:root {
  color-scheme: dark;
  --ink: #faf7ff;
  --muted: #b9b2c9;
  --canvas: #11101a;
  --panel: #1a1827;
  --line: #38334a;
  --accent: #b8a3ff;
  --lime: #e2f1a3;
}

body {
  background: radial-gradient(ellipse at 85% 0%, #211833 0%, transparent 48rem), var(--canvas);
  color: var(--ink);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
}
p, .muted, .hint { color: var(--muted); }
strong { color: var(--ink); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline-color: var(--accent);
}
.wrap { max-width: 1320px; padding-inline: clamp(20px, 4.5vw, 66px); }
.site-header {
  max-width: 1320px;
  height: 76px;
  padding-inline: clamp(20px, 4.5vw, 66px);
  border-color: var(--line);
}
.brand { font-size: 25px; font-weight: 750; }
.brand img { object-fit: contain; }
.brand-dot, .plain, .eyebrow { color: var(--accent); }
.site-header nav { gap: clamp(12px, 2.1vw, 32px); color: var(--muted); }
.site-header nav a.active, .site-header nav a:hover { color: var(--ink); }
.site-header nav a.active { box-shadow: 0 2px var(--accent); }
.site-header .account-link { flex: 0 0 auto; }
.button, button.primary {
  background: var(--lime); border-color: var(--lime); color: #1b2416;
  border-radius: 9px; padding: 12px 19px; font-weight: 750;
}
.button:hover, button.primary:hover { box-shadow: 0 8px 27px #c8ec6630; }
.button-small { padding: 8px 15px; }
.secondary, button.secondary {
  background: #232037; border-color: #49405e; color: var(--ink);
  padding: 12px 17px; border-radius: 9px;
}
.secondary:hover { border-color: var(--accent); }
input, textarea, select { background: #14121f; border-color: #4a415f; color: var(--ink); }
input::placeholder { color: #a19ab2; }
.card, .feature-card { background: var(--panel); border-color: var(--line); border-radius: 16px; }
.page-head { padding-block: clamp(38px, 6vw, 75px) 30px; }
.page-head h1 { font-size: clamp(34px, 5vw, 57px); }
.page-head .eyebrow { margin-bottom: 14px; }
.hash { color: var(--muted); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  gap: clamp(26px, 4vw, 62px);
  min-height: auto;
  padding: clamp(36px, 5.7vw, 84px) 0 clamp(32px, 4.5vw, 64px);
  align-items: center;
}
.hero h1 { font-size: clamp(43px, 5.28vw, 77px); line-height: 1.04; letter-spacing: -.055em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .hero-kicker {
  display: flex; align-items: center; gap: 8px;
  color: var(--accent); font-size: 13px; font-weight: 650; margin: 0 0 16px;
}
.hero-kicker span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 16px #b8a3ff9e; }
.hero .hero-description { color: #d0c9df; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.65; margin: 20px 0 24px; }
.hero .hero-platform { font-size: 12px; line-height: 1.5; margin: 16px 0 0; }
.hero-art {
  margin: 0; padding: 0; overflow: hidden;
  aspect-ratio: 1.45; background: #201730;
  border: 1px solid #564067; border-radius: 18px;
  box-shadow: 0 20px 60px #0005;
}
.hero-art::before { display: none; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; }

.section { padding: clamp(38px, 5vw, 68px) 0; }
.section-head { align-items: end; margin-bottom: 22px; gap: 14px; }
.section-head h2 { font-size: clamp(29px, 4vw, 45px); }
.game-section { padding-top: 22px; border-top: 1px solid var(--line); }
.game-cards {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 14px;
}
.game-card {
  display: grid; grid-template-columns: minmax(100px, .46fr) minmax(0, 1fr);
  min-height: 170px; gap: 0; align-items: stretch;
  border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--panel);
  padding: 0;
}
.game-art {
  display: grid; place-items: center; min-height: 140px;
  background: radial-gradient(ellipse at center, #4d396b, #20162f);
  border-right: 1px solid var(--line);
}
.game-art img { width: min(88%, 150px); height: 145px; object-fit: contain; }
.game-custom-cover .game-art { position: relative; overflow: hidden; }
.game-custom-cover .game-art img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.game-cover-editor { display: grid; align-items: start; gap: 8px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; }
.game-cover-preview { width: 100%; max-height: 185px; object-fit: contain; background: #181421; border-radius: 8px; }
.game-cover-editor [hidden] { display: none; }
.game-cover-editor [data-cover-clear] { justify-self: start; }
.game-mystery .game-art {
  background: radial-gradient(ellipse at center, #30274b, transparent 72%),
              repeating-linear-gradient(130deg, #28213c 0 10px, #221c34 10px 20px);
}
.game-mystery .game-art span {
  font-size: 62px; line-height: 1; font-weight: 800; color: var(--accent); text-shadow: 0 0 24px #c1aaff55;
}
.game-copy { min-width: 0; padding: 18px; align-self: center; }
.game-copy h3 { margin: 8px 0 5px; font-size: clamp(18px, 2vw, 23px); overflow-wrap: anywhere; }
.game-copy p { font-size: 13px; }
.game-copy .launch-date { margin-bottom: 4px; }
.game-copy .launch-date small { font-size: 10px; white-space: nowrap; }
.game-copy .secondary, .game-copy .plain { display: inline-flex; margin-top: 12px; font-size: 12px; }
.game-preview-actions { gap: 8px; margin-top: 12px; }
.game-copy .game-preview-actions .secondary { margin-top: 0; padding: 8px 12px; }
#game-trailer video { max-height: min(68vh, 650px); }
#game-details { width: min(650px, 94vw); }
#game-details h2 { margin-right: 42px; overflow-wrap: anywhere; }
#game-details h3 { margin: 22px 0 8px; }
#game-details ol { margin: 8px 0 0; padding-left: 22px; }
#game-details li + li { margin-top: 8px; }
.haystack-limit { margin-top: 14px; color: var(--lime); }
.game-copy .game-access-note { margin-top: 8px; color: var(--lime); }
.badge {
  padding: 3px 8px; border-radius: 5px; font-size: 11px;
  background: #332950; border-color: #554773; color: #ece0ff;
}
.badge.green { background: #243725; border-color: #4a6246; color: #d4f2bb; }
.badge.grey { background: #28253a; border-color: #4d465f; color: #dbd1ec; }
.badge.orange { background: #3c2828; border-color: #694544; color: #ffc9b9; }
.feature-card { padding: clamp(20px, 2.5vw, 32px); }
.feature-card p { font-size: 14px; }
.feature-card .icon, .feature-card:nth-child(2) .icon, .feature-card:nth-child(3) .icon {
  width: 37px; height: 37px; font-size: 19px; margin-bottom: 18px;
  color: var(--accent); background: #2b2341; border-color: #4c3b68;
}
.gallery { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(24px, 5vw, 68px); border-block: 1px solid var(--line); }
.preview-image { height: auto; max-height: 390px; border-color: var(--line); border-radius: 14px; object-fit: contain; }
.gallery-text p { margin: 14px 0 19px; max-width: 40ch; }
.price-card, .price-card.featured {
  --tier-line: #48566b;
  --tier-action: #b9d0e8;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(160deg, #242134, #1b1727 68%);
  border-color: var(--tier-line);
  box-shadow: none;
}
.price-card.tier-vip { --tier-line: #765331; --tier-action: #ffd591; }
.price-card.tier-svip { --tier-line: #625778; --tier-action: #dddbe9; }
.price-card .plan-cover {
  display: block;
  width: 100%;
  height: clamp(134px, 15vw, 192px);
  object-fit: cover;
  border-bottom: 1px solid var(--tier-line);
}
.price-card .plan-body { display: flex; flex: 1; flex-direction: column; padding: clamp(18px, 2.2vw, 29px); }
.price-card .top { gap: 8px; flex-wrap: wrap; }
.price-card .top h3 { line-height: 1.22; font-size: clamp(23px, 2.4vw, 31px); }
.price-card .plan-name { position: relative; overflow-wrap: anywhere; }
.tier-vip .plan-name { color: #ffda86; }
.tier-svip .plan-name { color: #e4e6ef; }
@supports (background-clip: text) {
  .tier-vip .plan-name, .tier-svip .plan-name { background-clip: text; color: transparent; }
  .tier-vip .plan-name {
    background-image: linear-gradient(105deg, #d69330 12%, #ffdb87 36%, #fff7cf 48%, #ffe298 55%, #d69330 79%);
    background-size: 245% 100%;
    animation: vip-metal 4.8s ease-in-out infinite;
  }
  .tier-svip .plan-name { background-image: linear-gradient(168deg, #ffffff 14%, #dce1ec 41%, #b9c3d7 61%, #f6f3fa 84%); }
}
.tier-vip .plan-name::after {
  content: "";
  position: absolute;
  top: -4px;
  right: -8px;
  width: 15px;
  height: 15px;
  background: #fff2bd;
  clip-path: polygon(50% 0, 58% 40%, 100% 50%, 58% 60%, 50% 100%, 42% 60%, 0 50%, 42% 40%);
  opacity: 0;
  pointer-events: none;
  animation: vip-glint 4.8s ease-in-out infinite;
}
@keyframes vip-metal {
  0%, 25% { background-position: 95% 50%; }
  62%, 100% { background-position: 5% 50%; }
}
@keyframes vip-glint {
  0%, 43%, 72%, 100% { opacity: 0; transform: scale(.2) rotate(-20deg); }
  56% { opacity: .95; transform: scale(1) rotate(15deg); }
}
@media (prefers-reduced-motion: reduce) {
  .tier-vip .plan-name, .tier-vip .plan-name::after { animation: none; }
  .tier-vip .plan-name { background-position: 48% 50%; }
}
.price-card .price { font-size: clamp(28px, 3vw, 37px); margin-top: 18px; }
.price-card .plan-promotion { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 7px; font-size: 13px; }
.price-card .plan-description { font-size: 14px; margin: 13px 0 18px; }
.price-card .plan-body .button {
  margin-top: auto;
  background: var(--tier-action);
  border-color: var(--tier-action);
  color: #211a28;
}
.price-card .plan-body .button:disabled { background: #282536; border-color: #494055; color: #d0c4db; opacity: 1; }
@media (max-width: 760px) {
  .price-card .plan-cover { height: clamp(145px, 39vw, 205px); }
}
.content-section { padding-bottom: 60px; }
footer { border-color: var(--line); }

.admin-wrap { max-width: 1500px; }
.admin-workspace-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  padding: clamp(27px, 4vw, 51px) 0 24px;
}
.admin-workspace-head h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.05; margin-top: 8px; }
.admin-workspace-head .secondary { flex: 0 0 auto; }
.admin-layout { grid-template-columns: 208px minmax(0, 1fr); gap: 22px; }
.admin-main { gap: 16px; }
.admin-nav {
  min-width: 0;
  padding: 10px;
  background: #171522;
  border: 1px solid var(--line);
  border-radius: 15px;
}
.admin-nav-group { display: grid; gap: 4px; }
.admin-nav-group + .admin-nav-group { border-top: 1px solid #323044; margin-top: 7px; padding-top: 7px; }
.admin-nav-group > span { color: #a79cb9; font-size: 11px; font-weight: 650; padding: 5px 11px; }
.admin-nav button { color: #d0c7df; min-height: 35px; padding: 7px 10px; }
.admin-nav button.active { color: var(--ink); background: #33284b; border-color: #665180; }
.admin-metrics, .dashboard-secondary-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; }
.admin-main .overview-metric {
  background: linear-gradient(150deg, #241f34, #1a1828);
  display: grid;
  justify-items: start;
  align-content: start;
  min-height: 124px;
  padding: clamp(14px, 1.45vw, 22px);
}
.admin-main .metric-revenue {
  background: radial-gradient(ellipse at 90% 0%, #3b2b54, transparent 80%), #231d35;
  border-color: #665080;
}
.admin-main .overview-metric p { font-size: 13px; color: #d2c8de; line-height: 1.4; }
.admin-main .overview-metric strong { font-size: clamp(22px, 2.2vw, 33px); line-height: 1.2; margin: 8px 0 4px; overflow-wrap: anywhere; }
.admin-main .metric-revenue strong { color: #e5d5ff; }
.admin-main .overview-metric small { color: #b8abc9; font-size: 11px; }
.dashboard-workbench { display: grid; grid-template-columns: minmax(0, 2.12fr) minmax(229px, 1fr); gap: 14px; align-items: start; }
.dashboard-workbench > .card { min-width: 0; padding: clamp(16px, 2vw, 24px); }
.dashboard-workbench h2 { font-size: clamp(18px, 1.55vw, 23px); margin: 0; }
.dashboard-panel-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; flex-wrap: wrap; }
.dashboard-panel-head p { font-size: 12px; margin-top: 4px; }
.revenue-period { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid #40354e; border-radius: 9px; background: #171420; }
.revenue-period button {
  border: 1px solid transparent; background: transparent; color: #d0c3db;
  border-radius: 6px; font-size: 11px; font-weight: 650; padding: 6px 8px;
}
.revenue-period button[aria-pressed="true"] { border-color: #674b87; background: #3a2b52; color: #f6edff; }
.chart-summary { display: flex; flex-wrap: wrap; gap: 12px 30px; margin: 18px 0 21px; }
.chart-summary > div { display: grid; gap: 4px; min-width: 115px; }
.chart-summary span { color: #c5b8d3; font-size: 12px; }
.chart-summary strong { font-size: clamp(18px, 1.8vw, 26px); }
.revenue-chart {
  --chart-height: 146px;
  display: grid;
  grid-template-columns: max-content minmax(0,1fr);
  align-items: start;
  gap: 10px;
  margin: 0 0 26px;
}
.chart-values { height: var(--chart-height); display: flex; justify-content: space-between; flex-direction: column; color: #baadc9; font-variant-numeric: tabular-nums; font-size: 10px; text-align: right; }
.chart-plot {
  position: relative;
  height: var(--chart-height);
  display: grid;
  grid-template-columns: repeat(var(--chart-columns),minmax(0,1fr));
  border-top: 1px solid #353044;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(25% - 1px), #352e45 calc(25% - 1px), #352e45 25%);
}
.chart-plot::before { content: ""; position: absolute; inset: var(--chart-zero) 0 auto; border-top: 1px solid #9e88b8; pointer-events: none; }
.chart-column { position: relative; min-width: 0; }
.chart-bar {
  position: absolute;
  inset: var(--bar-top) 20% auto;
  height: var(--bar-size);
  min-height: 2px;
  background: linear-gradient(#d5b8ff, #8760ca);
  border-radius: 4px 4px 0 0;
}
.chart-bar.negative { background: linear-gradient(#b86088, #f0a8c7); border-radius: 0 0 4px 4px; }
.chart-tick { position: absolute; top: calc(100% + 6px); left: 50%; color: #b9abc9; font-size: 10px; white-space: nowrap; transform: translateX(-50%); }
.chart-column:first-child .chart-tick { left: 0; transform: none; }
.chart-column:last-child .chart-tick { left: auto; right: 0; transform: none; }
.chart-empty { min-height: 75px; padding: 18px 12px; border: 1px dashed #433953; border-radius: 9px; text-align: center; }
.revenue-details { border-top: 1px solid #3c334c; margin-top: 12px; padding-top: 10px; }
.revenue-details summary { cursor: pointer; color: #dcc9f9; font-size: 13px; font-weight: 600; }
.dashboard-shortcuts { display: grid; gap: 7px; margin-top: 13px; }
.admin-shortcut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 11px;
  border-radius: 9px;
  background: #262034;
  color: #eee4f8;
  border: 1px solid #473856;
  font-size: 13px;
  text-align: left;
}
.admin-shortcut:hover { border-color: #a07cc9; background: #322641; }
.admin-shortcut span:last-child { color: #d8b8ff; font-size: 15px; }
.dashboard-service { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; border-top: 1px solid #3c334c; margin-top: 16px; padding-top: 12px; font-size: 12px; }
.dashboard-service .service-normal { color: #b4e2bf; }
.dashboard-service .service-maintenance { color: #ffd39b; }
.dashboard-secondary-metrics .overview-metric { min-height: 99px; }
.dashboard-secondary-metrics .overview-metric strong { font-size: clamp(20px, 2vw, 27px); }
.dashboard-bottom .admin-shortcut { margin-top: 11px; }
@media(max-width:1060px){
  .dashboard-workbench { grid-template-columns: 1fr; }
  .dashboard-shortcuts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-metrics,.dashboard-secondary-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:760px){
  .admin-layout { grid-template-columns: minmax(0,1fr); gap: 15px; }
  .admin-nav-group { display: flex; flex: 0 0 auto; align-items: center; }
  .admin-nav-group + .admin-nav-group { border-top: 0; border-left: 1px solid #443753; margin: 0; padding: 0 0 0 5px; }
  .admin-nav-group > span { display: none; }
  .admin-nav-group button { white-space: nowrap; }
}
@media(max-width:470px){
  .chart-column:not(:first-child):not(:last-child) .chart-tick { display: none; }
  .revenue-chart { --chart-height: 118px; }
  .admin-workspace-head h1 { font-size: 33px; }
}
table th { color: var(--muted); }
table td, table th { border-color: var(--line); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.game-admin-toolbar { margin: 0 0 15px; }
#admin-dialog { background: var(--panel); border-color: var(--line); }

#terms-dialog { width: min(460px, calc(100vw - 28px)); max-height: calc(100% - 28px); padding: 22px; overflow-y: auto; background: var(--panel); border-color: var(--line); }
#terms-dialog p { margin: 12px 0; line-height: 1.6; }
#terms-copy { border-block-start: 1px solid var(--line); margin-top: 18px; padding-top: 4px; }
.terms-check { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0 8px; }
.terms-check input { flex: 0 0 auto; margin: 3px 0 0; width: 18px; height: 18px; }
#terms-error:empty { display: none; }
#terms-error { color: #ffc3ad; }
#admin-dialog h3 { margin-top: 20px; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { aspect-ratio: 1.65; }
  .hero .hero-description { max-width: 47ch; }
  .gallery { grid-template-columns: 1fr; }
  .game-cards { grid-template-columns: 1fr; }
}
@media (max-width: 485px) {
  .site-header { gap: 11px; height: 62px; }
  .site-header .account-link { gap: 6px; padding-inline: 10px; }
  .site-header nav { padding: 15px; background: var(--panel); gap: 10px; }
  .hero h1 { font-size: clamp(36px, 10.8vw, 52px); }
  .hero-art { aspect-ratio: 1.35; }
  .game-card { grid-template-columns: 104px minmax(0, 1fr); }
  .game-art img { height: 106px; }
  .game-copy { padding: 13px; }
  .section-head { align-items: start; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
