/* ELITE WHITE-PURPLE DESIGN SYSTEM - NAMESPACE .lib- */
.lib-wrapper {
  margin-left: 20px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.lib-glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* HEADER */
.lib-header { display: flex; justify-content: space-between; align-items: center; padding: 24px 32px; }
.lib-title { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: 1px; background: linear-gradient(135deg, #fff, #c084fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-transform: uppercase; }
.lib-subtitle { margin: 4px 0 0; color: #a1a1aa; font-size: 14px; }
.lib-header-right { display: flex; gap: 16px; }
.lib-stat-chip { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,0.3); padding: 8px 16px; border-radius: 12px; font-size: 13px; font-weight: 600; border: 1px solid rgba(255,255,255,0.05); }
.lib-clickable { cursor: pointer; transition: all 0.3s; }
.lib-clickable:hover { background: rgba(255,255,255,0.1); transform: translateY(-2px); border-color: #c084fc; }

/* CONTROLS */
.lib-controls { display: flex; flex-wrap: wrap; gap: 16px; padding: 16px 24px; align-items: center; justify-content: space-between; }
.lib-search-box { display: flex; align-items: center; gap: 12px; background: rgba(0,0,0,0.4); padding: 10px 16px; border-radius: 12px; flex: 1; min-width: 250px; border: 1px solid rgba(255,255,255,0.1); transition: border-color 0.3s; }
.lib-search-box:focus-within { border-color: #c084fc; box-shadow: 0 0 10px rgba(168,85,247,0.2); }
.lib-search-box i { color: #a1a1aa; }
.lib-search-box input { background: transparent; border: none; color: #fff; width: 100%; outline: none; font-family: 'Inter'; font-size: 14px; }
.lib-filters { display: flex; gap: 12px; }
.lib-select { background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1); color: #e4e4e7; padding: 10px 16px; border-radius: 12px; outline: none; font-family: 'Inter'; font-size: 13px; cursor: pointer; }
.lib-select:focus { border-color: #06b6d4; }

/* RECOMMENDATIONS BANNER */
.lib-section-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; display: flex; align-items: center; gap: 8px; }
.lib-recs-container { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 16px; scroll-behavior: smooth; }
.lib-recs-container::-webkit-scrollbar { height: 6px; }
.lib-recs-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
.lib-rec-card { min-width: 340px; display: flex; gap: 16px; padding: 16px; border-radius: 12px; cursor: pointer; transition: all 0.3s; background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(0,0,0,0.2)); border: 1px solid rgba(255,255,255,0.05); }
.lib-rec-card:hover { transform: translateY(-4px); border-color: #06b6d4; }
.lib-rec-cover { width: 80px; height: 110px; border-radius: 6px; object-fit: cover; box-shadow: 0 4px 12px rgba(0,0,0,0.5); }
.lib-rec-info h3 { margin: 0 0 8px; font-size: 15px; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lib-rec-why { font-size: 12px; color: #a1a1aa; line-height: 1.4; background: rgba(239,83,80,0.1); padding: 8px; border-radius: 6px; border-left: 2px solid #ef5350; }

/* GRID & CARDS */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; animation: libFadeIn 0.4s; }
.lib-card { display: flex; flex-direction: column; cursor: pointer; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); perspective: 1000px; position: relative; }
.lib-card:hover .lib-card-cover-wrapper { transform: rotateY(-5deg) rotateX(5deg) scale(1.02); box-shadow: 10px 20px 30px rgba(0,0,0,0.6); }
.lib-card-cover-wrapper { width: 100%; aspect-ratio: 2/3; position: relative; border-radius: 12px; overflow: hidden; transition: all 0.4s; box-shadow: 0 8px 24px rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1); }
.lib-card-cover { width: 100%; height: 100%; object-fit: cover; }
.lib-card-type { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); border-radius: 50%; display: flex; justify-content: center; align-items: center; border: 1px solid rgba(255,255,255,0.2); font-size: 14px; }
.lib-card-premium { position: absolute; top: 12px; left: 12px; background: rgba(251,191,36,0.2); color: #fbbf24; padding: 4px 8px; border-radius: 6px; font-size: 10px; font-weight: 800; border: 1px solid #fbbf24; backdrop-filter: blur(4px); }
.lib-card-info { padding: 16px 4px 0; }
.lib-card-title { font-size: 15px; font-weight: 700; margin: 0 0 4px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lib-card-author { font-size: 12px; color: #a1a1aa; margin: 0 0 8px; }
.lib-card-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #a1a1aa; }
.lib-stars-small { color: #fbbf24; }

/* DRAWER */
.lib-drawer-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 1000; opacity: 0; pointer-events: none; transition: opacity 0.4s; }
.lib-drawer-overlay.active { opacity: 1; pointer-events: auto; }
.lib-drawer { position: fixed; top: 0; right: -700px; width: 700px; max-width: 100vw; height: 100vh; z-index: 1001; transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1); display: flex; flex-direction: column; background: rgba(10,10,15,0.95); border-left: 1px solid rgba(255,255,255,0.1); }
.lib-drawer.active { right: 0; }
.lib-drawer-close { position: absolute; top: 24px; right: 24px; background: rgba(255,255,255,0.1); border: none; color: #fff; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; z-index: 10; transition: background 0.3s; }
.lib-drawer-close:hover { background: #ef5350; }
.lib-drawer-content { padding: 48px 40px; overflow-y: auto; height: 100%; display: flex; flex-direction: column; gap: 32px; }

/* DRAWER HERO */
.lib-hero { display: flex; gap: 32px; }
.lib-hero-cover { width: 160px; height: 240px; border-radius: 12px; object-fit: cover; box-shadow: 0 12px 32px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1); }
.lib-hero-info { flex: 1; }
.lib-hero-title { font-size: 28px; font-weight: 800; margin: 0 0 8px; line-height: 1.2; }
.lib-hero-author { font-size: 16px; color: #a1a1aa; margin: 0 0 16px; }
.lib-hero-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.lib-tag { padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); }
.lib-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* BUTTONS */
.lib-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 8px; font-weight: 700; font-size: 13px; cursor: pointer; transition: all 0.3s; border: none; font-family: 'Inter'; text-transform: uppercase; letter-spacing: 0.5px; }
.lib-btn-primary { background: #a855f7; color: #fff; }
.lib-btn-primary:hover { background: #c084fc; box-shadow: 0 0 20px rgba(168,85,247,0.4); }
.lib-btn-outline { background: rgba(255,255,255,0.05); color: #fff; border: 1px solid rgba(255,255,255,0.2); }
.lib-btn-outline:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

/* TABS */
.lib-tabs-nav { display: flex; gap: 24px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 1px; }
.lib-tab-btn { background: transparent; border: none; color: #a1a1aa; font-size: 14px; font-weight: 600; padding: 12px 0; cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.3s; text-transform: uppercase; letter-spacing: 1px; }
.lib-tab-btn:hover { color: #fff; }
.lib-tab-btn.active { color: #c084fc; border-bottom-color: #c084fc; }
.lib-tab-pane { display: none; padding-top: 24px; animation: libFadeIn 0.3s; }
.lib-tab-pane.active { display: block; }

/* TAB CONTENT SPECIFICS */
.lib-desc { line-height: 1.6; color: #e4e4e7; font-size: 15px; white-space: pre-line; }
.lib-progress-bg { width: 100%; height: 8px; background: rgba(255,255,255,0.1); border-radius: 4px; margin: 16px 0; overflow: hidden; }
.lib-progress-fill { height: 100%; background: #06b6d4; border-radius: 4px; transition: width 0.4s ease; }

.lib-note-input-container { background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); padding: 16px; border-radius: 12px; margin-bottom: 24px; }
.lib-textarea { width: 100%; background: transparent; border: none; color: #fff; outline: none; font-family: 'Inter'; resize: vertical; line-height: 1.5; font-size: 14px; }
.lib-note-list { display: flex; flex-direction: column; gap: 16px; }
.lib-note-item { background: rgba(255,255,255,0.03); padding: 16px; border-radius: 8px; border-left: 3px solid #c084fc; }

.lib-apply-list { display: flex; flex-direction: column; gap: 12px; }
.lib-apply-card { display: flex; align-items: center; gap: 16px; padding: 16px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; cursor: pointer; transition: all 0.3s; }
.lib-apply-card:hover { border-color: #06b6d4; background: rgba(6,182,212,0.1); transform: translateX(4px); }
.lib-apply-icon { font-size: 24px; color: #06b6d4; }

/* MODALS */
.lib-modal { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); display: none; justify-content: center; align-items: center; z-index: 2000; }
.lib-modal.active { display: flex; animation: libFadeIn 0.3s forwards; }
.lib-modal-card { width: 100%; max-width: 500px; padding: 32px; position: relative; }
.lib-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.lib-btn-close { background: transparent; border: none; color: #a1a1aa; font-size: 24px; cursor: pointer; transition: color 0.3s; }
.lib-btn-close:hover { color: #ef5350; }
.lib-stars { display: flex; gap: 8px; font-size: 28px; cursor: pointer; color: #444; margin-top: 8px; }
.lib-star.active, .lib-star:hover { color: #fbbf24; }

@keyframes libFadeIn { from { opacity: 0; } to { opacity: 1; } }