/* ---------- Reset & base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }

:root {
  --background: #07070d;
  --surface: #12121e;
  --border-soft: rgba(255, 255, 255, 0.1);
  --neon-pink: #ff2ec4;
  --neon-purple: #9d4bff;
  --neon-cyan: #00e5ff;
  --fg: #f2f2f7;
  --fg-dim: #a3a3b0;
}

body {
  background: var(--background);
  background-image:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(157, 75, 255, 0.18), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(0, 229, 255, 0.12), transparent);
  color: var(--fg);
  font-family: 'Outfit', ui-sans-serif, system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 { font-family: 'Rajdhani', ui-sans-serif, system-ui, sans-serif; letter-spacing: 0.01em; margin: 0; }

.neon-text { color: #fff; text-shadow: 0 0 6px rgba(255,46,196,.9), 0 0 18px rgba(157,75,255,.6); }

main { flex: 1; }

/* ---------- Layout utilities ---------- */
.container { max-width: 1152px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.container-md { max-width: 768px; margin: 0 auto; padding: 0 24px; }
.container-lg { max-width: 960px; margin: 0 auto; padding: 0 24px; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 6px; } .gap-2 { gap: 10px; } .gap-3 { gap: 14px; } .gap-4 { gap: 20px; }
.mt-2 { margin-top: 10px; } .mt-3 { margin-top: 14px; } .mt-4 { margin-top: 20px; }
.mt-6 { margin-top: 28px; } .mt-8 { margin-top: 36px; } .mt-10 { margin-top: 44px; }
.mb-2 { margin-bottom: 10px; } .mb-3 { margin-bottom: 14px; } .mb-4 { margin-bottom: 20px; } .mb-6 { margin-bottom: 28px; }
.text-sm { font-size: 0.875rem; } .text-xs { font-size: 0.75rem; }
.text-dim { color: var(--fg-dim); }
.py-8 { padding-top: 36px; padding-bottom: 36px; }
.py-10 { padding-top: 44px; padding-bottom: 44px; }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 24px;
  background: rgba(0,0,0,.7);
  border-bottom: 1px solid rgba(255,255,255,.05);
  backdrop-filter: blur(10px);
}
.navbar .logo { font-family: 'Rajdhani', sans-serif; font-size: 1.5rem; font-weight: 700; }
.navbar nav { display: flex; gap: 24px; font-family: 'Rajdhani', sans-serif; font-weight: 500; font-size: .95rem; }
.navbar nav a { position: relative; color: var(--fg-dim); padding: 4px 0; }
.navbar nav a:hover, .navbar nav a.active { color: #fff; }
.navbar nav a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-purple)); border-radius: 4px;
}
.navbar .right { display: flex; align-items: center; gap: 12px; font-size: .9rem; }
.nav-toggle { display: none; background: none; border: none; color: var(--fg); font-size: 1.4rem; line-height: 1; padding: 4px 8px; }

