@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #0a0d0e;
  --surface: #12171a;
  --surface-2: #1a2226;
  --line: #232d31;
  --accent: #baff2c;
  --accent-dim: #8fd11f;
  --accent-2: #ff5a36;
  --danger: #ff5a5a;
  --text: #eef2ef;
  --text-dim: #829189;
  --radius: 8px;
}

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

body {
  background:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(186, 255, 44, 0.08), transparent 60%),
    linear-gradient(180deg, #0d1213 0%, var(--bg) 320px);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.55;
  min-height: 100vh;
}

h1, h2, h3, .logo-text { font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.01em; }

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

.wrap { max-width: 960px; margin: 0 auto; padding: 0 24px; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 13, 14, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 32px; }
.logo-text { font-weight: 700; font-size: 20px; }
.logo-text span { color: var(--accent); }
.topbar nav { display: flex; gap: 20px; align-items: center; font-size: 14px; color: var(--text-dim); }
.topbar nav a:hover { color: var(--text); }
.nav-cta { background: var(--accent); color: #0a0d0e !important; font-weight: 700; padding: 8px 16px; border-radius: 6px; }
.nav-user { color: var(--text); font-weight: 600; }
.nav-exit { color: var(--danger) !important; }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 22px; cursor: pointer; }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .topbar nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 0;
  }
  .topbar nav.open { display: flex; }
  .topbar nav a, .topbar nav span { width: 100%; padding: 12px 24px; box-sizing: border-box; }
  .nav-cta { width: calc(100% - 48px); margin: 6px 24px; text-align: center; }
}

/* Wide container for the storefront (full-width, responsive) */
.wrap-wide { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

.hero {
  padding: 64px 0 40px;
  background: radial-gradient(ellipse 900px 500px at 50% -20%, rgba(186, 255, 44, 0.10), transparent 60%);
  text-align: center;
}
.hero h1 { font-size: clamp(28px, 5vw, 48px); margin-bottom: 12px; }
.hero h1 span { color: var(--accent); }
.hero p { color: var(--text-dim); font-size: clamp(14px, 2vw, 17px); margin-bottom: 32px; }

.search-form { display: flex; max-width: 560px; margin: 0 auto; gap: 10px; }
.search-form input {
  flex: 1; background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 14px 16px; color: var(--text); font-size: 15px; font-family: inherit;
}
.search-form input:focus { outline: none; border-color: var(--accent); }
.search-form button {
  background: var(--accent); color: #0a0d0e; border: none; border-radius: 8px;
  padding: 0 22px; font-weight: 700; cursor: pointer; font-size: 14px;
}
.search-form button:hover { background: var(--accent-dim); }

.pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 32px 0 28px; }
.pill {
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; font-size: 13px; color: var(--text-dim); white-space: nowrap;
}
.pill:hover { color: var(--text); border-color: var(--accent-dim); }
.pill.active { background: var(--accent); color: #0a0d0e; border-color: var(--accent); font-weight: 700; }

.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin-bottom: 60px; }
.store-card {
  display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden;
}
@media (prefers-reduced-motion: no-preference) {
  .store-card { transition: transform 0.16s ease, border-color 0.16s ease; }
}
.store-card:hover { transform: translateY(-3px); border-color: var(--accent-dim); }
.store-card-img { height: 220px; background: var(--surface-2) center/contain no-repeat; }
.store-card .body { padding: 18px; }
.store-card h3 { font-size: 17px; margin: 8px 0 2px; }
.store-card .game { font-size: 12px; color: var(--text-dim); margin-bottom: 10px; }
.store-card .desc { font-size: 13px; color: var(--text-dim); margin-bottom: 14px; line-height: 1.5; }
.store-card .price { font-weight: 700; color: var(--accent); font-size: 15px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.tag-badge {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em;
  background: var(--surface-2); color: var(--accent-dim); padding: 3px 8px; border-radius: 4px;
}

.mod-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 48px 0 80px; align-items: stretch; }
.mod-detail-media { min-height: 460px; align-self: stretch; border-radius: 16px; background: var(--surface-2) center/contain no-repeat; border: 1px solid var(--line); }
.mod-detail-info h1 { font-size: 30px; margin: 14px 0 6px; }
.mod-detail-info .game { color: var(--text-dim); font-size: 14px; margin-bottom: 20px; }
.mod-desc { color: var(--text-dim); line-height: 1.7; margin-bottom: 24px; white-space: pre-line; }
.price-big { font-size: 26px; font-weight: 700; color: var(--accent); margin-bottom: 20px; }
.mod-detail-info .btn { width: auto; display: inline-block; padding: 14px 28px; }

@media (max-width: 780px) {
  .mod-detail { grid-template-columns: 1fr; gap: 24px; padding: 28px 0 60px; }
  .mod-detail-media { min-height: 220px; }
}

