/* ================================================================
   CU ACADEMY — academy.css
   Complete design system for the learning platform
   ================================================================ */

/* ── TOKENS ─────────────────────────────────────────────────────── */
:root {
  --bg:           #0d0d0d;
  --bg-2:         #111111;
  --bg-3:         #161616;
  --surface:      #1a1a1a;
  --surface-2:    #222222;
  --border:       #2a2a2a;
  --border-2:     #333333;
  --text:         #f0f0ee;
  --text-muted:   #888880;
  --text-dim:     #555550;
  --accent:       #9b5dff;
  --accent-2:     #c084fc;
  --accent-glow:  rgba(155,93,255,.25);
  --green:        #22c55e;
  --green-glow:   rgba(34,197,94,.2);
  --gold:         #f0c040;
  --red:          #ef4444;
  --blue:         #3b82f6;

  --font-head:    'Syne', sans-serif;
  --font-body:    'Space Grotesk', sans-serif;
  --font-mono:    'DM Mono', monospace;

  --r:    12px;
  --r-sm: 6px;
  --ease: cubic-bezier(.16,1,.3,1);
  --dur:  .4s;

  /* Academy specific */
  --nav-h:     60px;
  --sidebar-w: 280px;
}

[data-theme="light"] {
  --bg:          #f4f4f2;
  --bg-2:        #eaeae7;
  --bg-3:        #e0e0dc;
  --surface:     #ffffff;
  --surface-2:   #f8f8f5;
  --border:      #dcdcd5;
  --border-2:    #c8c8c0;
  --text:        #0d0d0d;
  --text-muted:  #555550;
  --text-dim:    #aaaaaa;
  --accent:      #7c3aed;
  --accent-2:    #9b5dff;
  --accent-glow: rgba(124,58,237,.15);
}

/* ── RESET ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background .4s var(--ease), color .4s var(--ease);
}
a  { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }

/* ── ACADEMY TOP NAV ─────────────────────────────────────────────── */
.ac-nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 20px;
  z-index: 1000;
  transition: background .3s;
}
.ac-nav__logo {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 800; font-size: .95rem;
  color: var(--text); flex-shrink: 0;
}
.ac-nav__logo .logo-mark { color: var(--accent); }
.academy-chip {
  font-family: var(--font-mono); font-size: .6rem; font-weight: 600;
  background: var(--accent); color: #fff;
  padding: 2px 7px; border-radius: 99px;
}
/* Search */
.ac-nav__search {
  flex: 1; max-width: 480px; position: relative;
}
.ac-nav__search input {
  width: 100%; padding: 9px 16px 9px 38px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 99px; font-family: var(--font-body); font-size: .875rem;
  color: var(--text); outline: none; transition: border-color .25s;
}
.ac-nav__search input:focus { border-color: var(--accent); }
.ac-nav__search::before {
  content: '🔍'; position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%); font-size: .8rem;
  pointer-events: none;
}
/* Nav tabs */
.ac-nav__tabs {
  display: flex; align-items: center; gap: 2px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 3px;
}
.ac-tab {
  padding: 7px 14px; border-radius: 5px;
  font-family: var(--font-body); font-size: .82rem; font-weight: 600;
  color: var(--text-muted);
  transition: all .2s; white-space: nowrap;
}
.ac-tab:hover { color: var(--text); background: var(--bg-2); }
.ac-tab.active { background: var(--accent); color: #fff; }
/* Right actions */
.ac-nav__right {
  display: flex; align-items: center; gap: 12px; margin-left: auto;
}
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; position: relative;
  transition: border-color .25s, color .25s;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.notif-dot {
  position: absolute; top: -3px; right: -3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--red); color: #fff;
  font-size: .6rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
}
.avatar-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-family: var(--font-head); font-weight: 800; font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--border); cursor: pointer;
  transition: border-color .25s;
}
.avatar-btn:hover { border-color: var(--accent); }
/* Theme toggle */
.theme-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border-2);
  color: var(--text-muted); font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .25s, color .25s;
}
.theme-btn:hover { border-color: var(--accent); color: var(--accent); }
.t-icon { transition: opacity .3s; }
.sun  { display: none; }
[data-theme="light"] .sun  { display: block; }
[data-theme="light"] .moon { display: none; }

