/* ========================================
   ZEXFAM — Dashboard Styles
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --bg-primary: rgba(26, 8, 51, 0.4); /* #1a0833 */
  --bg-secondary: rgba(38, 17, 74, 0.5); /* #26114a */
  --bg-card: rgba(44, 22, 84, 0.6); /* #2c1654 */
  --bg-card-hover: rgba(57, 30, 107, 0.8); /* #391e6b */
  --bg-surface: rgba(32, 13, 61, 0.5); /* #200d3d */
  --bg-glass: rgba(81, 28, 143, 0.72);
  --bg-glass-light: rgba(255, 255, 255, 0.05);
  
  /* Claude Club Scene Colors */
  --scene-a: #ff6b3d;
  --scene-b: #ffb36b;
  --scene-c: #511c8f;
  
  --motion-speed: 13s;
  --px: 0px; --py: 0px; --back-x: 0px; --back-y: 0px;
  --signal-x: 0px; --signal-y: 0px;
  --spot-x: 50%; --spot-y: 50%; --mouse-x: 50%; --mouse-y: 50%;

  --accent-violet: #ff6b3d;
  --accent-violet-light: #ff8e6b;
  --accent-violet-glow: rgba(255, 107, 61, 0.35);
  --accent-cyan: #ffb36b;
  --accent-cyan-glow: rgba(255, 179, 107, 0.25);
  --accent-amber: #f59e0b;
  --accent-amber-glow: rgba(245, 158, 11, 0.25);
  --accent-rose: #511c8f;
  --accent-rose-glow: rgba(81, 28, 143, 0.25);
  --accent-blue: #3b82f6;
  --accent-blue-glow: rgba(59, 130, 246, 0.25);

  --text-primary: #fffaf2;
  --text-secondary: #d4c5e3;
  --text-muted: #9681b3;
  --text-inverse: #1a0833;

  --border-subtle: rgba(255, 250, 242, 0.1);
  --border-light: rgba(255, 250, 242, 0.2);
  --border-accent: rgba(255, 107, 61, 0.4);

  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-heading: 'Space Grotesk', var(--font-sans);
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --sidebar-width: 260px;
  --topbar-height: 64px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-sans); background: var(--bg-primary); color: var(--text-primary); line-height: 1.6; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

.text-gradient {
  background: linear-gradient(135deg, var(--accent-violet-light), var(--accent-cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ========================================
   DASHBOARD MOTION BACKGROUND
   ======================================== */
.dashboard-motion-bg {
  position: fixed; inset: 0; z-index: -10;
  background: var(--bg-primary);
  overflow: hidden; pointer-events: none;
  transition: background 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.motion-field, .motion-field::before, .motion-field::after {
  position: absolute; content: ""; will-change: transform; pointer-events: none;
}
.motion-field {
  inset: -30%; z-index: -3; border-radius: 42%;
  background: conic-gradient(from 30deg, var(--accent-violet), transparent 26%, var(--accent-cyan), transparent 56%, var(--accent-violet));
  filter: blur(54px); opacity: 0.2;
  transform: translate3d(var(--back-x), var(--back-y), 0);
  animation: cc-spin 30s linear infinite;
}
.motion-field::before {
  inset: 25%; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-cyan), transparent 66%);
  animation: cc-breathe 15s ease-in-out infinite alternate;
}
.motion-field::after {
  inset: 12%; border: 1px solid var(--border-subtle); border-radius: 48% 52% 62% 38%;
  animation: cc-orbit 15s linear infinite;
}
.motion-grid {
  position: absolute; inset: -45%; z-index: -2; opacity: 0.2;
  background-image: linear-gradient(var(--border-subtle) 1px, transparent 1px), linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: perspective(700px) rotateX(64deg) translateY(27%);
  animation: cc-drift 20s linear infinite;
}
.motion-spotlight {
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(circle 420px at var(--spot-x) var(--spot-y), var(--bg-glass-light), transparent 72%);
  transition: opacity 0.3s ease;
}
.motion-signal {
  position: absolute; right: 5%; bottom: 10%; display: grid; width: 200px; aspect-ratio: 1;
  place-items: center; border: 1px solid var(--border-subtle); border-radius: 50%;
  transform: translate3d(var(--signal-x), var(--signal-y), 0);
  animation: cc-orbit 20s linear infinite;
}
.motion-signal::before, .motion-signal::after { position: absolute; content: ""; border: inherit; border-radius: inherit; }
.motion-signal::before { inset: 18%; }
.motion-signal::after { inset: 38%; background: var(--accent-violet); filter: blur(15px); opacity: 0.3; border: none; }
.particles { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.particle {
  position: absolute; width: 3px; height: 3px; background: var(--accent-violet-light);
  border-radius: 50%; opacity: 0; animation: particle-float linear infinite;
}

@keyframes cc-spin { to { transform: translate3d(var(--back-x), var(--back-y), 0) rotate(360deg); } }
@keyframes cc-breathe { to { transform: scale(1.2) translate3d(8%, -6%, 0); } }
@keyframes cc-orbit { to { rotate: 360deg; } }
@keyframes cc-drift { to { background-position: 56px 56px; } }
@keyframes ripple-out { 0% { transform: scale(0); opacity: 0.5; } 100% { transform: scale(4); opacity: 0; } }
@keyframes particle-float { 0% { transform: translateY(0) translateX(0); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translateY(-120vh) translateX(40px); opacity: 0; } }

.click-ripple {
  position: fixed; width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-violet-light), transparent);
  pointer-events: none; animation: ripple-out 0.6s ease-out forwards; z-index: 9999;
}

/* ========================================
   Layout: Sidebar + Main
   ======================================== */

.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

/* — Sidebar — */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-subtle);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 50;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
}

