/* ============================================
   VALERIANO GAMES — design system
   Display: Chakra Petch / Body: Inter / Data: Space Mono
   ============================================ */

:root {
  --bg: #0A101E;
  --bg-alt: #0D1526;
  --surface: #121B30;
  --surface-2: #16213A;
  --border: #223052;
  --blue: #3B63FF;
  --blue-light: #6E8BFF;
  --blue-dim: #1C2B5E;
  --green: #19D97C;
  --green-light: #5CEAA6;
  --green-dim: #103E2C;
  --text: #EEF2FA;
  --text-muted: #8C99B8;
  --danger: #FF5B6E;
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 20px 60px -20px rgba(0,0,0,0.6);
  --gradient: linear-gradient(120deg, var(--blue) 0%, var(--green) 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  background-image:
    radial-gradient(circle at 15% 0%, rgba(59,99,255,0.16), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(25,217,124,0.12), transparent 40%);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

h1, h2, h3, h4 {
  font-family: 'Chakra Petch', 'Inter', sans-serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--green-light);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Eyebrow / HUD label */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-light);
}
.eyebrow::before { content: '//'; color: var(--blue-light); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient);
  color: #071022;
  box-shadow: 0 8px 24px -8px rgba(25,217,124,0.45);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -8px rgba(25,217,124,0.6); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--blue-light); color: var(--blue-light); }
.btn-whatsapp {
  background: var(--green);
  color: #071022;
  width: 100%;
  box-shadow: 0 8px 24px -10px rgba(25,217,124,0.55);
}
.btn-whatsapp:hover { background: var(--green-light); }
.btn-danger { border: 1px solid rgba(255,91,110,0.4); color: var(--danger); background: rgba(255,91,110,0.08); }
.btn-danger:hover { background: rgba(255,91,110,0.16); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn:disabled { opacity: 0.45; pointer-events: none; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10,16,30,0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.logo-img { height: 40px; width: auto; display: block; }
.logo-img-lg { height: 88px; }
.logo-img-sm { height: 26px; }
.logo-center { justify-content: center; }
.logo .bolt { color: var(--green-light); font-size: 20px; }
.logo span { color: var(--blue-light); }
.nav { display: flex; gap: 32px; }
.nav a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s ease;
}
.nav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.social-btn {
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: 50%; color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease, color 0.15s ease;
}
.social-btn svg { display: block; }
.social-btn:hover { border-color: var(--green); color: var(--green-light); transform: translateY(-2px); }
.footer-social {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 10px; font-size: 13.5px; color: var(--text-muted);
}
.footer-social:hover { color: var(--green-light); }
.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  transition: border-color 0.15s ease;
}
.cart-btn:hover { border-color: var(--green); }
.cart-icon { font-size: 17px; }
#cartCount {
  background: var(--green);
  color: #071022;
  font-weight: 700;
  border-radius: 20px;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  font-size: 12px;
}