@media (max-width: 760px) {
  .navbar { flex-wrap: wrap; }
  .nav-toggle { display: block; order: 1; }
  .navbar .logo { order: 0; }
  .navbar nav, .navbar .right {
    display: none;
    width: 100%; order: 2;
    flex-direction: column; align-items: flex-start; gap: 14px;
    padding-top: 16px; margin-top: 12px;
    border-top: 1px solid var(--border-soft);
  }
  .navbar.nav-open nav, .navbar.nav-open .right { display: flex; }
  .navbar .right { flex-direction: row; flex-wrap: wrap; }
}
.badge-premium {
  background: linear-gradient(90deg, #fbbf24, #f59e0b); color: #000; font-weight: 700;
  padding: 4px 12px; border-radius: 999px; font-size: .75rem; box-shadow: 0 0 12px rgba(250,204,21,.5);
}

.site-footer {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  padding: 24px; margin-top: 40px;
  border-top: 1px solid rgba(255,255,255,.05);
}
.site-footer a { color: var(--fg-dim); font-size: .9rem; }
.site-footer a:hover { color: var(--neon-cyan); }

/* ---------- Buttons ---------- */
.btn-neon {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 24px; border: none; border-radius: 999px; font-weight: 600;
  font-family: 'Rajdhani', sans-serif; letter-spacing: .03em; color: #fff;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  box-shadow: 0 0 14px rgba(255,46,196,.35), 0 0 2px rgba(255,46,196,.6);
  transition: transform .18s ease, box-shadow .25s ease, filter .2s ease;
}
.btn-neon:hover { transform: translateY(-1px) scale(1.03); box-shadow: 0 0 22px rgba(255,46,196,.65), 0 0 46px rgba(157,75,255,.4); filter: brightness(1.08); }
.btn-neon:disabled { opacity: .5; filter: none; transform: none; box-shadow: none; cursor: default; }
.btn-neon.small { padding: 6px 14px; font-size: .8rem; }

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 22px; border-radius: 999px; font-weight: 600; font-family: 'Rajdhani', sans-serif;
  letter-spacing: .03em; color: var(--fg); background: rgba(255,255,255,.03); border: 1px solid var(--border-soft);
  transition: border-color .2s ease, box-shadow .25s ease, color .2s ease;
}
.btn-outline:hover { border-color: var(--neon-cyan); color: #fff; box-shadow: 0 0 16px rgba(0,229,255,.35); }
.btn-outline.small { padding: 5px 14px; font-size: .8rem; }

.btn-plain { background: none; border: none; color: var(--fg-dim); }
.btn-plain:hover { color: #fff; }

/* ---------- Forms ---------- */
.input-neon {
  width: 100%; border-radius: 10px; background: var(--surface); border: 1px solid var(--border-soft);
  padding: 10px 14px; color: var(--fg); outline: none; font-family: inherit; font-size: 1rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.input-neon::placeholder { color: rgba(255,255,255,.35); }
.input-neon:focus { border-color: var(--neon-cyan); box-shadow: 0 0 0 3px rgba(0,229,255,.15), 0 0 16px rgba(0,229,255,.35); }
textarea.input-neon { resize: vertical; }
label.field-label { display: block; margin-bottom: 6px; font-size: .9rem; font-weight: 500; }

/* Chips (tag filters) */
.chip { cursor: pointer; }
.chip input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.chip-face {
  display: inline-block; padding: 7px 16px; border-radius: 999px; font-size: .8rem;
  border: 1px solid var(--border-soft); background: rgba(255,255,255,.03);
  transition: all .2s cubic-bezier(.34,1.56,.64,1);
}
.chip input:checked + .chip-face {
  border-color: transparent; color: #fff;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  box-shadow: 0 0 10px rgba(255,46,196,.55), 0 0 22px rgba(157,75,255,.35);
  transform: scale(1.06);
}
.chip:hover .chip-face { border-color: var(--neon-cyan); }

.checkbox-neon {
  appearance: none; width: 18px; height: 18px; border: 2px solid var(--border-soft); border-radius: 5px;
  background: rgba(255,255,255,.03); cursor: pointer; position: relative; vertical-align: middle;
}
.checkbox-neon:checked {
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple)); border-color: transparent;
  box-shadow: 0 0 10px rgba(255,46,196,.6), 0 0 20px rgba(157,75,255,.35);
}
.checkbox-neon:checked::after {
  content: ''; position: absolute; left: 48%; top: 42%; width: 4px; height: 8px;
  border: solid white; border-width: 0 2px 2px 0; transform: translate(-50%,-50%) rotate(45deg);
}

/* ---------- Cards / carousel ---------- */
.card-glow { transition: transform .25s ease, box-shadow .25s ease; }
.card-glow:hover { box-shadow: 0 0 0 1px rgba(255,46,196,.4), 0 8px 30px rgba(157,75,255,.35); transform: scale(1.05); z-index: 10; }

.game-card-wrap { display: block; width: 170px; flex-shrink: 0; }
.game-card {
  position: relative; aspect-ratio: 2/3;
  border-radius: 12px; overflow: hidden; background: #262626;
}
.game-card img { width: 100%; height: 100%; object-fit: cover; }
.game-card .overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 12px; background: linear-gradient(to top, rgba(0,0,0,.9), rgba(0,0,0,.1) 60%, transparent);
  opacity: 0; transition: opacity .2s ease;
}
.game-card:hover .overlay { opacity: 1; }
.game-card .meta { font-size: .75rem; color: #d4d4d8; display: flex; gap: 8px; align-items: center; }
.game-card .date { font-size: .68rem; color: var(--fg-dim); margin-top: 2px; }
.game-card-info { padding: 8px 2px 0; }
.game-card-info .name {
  font-family: 'Rajdhani', sans-serif; font-weight: 600; font-size: .85rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.game-card-info .version { font-size: .7rem; color: var(--fg-dim); margin-top: 2px; }

.carousel-section { position: relative; padding: 16px 0; }
.carousel-title { padding: 0 24px 8px; font-size: 1.25rem; font-weight: 600; }
.carousel-track { display: flex; gap: 14px; overflow-x: auto; padding: 0 24px 8px; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-arrow {
  position: absolute; top: 0; height: 100%; width: 40px; z-index: 20; display: none;
  align-items: center; justify-content: center; font-size: 1.6rem; color: #e5e5e5; background: none; border: none;
}
@media (min-width: 640px) { .carousel-arrow { display: flex; } }
.carousel-arrow.left { left: 0; background: linear-gradient(to right, rgba(0,0,0,.8), transparent); }
.carousel-arrow.right { right: 0; background: linear-gradient(to left, rgba(0,0,0,.8), transparent); }
.carousel-arrow:hover { color: var(--neon-cyan); }

/* ---------- Hero ---------- */
.hero { position: relative; height: 55vh; min-height: 340px; overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s ease-in-out; }
.hero img.active { opacity: 1; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, var(--background), rgba(0,0,0,.4), transparent); }
.hero-content { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 40px 24px; }
.hero-content h1 { font-size: 2.4rem; max-width: 640px; }
.hero-dots { display: flex; gap: 8px; margin-top: 20px; }
.hero-dot { height: 6px; width: 6px; border-radius: 999px; background: rgba(255,255,255,.3); border: none; padding: 0; }
.hero-dot.active { width: 32px; background: linear-gradient(90deg, var(--neon-pink), var(--neon-purple)); box-shadow: 0 0 8px rgba(255,46,196,.6); }

/* ---------- Detail page ---------- */
.detail-top { display: flex; gap: 24px; flex-wrap: wrap; }
.detail-cover { width: 100%; max-width: 280px; aspect-ratio: 2/3; object-fit: cover; border-radius: 14px; flex-shrink: 0; }
.tag-pill {
  display: inline-block; border-radius: 999px; padding: 5px 14px; font-size: .75rem;
  border: 1px solid var(--border-soft); background: var(--surface); transition: all .2s ease;
}
.tag-pill:hover { border-color: transparent; background: linear-gradient(90deg, var(--neon-pink), var(--neon-purple)); box-shadow: 0 0 12px rgba(255,46,196,.4); }

.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
.gallery-grid img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; cursor: pointer; transition: transform .2s ease; }
.gallery-grid img:hover { transform: scale(1.04); }

.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); z-index: 100; display: flex; align-items: center; justify-content: center; }
.lightbox img { max-height: 85vh; max-width: 90vw; object-fit: contain; }
.lightbox .close { position: absolute; top: 16px; right: 24px; font-size: 2rem; color: #fff; background: none; border: none; }
.lightbox .nav-btn { position: absolute; top: 50%; transform: translateY(-50%); font-size: 2.5rem; color: #fff; background: none; border: none; }
.lightbox .nav-btn.left { left: 16px; } .lightbox .nav-btn.right { right: 16px; }

.creator-panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; border-radius: 14px; border: 1px solid var(--border-soft); background: rgba(18,18,30,.6); padding: 16px; }
.avatar { width: 48px; height: 48px; border-radius: 999px; object-fit: cover; }

.vote-btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 9px 18px; font-size: .9rem; border: 1px solid var(--border-soft); background: none; color: var(--fg); transition: all .2s ease; }
.vote-btn.active-like { border-color: transparent; background: linear-gradient(90deg, var(--neon-cyan), #34d399); color: #000; box-shadow: 0 0 14px rgba(0,229,255,.5); }
.vote-btn.active-dislike { border-color: transparent; background: linear-gradient(90deg, var(--neon-pink), #f43f5e); color: #fff; box-shadow: 0 0 14px rgba(255,46,196,.5); }
.vote-btn.active-fav { border-color: transparent; background: linear-gradient(90deg, #fbbf24, #f59e0b); color: #000; box-shadow: 0 0 14px rgba(250,204,21,.5); }

/* ---------- Comments ---------- */
.comment-card { border-radius: 12px; border: 1px solid var(--border-soft); background: rgba(18,18,30,.6); padding: 14px; }
.comment-avatar { width: 28px; height: 28px; border-radius: 999px; object-fit: cover; }

/* ---------- Tables (admin) ---------- */
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
th, td { padding: 8px 12px 8px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
thead { border-bottom: 1px solid var(--border-soft); color: var(--fg-dim); }
.admin-layout { display: flex; gap: 32px; max-width: 1100px; margin: 0 auto; padding: 32px 24px; }
.admin-sidebar { width: 176px; flex-shrink: 0; }
@media (max-width: 720px) {
  .admin-layout { flex-direction: column; padding: 24px 16px; }
  .admin-sidebar { width: 100%; }
  .admin-sidebar nav { display: flex; flex-wrap: wrap; gap: 4px; }
}
.admin-sidebar a { display: block; padding: 8px; border-radius: 8px; color: var(--fg-dim); }
.admin-sidebar a:hover { background: rgba(255,255,255,.05); color: var(--neon-cyan); }
.admin-thumb { width: 40px; height: 56px; object-fit: cover; border-radius: 6px; }

.dl-block { border-radius: 12px; border: 1px solid var(--border-soft); background: var(--surface); padding: 12px; }
.dl-remove {
  width: 24px; height: 24px; flex-shrink: 0; border-radius: 999px; border: 1px solid var(--border-soft);
  background: rgba(244,63,94,.1); color: #f87171; font-size: .9rem; line-height: 1; cursor: pointer;
}
.dl-remove:hover { background: rgba(244,63,94,.25); border-color: #f87171; }

/* ---------- Stats (admin) ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.stat-card { border-radius: 14px; border: 1px solid var(--border-soft); background: var(--surface); padding: 20px; }
.stat-value { font-size: 1.8rem; font-weight: 700; font-family: 'Rajdhani', sans-serif; }
.stat-label { color: var(--fg-dim); font-size: .8rem; margin-top: 4px; }

/* ---------- Content warning ---------- */
.content-warning {
  border-radius: 14px; border: 1px solid rgba(251,191,36,.35); background: rgba(251,191,36,.08);
  padding: 14px 20px; margin-bottom: 24px;
}
.content-warning-title {
  color: #fbbf24; font-weight: 700; font-family: 'Rajdhani', sans-serif;
  letter-spacing: .03em; text-transform: uppercase; font-size: .9rem; margin-bottom: 4px;
}
.content-warning-text { color: var(--fg-dim); font-size: .875rem; }

/* ---------- Alerts ---------- */
.alert { padding: 10px 16px; border-radius: 10px; font-size: .875rem; }
.alert-success { background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.3); color: #34d399; }
.alert-error { background: rgba(244,63,94,.1); border: 1px solid rgba(244,63,94,.3); color: #f87171; }
.alert-warning { background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.3); color: #fbbf24; }

/* ---------- Avatar picker ---------- */
.avatar-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
@media (max-width: 480px) { .avatar-grid { grid-template-columns: repeat(4, 1fr); } }
.avatar-option {
  padding: 0; border: 3px solid transparent; border-radius: 999px; background: none;
  overflow: hidden; aspect-ratio: 1; transition: all .2s cubic-bezier(.34,1.56,.64,1);
}
.avatar-option img { width: 100%; height: 100%; object-fit: cover; border-radius: 999px; }
.avatar-option:hover { border-color: var(--neon-cyan); transform: scale(1.06); }
.avatar-option.selected {
  border-color: var(--neon-pink);
  box-shadow: 0 0 0 3px rgba(255,46,196,.25), 0 0 16px rgba(255,46,196,.5);
  transform: scale(1.08);
}
.nav-avatar { width: 28px; height: 28px; border-radius: 999px; object-fit: cover; vertical-align: middle; margin-right: 6px; }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; gap: 24px; grid-template-columns: 1fr; margin-top: 32px; }
@media (min-width: 640px) { .pricing-grid { grid-template-columns: 1fr 1fr; } }
.pricing-card { border-radius: 16px; padding: 24px; border: 1px solid var(--border-soft); background: var(--surface); }
.pricing-card.premium { border-color: transparent; box-shadow: 0 0 0 1px rgba(255,46,196,.4), 0 0 30px rgba(157,75,255,.25); }
.price { font-size: 2rem; font-weight: 700; margin-top: 4px; }
