* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --angular-start: #F60877;
  --angular-end: #9D31F4;
  --angular-red: #DD0031;
  --text: #18181B;
  --text-muted: #64748b;
  --border: #e5e7eb;
  --surface: #f8f9fa;
  --code-bg: #011627;
}
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #ffffff;
  color: var(--text);
  line-height: 1.7;
  position: relative;
  overflow-x: hidden;
}
body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(120px);
  z-index: 0;
}
body::before { top: -400px; right: -250px; width: 800px; height: 800px; background: rgba(246, 8, 119, 0.08); }
body::after { bottom: -400px; left: -300px; width: 900px; height: 900px; background: rgba(157, 49, 244, 0.06); }

.container {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* Header */
header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}
header img { width: 40px; height: 40px; }
header h1 {
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--angular-start), var(--angular-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
header .back-link {
  margin-left: auto;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}
header .back-link:hover { color: var(--angular-start); }

/* Meta bar (duration, goals) */
.meta-bar {
  display: flex;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}
.meta-item .material-symbols-outlined { font-size: 20px; color: var(--angular-start); }

.goals {
  background: linear-gradient(135deg, rgba(246,8,119,0.05), rgba(157,49,244,0.05));
  border: 1px solid rgba(246,8,119,0.15);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 32px;
  font-size: 0.92rem;
}
.goals strong { color: var(--angular-red); }

/* Headings */
h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}
h2:first-of-type { margin-top: 0; }
h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 28px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

p { margin: 8px 0; color: #374151; }
p.muted { color: var(--text-muted); font-size: 0.9rem; }

/* Inline code */
code {
  font-family: 'Fira Code', monospace;
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.86em;
}

/* Code blocks */
pre {
  background: var(--code-bg);
  color: #d6deeb;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 12px 0 16px;
  font-family: 'Fira Code', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  overflow-x: auto;
  position: relative;
}
pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  color: inherit;
}
pre .copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #94a3b8;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: 'Fira Code', monospace;
  transition: all 0.2s;
}
pre .copy-btn:hover { background: rgba(255,255,255,0.2); color: white; }

/* Syntax colors (night owl inspired) */
.kw { color: #c792ea; }  /* keywords: import, from, const, export, class, return, if */
.fn { color: #82aaff; }  /* functions */
.str { color: #ecc48d; } /* strings */
.cm { color: #637777; font-style: italic; } /* comments */
.ty { color: #ffcb8b; }  /* types */
.num { color: #f78c6c; } /* numbers */
.op { color: #89ddff; }  /* operators */
.dec { color: #addb67; } /* decorators */

/* Lists */
ul, ol { padding-left: 24px; margin: 8px 0; }
li { margin: 4px 0; color: #374151; }

/* Links */
a { color: var(--angular-red); font-weight: 600; text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--angular-start); }

/* Details/Summary (collapsible hints) */
details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 16px 0;
  overflow: hidden;
}
details summary {
  padding: 14px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  user-select: none;
  color: var(--text);
  transition: background 0.2s;
}
details summary::-webkit-details-marker { display: none; }
details summary::before {
  content: 'expand_more';
  font-family: 'Material Symbols Outlined';
  font-size: 20px;
  color: var(--angular-start);
  transition: transform 0.25s ease;
  display: inline-block;
}
details[open] summary::before { transform: rotate(180deg); }
details summary:hover { background: rgba(246,8,119,0.03); }
details .hint-content {
  padding: 0 20px 16px;
  border-top: 1px solid var(--border);
}
details .hint-content pre { margin-top: 12px; }

/* Tip box */
.tip {
  background: linear-gradient(135deg, rgba(246,8,119,0.05), rgba(157,49,244,0.05));
  border: 1px solid rgba(246,8,119,0.15);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 16px 0;
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.tip .material-symbols-outlined { color: var(--angular-start); font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.tip strong { color: var(--angular-red); }

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin: 16px 0;
}

/* Blockquote */
blockquote {
  border-left: 3px solid var(--angular-start);
  padding: 8px 16px;
  margin: 12px 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  background: rgba(246,8,119,0.02);
  border-radius: 0 8px 8px 0;
}

/* Horizontal rule */
hr {
  border: none;
  border-top: 2px solid var(--border);
  margin: 32px 0;
}

/* Footer navigation */
.lab-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 2px solid var(--border);
  gap: 16px;
}
.lab-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s;
}
.lab-nav .prev { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.lab-nav .prev:hover { border-color: var(--angular-start); color: var(--angular-start); }
.lab-nav .next {
  background: linear-gradient(135deg, var(--angular-start), var(--angular-end));
  color: white;
  box-shadow: 0 4px 16px rgba(246, 8, 119, 0.2);
}
.lab-nav .next:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(246, 8, 119, 0.3); }
.lab-nav .spacer { flex: 1; }

/* ========== INDEX PAGE ========== */
.lab-grid {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}
.lab-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}
.lab-card:hover {
  border-color: var(--angular-start);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(246, 8, 119, 0.1);
}
.lab-card .lab-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--angular-start), var(--angular-end));
  color: white;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.lab-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 6px;
  display: block;
}
.lab-card .lab-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}
.lab-card .lab-meta .material-symbols-outlined { font-size: 16px; }
.lab-card p {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0;
}

/* Docs section */
.docs-list {
  list-style: none;
  padding: 0;
  margin: 8px 0;
}
.docs-list li {
  padding: 4px 0;
}
.docs-list li a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Responsive */
@media (max-width: 600px) {
  .container { padding: 24px 16px 60px; }
  header h1 { font-size: 1.2rem; }
  h2 { font-size: 1.1rem; }
  pre { font-size: 0.8rem; padding: 12px 14px; }
  .lab-nav { flex-direction: column; }
  .lab-nav a { justify-content: center; }
  .meta-bar { flex-direction: column; gap: 8px; }
}