/* ===== Hero ===== */
.hero { padding: 88px 0 64px; position: relative; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 30px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 26px;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(25,217,124,0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(25,217,124,0.55); }
  70% { box-shadow: 0 0 0 8px rgba(25,217,124,0); }
  100% { box-shadow: 0 0 0 0 rgba(25,217,124,0); }
}
.hero h1 {
  font-size: clamp(34px, 6vw, 58px);
  max-width: 780px;
  margin-bottom: 20px;
}
.hero h1 .grad {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 520px;
  margin-bottom: 34px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ===== Categories ===== */
.catalog-controls { display: flex; flex-direction: column; gap: 14px; margin-bottom: 26px; }

.search-box {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 30px;
  padding: 11px 18px; max-width: 420px;
}
.search-ico { font-size: 15px; opacity: 0.7; flex-shrink: 0; }
.search-box input {
  flex: 1; background: none; border: none; color: var(--text); font-size: 14.5px; min-width: 0;
}
.search-box input:focus { outline: none; }
.search-box input::placeholder { color: var(--text-muted); }

.dtype-filtros { display: flex; gap: 10px; flex-wrap: wrap; }
.dtype-btn {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 600; font-size: 13.5px;
  padding: 10px 20px; border: 1px solid var(--border); border-radius: 30px;
  color: var(--text-muted); transition: all 0.15s ease;
}
.dtype-btn:hover { color: var(--text); border-color: var(--blue-light); }
.dtype-btn.active { background: var(--gradient); border-color: transparent; color: #071022; }

.filter-group { display: flex; flex-direction: column; gap: 10px; }
.filter-label {
  font-family: 'Space Mono', monospace; font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted);
}
.filter-divider { height: 1px; background: var(--border); margin: 2px 0; }

.cat-filtros {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.cat-filtros::-webkit-scrollbar { display: none; }
.cat-btn {
  font-family: 'Space Mono', monospace;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 30px;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all 0.15s ease;
}
.cat-btn:hover { color: var(--text); border-color: var(--blue-light); }
.cat-btn.active {
  background: var(--surface-2);
  border-color: var(--green);
  color: var(--green-light);
}

/* ===== Catalog ===== */
.catalogo { padding: 40px 0 80px; }
.section-head { margin-bottom: 30px; }
.section-head h2 { font-size: 28px; margin-top: 10px; }

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.load-more-wrap { display: flex; justify-content: center; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.from-label { font-size: 10.5px; font-weight: 400; color: var(--text-muted); display: block; text-transform: uppercase; letter-spacing: 0.04em; }

.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}
.game-card:hover {
  transform: translateY(-5px);
  border-color: var(--blue-light);
  box-shadow: var(--shadow);
}
.game-thumb {
  height: 150px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.game-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(10,16,30,0.55) 100%);
}
.game-thumb .game-icon { font-size: 46px; filter: drop-shadow(0 6px 14px rgba(0,0,0,0.35)); z-index: 1; }
.game-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.game-card:hover .game-thumb::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,0.16) 50%, transparent 60%);
  animation: sweep 0.8s ease forwards;
}
@keyframes sweep {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}
.platform-tag {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(10,16,30,0.7);
  border: 1px solid rgba(255,255,255,0.12);
  font-family: 'Space Mono', monospace;
  font-size: 10.5px;
  padding: 4px 8px;
  border-radius: 20px;
  z-index: 1;
}
.game-info { padding: 16px; }
.game-cat {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--green-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.game-info h3 { font-size: 16.5px; margin: 6px 0 12px; }

/* cartridge connector ridge */
.game-card .ridge {
  height: 6px;
  margin: 0 16px 14px;
  background: repeating-linear-gradient(90deg, var(--border) 0 4px, transparent 4px 8px);
  border-radius: 3px;
}

.game-footer { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 16px; gap: 10px; }
.game-price { font-family: 'Space Mono', monospace; font-weight: 700; font-size: 17px; color: var(--text); }
.game-price small { color: var(--text-muted); font-weight: 400; font-size: 11px; display: block; }
.game-actions { display: flex; gap: 8px; padding: 0 16px 16px; }
.game-actions .btn { flex: 1; padding: 10px 8px; font-size: 13px; min-width: 0; }
.game-card-link { display: block; color: inherit; }
.game-card-link:hover h3 { color: var(--blue-light); }

/* ===== About / trust ===== */
.sobre { padding: 20px 0 90px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; }
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.feature .ico {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--blue-dim);
  font-size: 19px;
  margin-bottom: 16px;
}
.feature h3 { font-size: 16px; margin-bottom: 8px; }
.feature p { color: var(--text-muted); font-size: 14px; }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  position: relative;
  padding-top: 50px;
}
.site-footer::before {
  content: '';
  position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: var(--gradient);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 30px;
  padding-bottom: 30px;
}
.footer-inner p { color: var(--text-muted); font-size: 13.5px; margin-top: 10px; }
.footer-inner h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 12px; }
.footer-admin a { font-size: 13px; color: var(--text-muted); border: 1px solid var(--border); padding: 8px 14px; border-radius: 30px; display: inline-block; }
.footer-admin a:hover { color: var(--green-light); border-color: var(--green); }
.copyright {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

/* ===== Cart Drawer ===== */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(5,8,16,0.6);
  backdrop-filter: blur(2px);
  z-index: 50;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 380px; max-width: 92vw;
  background: var(--bg-alt);
  border-left: 1px solid var(--border);
  z-index: 51;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(.2,.8,.2,1);
}
.cart-drawer.open { transform: translateX(0); }
.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--border);
}
.cart-header h3 { font-size: 17px; }
.cart-header button { font-size: 20px; color: var(--text-muted); line-height: 1; }
.cart-items { flex: 1; overflow-y: auto; padding: 16px 22px; display: flex; flex-direction: column; gap: 14px; }
.cart-empty { color: var(--text-muted); font-size: 14px; text-align: center; margin-top: 40px; }
.cart-item { display: flex; gap: 12px; align-items: center; }
.cart-item .ci-icon {
  width: 46px; height: 46px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0;
  overflow: hidden;
}
.ci-photo { width: 100%; height: 100%; object-fit: cover; }
.cart-item .ci-info { flex: 1; min-width: 0; }
.cart-item .ci-info strong { font-size: 13.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-item .ci-info span { font-family: 'Space Mono', monospace; font-size: 12.5px; color: var(--text-muted); }
.cart-item .ci-remove { color: var(--danger); font-size: 12px; }
.cart-footer { padding: 20px 22px; border-top: 1px solid var(--border); }
.cart-total { display: flex; justify-content: space-between; font-family: 'Space Mono', monospace; font-size: 16px; margin-bottom: 14px; }
.cart-total span { font-weight: 700; color: var(--green-light); }
.cart-hint { font-size: 11.5px; color: var(--text-muted); text-align: center; margin-top: 10px; }

/* ===== toast ===== */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--surface-2); border: 1px solid var(--green);
  color: var(--text); padding: 12px 20px; border-radius: 30px;
  font-size: 13.5px; z-index: 60; opacity: 0; pointer-events: none;
  transition: all 0.25s ease;
  display: flex; align-items: center; gap: 8px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Admin ===== */
