﻿/* ==========================================================================
   INFERNAL — front-end recreation
   Original implementation. Dark, compact, card-based layout.
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Noto Sans Thai";
  src: url("fonts/NotoSansThai-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans Thai";
  src: url("fonts/NotoSansThai-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans Thai";
  src: url("fonts/NotoSansThai-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans Thai";
  src: url("fonts/NotoSansThai-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans Thai";
  src: url("fonts/NotoSansThai-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #08080a;
  --fg: #f5f5f7;
  --card: #101014;
  --card-hover: #17171b;
  --card-fg: #f5f5f7;
  --muted: #9a9aa4;
  --muted-2: #737373;
  --secondary: #151518;
  --border: rgba(255, 255, 255, 0.09);
  --border-soft: rgba(255, 255, 255, 0.06);
  --primary: #f5f5f7;
  --primary-fg: #101014;
  --emerald: #34d399;
  --amber: #fbbf24;
  --ring: #d4d4d8;
  --gray-glow: #d4d4d8;

  --font-sans: "Noto Sans Thai", "LINE Seed Sans TH", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 1024px;
  --nav-h: 56px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --bounce: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--bg);
  background-image: radial-gradient(900px 420px at 50% -220px, rgba(255, 255, 255, 0.035), transparent 70%);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, figure {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

::selection {
  background: rgba(163, 163, 163, 0.4);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #525252, #737373);
  border-radius: 999px;
  border: 2px solid #0a0a0a;
  box-shadow: 0 0 10px rgba(163, 163, 163, 0.3);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #737373, #a3a3a3);
  box-shadow: 0 0 15px rgba(163, 163, 163, 0.5);
}

/* ---------- Utilities ---------- */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 16px;
}

.icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  pointer-events: none;
}

.icon-sm { width: 14px; height: 14px; }
.icon-xs { width: 12px; height: 12px; }

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.dot-emerald {
  background: var(--emerald);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  transform: translateY(-160%);
  background: var(--fg);
  color: #08080a;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn .icon {
  opacity: 0.75;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-fg);
}

.btn-primary:hover {
  background: #e5e5e5;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--fg);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.07);
}

.btn-sm {
  height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: rgba(10, 10, 10, 0.80);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.nav.is-scrolled {
  background: rgba(10, 10, 10, 0.92);
  border-bottom-color: var(--border-soft);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--nav-h);
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  border-radius: 8px;
  transition: opacity 0.15s ease;
}

.brand:hover {
  opacity: 0.8;
}

.brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.nav-burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 8px;
  color: var(--muted);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-burger:hover {
  background: var(--secondary);
  color: var(--fg);
}

.nav-burger .icon {
  width: 20px;
  height: 20px;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2px;
  margin-left: 16px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-link .icon {
  width: 16px;
  height: 16px;
}

.nav-link:hover {
  color: var(--fg);
}

.nav-link.is-active {
  color: #ffffff;
  background: rgba(163, 163, 163, 0.1);
  box-shadow: 0 0 15px rgba(163, 163, 163, 0.15);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: 0 0 auto;
}

.guide-btn {
  display: none;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.guide-btn .icon {
  color: var(--muted);
}

.guide-btn:hover {
  background: var(--secondary);
  border-color: rgba(255, 255, 255, 0.16);
}

.lang-switch {
  display: none;
  align-items: center;
  gap: 2px;
  padding: 2px;
  background: rgba(38, 38, 38, 0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.lang-btn {
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--muted);
  transition: color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.lang-btn:hover {
  color: var(--fg);
}

.lang-btn.is-active {
  background: var(--bg);
  color: var(--fg);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.login-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.login-btn:hover {
  color: var(--fg);
}

.login-btn .icon {
  width: 16px;
  height: 16px;
}

/* ---------- Hero ---------- */
.hero-section {
  padding: 24px 0 8px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, #111114 0%, #0e0e11 100%);
  border: 1px solid rgba(255, 255, 255, 0.035);
  padding: 24px;
  animation: fade-up 0.5s var(--ease) both;
}

.hero-watermark {
  display: none;
  position: absolute;
  top: 50%;
  right: 32px;
  width: 176px;
  height: 176px;
  transform: translateY(-50%);
  opacity: 0.08;
  pointer-events: none;
  user-select: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 672px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 4px 14px;
  background: rgba(38, 38, 38, 0.8);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}

.hero-copy h1 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-wrap: balance;
}

.hero-copy p {
  margin-top: 8px;
  max-width: 640px;
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}

/* ---------- Scripts ---------- */
.scripts-section {
  padding: 24px 0 32px;
  scroll-margin-top: 80px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.section-heading {
  min-width: 0;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title > .icon {
  color: var(--muted);
}

.section-title h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.section-desc {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.text-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s ease;
}

.text-link:hover {
  color: var(--fg);
}

.script-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.script-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  color: inherit;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  animation: fade-up 0.5s var(--ease) both;
}

.script-card:hover {
  background: var(--card-hover);
  border-color: var(--border);
}

.script-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.script-thumb {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--secondary);
  border: 1px solid var(--border-soft);
}

.script-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.script-info {
  min-width: 0;
  flex: 1;
  padding-top: 1px;
}

.script-info h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--card-fg);
}

.place-id {
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.script-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}

.rating {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.icon-star {
  width: 12px;
  height: 12px;
  color: var(--amber);
  fill: currentColor;
  stroke: none;
}

.rating-score {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--card-fg);
}

.rating-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}

.buy-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.15s ease;
}

.script-card:hover .buy-link {
  color: var(--fg);
}

/* ---------- Footer ---------- */
.footer {
  padding: 8px 0 24px;
}

.footer-card {
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.footer-brand img {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  object-fit: contain;
}

.footer-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--fg);
}

.online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--emerald);
  white-space: nowrap;
}

.online .dot {
  width: 6px;
  height: 6px;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
}

.footer-links a,
.footer-links button {
  font-size: 12px;
  color: var(--muted);
  transition: color 0.15s ease;
}

.footer-links a:hover,
.footer-links button:hover {
  color: var(--fg);
}

.copyright {
  font-size: 11px;
  color: var(--muted-2);
}

/* ---------- Mobile menu ---------- */
.menu-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fg);
  overflow: hidden;
}

.menu-dialog::backdrop {
  background: rgba(0, 8, 20, 0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.menu-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: min(320px, 88vw);
  height: 100%;
  padding: 20px;
  overflow-y: auto;
  background: linear-gradient(135deg, #0a1628 0%, #000814 100%);
  border-right: 1px solid rgba(163, 163, 163, 0.3);
  box-shadow: 4px 0 30px rgba(163, 163, 163, 0.2);
  animation: slide-in 0.26s var(--ease);
}

.menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.menu-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--gray-glow);
  text-shadow: 0 0 10px rgba(163, 163, 163, 0.4);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--gray-glow);
  transition: all 0.3s ease;
  position: relative;
}

.icon-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: rgba(163, 163, 163, 0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.icon-btn:hover::before {
  opacity: 1;
}

.icon-btn:hover {
  color: #ffffff;
  box-shadow: 0 0 15px rgba(163, 163, 163, 0.4);
}

.icon-btn .icon {
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.icon-btn:hover .icon {
  transform: scale(1.2);
}

.menu-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.menu-links a,
.menu-links button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  color: var(--muted);
  transition: all 0.3s ease;
  position: relative;
}

.menu-links a::before,
.menu-links button::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(163, 163, 163, 0.15), rgba(115, 115, 115, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.menu-links a:hover::before,
.menu-links button:hover::before {
  opacity: 1;
}

.menu-links a:hover,
.menu-links button:hover {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(163, 163, 163, 0.5);
}

.menu-link-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(163, 163, 163, 0.2), rgba(115, 115, 115, 0.1));
  color: var(--gray-glow);
  box-shadow: 0 0 10px rgba(163, 163, 163, 0.2);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.menu-links a:hover .menu-link-icon,
.menu-links button:hover .menu-link-icon {
  box-shadow: 0 0 20px rgba(163, 163, 163, 0.5);
  transform: scale(1.1);
}

.menu-link-icon .icon {
  width: 16px;
  height: 16px;
}

.menu-foot {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(163, 163, 163, 0.2);
}

.menu-foot .lang-switch {
  display: inline-flex;
  width: fit-content;
}

.menu-note {
  font-size: 11px;
  text-align: center;
  color: var(--muted-2);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(10, 22, 40, 0.95), rgba(0, 8, 20, 0.95));
  border: 1px solid rgba(163, 163, 163, 0.4);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  box-shadow: 
    0 16px 48px rgba(0, 0, 0, 0.55),
    0 0 30px rgba(163, 163, 163, 0.3);
  font-size: 12px;
  line-height: 1.5;
  color: #ffffff;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 16px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  animation: pulse-border 2s ease-in-out infinite;
}

