/* ===== SHARED COURSE STYLES ===== */

/* ===== DAY AGENDA ===== */
.day-agenda {
  background: linear-gradient(135deg, rgba(79,70,229,0.08) 0%, rgba(6,182,212,0.06) 100%);
  border: 1px solid rgba(79,70,229,0.25);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin-bottom: 2rem;
}

.agenda-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(79,70,229,0.2);
}

.agenda-header h3 {
  margin: 0;
  color: var(--primary-light);
  font-size: 1rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.agenda-icon { font-size: 1.1rem; }

.agenda-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
}

.agenda-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.7rem;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.05);
  transition: background 0.15s;
}

.agenda-item:hover { background: rgba(79,70,229,0.12); }

.agenda-num {
  background: var(--primary);
  color: white;
  font-size: 0.68rem;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.agenda-topic {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.agenda-time {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--text-dim);
  white-space: nowrap;
}

:root {
  --primary: #4f46e5;
  --primary-light: #a5b4fc;
  --primary-dark: #3730a3;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --info: #06b6d4;
  --bg: #0f172a;
  --surface: #1e293b;
  --surface2: #273449;
  --border: #334155;
  --text: #e2e8f0;
  --text-muted: #b6c4d6;
  --text-dim: #94a3b8;
  --code-bg: #0d1117;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(0,0,0,0.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}

/* ===== LAYOUT ===== */
.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-header {
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.sidebar-header h2 {
  font-size: 1rem;
  color: var(--primary-light);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sidebar-header p {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 1.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}

.sidebar a:hover {
  background: var(--surface2);
  color: var(--text);
  border-left-color: var(--primary);
}

.sidebar a.active {
  background: rgba(79,70,229,0.15);
  color: var(--primary-light);
  border-left-color: var(--primary);
  font-weight: 600;
}

.sidebar .day-num {
  background: var(--surface2);
  color: var(--text-dim);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  min-width: 28px;
  text-align: center;
}

.sidebar a.active .day-num {
  background: var(--primary);
  color: white;
}

/* ===== MAIN CONTENT ===== */
.content {
  padding: 2.5rem 3rem;
  max-width: 1000px;
}

/* ===== TYPOGRAPHY ===== */
h1 { font-size: 2rem; color: var(--text); margin-bottom: 0.3rem; }
h2 { font-size: 1.4rem; color: var(--text); margin: 2.5rem 0 1rem; padding-bottom: 0.5rem;
     border-bottom: 2px solid var(--border); }
h3 { font-size: 1.1rem; color: var(--primary-light); margin: 1.5rem 0 0.6rem; }
h4 { font-size: 0.95rem; color: var(--accent); margin: 1rem 0 0.4rem; text-transform: uppercase; letter-spacing: 0.05em; }
p  { color: var(--text-muted); margin-bottom: 0.8rem; }
strong { color: var(--text); }

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.page-header .day-badge {
  display: inline-block;
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.page-header p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ===== OBJECTIVES ===== */
.objectives {
  background: rgba(79,70,229,0.08);
  border: 1px solid rgba(79,70,229,0.3);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin-bottom: 2rem;
}

.objectives h3 { margin-top: 0; color: var(--primary-light); }
.objectives ul { padding-left: 1.2rem; }
.objectives li { color: var(--text-muted); margin-bottom: 0.3rem; font-size: 0.95rem; }
.objectives li::marker { color: var(--primary-light); }

/* ===== CALLOUT BOXES ===== */
.callout {
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  border-left: 4px solid;
}

.callout-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.5rem;
}

.callout-label .icon { font-size: 1rem; }

.callout p { margin-bottom: 0; font-size: 0.95rem; }

.callout.realworld {
  background: rgba(16,185,129,0.07);
  border-color: var(--success);
}
.callout.realworld .callout-label { color: var(--success); }

.callout.memory {
  background: rgba(245,158,11,0.07);
  border-color: var(--accent);
}
.callout.memory .callout-label { color: var(--accent); }

.callout.tip {
  background: rgba(6,182,212,0.07);
  border-color: var(--info);
}
.callout.tip .callout-label { color: var(--info); }

.callout.warning {
  background: rgba(239,68,68,0.07);
  border-color: var(--danger);
}
.callout.warning .callout-label { color: var(--danger); }

.callout.story {
  background: rgba(79,70,229,0.07);
  border-color: var(--primary);
}
.callout.story .callout-label { color: var(--primary-light); }

/* ===== CODE BLOCKS ===== */
.code-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 1rem 0;
  overflow: hidden;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface2);
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
}

.code-lang {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.copy-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.copy-btn:hover { background: var(--surface); color: var(--text); }
.copy-btn.copied { color: var(--success); border-color: var(--success); }

pre {
  padding: 1.2rem 1.5rem;
  overflow-x: auto;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.7;
  font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}

code { color: #e2e8f0; }

/* Syntax colors */
.kw  { color: #c792ea; }  /* keyword */
.str { color: #c3e88d; }  /* string */
.num { color: #f78c6c; }  /* number */
.cmt { color: #546e7a; font-style: italic; }  /* comment */
.cls { color: #ffcb6b; }  /* class */
.fn  { color: #82aaff; }  /* function */
.ann { color: #f07178; }  /* annotation */
.pun { color: #89ddff; }  /* punctuation */

/* ===== COMPARISON TABLE ===== */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.compare-table th {
  background: var(--surface2);
  color: var(--primary-light);
  padding: 0.7rem 1rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border);
}

.compare-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.compare-table tr:hover td { background: var(--surface2); }

.compare-table .good  { color: var(--success); font-weight: 600; }
.compare-table .bad   { color: var(--danger); }
.compare-table .mid   { color: var(--accent); }

/* ===== VISUAL DIAGRAM ===== */
.diagram {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin: 1rem 0;
  font-family: 'Cascadia Code', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  overflow-x: auto;
  white-space: pre;
  line-height: 1.6;
}

/* ===== STEP LIST ===== */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 1rem 0; }
.steps li {
  counter-increment: step;
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: flex-start;
}
.steps li::before {
  content: counter(step);
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

/* ===== BIG-O CARDS ===== */
.bigo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.8rem;
  margin: 1rem 0;
}

.bigo-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem;
  text-align: center;
}

.bigo-card .notation { font-size: 1.1rem; font-weight: 700; color: var(--primary-light); font-family: monospace; }
.bigo-card .name     { font-size: 0.75rem; color: var(--text-dim); margin: 0.2rem 0; }
.bigo-card .example  { font-size: 0.78rem; color: var(--text-muted); }
.bigo-card.green  { border-color: var(--success); }
.bigo-card.yellow { border-color: var(--accent); }
.bigo-card.red    { border-color: var(--danger); }

/* ===== CONCEPT CARD ===== */
.concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.concept-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  transition: transform 0.15s, border-color 0.15s;
}

.concept-card:hover { transform: translateY(-2px); border-color: var(--primary); }
.concept-card .emoji { font-size: 1.8rem; margin-bottom: 0.5rem; }
.concept-card h4 { color: var(--text); margin: 0 0 0.4rem; font-size: 0.95rem; text-transform: none; }
.concept-card p  { font-size: 0.83rem; color: var(--text-dim); margin: 0; }

/* ===== BREADCRUMB NAV ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.breadcrumb a { color: var(--primary-light); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ===== DAY NAV ===== */
.day-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.day-nav a {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.8rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.15s;
  max-width: 200px;
}

.day-nav a:hover { border-color: var(--primary); background: var(--surface2); }
.day-nav .nav-label { font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.day-nav .nav-title { font-size: 0.9rem; color: var(--text); font-weight: 600; }

/* ===== INLINE CODE ===== */
p code, li code, td code {
  background: var(--surface2);
  color: var(--primary-light);
  font-size: 0.85em;
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-family: 'Cascadia Code', monospace;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ===== CHEAT SHEET ===== */
.cheat-sheet {
  background: linear-gradient(135deg, rgba(16,185,129,0.06) 0%, rgba(6,182,212,0.05) 100%);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin: 2rem 0;
}
.cheat-sheet h3 {
  font-size: 1rem;
  color: #10b981;
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cheat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.cheat-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 0.9rem 1rem;
}
.cheat-card h4 {
  font-size: 0.78rem;
  color: #10b981;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0 0 0.55rem;
}
.cheat-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}
.cheat-card li {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: 'Cascadia Code', monospace;
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
}
.cheat-card li::before {
  content: '›';
  color: #10b981;
  font-size: 0.9rem;
  line-height: 1.2;
  flex-shrink: 0;
}
.cheat-card .note { font-family: inherit; color: var(--text-dim); font-style: italic; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .content { padding: 1.5rem; }
}