.admin-body { min-height: 100vh; }
.login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card {
  width: 100%; max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  box-shadow: var(--shadow);
}
.login-card h1 { font-size: 20px; text-align: center; }
.login-card .muted { text-align: center; color: var(--text-muted); font-size: 13px; margin: 6px 0 26px; }
.login-card label { display: block; font-size: 12.5px; color: var(--text-muted); margin-bottom: 6px; margin-top: 16px; }
.login-card input, .admin-form-card input, .admin-form-card select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-size: 14.5px;
  transition: border-color 0.15s ease;
}
.admin-form-card select { cursor: pointer; }
.login-card input:focus, .admin-form-card input:focus, .admin-form-card select:focus { border-color: var(--blue-light); outline: none; }
.admin-form-card textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px; color: var(--text);
  font-size: 14.5px; font-family: inherit; resize: vertical;
}
.admin-form-card textarea:focus { border-color: var(--blue-light); outline: none; }
.error-msg { color: var(--danger); font-size: 13px; min-height: 18px; margin-top: 12px; }
.login-card .btn { width: 100%; margin-top: 6px; }
.back-link { display: block; text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-muted); }
.back-link:hover { color: var(--text); }

.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  position: sticky; top: 0; z-index: 10;
}
.admin-header h1 { font-size: 18px; }
.admin-header > div { display: flex; gap: 10px; }

