/* ==========================================================================
   AuraAI Platform - Skyblue & Dark Blue Theme Custom CSS
   ========================================================================== */

/* 1. Global Reset & Custom Variables */
:root {
  /* Main Background - Soft Skyblue */
  --bg-base: #eaf7ff;
  
  /* Containers, Sidebar & Cards - Dark Blue Shades */
  --bg-surface: #0f172a;
  --bg-card: #15243d;
  --bg-card-hover: #213a5e;
  
  /* Borders & Glows */
  --border-color: rgba(255, 255, 255, 0.12);
  --border-glow: rgba(0, 180, 216, 0.4);

  /* Text Colors */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-dark: #f8fafc;

  /* Primary Accent - Skyblue Highlight */
  --accent-cyan: #00b4d8;
  --accent-skyblue: #38bdf8;
  --accent-purple: #7000ff;
  --accent-green: #10b981;
  --accent-gold: #f59e0b;
  --accent-danger: #ef4444;

  /* Gradients */
  --gradient-glow: linear-gradient(135deg, rgba(0, 180, 216, 0.25) 0%, rgba(10, 25, 47, 0.8) 100%);
  --gradient-btn: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body.dark-theme, body {
  background-color: var(--bg-base);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 180, 216, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 85% 85%, rgba(10, 25, 47, 0.12) 0%, transparent 50%);
  background-attachment: fixed;
}

.card, .metric-card, .chart-container {
  backdrop-filter: blur(10px);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: #0077b6;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #00b4d8;
}

/* ==========================================================================
   2. Keyframe Animations
   ========================================================================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 12px rgba(0, 180, 216, 0.3); }
  50% { box-shadow: 0 0 22px rgba(0, 180, 216, 0.6); }
  100% { box-shadow: 0 0 12px rgba(0, 180, 216, 0.3); }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0px); }
}

@keyframes navSubtlePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

/* ==========================================================================
   3. Auth Overlay Modal (Dark Blue Card)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 25, 47, 0.75);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.4s var(--transition-smooth);
  padding: 1rem;
}

.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glow);
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(10, 25, 47, 0.5);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-btn);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.brand-icon {
  font-size: 1.8rem;
  color: var(--accent-cyan);
  animation: float 4s ease-in-out infinite;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.8rem;
}

.auth-tabs {
  display: flex;
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

.auth-tabs button {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition-fast);
}

.auth-tabs button.active-tab {
  background: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 180, 216, 0.4);
}

.input-group {
  margin-bottom: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.input-group input {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  outline: none;
  transition: var(--transition-fast);
  width: 100%;
}

.input-group input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.25);
}

/* ==========================================================================
   4. Buttons & Dark Blue Cards
   ========================================================================== */
.btn {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--gradient-btn);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 180, 216, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 180, 216, 0.5);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
}

.btn-block {
  width: 100%;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: var(--accent-danger);
  color: #fff;
}

.btn-danger-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: var(--transition-fast);
  box-shadow: 0 12px 30px rgba(10, 25, 47, 0.25);
}

.card:hover {
  border-color: var(--accent-cyan);
}

/* ==========================================================================
   5. Sidebar Navigation (Dark Blue) & App Layout
   ========================================================================== */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.sidebar {
  width: 260px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-glow);
  padding: 1.8rem 1.2rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
  top: 0;
  left: 0;
  box-shadow: 5px 0 25px rgba(10, 25, 47, 0.3);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2.5rem;
  padding-left: 0.5rem;
}

.sidebar-brand i {
  color: var(--accent-cyan);
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: left;
  width: 100%;
}

.nav-item i {
  font-size: 1.1rem;
  width: 20px;
  color: var(--accent-cyan);
}

.nav-item:hover {
  color: var(--text-main);
  background: rgba(0, 180, 216, 0.12);
}

.nav-item.active {
  background: var(--gradient-glow);
  color: var(--accent-cyan);
  border: 1px solid var(--accent-cyan);
}

.user-profile-widget {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-top: auto;
}