.sidebar-logo .logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--accent-violet), var(--accent-cyan));
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px; color: white;
}

.sidebar-nav {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 16px 12px 6px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.sidebar-item:hover {
  background: var(--bg-glass-light);
  color: var(--text-primary);
}

.sidebar-item.active {
  background: var(--accent-violet);
  color: white;
  box-shadow: 0 2px 12px var(--accent-violet-glow);
}

.sidebar-item .icon {
  width: 20px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar-item .badge {
  margin-left: auto;
  background: var(--accent-rose);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.sidebar-profile {
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-profile-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-violet), var(--accent-cyan));
  display: grid; place-items: center;
  font-weight: 700; font-size: 14px;
}

.sidebar-profile-info {
  flex: 1; min-width: 0;
}

.sidebar-profile-name {
  font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.sidebar-profile-role {
  font-size: 11px; color: var(--text-muted);
}

/* — Main Content — */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

.topbar {
  height: var(--topbar-height);
  background: rgba(10, 15, 30, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 40;
  gap: 16px;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  flex: 1;
  max-width: 420px;
}

.topbar-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 13px;
  width: 100%;
}

.topbar-search input::placeholder { color: var(--text-muted); }

.topbar-search .search-icon {
  color: var(--text-muted);
  font-size: 14px;
  flex-shrink: 0;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  position: relative;
}

.topbar-btn:hover {
  background: var(--bg-glass-light);
  color: var(--text-primary);
}

.topbar-btn .notif-dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 7px; height: 7px;
  background: var(--accent-rose);
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
}

.mobile-sidebar-toggle {
  display: none;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  align-items: center; justify-content: center;
  color: var(--text-primary);
}

.page-content {
  padding: 28px;
  animation: pageIn 0.35s ease;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   Dashboard Home
   ======================================== */

.welcome-banner {
  margin-bottom: 24px;
}

.welcome-date {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.welcome-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-light);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.stat-card .stat-icon {
  font-size: 20px;
  margin-bottom: 12px;
}

.stat-card .stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.stat-card .stat-value {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat-card .stat-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-card.streak::before { background: var(--accent-amber); }
.stat-card.streak .stat-value { color: var(--accent-amber); }

.stat-card.tasks::before { background: var(--accent-cyan); }
.stat-card.tasks .stat-value { color: var(--accent-cyan); }

.stat-card.xp::before { background: var(--accent-violet); }
.stat-card.xp .stat-value { color: var(--accent-violet-light); }

.stat-card.focus::before { background: var(--accent-blue); }
.stat-card.focus .stat-value { color: var(--accent-blue); }

/* Dashboard grid */
.dash-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color 0.2s ease;
}

.dash-card:hover {
  border-color: var(--border-light);
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.dash-card-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-card-link {
  font-size: 12px;
  color: var(--accent-violet-light);
  font-weight: 500;
  transition: color 0.15s;
}

.dash-card-link:hover { color: var(--accent-violet); }

/* Task list */
.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.task-item:last-child { border-bottom: none; }

.task-check {
  width: 20px; height: 20px;
  border: 2px solid var(--border-light);
  border-radius: 50%;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  display: grid; place-items: center;
}

.task-check:hover { border-color: var(--accent-violet); }

.task-check.done {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.task-check.done::after {
  content: '✓';
  font-size: 11px;
  color: white;
  font-weight: 700;
}

.task-info { flex: 1; min-width: 0; }

.task-name {
  font-size: 14px;
  font-weight: 500;
}

.task-name.done { text-decoration: line-through; color: var(--text-muted); }

.task-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-due {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.task-due.urgent { background: rgba(244,63,94,0.12); color: var(--accent-rose); }
.task-due.soon { background: rgba(245,158,11,0.12); color: var(--accent-amber); }
.task-due.later { background: rgba(6,214,160,0.12); color: var(--accent-cyan); }

/* Schedule */
.schedule-item {
  display: flex;
  gap: 14px;
  padding: 10px 0;
}

.schedule-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  min-width: 65px;
  padding-top: 2px;
}

.schedule-bar {
  width: 3px;
  border-radius: 2px;
  flex-shrink: 0;
}

.schedule-details {
  flex: 1;
}

.schedule-name {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
}

.schedule-location {
  font-size: 12px;
  color: var(--text-muted);
}

/* AI Quick Actions */
.ai-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ai-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-action-btn:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.ai-action-btn .action-icon {
  font-size: 18px;
}

/* ========================================
   AI Radar Page
   ======================================== */

.page-header {
  margin-bottom: 24px;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}

.page-desc {
  font-size: 14px;
  color: var(--text-secondary);
}

.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-tab:hover { border-color: var(--border-light); color: var(--text-primary); }
.filter-tab.active { background: var(--accent-violet); color: white; border-color: var(--accent-violet); }

.featured-banner {
  background: linear-gradient(135deg, var(--bg-card), rgba(124,58,237,0.08));
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.featured-icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  background: var(--accent-violet);
  display: grid; place-items: center;
  font-size: 28px;
  flex-shrink: 0;
}

.featured-content h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.featured-content p {
  font-size: 13px;
  color: var(--text-secondary);
}

.featured-badge {
  background: var(--accent-amber);
  color: var(--text-inverse);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-left: auto;
  white-space: nowrap;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.tool-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.tool-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.tool-card-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-md);
  display: grid; place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}

.tool-card-name {
  font-weight: 600;
  font-size: 15px;
}

.tool-card-cat {
  font-size: 11px;
  color: var(--text-muted);
}

.tool-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tool-card-tag {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-weight: 600;
}

.tool-card-link {
  font-size: 12px;
  color: var(--accent-violet-light);
  font-weight: 500;
}

/* ========================================
   Study Hub Page
   ======================================== */

.upload-zone {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  margin-bottom: 24px;
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--accent-violet);
  background: rgba(124,58,237,0.04);
}

.upload-zone .upload-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.upload-zone h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.upload-zone p {
  font-size: 14px;
  color: var(--text-muted);
}

.study-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 20px;
  border: 1px solid var(--border-subtle);
}

.study-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.study-tab:hover { color: var(--text-primary); }

.study-tab.active {
  background: var(--accent-violet);
  color: white;
}

.study-output {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  min-height: 200px;
}

.study-output .loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.study-output .loading .spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-violet);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.study-output .result-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.study-output .result-text h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 16px 0 8px;
}

