:root {
  --bg: #050914;
  --panel: rgba(9, 17, 30, 0.72);
  --panel-strong: rgba(8, 13, 22, 0.9);
  --line: rgba(160, 210, 255, 0.26);
  --line-hot: rgba(255, 151, 86, 0.45);
  --text: #eef6ff;
  --muted: #aab8ca;
  --blue: #70c6ff;
  --red: #8b171d;
  --red2: #b32629;
  --ok: #66e0a3;
  --bad: #ff8a80;
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.bg-system, .bg-layer, .bg-veil, .bg-particles, .bg-fog {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.bg-system { z-index: -5; overflow: hidden; background: #02050b; }
.bg-layer {
  opacity: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  transition: opacity 1500ms ease;
  animation: slowZoom 18s ease-in-out infinite alternate;
}
.bg-layer.is-active { opacity: 1; }
.bg-veil {
  z-index: 2;
  background:
    radial-gradient(circle at 25% 22%, rgba(65, 170, 255, 0.2), transparent 32%),
    radial-gradient(circle at 15% 70%, rgba(255, 100, 35, 0.16), transparent 28%),
    linear-gradient(90deg, rgba(3, 8, 17, .55), rgba(3, 7, 14, .22) 44%, rgba(3, 7, 14, .78)),
    linear-gradient(180deg, rgba(3, 7, 14, .35), rgba(3, 7, 14, .84));
}
.bg-particles {
  z-index: 3;
  opacity: .55;
  background-image:
    radial-gradient(circle, rgba(136, 211, 255, .8) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255, 143, 87, .7) 0 1px, transparent 1.5px);
  background-size: 120px 120px, 180px 180px;
  animation: drift 28s linear infinite;
}
.bg-fog {
  z-index: 4;
  opacity: .26;
  background: linear-gradient(100deg, transparent, rgba(190, 220, 255, .18), transparent);
  transform: translateX(-55%);
  animation: fogMove 16s ease-in-out infinite;
}

.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 42px;
  background: linear-gradient(180deg, rgba(2, 7, 15, .78), rgba(2, 7, 15, .22));
  border-bottom: 1px solid rgba(155, 205, 255, .16);
  backdrop-filter: blur(12px);
}
.topbar.scrolled { background: rgba(3, 8, 16, .92); }
.brand {
  font-family: Cinzel, serif;
  font-size: 21px;
  letter-spacing: .06em;
  text-shadow: 0 0 24px rgba(120, 200, 255, .55);
}
.nav { display: flex; align-items: center; gap: 18px; }
.nav a, .nav-logout {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  padding: 8px 2px;
  transition: color .2s ease, transform .2s ease;
}
.nav a::after, .nav-logout::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  transform: scaleX(0);
  transition: transform .22s ease;
}
.nav a:hover, .nav a.active, .nav-logout:hover { color: white; transform: translateY(-1px) scale(1.03); }
.nav a:hover::after, .nav a.active::after, .nav-logout:hover::after { transform: scaleX(1); }
.burger { display: none; background: transparent; border: 0; width: 40px; }
.burger span { display: block; height: 2px; margin: 7px 0; background: white; }

main { min-height: calc(100vh - 80px); }
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: center;
  gap: 44px;
  padding: 110px 7vw 70px;
}
.hero-content { max-width: 760px; }
.eyebrow {
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 12px;
  margin: 0 0 14px;
}
h1, h2, h3 { margin-top: 0; line-height: 1.08; }
h1 {
  font-family: Cinzel, serif;
  font-size: clamp(42px, 7vw, 92px);
  letter-spacing: .02em;
  margin-bottom: 20px;
}
h2 { font-size: clamp(28px, 3vw, 42px); }
h3 { font-size: 20px; }
p { color: var(--muted); line-height: 1.65; }
.lead { max-width: 660px; font-size: 20px; color: #dce9f8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  color: white;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  overflow: hidden;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent, rgba(255,255,255,.22), transparent);
  transform: translateX(-120%);
  transition: transform .45s ease;
}
.btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 0 28px rgba(95, 180, 255, .22); border-color: rgba(160, 220, 255, .55); }
.btn:hover::before { transform: translateX(120%); }
.btn.primary { background: linear-gradient(180deg, var(--red2), var(--red)); border-color: var(--line-hot); }
.btn.ghost { background: rgba(10, 24, 40, .54); }
.btn.text { border-color: transparent; background: transparent; }
button.btn { font: inherit; }