.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--text-dim); font-size: 13px; text-align: center; }

.center-page {
  min-height: calc(100vh - 68px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px;
  width: 100%;
  max-width: 380px;
}

.card h1 { font-size: 22px; margin-bottom: 6px; }
.card .sub { color: var(--text-dim); font-size: 14px; margin-bottom: 24px; }

label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; margin-top: 16px; }
label:first-of-type { margin-top: 0; }

input[type=text], input[type=email], input[type=password], select, textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #0a0d0e;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
  margin-top: 22px;
  text-align: center;
}
.btn:hover { background: var(--accent-dim); }
.btn.secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: var(--danger); color: #1a0a0a; }
.btn.small { width: auto; padding: 8px 14px; margin-top: 0; font-size: 13px; }

.foot-link { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-dim); }
.foot-link a { color: var(--accent); font-weight: 600; }

.alert { background: rgba(255, 90, 90, 0.12); border: 1px solid var(--danger); color: #ffb0b0; padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.alert.ok { background: rgba(186, 255, 44, 0.1); border-color: var(--accent); color: var(--accent); }

.page-title { font-size: 26px; margin: 36px 0 6px; }
.page-sub { color: var(--text-dim); margin-bottom: 28px; }

.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-bottom: 40px; }

.purchase-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.purchase-card img { width: 100%; height: 140px; object-fit: cover; display: block; background: var(--surface-2); }
.purchase-card .body { padding: 16px; }
.purchase-card h3 { font-size: 16px; margin-bottom: 4px; }
.purchase-card .game { font-size: 12px; color: var(--text-dim); margin-bottom: 14px; }
.serial-box {
  background: var(--bg);
  border: 1px dashed var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 14px;
  word-break: break-all;
}

.empty-state { color: var(--text-dim); text-align: center; padding: 60px 20px; border: 1px dashed var(--line); border-radius: 12px; }

table.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 20px; }
table.admin-table th, table.admin-table td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); }
table.admin-table th { color: var(--text-dim); font-weight: 600; }
table.admin-table form { display: inline; }

.admin-nav-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 24px; }
.admin-nav-card {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 22px;
}
.admin-nav-card:hover { border-color: var(--accent-dim); }
.admin-nav-card h3 { margin-bottom: 6px; }
.admin-nav-card p { color: var(--text-dim); font-size: 13px; }

.mod-stats { display: flex; gap: 16px; color: var(--text-dim); font-size: 13px; margin-bottom: 22px; }

.plan-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 6px; }
.plan-option {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 18px; font-weight: 600;
}
.plan-option:hover { border-color: var(--accent); }
.plan-option .plan-name { color: var(--text); }
.plan-option .plan-price { color: var(--accent); }

.plan-editor { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.plan-editor-row { display: flex; align-items: center; gap: 10px; }
.plan-editor-row input[type=text] { margin: 0; }

.gallery-thumbs { display: flex; gap: 10px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumb {
  width: 74px; height: 54px; flex: 0 0 auto; border-radius: 8px; cursor: pointer;
  background: var(--surface-2) center/cover no-repeat; border: 2px solid transparent; opacity: 0.6;
}
.gallery-thumb:hover { opacity: 0.9; }
.gallery-thumb.active { border-color: var(--accent); opacity: 1; }

.gallery-editor-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.gallery-editor-item { position: relative; width: 90px; }
.gallery-editor-item img { width: 90px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.gallery-editor-item button {
  position: absolute; top: -6px; right: -6px; background: var(--danger); color: #1a0a0a;
  border: none; border-radius: 50%; width: 20px; height: 20px; font-size: 12px; cursor: pointer; line-height: 1;
}

/* Conteudo extra livre (admin cola HTML em content_html) -- classes prontas
   pra manter a mesma linguagem visual do resto do site. */
.mod-content-extra { padding: 20px 0 80px; border-top: 1px solid var(--line); margin-top: 20px; }
.mod-content-extra h2 { font-size: 20px; letter-spacing: 0.02em; color: var(--accent); margin: 40px 0 24px; }
.mod-content-extra h2:first-child { margin-top: 0; }
.mod-content-extra p { color: var(--text-dim); line-height: 1.7; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.feature-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.feature-card .icon { font-size: 24px; margin-bottom: 10px; }
.feature-card h3 { font-size: 15px; margin-bottom: 6px; color: var(--text); }
.feature-card p { font-size: 13.5px; margin: 0; }

.step-list { display: flex; flex-direction: column; gap: 18px; }
.step-item { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-dim); color: #0a0d0e; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.step-item h4 { font-size: 15px; margin: 0 0 4px; color: var(--text); }
.step-item p { margin: 0; font-size: 14px; }
.step-item code { background: var(--surface-2); padding: 2px 6px; border-radius: 4px; font-size: 13px; }