.study-output .result-text ul {
  padding-left: 20px;
}

.study-output .result-text li {
  list-style: disc;
  margin-bottom: 6px;
}

/* Flashcards */
.flashcards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.flashcard {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  min-height: 160px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.flashcard:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.flashcard .fc-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-violet-light);
  margin-bottom: 12px;
}

.flashcard .fc-text {
  font-size: 15px;
  line-height: 1.6;
}

.flashcard .fc-answer {
  display: none;
  font-size: 14px;
  color: var(--accent-cyan);
  line-height: 1.6;
}

.flashcard.flipped .fc-text { display: none; }
.flashcard.flipped .fc-answer { display: block; }
.flashcard.flipped .fc-label { color: var(--accent-cyan); }

/* Quiz */
.quiz-question {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}

.quiz-question h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quiz-option:hover {
  border-color: var(--border-light);
  background: var(--bg-glass-light);
}

.quiz-option.selected {
  border-color: var(--accent-violet);
  background: rgba(124,58,237,0.08);
}

.quiz-option .option-dot {
  width: 18px; height: 18px;
  border: 2px solid var(--border-light);
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.15s;
}

.quiz-option.selected .option-dot {
  border-color: var(--accent-violet);
  background: var(--accent-violet);
  box-shadow: inset 0 0 0 3px var(--bg-surface);
}

/* ========================================
   Skill Builder Page
   ======================================== */

.skill-paths-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.skill-path-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.2s ease;
}

.skill-path-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.skill-path-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.skill-path-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: grid; place-items: center;
  font-size: 24px;
}

.skill-path-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
}

.skill-path-level {
  font-size: 12px;
  color: var(--text-muted);
}

.skill-progress {
  margin-bottom: 14px;
}

.skill-progress-bar {
  height: 6px;
  background: var(--bg-surface);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.skill-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s ease;
}

.skill-progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.skill-path-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.skill-xp {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-amber);
}