/* ---------- Animations ---------- */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-in {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes space-drift {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(20px, -20px) scale(1.05);
  }
  50% {
    transform: translate(-15px, 15px) scale(0.98);
  }
  75% {
    transform: translate(10px, -10px) scale(1.02);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-8px) rotate(1deg);
  }
  50% {
    transform: translateY(-4px) rotate(-1deg);
  }
  75% {
    transform: translateY(-6px) rotate(0.5deg);
  }
}

@keyframes glow-pulse {
  0%, 100% {
    text-shadow: 
      0 0 20px rgba(163, 163, 163, 0.5),
      0 0 40px rgba(163, 163, 163, 0.3);
  }
  50% {
    text-shadow: 
      0 0 30px rgba(163, 163, 163, 0.8),
      0 0 60px rgba(163, 163, 163, 0.5);
  }
}

@keyframes pulse-border {
  0%, 100% {
    box-shadow: 0 0 10px rgba(163, 163, 163, 0.1);
  }
  50% {
    box-shadow: 0 0 20px rgba(163, 163, 163, 0.3);
  }
}

@keyframes rotate-glow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes rotate-border {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes star-bounce {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.3) rotate(-10deg); }
  50% { transform: scale(1.1) rotate(5deg); }
  75% { transform: scale(1.2) rotate(-5deg); }
}

@keyframes fade-slide-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* ---------- Breakpoints ---------- */
@media (min-width: 640px) {
  .container {
    padding-inline: 24px;
  }

  .hero-section {
    padding-top: 32px;
    padding-bottom: 12px;
  }

  .hero-card {
    padding: 32px;
  }

  .hero-copy h1 {
    font-size: 30px;
  }

  .hero-copy p {
    font-size: 14px;
  }

  .scripts-section {
    padding-block: 32px;
  }

  .section-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
  }

  .text-link {
    align-self: auto;
  }

  .script-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lang-switch {
    display: inline-flex;
  }

  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 768px) {
  :root {
    --nav-h: 64px;
  }

  .nav-burger {
    display: none;
  }

  .nav-links {
    display: flex;
  }

  .guide-btn {
    display: inline-flex;
  }

  .hero-watermark {
    display: block;
  }

  .hero-card {
    padding: 40px;
  }

  .hero-copy h1 {
    font-size: 36px;
  }

  .hero-badge {
    font-size: 12px;
  }
}

@media (min-width: 768px) and (max-width: 899px) {
  .nav-link {
    padding-inline: 8px;
    font-size: 13px;
  }

  .nav-actions {
    gap: 6px;
  }

  .guide-btn {
    width: 32px;
    padding: 0;
    justify-content: center;
  }

  .guide-btn span {
    display: none;
  }

  .login-btn {
    padding-inline: 6px;
    font-size: 13px;
  }
}

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

@media (max-width: 639px) {
  .guide-btn {
    display: none;
  }
}

@media (max-width: 399px) {
  .login-btn span {
    display: none;
  }

  .login-btn {
    width: 36px;
    justify-content: center;
    padding: 0;
  }
}

/* ---------- Games catalog ---------- */
.games-main {
  padding: 32px 0 40px;
}

.games-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.games-title {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.games-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.games-count {
  display: inline-block;
  margin-left: 2px;
  color: inherit;
}

.search-wrap {
  position: relative;
  width: 100%;
}

.search-wrap > .icon {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.game-search {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 36px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--card);
  color: var(--fg);
  font: inherit;
  font-size: 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.game-search::placeholder {
  color: var(--muted);
}

.game-search:focus {
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.10);
}

.game-search::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 24px;
}

.game-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  transition: background-color 0.15s ease;
}

.game-card[hidden] {
  display: none;
}

.game-card:hover {
  background: var(--card-hover);
}

.game-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  overflow: hidden;
  background: var(--secondary);
}

.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s var(--ease);
}

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

.game-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.2) 52%, transparent);
  pointer-events: none;
}

.game-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  height: 16px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  font-size: 9px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.game-name-wrap {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  pointer-events: none;
}

.game-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #fff;
}

.game-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  padding: 10px 12px;
}

.game-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.icon-star-line {
  width: 12px;
  height: 12px;
  color: rgba(161, 161, 161, 0.8);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.game-score {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.game-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}

.game-view {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--muted);
  transition: color 0.15s ease;
}

.game-view .icon {
  width: 12px;
  height: 12px;
  margin-left: 2px;
  transition: transform 0.2s ease;
}

.game-card:hover .game-view {
  color: var(--fg);
}

.game-card:hover .game-view .icon {
  transform: translateX(2px);
}

.game-card.is-static {
  cursor: default;
}

.game-card.is-static:hover .game-thumb img {
  transform: none;
}

.game-card.is-static:hover .game-view {
  color: var(--muted);
}

.game-empty {
  display: none;
  padding: 56px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.game-empty.is-visible {
  display: block;
}

@media (min-width: 640px) {
  .games-main {
    padding: 40px 0 56px;
  }

  .games-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
  }

  .games-title {
    font-size: 30px;
  }

  .games-sub {
    font-size: 14px;
  }

  .search-wrap {
    width: 256px;
    flex: 0 0 auto;
  }

  .game-search {
    font-size: 14px;
  }

  .game-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .game-name {
    font-size: 16px;
  }

  .game-foot {
    padding: 12px;
  }
}

@media (min-width: 768px) {
  .search-wrap {
    width: 288px;
  }

  .game-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

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

@media (max-width: 359px) {
  .game-count {
    display: none;
  }
}

/* ---------- Demo auth pages ---------- */
.auth-page {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background-image: radial-gradient(700px 380px at 50% -140px, rgba(255, 255, 255, 0.06), transparent 70%);
}

.auth-nav {
  border-bottom: 1px solid var(--border-soft);
}

.auth-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.auth-brand img {
  width: 28px;
  height: 28px;
}

.auth-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  transition: color 0.15s ease;
}

.auth-home:hover {
  color: var(--fg);
}

.auth-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 32px 16px 48px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 32px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.auth-card-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  text-align: center;
}

.auth-card-head img {
  width: 48px;
  height: 48px;
}

.auth-card h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-sub {
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}

.demo-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 20px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
  color: #d4d4d8;
  font-size: 11px;
  line-height: 1.6;
}

.demo-banner .dot {
  margin-top: 5px;
  background: var(--amber);
  box-shadow: none;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.field input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0b0b0e;
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.field input::placeholder {
  color: #8a8a94;
}

.field input:focus {
  border-color: rgba(255, 255, 255, 0.55);
  background: #0a0a0c;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.10);
}

.auth-submit {
  width: 100%;
  height: 42px;
  margin-top: 4px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-size: 11px;
  color: var(--muted-2);
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-discord {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--fg);
  font-size: 12px;
  font-weight: 500;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-discord:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
}

.auth-note {
  margin-top: 16px;
  font-size: 11px;
  line-height: 1.7;
  text-align: center;
  color: var(--muted-2);
}

.auth-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
  transition: color 0.15s ease;
}

.auth-back:hover {
  color: var(--fg);
}

/* ---------- Demo dashboard ---------- */
.dash-page {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.dash-main {
  flex: 1;
  padding: 32px 0 56px;
}

.dash-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.dash-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--emerald);
}

.dash-title {
  margin-top: 6px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dash-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  max-width: 180px;
  padding: 0 10px 0 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}

