:root {
  --bg-void: #060a12;
  --bg-deep: #0b1220;
  --bg-card: rgba(13, 21, 36, 0.82);
  --bg-card-hover: rgba(19, 31, 52, 0.92);
  --border-frost: rgba(125, 211, 252, 0.22);
  --border-strong: rgba(125, 211, 252, 0.5);
  --ice: #7dd3fc;
  --ice-bright: #bae6fd;
  --cyan: #38bdf8;
  --violet: #a78bfa;
  --crimson: #ef4444;
  --crimson-soft: rgba(239, 68, 68, 0.16);
  --gold: #f59e0b;
  --emerald: #34d399;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --font-display: "Cinzel", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: radial-gradient(ellipse at 50% 0%, #101e36 0%, var(--bg-void) 58%, #04070d 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

#snow-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

.app-shell {
  position: relative;
  z-index: 1;
}

/* Top Navbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(6, 10, 18, 0.85);
  border-bottom: 1px solid var(--border-frost);
}

.topbar-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  color: #f8fafc;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-sub {
  display: block;
  font-size: 0.7rem;
  color: var(--ice);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 8px 13px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  color: #fff;
  background: rgba(125, 211, 252, 0.08);
  border-color: var(--border-frost);
}

.nav-btn.active {
  color: #fff;
  background: rgba(56, 189, 248, 0.16);
  border-color: var(--border-strong);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.2);
}

.nav-btn.cta-nav {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #04101d;
  font-weight: 700;
}

.nav-btn.cta-nav:hover {
  filter: brightness(1.12);
}

/* Live Ticker */
.live-ticker {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.12), rgba(167, 139, 250, 0.1), rgba(14, 165, 233, 0.12));
  border-bottom: 1px solid var(--border-frost);
  padding: 8px 20px;
}

.ticker-inner {
  max-width: 1220px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.83rem;
}

.ticker-pills {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--border-frost);
  color: var(--ice-bright);
  font-size: 0.78rem;
}

.dot-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.decree-line {
  color: #cbd5e1;
  font-style: italic;
}

/* Main Container & Views */
.container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 30px 20px 70px;
}

.view-section {
  display: none;
  animation: fadeIn 0.35s ease;
}

.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero {
  position: relative;
  border: 1px solid var(--border-frost);
  border-radius: 20px;
  padding: 48px 34px;
  background:
    radial-gradient(circle at 50% 18%, rgba(56, 189, 248, 0.16), transparent 62%),
    linear-gradient(180deg, rgba(11, 18, 32, 0.92), rgba(6, 10, 18, 0.95));
  text-align: center;
  overflow: hidden;
  margin-bottom: 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.morana-eye {
  width: 112px;
  height: 64px;
  margin: 0 auto 14px;
  filter: drop-shadow(0 0 18px rgba(125, 211, 252, 0.65));
  animation: eyeFloat 4.5s ease-in-out infinite;
}

@keyframes eyeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.hero-badge {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ice);
  border: 1px solid var(--border-frost);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
  background: rgba(14, 165, 233, 0.1);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3.35rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #f8fafc;
  text-shadow: 0 0 32px rgba(125, 211, 252, 0.35);
  margin-bottom: 14px;
}

.hero-lead {
  max-width: 760px;
  margin: 0 auto 26px;
  color: #cbd5e1;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.93rem;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7, #7dd3fc);
  color: #04101d;
  box-shadow: 0 8px 26px rgba(56, 189, 248, 0.32);
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.75);
  border-color: var(--border-strong);
  color: var(--ice-bright);
}

.btn-ghost:hover {
  background: rgba(56, 189, 248, 0.14);
}

.btn-crimson {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fecaca;
}

/* Cards & Grids */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin: 34px 0 18px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: #f8fafc;
  letter-spacing: 0.04em;
}

.section-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-frost);
  border-radius: 14px;
  padding: 22px;
  backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: var(--border-strong);
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  color: var(--ice-bright);
  margin-bottom: 8px;
}

.card p {
  color: #cbd5e1;
  font-size: 0.92rem;
}

/* Regions Strip */
.regions-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.region-chip {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid var(--border-frost);
  color: var(--ice-bright);
  font-size: 0.8rem;
}