.skill-continue-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-violet-light);
  padding: 6px 14px;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-pill);
  transition: all 0.15s;
}

.skill-continue-btn:hover {
  background: var(--accent-violet);
  color: white;
  border-color: var(--accent-violet);
}

/* ========================================
   Career Hub Page
   ======================================== */

.career-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
}

.internship-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.15s ease;
}

.internship-card:hover {
  border-color: var(--border-light);
}

.intern-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.intern-company-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  font-size: 18px;
  background: var(--bg-card);
}

.intern-title {
  font-size: 15px;
  font-weight: 600;
}

.intern-company {
  font-size: 12px;
  color: var(--text-muted);
}

.intern-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.intern-tag {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-glass-light);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.resume-card {
  text-align: center;
  padding: 32px 20px;
}

.resume-score {
  position: relative;
  width: 120px; height: 120px;
  margin: 0 auto 16px;
}

.resume-score svg {
  transform: rotate(-90deg);
}

.resume-score-value {
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-cyan);
}

/* ========================================
   English Lab Page
   ======================================== */

.chat-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 500px;
}

.chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-rose), var(--accent-amber));
  display: grid; place-items: center;
  font-size: 18px;
}

.chat-name {
  font-weight: 600;
  font-size: 14px;
}

.chat-status {
  font-size: 11px;
  color: var(--accent-cyan);
  display: flex; align-items: center; gap: 4px;
}

.chat-status::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-msg {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.6;
}

.chat-msg.ai {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-msg.user {
  background: var(--accent-violet);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-input-bar {
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 10px;
}

.chat-input {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

.chat-input:focus { border-color: var(--accent-violet); }
.chat-input::placeholder { color: var(--text-muted); }

.chat-send-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--accent-violet);
  color: white;
  display: grid; place-items: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.chat-send-btn:hover {
  background: var(--accent-violet-light);
  transform: scale(1.05);
}

.scenario-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.scenario-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.scenario-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.scenario-card .sc-icon { font-size: 28px; margin-bottom: 8px; }
.scenario-card .sc-name { font-size: 13px; font-weight: 600; }

/* ========================================
   My Campus Page
   ======================================== */

.campus-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.todo-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.todo-input {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}

.todo-input:focus { border-color: var(--accent-violet); }
.todo-input::placeholder { color: var(--text-muted); }

.todo-add-btn {
  padding: 10px 20px;
  background: var(--accent-violet);
  color: white;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
}

.todo-add-btn:hover { background: var(--accent-violet-light); }

/* Streak Calendar */
.streak-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.streak-day {
  aspect-ratio: 1;
  border-radius: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: all 0.15s;
}

.streak-day.level-1 { background: rgba(124,58,237,0.15); }
.streak-day.level-2 { background: rgba(124,58,237,0.3); }
.streak-day.level-3 { background: rgba(124,58,237,0.5); }
.streak-day.level-4 { background: var(--accent-violet); }

.streak-day-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Goal rings */
.goals-grid {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.goal-ring {
  text-align: center;
  flex: 1;
  min-width: 80px;
}

.goal-ring svg {
  width: 64px; height: 64px;
  margin: 0 auto 8px;
}

.goal-ring .ring-bg {
  fill: none;
  stroke: var(--bg-surface);
  stroke-width: 4;
}

.goal-ring .ring-fill {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease;
}

.goal-ring .goal-label {
  font-size: 11px;
  color: var(--text-muted);
}

.goal-ring .goal-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}

/* Countdown cards */
.deadline-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.deadline-card:last-child { border-bottom: none; }

.deadline-days {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.deadline-info { flex: 1; }
.deadline-name { font-size: 14px; font-weight: 500; }
.deadline-date { font-size: 12px; color: var(--text-muted); }

/* ========================================
   Shared Button
   ======================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; font-weight: 600; font-size: 14px; border-radius: var(--radius-pill);
  padding: 10px 22px; transition: all 0.2s ease; white-space: nowrap;
}

.btn-primary {
  background: var(--accent-violet); color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 24px var(--accent-violet-glow);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1024px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .career-grid { grid-template-columns: 1fr; }
  .campus-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 45;
  }

  .sidebar-overlay.show {
    display: block;
  }

  .main-content {
    margin-left: 0;
  }

  .mobile-sidebar-toggle {
    display: flex;
  }

  .stats-row { grid-template-columns: 1fr 1fr; }
  .ai-actions-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .skill-paths-grid { grid-template-columns: 1fr; }
  .scenario-cards { grid-template-columns: 1fr 1fr; }

  .page-content { padding: 20px 16px; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr; }
  .scenario-cards { grid-template-columns: 1fr; }
  .featured-banner { flex-direction: column; text-align: center; }
  .featured-badge { margin-left: 0; }
}