.user-chip > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4d4d8, #26262b);
  color: #111114;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.logout-btn:hover {
  color: var(--fg);
  background: var(--secondary);
}

.dash-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 24px;
  padding: 10px 14px;
  border: 1px solid rgba(252, 187, 0, 0.22);
  border-radius: 10px;
  background: rgba(252, 187, 0, 0.07);
  color: #e4e4e7;
  font-size: 11px;
  line-height: 1.6;
}

.key-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.key-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
}

.key-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.key-thumb {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 12px;
  background: var(--secondary);
}

.key-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.key-meta {
  flex: 1;
  min-width: 0;
}

.key-meta h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
}

.key-meta p {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--emerald);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge .dot {
  width: 5px;
  height: 5px;
  background: currentColor;
  box-shadow: none;
}

.key-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0b0b0e;
}

.key-code code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #e5e5e5;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--muted);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.copy-btn:hover {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.06);
}

.key-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
}

.key-foot strong {
  color: var(--fg);
  font-weight: 600;
}

.dash-footer {
  padding-bottom: 24px;
}

.dash-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted-2);
}

.dash-footer-inner a {
  color: var(--muted);
}

.dash-footer-inner a:hover {
  color: var(--fg);
}

@media (min-width: 768px) {
  .key-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 479px) {
  .auth-card {
    padding: 24px 20px;
  }

  .user-chip {
    max-width: 120px;
  }

  .logout-btn {
    width: 32px;
    justify-content: center;
    padding: 0;
  }

  .logout-btn span {
    display: none;
  }
}

/* ---------- Store page ---------- */
.store-main {
  padding: 20px 0 40px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
  transition: color 0.15s ease;
}

.breadcrumb a:hover {
  color: var(--fg);
}

.breadcrumb-sep {
  color: var(--muted-2);
}

.breadcrumb-current {
  min-width: 0;
  color: var(--fg);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.store-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
  transition: color 0.15s ease;
}

.store-back:hover {
  color: var(--fg);
}

.store-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 14px;
  padding: 20px;
  border-radius: 24px;
  background: var(--card);
}

.store-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: 0.14;
  pointer-events: none;
  user-select: none;
}

.store-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.3);
  filter: blur(42px);
}

.store-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.store-thumb {
  width: 96px;
  height: 96px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--secondary);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.store-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.store-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.store-title {
  min-width: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--fg);
  overflow-wrap: anywhere;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--secondary);
  color: var(--fg);
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.store-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  font-size: 11px;
  color: var(--muted);
}

.store-version {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--secondary);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
}

.store-sep {
  color: var(--muted-2);
}

.store-place {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  cursor: pointer;
  transition: color 0.15s ease;
}

.store-place:hover {
  color: var(--fg);
}

.store-place .icon {
  width: 12px;
  height: 12px;
  color: var(--muted-2);
}

.store-place:hover .icon {
  color: var(--fg);
}

.store-place.is-disabled {
  cursor: default;
  opacity: 0.7;
}

.store-place.is-disabled:hover {
  color: inherit;
}

.store-rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.store-stars {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  flex: 0 0 auto;
}

.store-stars .icon {
  width: 14px;
  height: 14px;
  color: var(--amber);
  fill: currentColor;
  stroke: none;
}

.store-stars .icon.is-off {
  color: rgba(255, 255, 255, 0.16);
}

.store-score {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--fg);
}

.store-review-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.store-desc {
  max-width: 640px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.store-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

.store-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--secondary);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.store-chip .icon {
  width: 12px;
  height: 12px;
  color: var(--muted);
}

.store-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.store-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.store-aside {
  min-width: 0;
}

.store-card {
  padding: 20px;
  border-radius: 16px;
  background: var(--card);
}

.store-card-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg);
}

.store-card-title-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.store-card-title-inline .icon {
  color: var(--muted);
}

.store-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.store-card-head .icon {
  color: var(--muted);
}

.store-about-text {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

.store-steps {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.store-steps li {
  padding-left: 2px;
}

.store-steps li + li {
  margin-top: 8px;
}

.store-steps li::marker {
  color: var(--muted-2);
}

.store-reviews-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.store-reviews-desc {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

.store-review-total {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.review-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--secondary);
}

.review-aggregate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.review-score-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
}

.review-score {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--fg);
}

.review-out {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.review-total-label {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.review-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.review-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.review-bar-label {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1px;
  width: 24px;
  flex: 0 0 auto;
  font-family: var(--font-mono);
  color: var(--muted);
}

.review-bar-label .icon {
  width: 9px;
  height: 9px;
  color: var(--muted);
  fill: currentColor;
}

.review-bar-track {
  display: block;
  flex: 1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
}

.review-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 0.3s var(--ease);
}

.review-bar-count {
  width: 24px;
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 10px;
  text-align: right;
  color: var(--muted);
}

.store-review-list {
  margin-top: 16px;
}

.store-review {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}

.review-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.review-user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.review-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--secondary);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.review-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg);
}

.review-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 16px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--secondary);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 9px;
  white-space: nowrap;
}

.review-verified .icon {
  width: 10px;
  height: 10px;
  color: var(--emerald);
}

.review-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.review-item-stars .icon {
  width: 12px;
  height: 12px;
}

.review-date {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}

.store-review-empty {
  padding: 16px 0 4px;
  font-size: 12px;
  color: var(--muted);
}

.store-review-list[hidden],
.store-review-empty[hidden] {
  display: none;
}

.store-buy {
  padding: 20px;
}

.buy-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.buy-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.buy-title-row h2 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.buy-instant {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--secondary);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 10px;
  white-space: nowrap;
}

.buy-desc {
  font-size: 12px;
  color: var(--muted);
}

.plan-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.plan-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  color: var(--fg);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.plan-option:hover {
  border-color: rgba(250, 250, 250, 0.38);
  background: rgba(250, 250, 250, 0.04);
}

.plan-option:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.plan-option.is-selected {
  border-color: var(--primary);
  background: rgba(250, 250, 250, 0.08);
  box-shadow: 0 0 0 1px var(--primary);
}

.plan-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.plan-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.plan-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg);
  transition: color 0.15s ease;
}

.plan-option.is-selected .plan-name {
  color: var(--fg);
  font-weight: 700;
}

.plan-sub {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.plan-popular {
  display: inline-flex;
  align-items: center;
  height: 16px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--secondary);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}

.plan-price {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--fg);
  white-space: nowrap;
}

.buy-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--secondary);
  font-size: 12px;
}

.buy-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.buy-summary-row > span:first-child {
  color: var(--muted);
}

.buy-summary-value {
  color: var(--fg);
}

.buy-summary-total {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--fg);
}

.store-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin-top: 20px;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--primary);
  color: var(--primary-fg);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.store-cta:hover {
  background: #e5e5e5;
}

.store-cta:active {
  transform: translateY(1px);
}

.store-cta:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.store-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-top: 12px;
  color: rgba(161, 161, 161, 0.8);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.store-secure .icon {
  width: 12px;
  height: 12px;
}

@media (min-width: 640px) {
  .store-main {
    padding: 28px 0 48px;
  }

  .store-hero {
    padding: 32px;
  }

  .store-hero-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
  }

  .store-thumb {
    width: 112px;
    height: 112px;
  }

  .store-info {
    gap: 12px;
  }

  .store-title {
    font-size: 30px;
  }

  .store-desc {
    font-size: 13px;
  }

  .store-card {
    padding: 24px;
  }

  .store-reviews-head {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
  }

  .review-summary {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: center;
  }

  .review-aggregate {
    grid-column: span 5;
    align-items: flex-start;
    padding-right: 16px;
    border-right: 1px solid var(--border);
    text-align: left;
  }

  .review-score-row {
    justify-content: flex-start;
  }

  .review-aggregate .store-stars {
    justify-content: flex-start;
  }

  .review-bars {
    grid-column: span 7;
  }

  .store-buy {
    padding: 24px;
  }
}