/* Logout btn */
.logout-btn {
  font-family: var(--font-mono); font-size: .72rem; font-weight: 600;
  color: var(--text-dim); padding: 6px 12px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  transition: all .2s;
}
.logout-btn:hover { border-color: var(--red); color: var(--red); }

/* ── PAGE LAYOUT ─────────────────────────────────────────────────── */
.ac-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr 280px;
  gap: 0;
  margin-top: var(--nav-h);
  min-height: calc(100vh - var(--nav-h));
}
.ac-layout.no-right { grid-template-columns: var(--sidebar-w) 1fr; }
.ac-layout.full-width { grid-template-columns: 1fr; }

/* MAIN CONTENT */
.ac-main {
  padding: 24px;
  overflow-y: auto;
  max-width: 100%;
}

/* ── LEFT SIDEBAR ─────────────────────────────────────────────────── */
.ac-sidebar {
  border-right: 1px solid var(--border);
  padding: 20px 16px;
  position: sticky; top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
}
.ac-sidebar::-webkit-scrollbar { width: 4px; }
.ac-sidebar::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 99px; }

/* Course sidebar */
.course-prog-header { margin-bottom: 20px; }
.course-prog-header h3 {
  font-family: var(--font-head); font-size: .95rem; font-weight: 800;
  margin-bottom: 8px; line-height: 1.3;
}
.prog-bar {
  height: 6px; background: var(--border); border-radius: 99px;
  overflow: hidden; margin-bottom: 4px;
}
.prog-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--green));
  transition: width 1s var(--ease);
}
.prog-pct {
  font-family: var(--font-mono); font-size: .72rem;
  color: var(--accent); font-weight: 500;
}

/* Chapter accordion */
.chapter-list { display: flex; flex-direction: column; gap: 4px; }
.chapter-item {}
.chapter-toggle {
  width: 100%; padding: 10px 12px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--font-body); font-size: .85rem; font-weight: 600;
  color: var(--text); text-align: left;
  transition: border-color .2s, background .2s;
}
.chapter-toggle:hover { border-color: var(--accent); }
.chapter-toggle.active { border-color: var(--accent); background: var(--accent-glow); }
.chapter-arrow { transition: transform .3s; font-size: .7rem; color: var(--text-muted); }
.chapter-toggle.open .chapter-arrow { transform: rotate(180deg); }
.chapter-lessons {
  margin-top: 3px; display: none; flex-direction: column; gap: 2px;
  padding-left: 8px;
}
.chapter-lessons.open { display: flex; }
.lesson-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: var(--r-sm);
  font-size: .82rem; color: var(--text-muted);
  cursor: pointer; transition: all .2s;
  border: 1px solid transparent;
}
.lesson-item:hover { background: var(--surface); color: var(--text); border-color: var(--border); }
.lesson-item.active { background: var(--accent-glow); color: var(--accent); border-color: var(--accent); }
.lesson-item.done  { color: var(--green); }
.lesson-check { font-size: .7rem; flex-shrink: 0; }
.lesson-dur { margin-left: auto; font-family: var(--font-mono); font-size: .68rem; color: var(--text-dim); }

/* ── RIGHT SIDEBAR ────────────────────────────────────────────────── */
.ac-right {
  border-left: 1px solid var(--border);
  padding: 20px 16px;
  position: sticky; top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
}
.ac-right::-webkit-scrollbar { width: 4px; }
.ac-right::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 99px; }

