:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f1f4f8;
  --text: #111827;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-2: #7c3aed;
  --border: rgba(15, 23, 42, 0.08);
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

body.dark {
  color-scheme: dark;
  --bg: #000000;
  --surface: #000000;
  --surface-2: #111111;
  --text: #f8fafc;
  --muted: #cbd5e1;
  --accent: #60a5fa;
  --accent-2: #8b5cf6;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
}

html {
  background-color: var(--bg);
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  background-image: none;
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
}

.page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 0 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.brand h1,
.brand h3,
.hero h2,
.section-heading h3,
.modal-head h3,
.article-shell h1,
.article-shell h2 {
  margin: 0;
}

.brand p,
.hero p,
.card-body p,
.footer p,
.modal-card p,
.modal-card li,
.article-shell p,
.article-shell li {
  color: var(--muted);
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: var(--shadow);
}

.page-nav {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.nav-link.active,
.nav-link:hover {
  color: var(--accent);
}

.icon-button,
.primary-btn,
.secondary-btn {
  border: none;
  cursor: pointer;
  font: inherit;
}

.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 34px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.7s ease both;
}

.hero-copy {
  max-width: 720px;
  margin-bottom: 24px;
}

.eyebrow {
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 8px;
}

.hero h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 10px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.search-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.search-card input {
  width: 100%;
  border: none;
  outline: none;
  font: inherit;
  background: transparent;
  color: var(--text);
}

.section-block {
  margin-top: 28px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.section-link,
.read-more {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.content-card,
.feature-card,
.modal-card,
.article-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.8s ease both;
}

.content-card {
  overflow: hidden;
}

.game-card-top {
  position: relative;
  padding: 16px 16px 0;
}

.game-icon-placeholder {
  position: absolute;
  left: 24px;
  bottom: -24px;
  width: 84px;
  height: 84px;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  background: var(--surface);
  z-index: 2;
}

.game-icon-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-media {
  height: 140px;
  background-size: cover;
  background-position: center;
  border-radius: 18px;
}

.gradient-1 {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.gradient-2 {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.gradient-3 {
  background: linear-gradient(135deg, #10b981, #059669);
}

.card-body {
  padding: 18px 18px 20px;
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.card-title-row span,
.card-meta span {
  color: var(--muted);
  font-size: 0.93rem;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.feature-card {
  padding: 24px;
}

.vip-section {
  margin-top: 28px;
}

.vip-card {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr;
  gap: 18px;
  padding: 24px;
  background: linear-gradient(135deg, var(--surface), rgba(37, 99, 235, 0.1));
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.vip-copy h3 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.vip-benefits {
  padding-left: 18px;
  margin: 14px 0 0;
  display: grid;
  gap: 8px;
}

.vip-pricing-card {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.vip-pricing-card .eyebrow,
.vip-pricing-card p {
  color: rgba(255,255,255,0.9);
}

.payment-grid {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.payment-card {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
}

.payment-card h4 {
  margin: 0 0 10px;
}

.payment-number {
  font-size: 1.2rem;
  margin: 6px 0 10px;
}

.payment-qr-card img {
  width: 100%;
  max-width: 240px;
  border-radius: 16px;
  display: block;
  margin: 12px 0;
}

.payment-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.payment-actions .secondary-btn {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-color: rgba(255,255,255,0.2);
}

.price-note {
  margin: 10px 0 0;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.92);
}

@media (min-width: 860px) {
  .payment-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.sol-qr-block {
  margin-top: 18px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
}

.sol-qr-block h4 {
  margin: 0 0 10px;
}

.sol-qr-block p {
  margin: 0 0 12px;
}

.sol-qr-block img {
  width: 100%;
  max-width: 240px;
  border-radius: 16px;
  display: block;
  margin: 0 auto 16px;
}

.vip-rule-card,
.vip-login-card,
.vip-tabs-card {
  margin-top: 16px;
  padding: 16px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.vip-rule-card h4,
.vip-login-card h3,
.vip-tab-buttons {
  margin: 0 0 8px;
}

.vip-tab-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.vip-tab-button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

.vip-tab-button.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  border-color: transparent;
}

.vip-tab-panels {
  margin-top: 16px;
}

.vip-tab-panel {
  display: none;
}

.vip-tab-panel.active {
  display: block;
}

.vip-login-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.vip-login-form input {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.vip-status {
  margin-top: 10px;
  color: var(--muted);
}

.price {
  font-size: 2rem;
  font-weight: 800;
  margin: 6px 0;
}

.price span {
  font-size: 0.95rem;
  font-weight: 600;
  margin-left: 4px;
}

.article-shell {
  padding: 28px;
  margin-top: 18px;
}

.article-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 16px;
  color: var(--muted);
}

.article-shell ul {
  padding-left: 20px;
}

.download-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 20px;
}

.download-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-2);
}

.download-card h3 {
  margin: 0 0 6px;
}

.download-card p {
  margin: 0 0 12px;
}

.download-card.vip-download {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
}

.download-card.vip-download p {
  color: rgba(255,255,255,0.9);
}

.screenshot-section {
  margin: 24px 0 20px;
}

.screenshot-section h3 {
  margin: 0 0 12px;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.screenshot-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  background: var(--surface-2);
}

.url-editor {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.url-editor h4 {
  margin: 0 0 6px;
}

.url-editor input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.url-editor .primary-btn {
  width: fit-content;
  padding: 8px 12px;
}

.screenshot-placeholder {
  min-height: 140px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 600;
}

.footer {
  margin-top: 36px;
  padding: 24px 0 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

dialog {
  border: none;
  padding: 0;
  background: transparent;
}

dialog::backdrop {
  background: rgba(2, 6, 23, 0.65);
}

.modal-card {
  width: min(92vw, 560px);
  padding: 24px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.modal-close {
  width: 36px;
  height: 36px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.primary-btn,
.secondary-btn {
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
}

.vip-btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  background: linear-gradient(135deg, #d4af37, #facc15);
  color: #111827;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.25);
}

.secondary-btn {
  background: var(--surface-2);
  color: var(--text);
}

.free-btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: white;
  font-weight: 600;
}

.hidden-card {
  display: none;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(37, 99, 235, 0.2);
  }
  50% {
    box-shadow: 0 0 18px rgba(37, 99, 235, 0.22);
  }
}

.primary-btn:hover,
.secondary-btn:hover,
.icon-button:hover,
.read-more:hover {
  animation: pulseGlow 1.2s ease-in-out infinite;
}

@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
  }

  .page-nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