@media (min-width: 768px) {
  .store-main {
    padding: 32px 0 56px;
  }

  .store-hero {
    padding: 40px;
  }

  .store-grid {
    margin-top: 28px;
  }
}

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

  .store-col {
    grid-column: span 7;
  }

  .store-aside {
    grid-column: span 5;
  }

  .store-buy {
    position: sticky;
    top: calc(var(--nav-h) + 16px);
  }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- 2026 additions: auth slot, buy script, rental store ---------- */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--fg);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-ghost:hover {
  background: var(--secondary);
  border-color: rgba(255, 255, 255, 0.18);
}

.auth-slot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 8px 0 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  font-weight: 500;
  color: var(--fg);
  max-width: 170px;
}

.nav-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald), #a1a1aa);
  color: #111114;
  font-size: 11px;
  font-weight: 800;
}

.nav-user-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-logout:hover {
  color: #ff8f8f;
  background: rgba(255, 107, 107, 0.1);
}

.nav-logout .icon {
  width: 15px;
  height: 15px;
}

.admin-btn {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 1px solid var(--border-soft);
}

.admin-btn .icon {
  width: 16px;
  height: 16px;
}

.auth-slot-block {
  display: block;
  width: 100%;
}

.auth-slot-block .nav-user {
  width: 100%;
  max-width: none;
  height: 40px;
  justify-content: flex-start;
  padding: 0 10px;
}

.auth-slot-block .nav-logout {
  width: 100%;
  height: 36px;
  margin-top: 6px;
  gap: 6px;
}

.auth-slot-block .nav-logout::after {
  content: "�͡�ҡ�к�";
  font-size: 12px;
  font-weight: 600;
}

/* ---------- Buy script / games extras ---------- */
.games-eyebrow,
.rent-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 3px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--emerald);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.games-heading {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.games-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 11.5px;
  color: var(--fg);
}

.games-note .icon {
  width: 14px;
  height: 14px;
  color: var(--emerald);
}

.games-note-hint {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--muted-2);
}

@media (max-width: 639px) {
  .games-note-hint {
    margin-left: 0;
    width: 100%;
  }

  .nav-user {
    max-width: 110px;
    padding-right: 4px;
  }

  .nav-user-name {
    display: none;
  }
}

/* ---------- Rental store ---------- */
.rent-main {
  padding: 20px 0 56px;
}

.rent-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 14px;
  padding: 22px;
  border: 1px solid var(--border-soft);
  border-radius: 24px;
  background:
    radial-gradient(620px 240px at 8% 0%, rgba(255, 255, 255, 0.16), transparent 70%),
    linear-gradient(180deg, #111114 0%, #0e0e11 100%);
}

.rent-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.rent-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  border: 0;
  background: none;
  box-shadow: none;
}

.rent-hero-icon img {
  width: 80px;
  height: 80px;
}

.rent-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.rent-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--fg);
}

.rent-tagline {
  font-size: 13px;
  font-weight: 500;
  color: var(--emerald);
}

.rent-desc {
  max-width: 660px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
}

.rent-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 11px;
  color: var(--muted);
}

.rent-version {
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--secondary);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.rent-sep {
  color: var(--muted-2);
}

.rent-onemap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.rent-onemap .icon {
  width: 12px;
  height: 12px;
  color: var(--emerald);
}

.rent-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.rent-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.rent-card {
  padding: 18px;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background: var(--card);
}

.rent-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rent-card-head > .icon {
  width: 15px;
  height: 15px;
  color: var(--emerald);
}

.rent-card-title {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.rent-card-desc {
  margin-top: 5px;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--muted);
}

.rent-feature-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.rent-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.rent-feature-list .icon {
  width: 13px;
  height: 13px;
  margin-top: 2px;
  flex: 0 0 auto;
  color: var(--emerald);
}

.rent-selected {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.rent-selected[hidden] {
  display: none;
}

.rent-selected-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--emerald);
}

.rent-selected-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg);
}

.rent-maps {
  display: flex;
  flex-direction: column;
  margin-top: 12px;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.rent-map {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: inherit;
  transition: background-color 0.15s ease;
}

.rent-map:last-child {
  border-bottom: 0;
}

.rent-map:hover {
  background: rgba(255, 255, 255, 0.04);
}

.rent-map.is-selected {
  background: rgba(255, 255, 255, 0.07);
}

.rent-map-thumb {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 8px;
  object-fit: cover;
  background: var(--secondary);
}

.rent-map-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.rent-map-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--fg);
}

.rent-map-place {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--muted-2);
}

.rent-map-check {
  margin-left: auto;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--emerald);
}

.rent-maps-foot {
  margin-top: 12px;
}

.rent-plans {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.rent-aside .rent-card {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
}

.rent-buy .store-cta {
  margin-top: 14px;
}

/* ---------- Checkout dialog ---------- */
.rent-dialog {
  width: min(460px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  color: var(--fg);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65);
  margin: auto;
}

.rent-dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.rent-dialog-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
}

.rent-dialog-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.rent-dialog-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--emerald);
}

.rent-dialog-check .icon {
  width: 20px;
  height: 20px;
}

.rent-dialog-head h2 {
  margin: 2px 0 4px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.rent-dialog-desc {
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--muted);
}

.rent-key-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.rent-key-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--emerald);
}

.rent-key {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--fg);
  word-break: break-all;
  user-select: all;
}

.rent-dialog-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
}

.rent-dialog-meta div {
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.rent-dialog-meta dt {
  font-size: 10px;
  color: var(--muted-2);
}

.rent-dialog-meta dd {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg);
}

@media (min-width: 640px) {
  .rent-main {
    padding: 28px 0 64px;
  }

  .rent-hero {
    padding: 28px;
  }

  .rent-hero-inner {
    flex-direction: row;
    align-items: flex-start;
    gap: 22px;
  }

  .rent-title {
    font-size: 30px;
  }

  .rent-grid {
    gap: 16px;
  }

  .rent-card {
    padding: 22px;
  }
}

@media (min-width: 900px) {
  .rent-grid {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
  }

  .rent-aside {
    position: relative;
  }
}

/* ---------- Login / register ---------- */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin-bottom: 16px;
  padding: 3px;
  border: 1px solid var(--border-soft);
  border-radius: 11px;
  background: #0b0b0e;
}