/* Community card */
.comm-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden; margin-bottom: 16px;
}
.comm-card__img {
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; position: relative;
}
.comm-card__body { padding: 14px; }
.comm-card__body h3 { font-family: var(--font-head); font-size: .95rem; font-weight: 800; margin-bottom: 2px; }
.comm-card__body .url { font-family: var(--font-mono); font-size: .7rem; color: var(--accent); margin-bottom: 10px; }
.comm-card__body .desc { font-size: .8rem; color: var(--text-muted); margin-bottom: 12px; }
.comm-stats { display: flex; gap: 16px; padding: 10px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.cs-item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cs-num { font-family: var(--font-head); font-size: 1.1rem; font-weight: 800; }
.cs-lbl { font-family: var(--font-mono); font-size: .65rem; color: var(--text-dim); text-transform: uppercase; }
.btn-settings {
  width: 100%; padding: 8px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  font-family: var(--font-mono); font-size: .72rem; font-weight: 600;
  color: var(--text-muted); letter-spacing: .08em;
  transition: all .2s;
}
.btn-settings:hover { border-color: var(--accent); color: var(--accent); }

/* Admin avatars */
.admin-row { display: flex; gap: -6px; flex-wrap: wrap; margin-bottom: 12px; }
.admin-av {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 2px solid var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-size: .65rem; font-weight: 800; color: #fff;
  margin-left: -8px;
}
.admin-av:first-child { margin-left: 0; }

/* Leaderboard widget */
.lb-widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 14px; }
.lb-widget h4 { font-family: var(--font-head); font-size: .9rem; font-weight: 800; margin-bottom: 12px; }
.lb-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: .82rem;
}
.lb-item:last-child { border-bottom: none; }
.lb-rank {
  font-family: var(--font-mono); font-size: .75rem; font-weight: 700;
  width: 20px; text-align: center;
}
.lb-rank.gold   { color: var(--gold); }
.lb-rank.silver { color: #c0c0c0; }
.lb-rank.bronze { color: #cd7f32; }
.lb-av {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #444, #666);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.lb-name { flex: 1; font-weight: 600; }
.lb-pts { font-family: var(--font-mono); font-size: .72rem; color: var(--accent); }

/* ── COMMUNITY FEED ──────────────────────────────────────────────── */
.feed-compose {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 16px;
  display: flex; gap: 12px; align-items: center;
  margin-bottom: 20px;
  cursor: pointer; transition: border-color .25s;
}
.feed-compose:hover { border-color: var(--accent); }
.feed-compose input {
  flex: 1; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 99px; padding: 10px 20px;
  font-family: var(--font-body); font-size: .9rem;
  color: var(--text-muted); outline: none; cursor: pointer;
}
.feed-compose input:focus { border-color: var(--accent); color: var(--text); cursor: text; }

/* Filter bar */
.filter-bar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px;
}
.filter-all {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--text); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-size: .75rem; font-weight: 800;
  flex-shrink: 0;
}
.filter-chip {
  padding: 8px 16px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: .82rem; font-weight: 600; color: var(--text-muted);
  cursor: pointer; transition: all .2s;
}
.filter-chip:hover, .filter-chip.active { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.filter-settings {
  margin-left: auto;
  width: 34px; height: 34px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; cursor: pointer; transition: border-color .25s;
}
.filter-settings:hover { border-color: var(--accent); }

/* Post card */
.post-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px;
  margin-bottom: 16px;
  transition: border-color .3s, transform .3s;
  animation: fadeUp .4s var(--ease) both;
}
@keyframes fadeUp { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:none} }
.post-card:hover { border-color: var(--border-2); }
.post-card.pinned { border-color: var(--gold) !important; }
.post-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.post-av {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #444, #666);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-size: .9rem; font-weight: 800;
  color: #fff; flex-shrink: 0; position: relative;
}
.post-av .lv {
  position: absolute; bottom: -4px; right: -4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--surface);
  font-size: .55rem; font-weight: 800; color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.post-meta { flex: 1; }
.post-meta .name { font-weight: 700; font-size: .9rem; }
.post-meta .date { font-family: var(--font-mono); font-size: .72rem; color: var(--text-muted); }
.post-pin {
  font-family: var(--font-mono); font-size: .7rem; font-weight: 600;
  color: var(--gold); display: flex; align-items: center; gap: 4px;
}
.post-title { font-family: var(--font-head); font-size: 1rem; font-weight: 800; margin-bottom: 8px; cursor: pointer; }
.post-title:hover { color: var(--accent); }
.post-body { font-size: .875rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 16px; }
.post-actions {
  display: flex; align-items: center; gap: 16px;
  padding-top: 12px; border-top: 1px solid var(--border);
}
.post-action {
  display: flex; align-items: center; gap: 6px;
  font-size: .82rem; color: var(--text-muted);
  cursor: pointer; transition: color .2s; padding: 4px 8px;
  border-radius: var(--r-sm);
}
.post-action:hover { color: var(--accent); background: var(--accent-glow); }
.post-action.liked { color: var(--red); }
.post-action.liked:hover { color: var(--red); background: rgba(239,68,68,.1); }
.new-comment-badge {
  margin-left: auto;
  font-family: var(--font-mono); font-size: .7rem; font-weight: 600;
  color: var(--accent); background: var(--accent-glow);
  padding: 4px 10px; border-radius: 99px;
}
.post-contributors { display: flex; }
.cont-av {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, #333, #555);
  border: 2px solid var(--surface);
  margin-left: -6px;
}
.cont-av:first-child { margin-left: 0; }