.user-profile-widget img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.user-info span {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.user-info small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition-fast);
}

.icon-btn:hover {
  color: var(--accent-danger);
}

/* Content Area */
.content-area {
  margin-left: 260px;
  flex: 1;
  padding: 2.5rem 3rem;
  max-width: 1200px;
  width: calc(100% - 260px);
  min-width: 0;
  overflow-x: hidden;
}

.page-view {
  width: 100%;
}

.page-view {
  display: none;
  animation: fadeIn 0.4s var(--transition-smooth);
}

.page-view.active {
  display: block;
}

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
}

.page-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

/* ==========================================================================
   6. Dashboard Metrics & Dark Blue Box Cards
   ========================================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.metric-card {
  background: linear-gradient(145deg, rgba(17, 34, 64, 0.98), rgba(13, 24, 49, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.24);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 1.2rem;
  transition: var(--transition-fast);
  box-shadow: 0 16px 35px rgba(10, 25, 47, 0.28);
}

.metric-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cyan);
  box-shadow: 0 20px 40px rgba(0, 180, 216, 0.18);
}

.metric-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.icon-purple { background: rgba(112, 0, 255, 0.15); color: #a855f7; }
.icon-gold { background: rgba(245, 158, 11, 0.15); color: var(--accent-gold); }
.icon-green { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }

.metric-card h3 {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.metric-val {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}

.chart-container {
  background: linear-gradient(145deg, rgba(17, 34, 64, 0.98), rgba(13, 24, 49, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  box-shadow: 0 16px 35px rgba(10, 25, 47, 0.28);
}

.chart-container h3 {
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}

.chart-container canvas {
  max-height: 320px;
  width: 100% !important;
  height: 320px !important;
}

/* ==========================================================================
   7. Quiz Engine Styles
   ========================================================================== */
.quiz-container {
  max-width: 750px;
  margin: 0 auto;
  position: relative;
  width: 100%;
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  gap: 10px;
}

.quiz-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid transparent;
  transition: var(--transition-fast);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.25);
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.08);
  min-width: 110px;
}

.badge-danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.quiz-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-card);
  border-radius: 3px;
  margin-bottom: 2rem;
  overflow: hidden;
}

#quiz-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient-btn);
  transition: width 0.3s ease;
}

#question-text {
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 1.8rem;
}

.options-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 2rem;
}

.option-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  text-align: left;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-fast);
  width: 100%;
}

.option-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
}

.option-btn.selected {
  background: rgba(0, 180, 216, 0.2);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.quiz-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 1.2rem;
  gap: 15px;
}

#question-tracker {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ==========================================================================
   8. Notepad Module
   ========================================================================== */
.notepad-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  min-height: 500px;
}

.notes-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: 400px;
}

.note-item {
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: var(--transition-fast);
}

.note-item:hover, .note-item.active {
  border-color: var(--accent-cyan);
  background: var(--bg-card-hover);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px dashed rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-align: center;
  font-size: 0.9rem;
}

.empty-state i {
  font-size: 1.2rem;
  color: var(--accent-cyan);
}

.note-editor {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#note-title {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-color);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  padding-bottom: 8px;
  outline: none;
  width: 100%;
}

#note-title:focus {
  border-bottom-color: var(--accent-cyan);
}

#note-content {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1rem;
  line-height: 1.6;
  resize: none;
  flex: 1;
  min-height: 320px;
  outline: none;
  width: 100%;
}

.editor-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  gap: 10px;
}

#save-status {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ==========================================================================
   9. Free Books Hub
   ========================================================================== */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.book-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  transition: var(--transition-fast);
}

.book-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-cyan);
}

.book-icon {
  font-size: 2.2rem;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
}

.book-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.book-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   10. Settings & Danger Zone
   ========================================================================== */
.settings-container {
  max-width: 680px;
  width: 100%;
}

.avatar-upload-section {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.avatar-preview-frame {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--accent-cyan);
  background: var(--bg-card);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0, 180, 216, 0.18);
}

