:root {
  color-scheme: dark;
  --bg: #070b12;
  --panel: rgba(17, 26, 42, 0.88);
  --panel-strong: #111a2a;
  --line: rgba(148, 163, 184, 0.18);
  --text: #eef5ff;
  --muted: #9fb0c5;
  --accent: #58e6b0;
  --accent-strong: #18ba80;
  --blue: #65a9ff;
  --danger: #ff7f8a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 15% 5%, rgba(29, 101, 90, 0.28), transparent 34%),
    radial-gradient(circle at 82% 0%, rgba(39, 91, 168, 0.22), transparent 31%),
    linear-gradient(180deg, #080d16, #070a10 68%, #05070b);
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.app-shell { width: min(1320px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 22px;
  margin-top: 12px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(8, 13, 22, 0.84);
  backdrop-filter: blur(20px);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--accent), #2579b6);
  color: #04100c;
  font-weight: 900;
  box-shadow: 0 0 34px rgba(88, 230, 176, 0.2);
}
.brand strong, .brand small { display: block; }
.brand small {
  margin-top: 2px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.main-nav { display: flex; gap: 6px; }
.main-nav a {
  padding: 10px 12px;
  border-radius: 10px;
  color: #cbd8e8;
}
.main-nav a:hover { background: rgba(101, 169, 255, 0.1); color: #fff; }
.language-picker { display: grid; gap: 4px; color: var(--muted); font-size: 12px; }
.language-picker select {
  min-width: 150px;
  padding: 9px 32px 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0d1522;
  color: var(--text);
}
.section { padding: 88px 12px 20px; scroll-margin-top: 96px; }
.hero {
  min-height: 720px;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: 54px;
}
.eyebrow {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 840px;
  margin-bottom: 22px;
  font-size: clamp(48px, 6.5vw, 94px);
  line-height: 0.96;
  letter-spacing: -0.055em;
}
h2 { margin-bottom: 14px; font-size: clamp(34px, 4vw, 58px); letter-spacing: -0.035em; }
h3 { margin-bottom: 10px; font-size: 22px; }
.hero-copy > p, .section-intro {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.65;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { opacity: 0.58; cursor: not-allowed; }
.button.primary { background: linear-gradient(135deg, var(--accent), var(--accent-strong)); color: #04110c; font-weight: 800; }
.button.secondary { border-color: var(--line); background: rgba(22, 34, 54, 0.7); color: var(--text); }
.button.compact { min-height: 36px; padding: 7px 10px; border-color: var(--line); background: #172238; color: var(--text); }
.platform-status {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  padding: 13px 15px;
  border: 1px solid rgba(88, 230, 176, 0.18);
  border-radius: 14px;
  background: rgba(22, 107, 78, 0.12);
}
.platform-status strong, .platform-status small { display: block; }
.platform-status small { margin-top: 3px; color: var(--muted); }
.status-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 20px var(--accent); }
.hero-visual {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(19, 39, 65, 0.8), rgba(6, 13, 24, 0.98));
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.35);
}
.grid-plane {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(101, 169, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(101, 169, 255, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: perspective(500px) rotateX(58deg) scale(1.6) translateY(12%);
  transform-origin: bottom;
}
.core-node {
  position: absolute;
  left: 50%;
  top: 46%;
  display: grid;
  place-items: center;
  width: 180px;
  height: 180px;
  transform: translate(-50%, -50%) rotate(45deg);
  border: 1px solid rgba(88, 230, 176, 0.45);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(88, 230, 176, 0.16), rgba(101, 169, 255, 0.12));
  box-shadow: 0 0 90px rgba(88, 230, 176, 0.18);
}
.core-node > * { transform: rotate(-45deg); }
.core-node span { align-self: end; color: var(--muted); letter-spacing: 0.35em; font-size: 12px; }
.core-node strong { align-self: start; margin-top: 4px; font-size: 48px; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 32px; }
.card-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.game-card, .feature-card, .account-panel, .subscription-note {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
}
.game-card { overflow: hidden; }
.game-art {
  position: relative;
  min-height: 250px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(88, 230, 176, 0.18), transparent 32%),
    linear-gradient(135deg, #10243b, #0a111d);
}
.game-badge { position: absolute; top: 16px; right: 16px; padding: 7px 10px; border-radius: 999px; background: rgba(88, 230, 176, 0.12); color: var(--accent); font-size: 13px; }
.game-symbol { font-size: 110px; font-weight: 900; color: rgba(238, 245, 255, 0.9); text-shadow: 0 0 50px rgba(88, 230, 176, 0.3); }
.game-content, .feature-card { padding: 24px; }
.game-content p, .feature-card p, .subscription-note p { color: var(--muted); line-height: 1.6; }
.account-section { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 44px; align-items: start; }
.account-panel { padding: 26px; min-height: 300px; }
.auth-form { display: grid; gap: 16px; }
.auth-form label { display: grid; gap: 7px; color: #d7e2f0; }
.auth-form input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: #0b121e;
  color: var(--text);
}
.auth-form input:focus { border-color: rgba(88, 230, 176, 0.6); box-shadow: 0 0 0 3px rgba(88, 230, 176, 0.08); }
.auth-form small { color: var(--muted); }
.message-box { margin-bottom: 16px; padding: 12px 14px; border-radius: 12px; background: rgba(101, 169, 255, 0.12); color: #dcecff; }
.message-box.error { background: rgba(255, 127, 138, 0.12); color: #ffd8dc; }
.account-card { display: grid; grid-template-columns: auto 1fr auto; gap: 15px; align-items: center; }
.avatar { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 17px; background: linear-gradient(145deg, var(--accent), #4386c7); color: #06110d; font-weight: 900; font-size: 24px; }
.account-card strong, .account-card span, .account-card small { display: block; }
.account-card span { margin-top: 3px; color: var(--accent); }
.account-card small { margin-top: 3px; color: var(--muted); }
.closed-card { padding: 18px; border: 1px solid rgba(255, 191, 102, 0.2); border-radius: 14px; background: rgba(255, 191, 102, 0.08); }
.admin-grid { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: 20px; margin-top: 30px; }
.card-header { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.users-list { display: grid; gap: 10px; margin-top: 16px; }
.user-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(6, 12, 21, 0.42); }
.user-row strong, .user-row span, .user-row small { display: block; }
.user-row span, .user-row small { margin-top: 3px; color: var(--muted); }
.user-role { align-self: start; padding: 6px 9px; border-radius: 999px; background: rgba(88, 230, 176, 0.1); color: var(--accent) !important; font-size: 12px; }
.subscription-note { margin: 88px 12px 20px; padding: 30px; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; margin-top: 80px; padding: 26px 12px 34px; border-top: 1px solid var(--line); color: var(--muted); }

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; }
  .main-nav { order: 3; grid-column: 1 / -1; overflow-x: auto; }
  .hero, .account-section { grid-template-columns: 1fr; }
  .hero { padding-top: 60px; }
  .hero-visual { min-height: 420px; }
  .card-grid.three, .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .app-shell { width: min(100% - 20px, 1320px); }
  .site-header { top: 6px; padding: 11px; }
  .brand small { display: none; }
  .language-picker span { display: none; }
  .language-picker select { min-width: 120px; }
  .section { padding-top: 68px; }
  .hero { min-height: auto; }
  h1 { font-size: clamp(44px, 15vw, 68px); }
  .card-grid { grid-template-columns: 1fr; }
  .account-card { grid-template-columns: auto 1fr; }
  .account-card .button { grid-column: 1 / -1; }
}