/* Write Post Modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7); backdrop-filter: blur(8px);
  z-index: 2000; display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: all .3s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 28px;
  width: 600px; max-width: 90vw;
  transform: translateY(20px); transition: transform .3s var(--ease);
}
.modal-overlay.open .modal-box { transform: none; }
.modal-box h3 { font-family: var(--font-head); font-size: 1.1rem; font-weight: 800; margin-bottom: 16px; }
.modal-box input, .modal-box textarea, .modal-box select {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 12px 16px;
  font-family: var(--font-body); font-size: .9rem; color: var(--text);
  outline: none; margin-bottom: 12px; transition: border-color .25s;
}
.modal-box input:focus, .modal-box textarea:focus, .modal-box select:focus { border-color: var(--accent); }
.modal-box textarea { resize: vertical; min-height: 120px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.btn-cancel {
  padding: 10px 20px; border-radius: var(--r-sm);
  border: 1px solid var(--border); color: var(--text-muted);
  font-weight: 600; font-size: .875rem;
  transition: all .2s;
}
.btn-cancel:hover { border-color: var(--red); color: var(--red); }
.btn-post {
  padding: 10px 24px; border-radius: var(--r-sm);
  background: var(--accent); color: #fff;
  font-weight: 700; font-size: .875rem;
  transition: all .2s;
}
.btn-post:hover { background: var(--accent-2); }

/* ── CLASSROOM ────────────────────────────────────────────────────── */
.classroom-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.course-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
  cursor: pointer; transition: all .3s var(--ease);
}
.course-card:hover { transform: translateY(-4px); box-shadow: 0 16px 48px rgba(0,0,0,.3); border-color: var(--accent); }
.course-thumb {
  aspect-ratio: 16/9; position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.course-thumb-bg {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
}
.lock-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.65);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px;
}
.lock-icon { font-size: 2rem; opacity: .8; }
.lock-label {
  font-family: var(--font-mono); font-size: .72rem; font-weight: 600;
  color: rgba(255,255,255,.7); letter-spacing: .1em;
}
.course-body { padding: 16px; }
.course-body h3 {
  font-family: var(--font-head); font-size: .95rem; font-weight: 800;
  margin-bottom: 6px; line-height: 1.3;
}
.course-meta {
  font-family: var(--font-mono); font-size: .72rem; color: var(--text-dim);
  margin-bottom: 12px;
}
.course-progress { }
.cp-bar { height: 4px; background: var(--border); border-radius: 99px; overflow: hidden; }
.cp-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--green)); }
.cp-pct { font-family: var(--font-mono); font-size: .7rem; color: var(--text-dim); margin-top: 4px; }
.course-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono); font-size: .65rem; font-weight: 600;
  padding: 3px 8px; border-radius: 99px; margin-bottom: 8px;
}
.badge-free { background: rgba(34,197,94,.15); color: var(--green); }
.badge-paid { background: rgba(155,93,255,.15); color: var(--accent); }
.badge-new  { background: rgba(59,130,246,.15); color: var(--blue); }