.auth-tab {
  padding: 9px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.auth-tab:hover {
  color: var(--fg);
}

.auth-tab.is-active {
  background: linear-gradient(135deg, #26262b, #52525b 55%, #a1a1aa 145%);
  color: #ffffff;
  box-shadow: 0 8px 24px -12px rgba(255, 255, 255, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.auth-form[hidden] {
  display: none;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.auth-error {
  padding: 8px 10px;
  border: 1px solid rgba(255, 107, 107, 0.35);
  border-radius: 8px;
  background: rgba(255, 107, 107, 0.08);
  font-size: 11.5px;
  line-height: 1.5;
  color: #ff9c9c;
}

.auth-error[hidden] {
  display: none;
}

.auth-hint {
  margin-top: -4px;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--muted-2);
}

.auth-demo-fill {
  margin-top: 2px;
  height: 34px;
  font-size: 11px;
}

.auth-session {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.auth-session[hidden] {
  display: none;
}

.auth-session-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald), #a1a1aa);
  color: #111114;
  font-size: 13px;
  font-weight: 800;
}

.auth-session-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  font-size: 10.5px;
  color: var(--muted);
}

.auth-session-text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 650;
  color: var(--fg);
}

.auth-session .btn-ghost {
  margin-left: auto;
  flex: 0 0 auto;
  height: 30px;
  padding: 0 10px;
  font-size: 11px;
}

@media (min-width: 480px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

.game-foot .game-rating {
  flex: 1 1 auto;
  min-width: 0;
}

.game-foot .game-count {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-foot .game-view {
  flex: 0 0 auto;
}

.script-badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.10);
  color: var(--emerald);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ==========================================================================
   INFERNAL — deep navy / electric blue theme + motion layer
   ========================================================================== */

:root {
  --bg: #08080a;
  --bg-2: #050506;
  --fg: #f5f5f7;
  --card: #101014;
  --card-hover: #17171b;
  --card-fg: #f5f5f7;
  --muted: #9a9aa4;
  --muted-2: #8a8a94;
  --secondary: #151518;
  --border: rgba(255, 255, 255, 0.20);
  --border-soft: rgba(255, 255, 255, 0.11);
  --primary: #52525b;
  --primary-fg: #ffffff;
  --emerald: #d4d4d8;
  --amber: #f5f5f7;
  --ring: #a1a1aa;
  --accent: #52525b;
  --accent-2: #a1a1aa;
  --accent-soft: rgba(255, 255, 255, 0.16);
  --glow: rgba(255, 255, 255, 0.48);
  --glow-soft: rgba(255, 255, 255, 0.16);
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 520px at 50% -260px, rgba(255, 255, 255, 0.22), transparent 65%),
    radial-gradient(900px 520px at 105% 18%, rgba(255, 255, 255, 0.09), transparent 62%),
    radial-gradient(700px 500px at -10% 70%, rgba(255, 255, 255, 0.14), transparent 65%),
    linear-gradient(180deg, #08080a 0%, #060608 55%, #050506 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

.site,
.auth-page,
.admin-shell {
  position: relative;
  z-index: 1;
}

.site {
  isolation: isolate;
}

.site::before {
  content: "";
  position: fixed;
  inset: -35% -15%;
  z-index: -1;
  background:
    radial-gradient(38% 34% at 18% 26%, rgba(255, 255, 255, 0.26), transparent 70%),
    radial-gradient(30% 28% at 82% 16%, rgba(255, 255, 255, 0.16), transparent 72%),
    radial-gradient(42% 38% at 68% 80%, rgba(255, 255, 255, 0.24), transparent 70%);
  filter: blur(14px);
  animation: kraken-aurora 24s ease-in-out infinite alternate;
  pointer-events: none;
}

.site::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 58px 58px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 10%, transparent 80%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 10%, transparent 80%);
  animation: kraken-grid-drift 20s linear infinite;
  pointer-events: none;
}

/* ---------- Particles ---------- */
.kraken-fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.kraken-fx i {
  position: absolute;
  left: var(--x, 50%);
  bottom: -12px;
  width: var(--s, 3px);
  height: var(--s, 3px);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(245, 245, 247, 0.95) 0%, rgba(255, 255, 255, 0.35) 45%, transparent 72%);
  filter: blur(0.3px);
  opacity: 0;
  animation: kraken-particle var(--t, 14s) linear var(--delay, 0s) infinite;
  will-change: transform, opacity;
}

/* ---------- Scroll progress bar removed (white top streak) ---------- */

/* ---------- Brand / logo ---------- */
.brand {
  gap: 10px;
}

.brand img,
.auth-brand img {
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.55));
  animation: kraken-float 5s ease-in-out infinite;
}

.brand-name {
  display: none;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #f5f5f7;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.65);
}

.auth-brand span {
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.6);
}

.hero-watermark {
  z-index: 0;
  filter: saturate(1.3) brightness(1.15) drop-shadow(0 0 48px rgba(255, 255, 255, 0.55));
  animation: kraken-drift 12s ease-in-out infinite;
}

.rent-hero-icon img,
.auth-card-head img,
.admin-brand img {
  filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.55));
}

.rent-hero-icon img {
  animation: kraken-float 6s ease-in-out infinite;
}

/* ---------- Navigation ---------- */
.nav {
  background: rgba(8, 8, 10, 0.72);
  border-bottom-color: transparent;
}

.nav.is-scrolled {
  background: rgba(8, 8, 10, 0.92);
  border-bottom-color: var(--border);
  box-shadow: 0 16px 50px -24px rgba(255, 255, 255, 0.65);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 3px;
  left: 10px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #a1a1aa, #f5f5f7, transparent);
  transform: scaleX(0);
  transform-origin: 50% 50%;
  transition: transform 0.3s var(--ease);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.nav-link.is-active {
  color: #f5f5f7;
  text-shadow: 0 0 16px rgba(255, 255, 255, 0.55);
}

.login-btn {
  border-color: rgba(255, 255, 255, 0.35);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 22px -8px rgba(255, 255, 255, 0.8);
}

.login-btn:hover {
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow: 0 0 26px -6px rgba(255, 255, 255, 0.85);
}

.admin-btn:hover {
  color: #f5f5f7;
  box-shadow: 0 0 22px -4px rgba(255, 255, 255, 0.85);
}

/* ---------- Buttons ---------- */
.btn-primary {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.35);
  background: linear-gradient(120deg, #26262b 0%, #52525b 45%, #a1a1aa 130%);
  background-size: 180% 180%;
  box-shadow: 0 12px 34px -14px rgba(255, 255, 255, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  animation: kraken-btn-breathe 6s ease-in-out infinite;
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 22%, rgba(255, 255, 255, 0.38) 48%, transparent 74%);
  transform: translateX(-130%);
  transition: transform 0.7s var(--ease);
  pointer-events: none;
}

.btn-primary:hover {
  background-color: #5a5a63;
  background-position: 100% 50%;
  transform: translateY(-2px);
  box-shadow: 0 18px 44px -16px rgba(255, 255, 255, 1), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn-primary:hover::after {
  transform: translateX(130%);
}

.btn-secondary {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 24px -10px rgba(255, 255, 255, 0.8);
}

/* ---------- Hero ---------- */
.hero-card {
  background: linear-gradient(180deg, #121215 0%, #0e0e11 55%, #0b0b0e 100%);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 28px 80px -46px rgba(255, 255, 255, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transform-style: preserve-3d;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 0;
  border-radius: calc(var(--radius-xl) - 1px);
  background: radial-gradient(520px 260px at 50% 0%, rgba(255, 255, 255, 0.16), transparent 68%);
  pointer-events: none;
}

.hero-content {
  z-index: 2;
}

.hero-copy h1 {
  background: linear-gradient(100deg, #ffffff 5%, #d4d4d8 35%, #a1a1aa 62%, #f5f5f7 92%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(255, 255, 255, 0.35));
  animation: kraken-text-flow 9s linear infinite;
}

.hero-badge {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #d4d4d8;
}

.hero-badge .dot {
  animation: kraken-pulse 2s ease-in-out infinite;
}

/* ---------- Cards: glow, lift, spotlight ---------- */
.script-card,
.game-card,
.rent-card,
.plan-option,
.auth-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.28s var(--ease), border-color 0.28s ease, box-shadow 0.28s ease,
    background-color 0.28s ease;
}

.script-card::after,
.game-card::after,
.rent-card::after,
.plan-option::after,
.auth-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: none;
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
}

.script-card:hover::after,
.game-card:hover::after,
.rent-card:hover::after,
.plan-option:hover::after,
.auth-card:hover::after {
  opacity: 1;
}

.script-card:hover,
.game-card:hover,
.rent-card:hover,
.auth-card:hover {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 22px 55px -30px rgba(255, 255, 255, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.script-card:hover,
.game-card:hover {
  transform: translateY(-5px);
}

.script-card,
.game-card {
  animation: kraken-rise 0.65s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

.rent-card {
  animation: kraken-rise 0.6s var(--ease) both;
}

.rent-card:nth-child(2) {
  animation-delay: 80ms;
}

.rent-card:nth-child(3) {
  animation-delay: 140ms;
}

/* ---------- Plan selection ---------- */
.plan-option {
  background: rgba(14, 14, 17, 0.9);
}

.plan-option:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(20, 20, 24, 0.95);
  transform: translateY(-2px);
}

.plan-option.is-selected {
  border-color: #d4d4d8;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8), 0 0 32px -8px rgba(255, 255, 255, 0.85);
  animation: kraken-selected 3.2s ease-in-out infinite;
}

.plan-option.is-selected::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.8));
  background-size: 220% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: kraken-text-flow 4s linear infinite;
  pointer-events: none;
}

.plan-option:nth-child(1) { animation-delay: 0ms; }
.plan-option:nth-child(2) { animation-delay: 70ms; }
.plan-option:nth-child(3) { animation-delay: 140ms; }

/* ---------- Rent / store ---------- */
.rent-hero {
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(255, 255, 255, 0.22), transparent 70%),
    linear-gradient(180deg, #121215 0%, #0e0e11 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 80px -50px rgba(255, 255, 255, 0.9);
  animation: kraken-rise 0.7s var(--ease) both;
}

.rent-buy {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 26px 70px -42px rgba(255, 255, 255, 1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.rent-buy::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(360px 180px at 50% 0%, rgba(255, 255, 255, 0.18), transparent 70%);
  pointer-events: none;
}

.store-cta,
.rent-cta {
  box-shadow: 0 16px 40px -18px rgba(255, 255, 255, 0.95);
}

/* ---------- Games page ---------- */
.games-head {
  animation: kraken-rise 0.65s var(--ease) both;
}

.games-note {
  animation: kraken-rise 0.65s var(--ease) 0.12s both;
  border-color: rgba(255, 255, 255, 0.22);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
}

.game-search {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(14, 14, 17, 0.8);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.game-search:focus {
  border-color: #d4d4d8;
  background: rgba(20, 20, 24, 0.95);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.14), 0 0 30px -8px rgba(255, 255, 255, 0.9);
}

/* ---------- Footer / dialogs / toast ---------- */
.footer-card {
  background: linear-gradient(180deg, #101014 0%, #0b0b0e 100%);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 60px -44px rgba(255, 255, 255, 0.9);
}

.menu-dialog::backdrop,
dialog::backdrop {
  background: rgba(5, 5, 6, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.menu-panel {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 30px 90px -40px rgba(0, 0, 0, 0.8), 0 0 60px -24px rgba(255, 255, 255, 0.5);
}

.toast {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 18px 50px -22px rgba(255, 255, 255, 0.9);
}

/* ---------- Auth ---------- */
.auth-card {
  background: linear-gradient(180deg, #121215 0%, #0e0e11 100%);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 34px 90px -46px rgba(255, 255, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.auth-card-head img {
  animation: kraken-float 5.5s ease-in-out infinite;
}

/* ---------- Keyframes ---------- */
@keyframes kraken-rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes kraken-aurora {
  0% { transform: translate3d(-2%, -1%, 0) scale(1); }
  50% { transform: translate3d(2%, 2%, 0) scale(1.06); }
  100% { transform: translate3d(-1%, 3%, 0) scale(1.02); }
}

@keyframes kraken-grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 58px, 58px 0; }
}

@keyframes kraken-particle {
  0% { transform: translate3d(0, 0, 0) scale(0.5); opacity: 0; }
  12% { opacity: 0.75; }
  88% { opacity: 0.25; }
  100% { transform: translate3d(var(--dx, 20px), -108vh, 0) scale(1.15); opacity: 0; }
}

@keyframes kraken-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes kraken-drift {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  50% { transform: translateY(-54%) translateX(-8px); }
}

@keyframes kraken-rotate {
  to { transform: rotate(360deg); }
}

@keyframes kraken-text-flow {
  to { background-position: 200% center; }
}

@keyframes kraken-btn-breathe {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes kraken-selected {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8), 0 0 26px -8px rgba(255, 255, 255, 0.75); }
  50% { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.95), 0 0 40px -6px rgba(255, 255, 255, 0.95); }
}

@keyframes kraken-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); }
}