.status-panel, .card, .auth-card, .download-box, .metric {
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 18px 55px rgba(0,0,0,.28);
}
.status-panel { padding: 20px; }
.status-panel div { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.status-panel div:last-child { border-bottom: 0; }
.status-panel span { color: var(--muted); }
.status-panel .ok { color: var(--ok); }
.status-panel .bad { color: var(--bad); }
.status-panel .rates-lines { text-align: right; line-height: 1.35; font-size: 14px; }

.band { max-width: 1180px; margin: 0 auto; padding: 70px 24px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
.mini-grid, .cards, .account-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.account-manager { margin-top: 18px; }
.game-account-list { display: grid; gap: 8px; margin-bottom: 18px; }
.game-account-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; background: rgba(4, 9, 17, .72); border: 1px solid var(--line); }
.game-account-row div { display: flex; align-items: baseline; gap: 12px; }
.game-account-row span, .game-account-row time { color: var(--muted); font-size: 13px; }
.game-account-form { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; }
.mini-grid { grid-template-columns: repeat(2, 1fr); }
.metric, .card, .download-box { padding: 22px; }
.metric span { display: block; color: var(--muted); margin-bottom: 8px; }
.metric strong { font-size: 28px; color: white; }
.card { transition: transform .22s ease, border-color .22s ease, background .22s ease; }
.card:hover { transform: translateY(-4px); border-color: rgba(130,210,255,.5); background: rgba(12, 24, 40, .78); }
.news-card img, .article img { border-radius: var(--radius); aspect-ratio: 16/9; object-fit: cover; margin-bottom: 16px; }
.news-card time, .article time { color: var(--blue); font-size: 13px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.page-hero { padding: 150px 7vw 50px; max-width: 980px; }
.page-hero h1 { font-size: clamp(38px, 5vw, 68px); }
.article { max-width: 860px; margin: 0 auto; padding: 140px 24px 80px; }
.back { color: var(--blue); display: inline-block; margin-bottom: 18px; }

.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 110px 20px 50px; }
.auth-card { width: min(460px, 100%); padding: 28px; }
.auth-card h1 {
  max-width: 100%;
  font-size: 38px;
  line-height: 1.08;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.article-content p { white-space: pre-line; }
form { display: grid; gap: 14px; }
label { display: grid; gap: 7px; color: var(--muted); }
input, textarea, select {
  width: 100%;
  background: rgba(4, 9, 17, .82);
  color: white;
  border: 1px solid rgba(145, 205, 255, .3);
  border-radius: var(--radius);
  padding: 12px 13px;
  font: inherit;
  outline: none;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(112,198,255,.12); }
.check { grid-template-columns: auto 1fr; align-items: center; }
.check input { width: auto; }
.form-result { min-height: 24px; color: var(--blue); }
.form-result.error { color: var(--bad); }
.custom-top-up { max-width: 590px; margin-top: 16px; }
.custom-top-up form { grid-template-columns: repeat(2, minmax(0, 1fr)) auto; align-items: end; }

.account-nav { display: flex; flex-wrap: wrap; gap: 10px; max-width: 1180px; margin: 0 auto; padding: 120px 24px 0; }
.account-nav a { padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(8,15,26,.72); }
.admin-hero { padding-bottom: 22px; }
.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 10px;
}
.admin-nav a {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8,15,26,.78);
  color: #dce9f8;
  transition: transform .2s ease, border-color .2s ease;
}
.admin-nav a:hover { transform: translateY(-2px); border-color: rgba(130,210,255,.55); }
.admin-panel {
  margin-top: 0;
}
.admin-list {
  display: grid;
  gap: 14px;
}
.admin-list.compact { margin-top: 22px; }
.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(14px);
}
.admin-row h3 { margin-bottom: 6px; }
.admin-row p { margin: 0; }
.admin-row small { color: #8295ab; }
.row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 8px;
  margin-bottom: 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--blue);
  background: rgba(6, 14, 24, .8);
  font-size: 12px;
  text-transform: uppercase;
}
.badge.published, .badge.paid { color: var(--ok); border-color: rgba(102,224,163,.36); }
.badge.draft, .badge.pending { color: #ffd18f; border-color: rgba(255,209,143,.36); }
.badge.refunded, .badge.failed, .badge.canceled { color: var(--bad); border-color: rgba(255,138,128,.38); }
.btn.danger { background: rgba(82, 16, 22, .82); border-color: rgba(255, 118, 105, .42); }
.upload-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .45fr);
  gap: 10px;
}
.admin-search {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 18px;
}
.cash-form {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
}
code {
  color: #b8dfff;
  word-break: break-word;
  white-space: normal;
}
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); }
th, td { padding: 13px; border-bottom: 1px solid rgba(255,255,255,.08); text-align: left; }
th { color: var(--blue); }
.admin-form { max-width: 720px; }
.footer { padding: 32px; color: var(--muted); text-align: center; border-top: 1px solid rgba(255,255,255,.08); background: rgba(3,8,16,.72); }


@keyframes slowZoom { from { transform: scale(1.03); } to { transform: scale(1.09); } }
@keyframes drift { from { transform: translate3d(0,0,0); } to { transform: translate3d(-120px,-180px,0); } }
@keyframes fogMove { 0%,100% { transform: translateX(-60%); } 50% { transform: translateX(60%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 900px) {
  .topbar { padding: 0 18px; }
  .burger { display: block; }
  .nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    background: rgba(3, 8, 16, .96);
  }
  .nav.open { display: flex; }
  .hero, .two-col { grid-template-columns: 1fr; }
  .hero { padding-top: 118px; }
  .cards, .account-grid, .mini-grid { grid-template-columns: 1fr; }
  .admin-row, .upload-line, .cash-form, .admin-search, .game-account-form { grid-template-columns: 1fr; }
  .custom-top-up form { grid-template-columns: 1fr; }
  .row-actions { justify-content: flex-start; }
  .section-head { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 520px) {
  .auth-card { padding: 22px 18px; }
  .auth-card h1 { font-size: 30px; }
}
