/* Malggu Premium Dark Space — learning sites (Spells-aligned) */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

:root {
  --bg: #050509;
  --bg-elevated: #110e1a;
  --bg-card: rgba(20, 16, 31, 0.72);
  --coral: #ff8a68;
  --coral-dim: rgba(255, 138, 104, 0.15);
  --coral-glow: rgba(255, 138, 104, 0.35);
  --ink: #f4f1f8;
  --muted: #a39bb3;
  --line: rgba(255, 255, 255, 0.08);
  --ok: #34d399;
  --warn: #fbbf24;
  --violet: #a78bfa;
  --font: "Inter", "Pretendard", system-ui, sans-serif;
  --radius: 18px;
  --nav-h: 60px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--coral); text-decoration: none; }
a:hover { color: #ffb195; }

/* Three.js canvas — Spells #space-canvas */
#space-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 10% 5%, rgba(255, 100, 70, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse 50% 45% at 90% 25%, rgba(100, 50, 180, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 50% 90%, rgba(40, 60, 180, 0.035) 0%, transparent 50%),
    radial-gradient(ellipse 80% 40% at 50% 50%, rgba(5, 5, 20, 0.5) 0%, transparent 70%);
}

.page-wrapper {
  position: relative;
  z-index: 2;
  min-height: 100vh;
}

.portal-layer {
  position: relative;
  z-index: 100;
}

.display-heading {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin: 0 0 12px;
}
.gradient-text {
  background: linear-gradient(115deg, #fff 10%, var(--coral) 55%, #ffc4b0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 38rem;
  margin: 0;
}

.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  color: #1a0f0c;
  padding: 12px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff8a68 0%, #ff6b4a 55%, #ff9a78 100%);
  box-shadow: 0 0 0 1px rgba(255, 138, 104, 0.35), 0 12px 32px var(--coral-glow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(255, 138, 104, 0.5), 0 16px 40px var(--coral-glow);
}
.cta-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.cta-btn.ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  border: 1px solid var(--line);
}
.cta-btn.ghost:hover {
  border-color: rgba(255, 138, 104, 0.45);
  color: var(--coral);
  box-shadow: none;
}

.badge-glow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--coral);
  background: var(--coral-dim);
  border: 1px solid rgba(255, 138, 104, 0.28);
  border-radius: 999px;
  padding: 5px 10px;
}

.shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 72px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.stat {
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}
.stat .l { font-size: 0.72rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.stat .v { font-size: 1.45rem; font-weight: 800; margin-top: 6px; letter-spacing: -0.03em; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 12px; }
.chip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.chip.is-on {
  color: #fff;
  border-color: rgba(255, 138, 104, 0.4);
  background: var(--coral-dim);
}

.footer-mini {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