/* ---------- Brand wordmark on wider headers ---------- */
@media (min-width: 640px) {
  .brand-name {
    display: inline-block;
  }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  .kraken-fx {
    display: none;
  }

  .site::before,
  .site::after,
  .hero-card::after,
  .hero-copy h1,
  .brand img,
  .auth-brand img,
  .hero-watermark,
  .rent-hero-icon img,
  .auth-card-head img,
  .plan-option.is-selected,
  .btn-primary {
    animation: none !important;
  }

    .script-card,
  .game-card,
  .rent-card,
  .games-head,
  .games-note,
  .rent-hero,
  .plan-option {
    animation: none !important;
  }

  .hero-card,
    .script-card:hover,
  .game-card:hover,
  .plan-option:hover {
    transform: none !important;
  }
}

/* ---------- Customer key vault ---------- */
a.nav-user {
  text-decoration: none;
}

a.nav-user:hover {
  background: rgba(212, 212, 216, 0.14);
  border-color: rgba(212, 212, 216, 0.35);
}

.keys-main {
  padding: 20px 0 64px;
}

.keys-head {
  margin: 18px 0 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.keys-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

@media (min-width: 920px) {
  .keys-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.key-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255, 255, 255, 0.18), transparent 60%),
    rgba(12, 12, 15, 0.72);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.key-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 30%, rgba(212, 212, 216, 0.08) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: key-sheen 6s ease-in-out infinite;
}

@keyframes key-sheen {
  0%, 65% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .key-card::after { animation: none; }
}

.key-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.key-card-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--fg);
}

.key-card-sub {
  margin: 4px 0 0;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: #a1a1aa;
}

.key-status {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
}

.key-status.is-ok {
  color: #86efac;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.4);
}

.key-status.is-wait {
  color: #d4d4d8;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
}

.key-status.is-bad {
  color: #ff9f9f;
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.4);
}

.key-value-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.45);
  border-radius: 12px;
  background: rgba(6, 6, 8, 0.8);
}

.key-value {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 14px;
  font-weight: 600;
  color: #d4d4d8;
  word-break: break-all;
  user-select: all;
}

.key-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 14px;
}

.key-meta-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
}

.key-meta-row span {
  color: #a1a1aa;
}

.key-meta-row strong {
  color: var(--fg);
  font-weight: 600;
}

.key-script-block {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 12px;
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(255, 255, 255, 0.16), transparent 65%),
    rgba(6, 6, 8, 0.72);
}

.key-script-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.key-script-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d4d4d8;
}

.key-script {
  margin: 0;
  padding: 13px 14px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  line-height: 1.65;
  color: #cfe6ff;
  white-space: pre-wrap;
  word-break: break-word;
  user-select: all;
}

.key-script code {
  display: block;
  overflow: visible;
  text-overflow: clip;
  white-space: pre-wrap;
  font: inherit;
  color: inherit;
}

.key-script-hint {
  margin: 0;
  padding: 0 14px 12px;
  font-size: 11px;
  color: #a1a1aa;
}

.key-script-hint.is-warn {
  color: #ffcf8a;
}

.keys-state {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(12, 12, 15, 0.6);
  color: #b4b4bc;
  text-align: center;
}

.keys-state p {
  margin: 0 0 12px;
}

.keys-state.is-bad {
  border-color: rgba(239, 68, 68, 0.4);
}

.keys-empty {
  grid-column: 1 / -1;
  padding: 40px 24px;
  border: 1px dashed var(--border);
  border-radius: 18px;
  text-align: center;
  color: #b4b4bc;
}

.keys-empty p {
  margin: 0 0 16px;
}

/* ---------- Top-up page ---------- */
html[data-page="topup"] body {
  --tp-bg: #08080a;
  --tp-surface: #0e0e11;
  --tp-surface-2: #121216;
  --tp-border: rgba(255, 255, 255, 0.08);
  --tp-border-strong: rgba(255, 255, 255, 0.16);
  --tp-text: #f5f5f7;
  --tp-muted: #9a9aa4;
  --tp-muted-2: #6f6f7a;
  --tp-ok: #4ade80;
  --tp-warn: #fbbf24;
  --tp-bad: #f87171;
  background-color: var(--tp-bg);
  background-image: radial-gradient(900px 460px at 50% -230px, rgba(255, 255, 255, 0.05), transparent 70%);
  background-attachment: fixed;
}

html[data-page="topup"] .site::before,
html[data-page="topup"] .site::after {
  display: none;
}

html[data-page="topup"] .nav,
html[data-page="topup"] .nav.is-scrolled {
  background: rgba(8, 8, 10, 0.82);
  border-bottom-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 16px 50px -34px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(14px);
}

html[data-page="topup"] .nav-link.is-active {
  color: #fff;
  text-shadow: none;
}