.avatar-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-dropzone {
  border: 2px dashed rgba(56, 189, 248, 0.4);
  background: rgba(0, 180, 216, 0.08);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  text-align: center;
  color: var(--text-muted);
  transition: var(--transition-fast);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.avatar-dropzone.drag-over {
  border-color: var(--accent-cyan);
  background: rgba(0, 180, 216, 0.16);
  transform: translateY(-2px);
}

.dropzone-icon {
  font-size: 1.4rem;
  color: var(--accent-cyan);
}

.avatar-dropzone p {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text-main);
}

.avatar-dropzone span {
  font-size: 0.84rem;
}

.divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 2rem 0;
}

.danger-zone h3 {
  color: var(--accent-danger);
  margin-bottom: 6px;
}

.danger-zone p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

/* ==========================================================================
   11. Roadmap UI Styles
   ========================================================================== */
.roadmap-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
  width: 100%;
}

.module-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(10, 25, 47, 0.3);
}

.module-card.current-module {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 25px rgba(0, 180, 216, 0.25);
  background: linear-gradient(180deg, #112240 0%, #0a192f 100%);
}

.module-card.locked-module {
  opacity: 0.6;
  filter: grayscale(0.3);
}

.module-header-zone {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  gap: 20px;
}

.module-info-wrapper {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
}

.module-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: rgba(0, 180, 216, 0.15);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: 1px solid rgba(0, 180, 216, 0.3);
  flex-shrink: 0;
}

.module-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.module-number {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 1px;
}

.badge-completed {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
}

.badge-in-progress {
  background: rgba(0, 180, 216, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 180, 216, 0.3);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
}

.module-title-group h3 {
  font-size: 1.25rem;
  margin: 2px 0 6px 0;
  color: var(--text-main);
}

.module-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0;
}

.module-action-zone {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.toggle-expand-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.toggle-expand-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.toggle-expand-btn i {
  transition: transform 0.3s ease;
}

.roadmap-steps-container {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.steps-heading-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 10px;
}

.steps-heading-bar h4 {
  font-size: 0.9rem;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.steps-count {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.roadmap-step-item {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 3px solid var(--accent-cyan);
  border-radius: var(--radius-sm);
  padding: 14px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.roadmap-step-item:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.step-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
}

.step-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(0, 180, 216, 0.15);
  color: var(--accent-cyan);
  padding: 3px 8px;
  border-radius: 4px;
}

.step-index {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
}

.step-content h4 {
  font-size: 0.92rem;
  margin: 0 0 6px 0;
  color: var(--text-main);
}

.step-content p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
}

/* ==========================================================================
   12. Responsive Breakpoints (NO SLIDING SCROLLBAR NAV BAR)
   ========================================================================== */

/* Tablet & Mobile Screens (<= 1024px) */
@media screen and (max-width: 1024px) {
  .app-layout {
    flex-direction: column;
  }

  /* Sticky Top Bar - Dark Blue Theme */
  .sidebar {
    width: 100%;
    height: auto;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.8rem 1rem;
    background: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(12px);
    border-right: none;
    border-bottom: 1px solid var(--border-glow);
    box-shadow: 0 4px 20px rgba(10, 25, 47, 0.4);
  }

  .sidebar-brand {
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
  }

  /* Grid layout replaces sliding scrollbar completely */
  .nav-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    gap: 6px;
    overflow-x: hidden; /* Sliding scrollbar disabled */
    padding-bottom: 0;
  }

  .nav-item {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8px 4px;
    font-size: 0.72rem;
    gap: 4px;
    text-align: center;
    width: 100%;
    border-radius: var(--radius-sm);
  }

  .nav-item i {
    font-size: 1.2rem;
    width: auto;
  }

  /* Active Menu Pulse Animation */
  .nav-item.active {
    animation: navSubtlePulse 2.5s infinite ease-in-out;
  }

  .user-profile-widget {
    display: none; /* Hide profile widget on small screens to keep nav compact */
  }

  .content-area {
    margin-left: 0;
    width: 100%;
    padding: 2rem 1.5rem;
  }
}

