@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --bg: #0b0f18;
  --bg-2: #0e1320;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-strong: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);
  --accent: #ffffff;
  --accent-2: #6bc0a3;
  --text: #e9ecf4;
  --muted: #aab3c9;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

[data-theme='light'] {
  --bg: #c1c8d8;
  --bg-2: #b3bccf;
  --surface: rgba(0, 0, 0, 0.12);
  --surface-strong: rgba(0, 0, 0, 0.18);
  --border: rgba(0, 0, 0, 0.18);
  --border-strong: rgba(0, 0, 0, 0.26);
  --accent: #3652e5;
  --accent-2: #267c64;
  --text: #0c1221;
  --muted: #3f4657;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  background: linear-gradient(150deg, var(--bg) 0%, var(--bg-2) 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 120px clamp(16px, 4vw, 42px) 80px;
  overflow-x: hidden;
}

.home-page {
  padding-top: clamp(20px, 4vw, 10px);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(900px at 25% 70%, rgba(139, 157, 255, 0.06), transparent),
    radial-gradient(1200px at 70% 80%, rgba(107, 192, 163, 0.07), transparent);
  pointer-events: none;
  z-index: -2;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 160px 160px;
  opacity: 0.45;
  pointer-events: none;
  z-index: -3;
}

[data-theme='light'] body::after {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.07) 1px, transparent 1px);
  opacity: 0.55;
}

body > br {
  display: none;
}

a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  display: block;
}