html[data-page="topup"] .nav-link::after {
  background: linear-gradient(90deg, transparent, #fff, transparent);
}

html[data-page="topup"] .login-btn {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-page="topup"] .login-btn:hover {
  border-color: rgba(255, 255, 255, 0.32);
  box-shadow: 0 0 24px -10px rgba(255, 255, 255, 0.5);
}

html[data-page="topup"] .admin-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.topup-main {
  padding: 16px 0 72px;
}

.topup-back {
  margin-top: 2px;
  color: var(--tp-muted);
}

.topup-back:hover {
  color: #fff;
}

/* Balance */
.topup-balance-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px 0 22px;
  padding: 20px 22px;
  border: 1px solid var(--tp-border);
  border-radius: 18px;
  background: linear-gradient(160deg, #141418 0%, #0d0d10 100%);
  box-shadow: 0 24px 60px -42px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.topup-balance-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.06);
  color: #d7d7de;
}

.topup-balance-icon .icon {
  width: 22px;
  height: 22px;
}

.topup-balance-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.topup-balance-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--tp-muted);
}

.topup-balance {
  margin: 0;
  font-size: clamp(26px, 5vw, 34px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #fff;
  text-shadow: none;
}

.topup-balance-note {
  font-size: 12px;
  color: var(--tp-muted-2);
}

/* Tabs */
.topup-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--tp-border);
}

.topup-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.topup-tabs::-webkit-scrollbar {
  display: none;
}

.topup-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 12px 15px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--tp-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.topup-tab .icon {
  opacity: 0.75;
}

.topup-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}

.topup-tab.is-active {
  color: #fff;
  border-bottom-color: #fff;
}

.topup-tab.is-active .icon {
  opacity: 1;
}

.topup-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--tp-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--tp-muted);
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.topup-refresh:hover {
  color: #fff;
  border-color: var(--tp-border-strong);
  background: rgba(255, 255, 255, 0.06);
}

.topup-refresh-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

/* Layout */
.topup-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.85fr);
  gap: 18px;
  align-items: start;
}

.topup-layout.is-history {
  grid-template-columns: minmax(0, 1fr);
}

.topup-primary {
  min-width: 0;
}

.topup-panel {
  padding: 22px;
  border: 1px solid var(--tp-border);
  border-radius: 18px;
  background: linear-gradient(170deg, #121216 0%, #0c0c0f 100%);
  box-shadow: 0 24px 70px -52px #000;
}

.topup-panel[hidden] {
  display: none;
}

.topup-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.topup-panel-head h1 {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}

.topup-panel-head p {
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
  color: var(--tp-muted);
}

.topup-auto {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.08);
  color: #86efac;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Guide */
.topup-guide {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--tp-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.topup-guide h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  color: #e8e8ee;
}

.topup-guide h3 .icon {
  opacity: 0.7;
}

.topup-guide ol {
  counter-reset: tp-step;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.topup-guide li {
  counter-increment: tp-step;
  display: flex;
  gap: 10px;
  font-size: 12px;
  line-height: 1.65;
  color: #b6b6c0;
}

.topup-guide li::before {
  content: counter(tp-step);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

/* Fields */
.topup-warning {
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(251, 191, 36, 0.32);
  border-radius: 10px;
  background: rgba(251, 191, 36, 0.07);
  color: #fcd37a;
  font-size: 11px;
  line-height: 1.6;
}

.topup-field {
  margin-bottom: 16px;
}

.topup-field > label {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #d7d7de;
}

.topup-field input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--tp-border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  color: #f5f5f7;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.topup-field input::placeholder {
  color: #5f5f68;
}

.topup-field input:focus {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.topup-hint {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.6;
  color: var(--tp-muted-2);
}

/* Bank / steps */
.topup-step-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: #e8e8ee;
}

.topup-step-label:first-of-type {
  margin-top: 0;
}

.topup-step-label span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  color: #0a0a0c;
  font-size: 10px;
  font-weight: 800;
}

.topup-bank-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--tp-border);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
}

.topup-bank-logo {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: #0f7a3d;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

.topup-bank-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.topup-bank-info strong {
  font-size: 13px;
  color: #fff;
}

.topup-bank-info span {
  font-size: 11px;
  color: var(--tp-muted);
}

.topup-bank-account {
  font-family: var(--font-mono);
  font-size: 14px !important;
  letter-spacing: 0.08em;
  color: #e8e8ee !important;
}

.topup-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid var(--tp-border-strong);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: #e8e8ee;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.topup-copy-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.26);
}

/* Drop zone */
.topup-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 170px;
  padding: 20px;
  border: 1px dashed var(--tp-border-strong);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.topup-drop:hover,
.topup-drop.is-drag {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.04);
}

.topup-drop.has-file {
  border-style: solid;
  border-color: rgba(74, 222, 128, 0.35);
}

.topup-drop-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 4px;
  border: 1px solid var(--tp-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #c9c9d2;
}

.topup-drop-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.topup-drop-text {
  font-size: 11px;
  color: var(--tp-muted);
  overflow-wrap: anywhere;
}

.topup-drop-note {
  font-size: 10px;
  color: var(--tp-muted-2);
}

.topup-preview {
  max-width: 100%;
  max-height: 210px;
  margin-top: 8px;
  border: 1px solid var(--tp-border);
  border-radius: 10px;
  object-fit: contain;
}

.topup-preview[hidden] {
  display: none;
}

/* Submit + status */
.topup-submit {
  width: 100%;
  height: 44px;
  margin-top: 18px;
  border: 0;
  border-radius: 12px;
  background: #f5f5f7;
  color: #0a0a0c;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 30px -18px rgba(255, 255, 255, 0.55);
  transition: background 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.topup-submit:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.topup-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.topup-submit .icon {
  opacity: 0.7;
}

.topup-status {
  min-height: 18px;
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--tp-muted);
}

.topup-status.is-ok {
  color: #86efac;
}

.topup-status.is-bad {
  color: #fca5a5;
}

.topup-status.is-wait {
  color: #fcd37a;
}

/* History */
.topup-history {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.topup-history-empty {
  margin: 0;
  padding: 32px 16px;
  border: 1px dashed var(--tp-border);
  border-radius: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--tp-muted);
}

.topup-history-item {
  padding: 14px 16px;
  border: 1px solid var(--tp-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.topup-history-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.topup-history-method {
  font-size: 11px;
  font-weight: 700;
  color: #cfcfd8;
}

.topup-history-status {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.topup-history-status.is-ok {
  background: rgba(74, 222, 128, 0.1);
  color: #86efac;
}

.topup-history-status.is-wait {
  background: rgba(251, 191, 36, 0.1);
  color: #fcd37a;
}

.topup-history-status.is-bad {
  background: rgba(248, 113, 113, 0.1);
  color: #fca5a5;
}

.topup-history-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 7px;
}

.topup-history-main strong {
  font-size: 18px;
  color: #fff;
}

.topup-history-credit {
  font-size: 11px;
  color: #86efac;
}

.topup-history-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--tp-muted-2);
}

.topup-history-reason {
  margin: 6px 0 0;
  font-size: 10px;
  line-height: 1.5;
  color: #c9a45e;
}