/* Medium Mobile Devices (<= 768px) */
@media screen and (max-width: 768px) {
  .avatar-upload-section {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .avatar-dropzone {
    width: 100%;
  }

  .notepad-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .notes-sidebar {
    max-height: 200px;
  }

  .notes-list {
    max-height: 150px;
  }

  .module-header-zone {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .module-action-zone {
    width: 100%;
    justify-content: flex-end;
  }

  .page-header h1 {
    font-size: 1.6rem;
  }

  .auth-card {
    padding: 1.8rem;
  }

  .quiz-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .quiz-footer .btn {
    width: 100%;
  }

  .editor-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .editor-actions .btn {
    width: 100%;
  }
}

/* Small Phones (<= 480px) */
@media screen and (max-width: 480px) {
  .content-area {
    padding: 1.2rem 1rem;
  }

  .settings-container {
    padding: 1.1rem;
  }

  .avatar-preview-frame {
    width: 100px;
    height: 100px;
  }

  .avatar-dropzone {
    padding: 1rem;
  }

  .avatar-dropzone .btn {
    width: 100%;
  }

  .content-area {
    padding: 1.2rem 1rem;
  }

  .module-card {
    padding: 16px;
  }

  .module-info-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .steps-grid,
  .books-grid,
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 1.5rem 1.2rem;
  }

  .btn {
    padding: 10px 16px;
    font-size: 0.9rem;
  }
}

/* ==========================================
   AI ENGINEERING LIBRARY
========================================== */

.library-controls {
    margin-bottom: 24px;
}

.library-search {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 13px 16px;
    margin-bottom: 18px;
}

.library-search i {
    color: #38bdf8;
}

.library-search input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 14px;
}

.library-search input::placeholder {
    color: #64748b;
}

.library-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.library-filter {
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
    color: #94a3b8;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: 0.2s ease;
}

.library-filter:hover {
    border-color: #38bdf8;
    color: #38bdf8;
}

.library-filter.active {
    background: #38bdf8;
    color: #020617;
    border-color: #38bdf8;
    font-weight: 700;
}


/* Library Stats */

.library-stats {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 16px;
    margin-bottom: 28px;
}

.library-stat {
    display: flex;
    align-items: center;
    gap: 14px;
}

.library-stat i {
    font-size: 22px;
    color: #38bdf8;
}

.library-stat strong {
    display: block;
    font-size: 18px;
    color: #fff;
}

.library-stat span {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-top: 3px;
}


/* Book Grid */

.books-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 20px;
}


/* Book Card */

.book-card {
    display: flex;
    flex-direction: column;
    min-height: 330px;
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.book-card:hover {
    transform: translateY(-6px);
    border-color: rgba(56,189,248,0.5);
    box-shadow:
        0 15px 40px rgba(0,0,0,0.3);
}

.book-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.book-icon {
    font-size: 32px;
    color: #38bdf8;
}

.book-badge {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.7px;
    color: #38bdf8;
    background: rgba(56,189,248,0.1);
    border: 1px solid rgba(56,189,248,0.2);
    padding: 5px 9px;
    border-radius: 999px;
}

.book-card h3 {
    color: white;
    font-size: 17px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.book-card p {
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.7;
    flex: 1;
}

.book-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #64748b;
    font-size: 11px;
    padding: 14px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 15px;
}

.book-card .btn {
    margin-top: auto;
}


/* No Results */

.no-books-found {
    text-align: center;
    padding: 70px 20px;
    color: #64748b;
}

.no-books-found i {
    font-size: 45px;
    color: #38bdf8;
    margin-bottom: 15px;
}

.no-books-found h3 {
    color: white;
    margin-bottom: 8px;
}


/* Responsive */

@media (max-width: 1100px) {

    .books-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .library-stats {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 650px) {

    .books-grid {
        grid-template-columns: 1fr;
    }

    .library-stats {
        grid-template-columns: 1fr;
    }

    .library-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 5px;
    }

    .library-filter {
        white-space: nowrap;
    }

}