ul {
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5 {
  margin: 0 0 8px;
  font-family: 'Space Grotesk', 'Manrope', sans-serif;
  letter-spacing: -0.02em;
}

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

.page-shell {
  width: min(1200px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
  z-index: 1;
  margin-bottom: 40px;
}

.section-card {
  background: linear-gradient(145deg, var(--surface-strong), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 32px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  margin-bottom: 12px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 auto;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
}

.pill-live {
  border-color: rgba(53, 255, 63, 0.35);
  background: rgba(53, 255, 63, 0.08);
  color: #ffffff;
}

.pill-muted {
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.pill-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 14px;
  min-width: 120px;
}

.pill-online {
  background: linear-gradient(135deg, #3ed47a, #20b25f);
  color: #0b0f16;
  border-color: rgba(62, 212, 122, 0.5);
  box-shadow: 0 12px 30px rgba(32, 178, 95, 0.35);
}

.pill-offline {
  background: rgba(214, 69, 54, 0.08);
  color: #ffffff;
  border-color: rgba(255, 135, 122, 0.9);
  box-shadow: none;
}

.pill-unknown {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-color: var(--border);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.16s ease;
  width: auto;
  min-width: 120px;
  align-self: center;
}

.theme-toggle:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.theme-toggle-floating {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1200;
  backdrop-filter: blur(12px);
}

/* Hero + feature grid */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  place-items: center;
  gap: 18px;
  background: linear-gradient(145deg, var(--surface-strong), var(--surface));
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  text-align: center;
  min-height: 440px;
}

.index-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(16px, 2vw, 28px);
  min-height: 280px;
  gap: 12px;
}

.hero::after {
  content: '';
  position: absolute;
  inset: -40% -20%;
  background: radial-gradient(circle at 30% 30%, rgba(139, 157, 255, 0.12), transparent 38%),
    radial-gradient(circle at 80% 50%, rgba(107, 192, 163, 0.12), transparent 35%);
  opacity: 0.8;
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-content {
  width: 100%;
  max-width: 880px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.hero-title {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
}

.hero-subtitle {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  justify-content: center;
  align-items: center;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
  justify-content: center;
  align-items: center;
}

.info-grid .index-card h3,
.info-grid .index-card p {
  text-align: center;
  width: 100%;
}

.info-grid .hero-actions {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}

.feature-grid,
.index-container,
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  width: 100%;
  align-items: stretch;
  justify-items: center;
}

.news-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  width: 100%;
}

.info-grid {
  max-width: 1100px;
  margin: 0 auto;
  grid-auto-rows: 1fr;
  row-gap: 18px;
}

@media (min-width: 1024px) {
  .info-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.donation-grid {
  width: min(780px, 100%);
  margin: 0 auto;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  justify-content: center;
}

.topic-card,
.index-card,
.plot-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: linear-gradient(150deg, var(--surface-strong), var(--surface));
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.topic-card:hover,
.index-card:hover,
.plot-card:hover,
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.651);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.topic-card {
  display: flex;
  flex-direction: column;
  min-height: 240px;
  width: 100%;
  max-width: 480px;
}

/* --- Mobile Tweaks (phones & small tablets) --- */
@media (max-width: 720px) {
  body {
    padding: 96px 14px 64px;
  }

  .page-shell {
    width: 100%;
    gap: 20px;
  }

  .hero,
  .section-card {
    padding: 18px;
  }

  .hero {
    min-height: 340px;
  }

  .hero-title {
    font-size: clamp(28px, 6vw, 36px);
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .feature-grid,
  .index-container,
  .info-grid,
  .donation-grid {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .info-grid {
    row-gap: 14px;
  }

  .topic-card,
  .index-card,
  .plot-card {
    width: 100%;
  }
}

.topic-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.65);
  transition: transform 0.3s ease;
}

.topic-card:hover img {
  transform: scale(1.05);
}

.topic-overlay {
  position: relative;
  z-index: 1;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  height: 100%;
  background: linear-gradient(180deg, rgba(7, 8, 14, 0.05) 0%, rgba(5, 8, 17, 0.55) 75%);
}

.topic-overlay .pill,
.topic-overlay .pill-status {
  position: absolute;
  left: 18px;
  bottom: 18px;
}

[data-theme='light'] .topic-overlay,
[data-theme='light'] .topic-overlay h2,
[data-theme='light'] .topic-overlay h3,
[data-theme='light'] .topic-overlay p,
[data-theme='light'] .topic-overlay .link-label {
  color: #f6f8ff;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.link-label {
  color: #fff;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.index-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
  width: 100%;
  min-height: 240px;
  justify-content: center;
}

.info-grid .index-card .stat-value {
  margin: 4px 0;
}

.info-grid .index-card .stat-hint {
  margin: 2px 0 6px;
}

.info-grid .index-card .copy-btn {
  margin-top: 6px;
}

.index-card h2,
.index-card h3 {
  margin: 0;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
}

.stat-hint {
  color: var(--muted);
  font-size: 14px;
}

.discord {
  background: linear-gradient(140deg, var(--surface-strong), var(--surface));
  border-radius: var(--radius-lg);
  padding: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.discord iframe,
iframe {
  width: 100%;
  border: none;
  border-radius: var(--radius-md);
  background: #0d1020;
}

.discord-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 10px auto 0;
}

.discord-note {
  color: var(--muted);
  font-size: 13px;
}

/* Donation */
.spende {
  text-align: center;
  gap: 10px;
}

.spende h2 {
  margin: 0;
}

.spende-button {
  margin-top: 16px;
}

/* Store selection */
.store,
.plot-store {
  width: 100%;
}

/* Legal page */
.legal-page {
  align-items: center;
}

.legal-card {
  width: 100%;
}

.legal-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.legal-section {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.legal-section:last-child {
  border-bottom: none;
}

.legal-subsection {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legal-list {
  list-style: disc;
  padding-left: 20px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

.legal-logo-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  max-width: 260px;
  width: fit-content;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: linear-gradient(145deg, var(--surface-strong), var(--surface));
  box-shadow: var(--shadow);
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, border-color 0.2s ease;
  color: var(--text);
}

.legal-logo-link span {
  color: var(--text);
}

.legal-logo-link img {
  height: clamp(64px, 10vw, 110px);
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.legal-logo-link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.legal-logo-bottom {
  margin-top: 8px;
}

/* Plot shop */
.plot-store {
  padding: 0;
}

.plot-shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  padding-top: 12px;
}

.plot-card {
  padding: 16px;
}

.plot-card img {
  border-radius: var(--radius-sm);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.5);
}

.plot-card h3 {
  margin: 12px 0 6px;
}

.plot-card p {
  margin-bottom: 8px;
}

.plot-buy-btn {
  width: 100%;
  margin-top: 10px;
}

/* Footer */
.index-footer {
  margin-top: auto;
  width: min(1200px, 100%);
  align-self: center;
  padding: 24px 16px 18px;
  text-align: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--surface-strong), var(--surface));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  color: var(--muted);
  margin-bottom: 5px;
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.index-footer a {
  color: var(--text);
  font-weight: 600;
}

.footer-legal-btn {
  height: 42px;
  padding: 0 16px;
}

/* Decorative characters */
/* Snow canvas */
#snow-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

/* Responsive */
@media (min-width: 1040px) {
  .hero {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 960px) {
  .theme-toggle {
    width: auto;
    justify-content: center;
  }

  .theme-toggle-floating {
    bottom: 16px;
    right: 16px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .news-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body {
    padding: 96px 14px 70px;
  }

  .index-logo {
    height: 46px;
  }

  .page-shell {
    gap: 22px;
  }

  .hero-meta {
    gap: 8px;
  }
}