.admin-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 26px 0 24px; }
.admin-tab-btn {
  font-family: 'Chakra Petch', sans-serif; font-weight: 600; font-size: 13.5px;
  padding: 11px 20px; border: 1px solid var(--border); border-radius: 30px;
  color: var(--text-muted); transition: all 0.15s ease; display: inline-flex; align-items: center; gap: 7px;
}
.admin-tab-btn:hover { color: var(--text); border-color: var(--blue-light); }
.admin-tab-btn.active { background: var(--gradient); border-color: transparent; color: #071022; }

.admin-full-card { max-width: 720px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 26px 0 24px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 8px;
}
.stat-label { font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-family: 'Chakra Petch', sans-serif; font-size: 19px; }

.sales-chart { display: flex; flex-direction: column; gap: 14px; }
.chart-row { display: grid; grid-template-columns: 120px 1fr 90px; align-items: center; gap: 12px; }
.chart-label { font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-bar-wrap { background: var(--bg); border-radius: 20px; height: 10px; overflow: hidden; }
.chart-bar { height: 100%; background: var(--gradient); border-radius: 20px; }
.chart-value { font-family: 'Space Mono', monospace; font-size: 12.5px; color: var(--text-muted); text-align: right; }

.analytics-info-card { margin-top: 24px; }
.analytics-info-card p { color: var(--text-muted); font-size: 14px; line-height: 1.65; margin-bottom: 12px; }
.info-steps { color: var(--text-muted); font-size: 14px; line-height: 1.9; margin: 0 0 14px 20px; }
.info-steps strong { color: var(--text); }

.admin-tab-panel { padding-bottom: 60px; }
.admin-main { display: grid; grid-template-columns: 1fr 1.3fr; gap: 24px; align-items: start; }
.admin-form-card, .admin-list-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.admin-form-card h2, .admin-list-card h2 { font-size: 16px; margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-actions { display: flex; gap: 10px; margin-top: 20px; }
.settings-note { font-size: 12px; color: var(--text-muted); margin-top: 8px; line-height: 1.5; }

.section-label { display: block; font-size: 12.5px; color: var(--text-muted); margin-bottom: 6px; margin-top: 18px; font-weight: 600; }
.variant-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 10px;
}
.variant-check-label { display: flex; align-items: center; gap: 8px; font-size: 14px; flex-shrink: 0; cursor: pointer; }
.variant-check-label input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--green); cursor: pointer; }
.muted-inline { color: var(--text-muted); font-size: 12px; font-weight: 400; }
.variant-row input[type="number"] {
  flex: 1; min-width: 140px; margin: 0;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 9px 12px; color: var(--text); font-size: 14px;
}
.variant-row input[type="number"]:disabled { opacity: 0.4; cursor: not-allowed; }

