/* ===================== RESET & BASE ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #080808;
  --bg2: #111111;
  --bg3: #1a1a1a;
  --card: #141414;
  --border: #222222;
  --red: #c41e3a;
  --red-dark: #9b1830;
  --gold: #d4af37;
  --gold-dim: #a8892a;
  --text: #f0f0f0;
  --text-dim: #888;
  --text-muted: #555;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,.6);
  --shadow-hover: 0 8px 40px rgba(196,30,58,.25);
  --transition: .22s ease;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 3px; }

/* ===================== HEADER ===================== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8,8,8,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--text);
  flex-shrink: 0;
}

.logo-mark {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  font-weight: 900;
  color: #fff;
}

nav {
  display: flex;
  align-items: center;
  gap: .25rem;
}

nav a {
  padding: .45rem .85rem;
  border-radius: 7px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color var(--transition), background var(--transition);
}

nav a:hover, nav a.active {
  color: var(--text);
  background: var(--bg3);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-shrink: 0;
}

#lang-toggle {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: .35rem .7rem;
  border-radius: 7px;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 600;
  font-family: var(--font);
  transition: color var(--transition), border-color var(--transition);
}

#lang-toggle:hover {
  color: var(--text);
  border-color: var(--red);
}

/* ===================== HERO ===================== */
.hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 5rem 2rem 4rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(196,30,58,.18) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(212,175,55,.08) 0%, transparent 60%),
    var(--bg);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .3;
  mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, black, transparent);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(196,30,58,.15);
  border: 1px solid rgba(196,30,58,.3);
  color: var(--red);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .35rem .9rem;
  border-radius: 100px;
  margin-bottom: 1.4rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1.05;
  margin-bottom: .8rem;
}

.hero h1 span {
  background: linear-gradient(90deg, var(--red), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.05rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .7rem 1.6rem;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--red);
  color: #fff;
}

.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(196,30,58,.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

/* ===================== SECTION ===================== */
.section {
  padding: 4rem 2rem;
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -.5px;
  margin-bottom: .4rem;
}

.section-header p {
  color: var(--text-dim);
}

/* ===================== FILTER BAR ===================== */
.filter-bar {
  display: flex;
  gap: .4rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: .4rem 1rem;
  border-radius: 100px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
}

.filter-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.filter-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* ===================== CHARACTER GRID ===================== */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.char-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 2/3;
  cursor: pointer;
  background: var(--card);
  transition: transform var(--transition), box-shadow var(--transition);
}

.char-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-hover);
}

.char-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.char-card:hover img {
  transform: scale(1.06);
}

.char-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 900;
  color: rgba(255,255,255,.9);
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
}

.char-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.2) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  opacity: 1;
}

.char-name {
  font-size: .88rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.char-view {
  font-size: .75rem;
  color: var(--gold);
  font-weight: 600;
  opacity: 0;
  transform: translateY(4px);
  transition: all var(--transition);
}

.char-card:hover .char-view {
  opacity: 1;
  transform: translateY(0);
}

/* ===================== GALLERY PAGE ===================== */
.gallery-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  padding: 2rem;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}

.char-cover-wrap {
  width: 90px;
  height: 120px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg3);
}

.char-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.char-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 900;
  color: rgba(255,255,255,.9);
}

.gallery-header-info h1 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -.5px;
}

.gallery-header-info .back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--text-dim);
  font-size: .85rem;
  margin-top: .4rem;
  transition: color var(--transition);
}

.gallery-header-info .back-link:hover { color: var(--red); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .75rem;
  padding: 0 2rem;
  max-width: 1280px;
  margin: 0 auto;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--card);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-loader {
  text-align: center;
  padding: 2rem;
  color: var(--text-dim);
  font-size: .9rem;
  display: none;
}

.gallery-loader::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin-left: .6rem;
  vertical-align: middle;
}

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

.load-more-wrap {
  text-align: center;
  padding: 2.5rem;
}

.no-results {
  grid-column: 1/-1;
  text-align: center;
  color: var(--text-dim);
  padding: 3rem;
}

/* ===================== LIGHTBOX ===================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  backdrop-filter: blur(8px);
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 0 60px rgba(0,0,0,.8);
}

.lb-close {
  position: absolute;
  top: 1.2rem;
  right: 1.4rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background var(--transition);
}

.lb-close:hover { background: var(--red); border-color: var(--red); }

/* ===================== GAMES PAGE ===================== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.game-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}

.game-card:hover {
  border-color: var(--red);
  transform: translateY(-3px);
}

.game-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--bg3);
  overflow: hidden;
}

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

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

.game-badge {
  position: absolute;
  top: .6rem;
  left: .6rem;
  background: rgba(0,0,0,.75);
  border: 1px solid var(--border);
  color: var(--gold);
  font-size: .72rem;
  font-weight: 700;
  padding: .25rem .6rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: .05em;
  backdrop-filter: blur(4px);
}

.game-info {
  padding: 1.25rem;
}

.game-info h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .4rem;
}

.game-info p {
  font-size: .85rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* ===================== COMING SOON BANNER ===================== */
.coming-soon-banner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: linear-gradient(135deg, rgba(196,30,58,.1), rgba(212,175,55,.08));
  border: 1px solid rgba(196,30,58,.25);
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  margin: 3rem auto 0;
  max-width: 1280px;
}

.coming-soon-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.coming-soon-text h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: .3rem;
}

.coming-soon-text p {
  color: var(--text-dim);
  font-size: .9rem;
}

/* ===================== AGE GATE ===================== */
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 2rem;
}

.age-gate-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  max-width: 440px;
  width: 100%;
}

.age-gate-card h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: .8rem;
}

.age-gate-card p {
  color: var(--text-dim);
  font-size: .9rem;
  margin-bottom: 1.8rem;
  line-height: 1.6;
}

.age-gate-actions {
  display: flex;
  gap: .8rem;
  justify-content: center;
}

/* ===================== FOOTER ===================== */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: .8rem;
  margin-top: 4rem;
  line-height: 1.8;
}

footer strong { color: var(--text-dim); }

/* ===================== SKYSCRAPERS ===================== */
.sky-left, .sky-right {
  display: none;
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  width: 160px;
}
.sky-left  { left:  calc(50% - 660px); }
.sky-right { right: calc(50% - 660px); }

@media (min-width: 1680px) {
  .sky-left, .sky-right { display: block; }
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  header { padding: 0 1rem; }
  nav a { padding: .4rem .6rem; font-size: .82rem; }
  .hero { padding: 3.5rem 1.2rem 3rem; }
  .section { padding: 3rem 1.2rem; }
  .char-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .7rem; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); padding: 0 1.2rem; }
  .gallery-header { padding: 1.5rem 1.2rem; flex-wrap: wrap; }
  .games-grid { grid-template-columns: 1fr; }
  .coming-soon-banner { flex-direction: column; text-align: center; padding: 1.5rem; }
}

@media (max-width: 480px) {
  nav { display: none; }
  .char-grid { grid-template-columns: repeat(3, 1fr); }
}