/* Cover Showcase */
.cover-feature {
  display: grid;
  grid-template-columns: 1.05fr 1.2fr;
  gap: 24px;
  align-items: center;
}

@media (max-width: 820px) {
  .cover-feature { grid-template-columns: 1fr; }
}

.cover-img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  cursor: pointer;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

/* Goal Bar */
.goal-bar-track {
  width: 100%;
  height: 14px;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 999px;
  border: 1px solid var(--border-frost);
  overflow: hidden;
  margin: 12px 0 8px;
}

.goal-bar-fill {
  height: 100%;
  width: 70%;
  background: linear-gradient(90deg, #0284c7, #38bdf8, #a78bfa);
  border-radius: 999px;
}

/* Whitelist 4-Step Wizard */
.wizard-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

@media (max-width: 700px) {
  .wizard-steps { grid-template-columns: repeat(2, 1fr); }
}

.w-step {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-frost);
  background: rgba(11, 18, 32, 0.7);
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  text-align: center;
}

.w-step.active {
  border-color: var(--cyan);
  background: rgba(56, 189, 248, 0.16);
  color: #fff;
  font-weight: 600;
}

.w-step.done {
  border-color: var(--emerald);
  color: var(--emerald);
}

.wizard-pane {
  display: none;
}

.wizard-pane.active {
  display: block;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 0.84rem;
  color: var(--ice-bright);
  margin-bottom: 6px;
  font-weight: 500;
}

.field small {
  display: block;
  color: var(--text-muted);
  font-size: 0.76rem;
  margin-top: 4px;
}

input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  background: rgba(6, 10, 18, 0.85);
  border: 1px solid var(--border-frost);
  border-radius: 9px;
  padding: 10px 12px;
  color: #f8fafc;
  font-family: var(--font-body);
  font-size: 0.9rem;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.scenario-box {
  background: rgba(167, 139, 250, 0.08);
  border-left: 3px solid var(--violet);
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-style: italic;
  color: #e2e8f0;
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

/* Result Alert */
.audit-result {
  margin-top: 20px;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--emerald);
  background: rgba(52, 211, 153, 0.08);
}

.audit-result.warn {
  border-color: var(--gold);
  background: rgba(245, 158, 11, 0.08);
}

/* Fallen Alley & Chronicle */
.fallen-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  border-color: rgba(239, 68, 68, 0.42);
  background: linear-gradient(135deg, rgba(40, 12, 18, 0.72), rgba(11, 18, 32, 0.9));
}

@media (max-width: 600px) {
  .fallen-card { grid-template-columns: 1fr; }
}

.fallen-card img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(239, 68, 68, 0.5);
  filter: grayscale(20%) contrast(1.06);
}

.quote-pill {
  display: inline-block;
  margin: 4px 6px 4px 0;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(125, 211, 252, 0.08);
  border-left: 2px solid var(--ice);
  font-style: italic;
  font-size: 0.83rem;
  color: #cbd5e1;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.scene-card {
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}

.scene-card img {
  width: 100%;
  height: 185px;
  object-fit: cover;
  display: block;
}

.scene-card .scene-meta {
  padding: 14px;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(125, 211, 252, 0.12);
}

th {
  color: var(--ice);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
}

.badge-alive { background: rgba(52, 211, 153, 0.16); color: var(--emerald); }
.badge-fallen { background: var(--crimson-soft); color: #fca5a5; }
.badge-tag { background: rgba(56, 189, 248, 0.15); color: var(--ice); }

/* Sanctuary / Altar */
.bond-box {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.12), rgba(56, 189, 248, 0.08));
  border: 1px solid rgba(167, 139, 250, 0.42);
  border-radius: 12px;
  padding: 18px;
  margin: 14px 0;
  font-style: italic;
  color: #ede9fe;
}

.whisper-item {
  border-left: 2px solid var(--violet);
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.65);
  border-radius: 0 8px 8px 0;
  margin-bottom: 10px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 14, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 90;
  padding: 24px;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 92vw;
  max-height: 85vh;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
}

footer {
  text-align: center;
  padding: 28px 20px;
  color: var(--text-muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--border-frost);
}
