﻿:root {
  --bg: #0f1115;
  --surface: #171a21;
  --panel: #1f2430;
  --accent: #f4b860;
  --accent-2: #6ee7b7;
  --text: #f3f4f6;
  --muted: #a3aab7;
  --shadow: rgba(8, 10, 15, 0.6);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  opacity: 0.8;
}

a:hover {
  opacity: 1;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.bg-orb {
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(20px);
  opacity: 0.5;
  z-index: 0;
}

.orb-a {
  background: radial-gradient(circle at 30% 30%, #f4b860, transparent 60%);
  top: -160px;
  left: -140px;
}

.orb-b {
  background: radial-gradient(circle at 70% 40%, #6ee7b7, transparent 55%);
  bottom: -200px;
  right: -120px;
}

.toast-container {
  position: fixed;
  top: 90px;
  right: 28px;
  display: grid;
  gap: 10px;
  z-index: 6;
  pointer-events: none;
}

.toast {
  background: #131824;
  border: 1px solid #21283a;
  border-radius: 14px;
  padding: 12px 14px;
  min-width: 220px;
  box-shadow: 0 10px 26px rgba(8, 10, 16, 0.55);
  display: grid;
  gap: 4px;
  animation: toastIn 0.25s ease forwards;
}

.toast-title {
  font-weight: 600;
}

.toast-desc {
  color: var(--muted);
  font-size: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(8px);
  background: rgba(15, 17, 21, 0.7);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 36px;
  z-index: 2;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(140deg, #f4b860, #f29e4c);
  color: #111;
  font-weight: 700;
}

.brand-title {
  font-family: "Fraunces", serif;
  font-size: 20px;
}

.brand-sub {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
}

.site-nav {
  display: flex;
  gap: 20px;
  font-size: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.layout {
  padding: 40px 36px 80px;
  display: flex;
  flex-direction: column;
  gap: 48px;
  position: relative;
  z-index: 1;
}

.hero {
  max-width: 780px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: rise 0.8s ease forwards;
}

.hero h1 {
  font-family: "Fraunces", serif;
  font-size: 44px;
  margin: 0;
}

.hero p {
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-note {
  color: var(--muted);
  font-size: 14px;
}

.btn {
  border: none;
  background: var(--accent);
  color: #1a1207;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 25px rgba(244, 184, 96, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(244, 184, 96, 0.4);
}

.game {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.game-panel {
  background: var(--surface);
  padding: 28px;
  border-radius: 24px;
  box-shadow: 0 16px 40px var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
}

.stat {
  background: var(--panel);
  padding: 14px 16px;
  border-radius: 14px;
}

.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
}

.press {
  border: none;
  background: linear-gradient(160deg, #f4b860, #f29e4c);
  color: #1a1207;
  border-radius: 30px;
  padding: 38px 24px;
  font-size: 26px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 2px;
  box-shadow: 0 24px 40px rgba(244, 184, 96, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.press:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 30px 50px rgba(244, 184, 96, 0.45);
}

.press:active {
  transform: translateY(1px) scale(0.99);
}

.press-title {
  display: block;
  font-family: "Fraunces", serif;
}

.press-sub {
  display: block;
  font-size: 12px;
  letter-spacing: 3px;
  margin-top: 6px;
  text-transform: uppercase;
}

.milestones {
  display: grid;
  gap: 10px;
}

.milestone {
  background: #0f1218;
  border: 1px solid #262a34;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  color: var(--muted);
  opacity: 0.85;
}

.milestone.locked {
  opacity: 0.4;
}

.milestone.reveal {
  opacity: 1;
  animation: fadeInUp 0.4s ease forwards;
}

.ad-panel {
  background: #131720;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 16px 34px var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ad-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
}

.ad-slot {
  border: 1px dashed #343a49;
  border-radius: 16px;
  padding: 18px;
  background: #0e1219;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.ad-slot.tall {
  min-height: 220px;
}

.ad-title {
  font-weight: 600;
}

.ad-sub {
  font-size: 12px;
  color: var(--muted);
}

.ad-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.upgrades, .tips, .story, .quests, .achievements, .milestones-panel {
  background: var(--surface);
  border-radius: 24px;
  padding: 26px;
  box-shadow: 0 16px 40px var(--shadow);
}

.upgrades h2, .tips h2, .story h2, .quests h2, .achievements h2, .milestones-panel h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 28px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.section-note {
  font-size: 12px;
  color: var(--muted);
}

.mini-btn {
  border: 1px solid #2a3142;
  background: #101521;
  color: #d7defa;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}

.mini-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.quest-block {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.quest-block h3 {
  margin: 0;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
}

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

.upgrade-card {
  background: var(--panel);
  padding: 16px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upgrade-title {
  font-weight: 600;
}

.upgrade-cost {
  color: var(--muted);
  font-size: 13px;
}

.upgrade-btn {
  border: none;
  background: var(--accent-2);
  color: #10211b;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.upgrade-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.upgrade-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.story-lead {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 18px;
}

.story-list, .quest-list, .achievement-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.story-card, .quest-card, .achievement-card {
  background: var(--panel);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 140px;
}

.story-card {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.story-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(8, 10, 16, 0.35);
}

.story-card.locked {
  cursor: not-allowed;
  opacity: 0.6;
  filter: grayscale(0.2);
}

.achievement-card.locked {
  opacity: 0.6;
  filter: grayscale(0.2);
}

.story-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.story-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #0e121b;
  border: 1px solid #22283a;
}

.story-icon svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.story-icon.alley { color: #f4b860; }
.story-icon.market { color: #6ee7b7; }
.story-icon.forge { color: #60a5fa; }
.story-icon.archive { color: #f472b6; }

.card-title {
  font-weight: 600;
}

.card-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #11151d;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.meta-chip.complete {
  background: rgba(110, 231, 183, 0.16);
  color: #8ff3cb;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #121620;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f4b860, #6ee7b7);
  width: 0;
  transition: width 0.2s ease;
}

.reward {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #f4e2b4;
}

.reward::before {
  content: "Reward";
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #f4b860;
}

.boost-panel {
  margin-top: 20px;
  background: #131824;
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.boost-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
}

.boost-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.boost-chip {
  background: #0f141d;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  color: #cbd5f5;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.story-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 7;
}

.story-modal.is-open {
  display: block;
}

.story-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 18, 0.75);
}

.story-modal-card {
  position: relative;
  max-width: 720px;
  margin: 6vh auto;
  background: #121722;
  border-radius: 20px;
  padding: 28px 30px 32px;
  box-shadow: 0 20px 60px rgba(8, 10, 16, 0.55);
  border: 1px solid #232a3c;
}

.story-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #1a2232;
  color: var(--text);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.story-modal-meta {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.story-modal-card h3 {
  margin: 0 0 16px;
  font-family: "Fraunces", serif;
  font-size: 28px;
}

.story-modal-body {
  display: grid;
  gap: 12px;
  color: #c7cedb;
  line-height: 1.7;
}

.story-modal-body p {
  margin: 0;
}

.chronicle-layout {
  gap: 36px;
}

.chronicle-hero {
  max-width: 760px;
  display: grid;
  gap: 14px;
}

.chronicle-hero h1 {
  font-family: "Fraunces", serif;
  font-size: 40px;
  margin: 0;
}

.chronicle-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.chronicle-meta {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
}

.chronicle-timeline {
  background: var(--surface);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 16px 40px var(--shadow);
}

.timeline {
  display: grid;
  gap: 24px;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #1f2634;
}

.timeline-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  position: relative;
}

.timeline-item.locked {
  opacity: 0.6;
}

.timeline-marker {
  display: grid;
  place-items: start center;
  padding-top: 6px;
}

.timeline-card {
  background: #121722;
  border-radius: 18px;
  padding: 20px 22px;
  border: 1px solid #22283a;
  display: grid;
  gap: 12px;
}

.timeline-card h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 22px;
}

.timeline-meta {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.timeline-body {
  display: grid;
  gap: 10px;
  color: #c7cedb;
  line-height: 1.7;
}

.timeline-body p {
  margin: 0;
}

.tips ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.site-footer {
  padding: 24px 36px 48px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.footer-links {
  display: flex;
  gap: 16px;
}

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

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

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .game {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-direction: column;
    gap: 12px;
  }

  .toast-container {
    right: 18px;
    left: 18px;
  }

  .story-modal-card {
    margin: 8vh 18px;
  }

  .timeline::before {
    left: 18px;
  }

  .timeline-item {
    grid-template-columns: 36px 1fr;
  }
}

@media (max-width: 640px) {
  .layout {
    padding: 28px 20px 60px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .press {
    font-size: 20px;
  }
}