/* Sidebar */
.topup-aside {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.topup-aside[hidden] {
  display: none;
}

.topup-side-card {
  padding: 18px;
  border: 1px solid var(--tp-border);
  border-radius: 16px;
  background: linear-gradient(165deg, #121216 0%, #0c0c0f 100%);
}

.topup-side-card h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  color: #e8e8ee;
}

.topup-side-card h3 .icon {
  opacity: 0.7;
}

.topup-side-card ul {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.topup-side-card li {
  position: relative;
  padding-left: 16px;
  font-size: 11px;
  line-height: 1.65;
  color: #a8a8b2;
}

.topup-side-card li::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #6f6f7a;
}

.topup-side-history {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  background: linear-gradient(160deg, #15151a 0%, #0d0d10 100%);
}

.topup-side-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 6px;
  border: 1px solid var(--tp-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: #d7d7de;
}

.topup-side-history strong {
  font-size: 13px;
  color: #fff;
}

.topup-side-history p {
  margin: 0 0 8px;
  font-size: 11px;
  color: var(--tp-muted);
}

.topup-side-btn {
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--tp-border-strong);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
}

.topup-side-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Responsive */
@media (max-width: 900px) {
  .topup-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .topup-aside {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .topup-tabs-bar {
    flex-wrap: wrap;
    border-bottom: 0;
  }

  .topup-tabs {
    order: 2;
    width: 100%;
    border-bottom: 1px solid var(--tp-border);
  }

  .topup-tab {
    flex: 1 0 auto;
    justify-content: center;
    padding: 11px 8px;
    font-size: 11px;
  }

  .topup-refresh {
    order: 1;
    margin-left: auto;
  }

  .topup-panel-head h1 {
    font-size: 17px;
  }

  .topup-bank-card {
    flex-wrap: wrap;
  }

  .topup-copy-btn {
    margin-left: 52px;
  }
}

@media (max-width: 560px) {
  .topup-main {
    padding: 10px 0 56px;
  }

  .topup-balance-card {
    gap: 12px;
    padding: 16px;
  }

  .topup-balance-icon {
    width: 40px;
    height: 40px;
  }

  .topup-panel {
    padding: 16px;
    border-radius: 16px;
  }

  .topup-balance-note {
    font-size: 11px;
  }

  .topup-copy-btn {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-page="topup"] * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ==================================================================
   Charcoal theme refinement — near-black + graphite, low-glow.
   Appended last so it wins over earlier theme layers.
   ================================================================== */
:root {
  --bg: #08080a;
  --fg: #f4f4f6;
  --card: #101013;
  --card-hover: #16161a;
  --secondary: #151518;
  --muted: #9b9ba4;
  --muted-2: #6f6f79;
  --border: rgba(255, 255, 255, 0.09);
  --border-soft: rgba(255, 255, 255, 0.055);
  --primary: #f4f4f6;
  --primary-fg: #0b0b0d;
  --emerald: #d9d9de;
  --ring: #cfcfd6;
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 460px at 50% -320px, rgba(255, 255, 255, 0.07), transparent 70%),
    radial-gradient(760px 460px at 108% 8%, rgba(255, 255, 255, 0.035), transparent 68%),
    radial-gradient(640px 420px at -12% 78%, rgba(255, 255, 255, 0.03), transparent 70%),
    linear-gradient(180deg, #08080a 0%, #060608 55%, #050506 100%);
}

.site::before {
  opacity: 0.35;
  background:
    radial-gradient(38% 34% at 18% 26%, rgba(255, 255, 255, 0.10), transparent 70%),
    radial-gradient(30% 28% at 82% 16%, rgba(255, 255, 255, 0.06), transparent 72%),
    radial-gradient(42% 38% at 68% 80%, rgba(255, 255, 255, 0.08), transparent 70%);
  filter: blur(26px);
}

/* Navigation */
.nav,
.nav.is-scrolled {
  background: rgba(9, 9, 11, 0.86);
  border-bottom-color: var(--border-soft);
}

.nav.is-scrolled {
  box-shadow: 0 18px 44px -32px rgba(0, 0, 0, 0.9);
}

.nav-link.is-active {
  color: #fff;
  text-shadow: none;
}

.nav-link::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.85), transparent);
}

.login-btn {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
  color: var(--fg);
}

.login-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.26);
  box-shadow: none;
}

.nav-user-avatar,
.auth-avatar {
  background: linear-gradient(135deg, #e8e8ec, #a8a8b2);
  color: #0b0b0d;
}

/* Buttons — light pill on charcoal, high contrast */
.btn-primary {
  border-color: rgba(255, 255, 255, 0.55);
  background: linear-gradient(180deg, #ffffff 0%, #e9e9ee 55%, #d7d7dd 100%);
  background-size: 100% 100%;
  color: #0b0b0d;
  box-shadow: 0 10px 26px -16px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  animation: none;
}

.btn-primary .icon { opacity: 0.9; }

.btn-primary::after {
  background: linear-gradient(110deg, transparent 24%, rgba(255, 255, 255, 0.55) 48%, transparent 74%);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #ffffff 0%, #f2f2f5 55%, #e2e2e7 100%);
  color: #050506;
  transform: translateY(-1px);
  box-shadow: 0 14px 32px -18px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.btn-secondary:hover,
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Cards, heroes, panels */
.hero-card {
  background: linear-gradient(180deg, #101013 0%, #0d0d10 55%, #0a0a0c 100%);
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: 0 30px 70px -50px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.hero-card::after {
  background: radial-gradient(520px 260px at 50% 0%, rgba(255, 255, 255, 0.07), transparent 70%);
}

.hero-copy h1 {
  background: linear-gradient(100deg, #ffffff 5%, #dedee3 38%, #b6b6bf 64%, #f4f4f6 92%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: none;
}

.hero-watermark {
  filter: saturate(0.8) brightness(0.95) drop-shadow(0 0 34px rgba(255, 255, 255, 0.16));
  opacity: 0.5;
}

.brand-name,
.auth-brand span {
  text-shadow: none;
}

.rent-hero-icon img,
.auth-card-head img,
.admin-brand img {
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.18));
}

.script-card,
.game-card,
.rent-card,
.auth-card,
.rent-hero,
.footer-card,
.menu-panel,
.toast {
  box-shadow: 0 24px 60px -46px rgba(0, 0, 0, 0.95);
}

.script-card::after,
.game-card::after,
.rent-card::after,
.plan-option::after,
.auth-card::after {
  background: none;
}

.script-card:hover,
.game-card:hover,
.rent-card:hover,
.auth-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 26px 60px -40px rgba(0, 0, 0, 0.98), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.plan-option:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(22, 22, 27, 0.95);
}

.plan-option.is-selected {
  border-color: rgba(255, 255, 255, 0.55);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.03));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 18px 40px -26px rgba(0, 0, 0, 0.9);
  animation: none;
}

.plan-option.is-selected::before {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.3));
}

.rent-hero {
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(255, 255, 255, 0.08), transparent 72%),
    linear-gradient(180deg, #111114 0%, #0d0d10 100%);
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: 0 30px 70px -50px rgba(0, 0, 0, 0.95);
}

.rent-buy {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px -46px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.rent-buy::before {
  background: radial-gradient(360px 180px at 50% 0%, rgba(255, 255, 255, 0.06), transparent 72%);
}

.store-cta,
.rent-cta {
  box-shadow: 0 14px 32px -22px rgba(0, 0, 0, 0.9);
}

/* Games */
.games-note {
  border-color: rgba(255, 255, 255, 0.10);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
}

.game-search {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(16, 16, 19, 0.9);
}

.game-search:focus {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(21, 21, 26, 0.95);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.07);
}

/* Footer / dialogs / toast */
.footer-card {
  background: linear-gradient(180deg, #101013 0%, #0a0a0c 100%);
  border-color: rgba(255, 255, 255, 0.08);
}

.menu-panel {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.95);
}

.toast {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 44px -24px rgba(0, 0, 0, 0.95);
}

/* Auth */
.auth-card {
  background: linear-gradient(180deg, #111114 0%, #0d0d10 100%);
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: 0 34px 80px -50px rgba(0, 0, 0, 0.98), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Small chrome */
.dot-emerald {
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06);
}

.icon-btn:hover,
.guide-btn:hover {
  background: rgba(255, 255, 255, 0.07);
}


/* ---------- Wallet balance chip in the customer nav ---------- */
.nav-user {
  max-width: 248px;
}

.nav-balance {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #ecd9a8;
  white-space: nowrap;
}

.auth-slot-block .nav-balance {
  margin-left: auto;
}

@media (max-width: 639px) {
  .nav-user {
    max-width: 156px;
  }

  .nav-balance {
    padding: 2px 6px;
    font-size: 10px;
  }
}


/* ---------- B3-Hub Homepage Contact Section ---------- */
.home-contact-section {
  padding: 8px 0 28px;
}

.home-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
}

.home-contact-title {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.home-contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.home-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  background: var(--secondary);
  border: 1px solid var(--border);
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.home-contact-link .icon {
  width: 15px;
  height: 15px;
  color: var(--brand, var(--fg));
}

a.home-contact-link:hover {
  background: var(--card-hover);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}