.form-section { border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 16px 0; overflow: hidden; }
.form-section summary {
  cursor: pointer; padding: 13px 14px; font-family: 'Chakra Petch', sans-serif;
  font-weight: 600; font-size: 14px; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.form-section summary::-webkit-details-marker { display: none; }
.form-section summary::after { content: '+'; font-size: 18px; color: var(--text-muted); flex-shrink: 0; }
.form-section[open] summary::after { content: '−'; }
.form-section .section-hint { font-weight: 400; font-size: 11.5px; color: var(--text-muted); margin-right: auto; margin-left: 4px; }
.form-section > *:not(summary) { padding-left: 14px; padding-right: 14px; }
.form-section > *:last-child { padding-bottom: 14px; }
.form-section label:first-of-type { margin-top: 2px; }

.faq-row { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 10px; }
.faq-row input, .faq-row textarea { margin-bottom: 8px; }
.faq-row-actions { display: flex; justify-content: flex-end; }
.faq-empty-hint { font-size: 12.5px; color: var(--text-muted); margin-bottom: 10px; }

.image-upload-row { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.image-upload-row input[type="file"] {
  flex: 1; min-width: 0;
  font-size: 12.5px; color: var(--text-muted);
  background: var(--bg); border: 1px dashed var(--border);
  border-radius: var(--radius-sm); padding: 10px;
}
.image-preview-wrap { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.image-preview-wrap img {
  width: 52px; height: 52px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--border);
}

.admin-games-list { display: flex; flex-direction: column; gap: 10px; max-height: 640px; overflow-y: auto; }
.admin-game-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.admin-game-icon { width: 42px; height: 42px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0; overflow: hidden; }
.admin-thumb-img { width: 100%; height: 100%; object-fit: cover; }
.admin-game-info { flex: 1; min-width: 0; }
.admin-game-info strong { display: block; font-size: 14px; }
.admin-game-info span { font-size: 12.5px; color: var(--text-muted); }
.admin-game-actions { display: flex; gap: 6px; flex-shrink: 0; }
.muted { color: var(--text-muted); font-size: 13.5px; }

hr.divider { border: none; border-top: 1px solid var(--border); margin: 22px 0; }

/* ===== Testimonials ===== */
.testimonials { padding: 20px 0 30px; }
.testimonials h2 { margin-bottom: 26px; }
.testimonials-track {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 6px; scrollbar-width: none;
}
.testimonials-track::-webkit-scrollbar { display: none; }
.testimonial-card {
  scroll-snap-align: start; flex: 0 0 300px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px 24px; text-align: center;
}
.t-avatar {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 14px;
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Chakra Petch', sans-serif; font-weight: 700; font-size: 26px; color: #071022;
}
.testimonial-card strong { display: block; font-size: 15.5px; }
.t-location { display: block; font-size: 12.5px; color: var(--text-muted); margin-top: 3px; }
.t-stars { color: #F5B843; letter-spacing: 2px; margin: 12px 0; font-size: 15px; }
.testimonial-card p { color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.testimonials-dots { display: flex; justify-content: center; gap: 8px; margin-top: 22px; }
.t-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: background 0.15s ease, transform 0.15s ease; }
.t-dot.active { background: var(--green); transform: scale(1.3); }

/* ===== Newsletter ===== */
.newsletter { padding: 10px 0 60px; }
.newsletter-inner { max-width: 520px; }
.newsletter-inner h2 { margin-bottom: 8px; }
.newsletter-inner > p { color: var(--text-muted); font-size: 14.5px; margin-bottom: 22px; }
.newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter-form input {
  flex: 1; min-width: 200px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 13px 16px; color: var(--text); font-size: 14.5px;
}
.newsletter-form input:focus { outline: none; border-color: var(--blue-light); }
.newsletter-msg { font-size: 13.5px; margin-top: 12px; min-height: 18px; }
.newsletter-msg.success { color: var(--green-light); }
.newsletter-msg.error { color: var(--danger); }

/* ===== Product page ===== */
.back-to-catalog {
  display: inline-block; margin: 22px 24px 0; font-size: 13.5px; color: var(--text-muted);
}
.back-to-catalog:hover { color: var(--text); }

.product-page { padding: 24px 24px 70px; }

.product-hero { display: grid; grid-template-columns: 360px 1fr; gap: 36px; margin-bottom: 54px; }
.product-media {
  border-radius: var(--radius-lg); border: 1px solid var(--border);
  aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-icon { font-size: 100px; }
.product-info h1 { font-size: clamp(24px, 4vw, 34px); margin: 10px 0 6px; }
.product-platform { color: var(--text-muted); font-size: 14px; margin-bottom: 18px; }

.variant-picker { display: flex; gap: 10px; margin-bottom: 18px; }
.variant-btn {
  font-family: 'Chakra Petch', sans-serif; font-weight: 600; font-size: 14px;
  padding: 11px 22px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-muted); transition: all 0.15s ease;
}
.variant-btn:hover { color: var(--text); border-color: var(--blue-light); }
.variant-btn.active { background: var(--gradient); border-color: transparent; color: #071022; }

.product-price { font-family: 'Space Mono', monospace; font-weight: 700; font-size: 28px; margin-bottom: 24px; }
.product-price small { display: block; font-weight: 400; font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.product-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.product-actions .btn { padding: 14px 22px; }

.product-section { margin-bottom: 46px; }
.product-section > .eyebrow { display: block; margin-bottom: 16px; }
.product-description { color: var(--text-muted); font-size: 15px; line-height: 1.75; max-width: 760px; }

.details-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.detail-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 16px; text-align: center; }
.detail-ico { font-size: 22px; margin-bottom: 10px; }
.detail-label { font-size: 12.5px; color: var(--text-muted); margin-bottom: 4px; }
.detail-value { font-family: 'Chakra Petch', sans-serif; font-weight: 600; font-size: 15px; word-break: break-word; }

.video-wrap { position: relative; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); max-width: 800px; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.faq-accordion { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.faq-question {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; font-family: 'Chakra Petch', sans-serif; font-weight: 600; font-size: 14.5px; text-align: left;
}
.faq-chevron { flex-shrink: 0; margin-left: 14px; color: var(--green-light); transition: transform 0.2s ease; }
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.faq-answer p { padding: 0 20px 18px; color: var(--text-muted); font-size: 14px; line-height: 1.65; }

.not-found { text-align: center; padding: 90px 20px; }
.not-found p { color: var(--text-muted); margin-bottom: 22px; }

/* ===== Account page ===== */
.account-page { padding: 40px 24px 80px; max-width: 640px; }
.account-loading { text-align: center; padding: 60px 20px; }

.link-btn {
  display: inline-block; background: none; border: none; padding: 0;
  color: var(--blue-light); font-size: 13px; cursor: pointer; text-decoration: underline;
}
.link-btn:hover { color: var(--green-light); }

.auth-tabs, .account-tabs { display: flex; gap: 10px; margin-bottom: 24px; }
.auth-tab-btn, .account-tab-btn {
  font-family: 'Chakra Petch', sans-serif; font-weight: 600; font-size: 13.5px;
  padding: 10px 20px; border: 1px solid var(--border); border-radius: 30px;
  color: var(--text-muted); transition: all 0.15s ease;
}
.auth-tab-btn:hover, .account-tab-btn:hover { color: var(--text); border-color: var(--blue-light); }
.auth-tab-btn.active, .account-tab-btn.active { background: var(--gradient); border-color: transparent; color: #071022; }

.auth-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px 26px; margin-bottom: 10px;
}
.auth-card label { display: block; font-size: 12.5px; color: var(--text-muted); margin: 14px 0 6px; }
.auth-card label:first-of-type { margin-top: 0; }
.auth-card input {
  width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; color: var(--text); font-size: 14.5px;
}
.auth-card input:focus { outline: none; border-color: var(--blue-light); }
.auth-card .btn { width: 100%; margin-top: 18px; }
.auth-msg { font-size: 13px; min-height: 16px; margin-top: 12px; }
.auth-msg.error { color: var(--danger); }
.auth-msg.success { color: var(--green-light); }

.account-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 30px; gap: 14px; }
.account-header .muted { font-size: 13.5px; margin-top: 4px; }

.empty-orders {
  text-align: center; padding: 50px 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.empty-orders p { color: var(--text-muted); margin-bottom: 18px; }

.order-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 14px;
}
.order-card-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.order-status { font-family: 'Chakra Petch', sans-serif; font-weight: 600; font-size: 11.5px; padding: 4px 10px; border-radius: 20px; text-transform: uppercase; }
.order-status-pending { background: rgba(245,184,67,0.15); color: #F5B843; }
.order-status-paid { background: rgba(25,217,124,0.15); color: var(--green-light); }
.order-status-cancelled { background: rgba(255,91,110,0.15); color: var(--danger); }
.order-items { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 10px 0; margin-bottom: 10px; }
.order-item-row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 4px 0; }
.order-total { text-align: right; font-family: 'Space Mono', monospace; font-weight: 700; font-size: 15px; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .features { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .admin-main { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .chart-row { grid-template-columns: 90px 1fr 70px; gap: 8px; }
}
@media (max-width: 680px) {
  .nav { display: none; }
  .hero { padding: 56px 0 44px; }
  .form-row { grid-template-columns: 1fr; }
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 14px; }
  .game-thumb { height: 120px; }
  .game-actions { flex-direction: column; }
  .game-actions .btn { width: 100%; }
  .product-hero { grid-template-columns: 1fr; }
  .details-grid { grid-template-columns: repeat(2, 1fr); }
  .search-box { max-width: 100%; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form .btn { width: 100%; }
  .testimonial-card { flex-basis: 260px; }
}