:root {
  --bg: #0a0c0f;
  --surface: #12151a;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --border: rgba(255, 255, 255, 0.08);
  --emerald: #10b981;
  --emerald-light: #34d399;
  --shadow-dark: rgba(0, 0, 0, 0.5);
  --shadow-light: rgba(255, 255, 255, 0.04);
}

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

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  height: 100%;
  margin: 0;
  background: radial-gradient(
      ellipse at 20% 30%,
      rgba(16, 185, 129, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 80% 60%,
      rgba(52, 211, 153, 0.12) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 40% 80%,
      rgba(6, 182, 212, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 70% 20%,
      rgba(34, 197, 94, 0.08) 0%,
      transparent 50%
    ),
    linear-gradient(
      135deg,
      rgba(10, 12, 15, 0.92) 0%,
      rgba(10, 12, 15, 0.88) 50%,
      rgba(10, 12, 15, 0.92) 100%
    ),
    var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    sans-serif;
  letter-spacing: 0.02em;
  line-height: 1.6;
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
}

h2 {
  margin: 22px 0 10px;
  font-size: clamp(18px, 2.1vw, 24px);
}

/* Navigation Styles */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 12, 15, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topnav-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  color: var(--emerald);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-decoration: none;
  transition: color 220ms ease-in-out;
  flex-shrink: 0;
}

.brand:hover {
  color: var(--emerald-light);
}

.nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  align-items: center;
}

@media (max-width: 600px) {
  .nav-links {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

.nav-link {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 6px 6px 14px var(--shadow-dark),
    -6px -6px 14px var(--shadow-light);
  transition: all 220ms ease-in-out;
}

.nav-link:hover {
  transform: translateY(-1px);
  border-color: rgba(16, 185, 129, 0.3);
}

.nav-link.active {
  box-shadow: inset 6px 6px 14px var(--shadow-dark),
    inset -6px -6px 14px var(--shadow-light);
  color: var(--emerald);
  border-color: rgba(16, 185, 129, 0.2);
}

/* Page Layout */
.page {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.card {
  width: 100%;
  max-width: 1000px;
  background: var(--surface);
  border-radius: 24px;
  border: 1px solid var(--border);
  padding: clamp(24px, 4vw, 48px);
  box-shadow: 8px 8px 20px var(--shadow-dark),
    -8px -8px 20px var(--shadow-light);
}

/* Typography */
p {
  margin: 10px 0;
  color: var(--muted);
}

ul {
  margin: 10px 0 10px 18px;
  padding: 0;
  color: var(--muted);
}

li {
  margin: 6px 0;
}

a {
  color: var(--emerald);
  text-decoration: none;
  transition: color 220ms ease-in-out;
}

a:hover {
  color: var(--emerald-light);
  text-decoration: underline;
}

/* Utility Classes */
.footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

.quick-links {
  margin: 16px 0 0;
  color: var(--muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.template {
  margin-top: 16px;
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: inset 6px 6px 14px var(--shadow-dark),
    inset -6px -6px 14px var(--shadow-light);
  overflow-x: auto;
}

pre {
  margin: 0;
  white-space: pre;
  color: rgba(255, 255, 255, 0.82);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 14px;
  line-height: 1.55;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 0.95em;
}