/* ── COURSE PLAYER ────────────────────────────────────────────────── */
.player-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: 0;
  margin-top: var(--nav-h);
  min-height: calc(100vh - var(--nav-h));
}
.player-sidebar {
  border-right: 1px solid var(--border);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto; position: sticky; top: var(--nav-h);
}
.player-sidebar::-webkit-scrollbar { width: 4px; }
.player-sidebar::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 99px; }
.player-main { padding: 0; }
.video-area {
  background: #000;
  aspect-ratio: 16/9;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  max-height: 65vh;
}
.video-placeholder {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px; color: #fff;
}
.play-btn {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 2px solid rgba(255,255,255,.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #fff; cursor: pointer;
  transition: all .3s; backdrop-filter: blur(8px);
}
.play-btn:hover { background: var(--accent); border-color: var(--accent); transform: scale(1.1); }
.video-speed {
  position: absolute; bottom: 20px; right: 20px;
  background: rgba(0,0,0,.85); border-radius: var(--r-sm);
  padding: 8px 16px;
  display: flex; flex-direction: column; align-items: center;
  font-size: .8rem; color: #fff; gap: 2px;
}
.video-speed .spd { font-family: var(--font-head); font-size: 1.1rem; font-weight: 800; }
.video-meta { position: absolute; top: 16px; right: 16px; }
.done-check {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--green); display: flex; align-items: center;
  justify-content: center; font-size: 1rem; color: #fff;
}
.lesson-info { padding: 20px 24px; }
.lesson-info h2 {
  font-family: var(--font-head); font-size: 1.3rem; font-weight: 800;
  margin-bottom: 6px;
}
.lesson-info p { font-size: .9rem; color: var(--text-muted); }
.lesson-nav {
  display: flex; gap: 12px; margin-top: 16px;
  padding-top: 16px; border-top: 1px solid var(--border);
}
.btn-prev, .btn-next {
  padding: 10px 20px; border-radius: var(--r-sm);
  font-family: var(--font-body); font-weight: 600; font-size: .875rem;
  transition: all .2s;
}
.btn-prev {
  border: 1px solid var(--border); color: var(--text-muted);
  background: transparent;
}
.btn-prev:hover { border-color: var(--accent); color: var(--accent); }
.btn-next {
  background: var(--accent); color: #fff;
  border: none;
}
.btn-next:hover { background: var(--accent-2); }

/* ── ARTICLES / BLOG ──────────────────────────────────────────────── */
.article-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.article-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
  transition: all .3s;
}
.article-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.article-thumb {
  aspect-ratio: 16/9; background: var(--bg-3);
  display: flex; align-items: center; justify-content: center; font-size: 2.5rem;
}
.article-body { padding: 20px; }
.article-cat {
  font-family: var(--font-mono); font-size: .7rem; font-weight: 600;
  color: var(--accent); text-transform: uppercase; letter-spacing: .1em;
  margin-bottom: 8px; display: block;
}
.article-body h3 { font-family: var(--font-head); font-size: 1rem; font-weight: 800; margin-bottom: 8px; line-height: 1.3; }
.article-body p { font-size: .875rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 12px; }
.article-meta { font-family: var(--font-mono); font-size: .72rem; color: var(--text-dim); }
.read-more {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono); font-size: .78rem; font-weight: 600;
  color: var(--accent); margin-top: 10px;
  transition: gap .2s;
}
.article-card:hover .read-more { gap: 8px; }

/* ── SECTION HEADINGS ─────────────────────────────────────────────── */
.page-heading {
  margin-bottom: 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.page-heading h2 {
  font-family: var(--font-head); font-size: 1.4rem; font-weight: 800;
}
.page-heading p { font-size: .875rem; color: var(--text-muted); }

/* ── TOAST ────────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 12px 24px;
  font-size: .875rem; font-weight: 600;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  z-index: 9999; transition: transform .4s var(--ease), opacity .4s;
  opacity: 0;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { border-color: var(--green); color: var(--green); }
.toast.error   { border-color: var(--red); color: var(--red); }

/* ── RESPONSIVE ───────────────────────────────────────────────────── */
@media(max-width:1100px){
  .ac-layout { grid-template-columns: var(--sidebar-w) 1fr; }
  .ac-right { display: none; }
  .classroom-grid { grid-template-columns: repeat(2,1fr); }
}
@media(max-width:768px){
  :root { --sidebar-w: 0px; }
  .ac-layout { grid-template-columns: 1fr; }
  .ac-sidebar { display: none; }
  .ac-nav__tabs { display: none; }
  .classroom-grid { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: 1fr; }
  .player-layout { grid-template-columns: 1fr; }
  .player-sidebar { display: none; }
}
