/* ══════════════════════════════════════════
   LIT-GAMES  —  Main Stylesheet
   Dark / Light theme · Language support
   ══════════════════════════════════════════ */

:root {
  --bg:          #0b0b0b;
  --bg-2:        #111111;
  --bg-3:        #181818;
  --bg-card:     #141414;
  --border:      #242424;
  --accent-1:    #f97316;
  --accent-2:    #fbbf24;
  --gradient:    linear-gradient(135deg, #f97316, #fbbf24);
  --text:        #e8e8e8;
  --text-muted:  #777;
  --text-dim:    #444;
  --font-display: 'Bebas Neue', cursive;
  --font-body:    'Outfit', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --radius:       8px;
  --header-h:     64px;
}

/* ── LIGHT MODE ──────────────────────────── */
body.light {
  --bg:         #f0f6ff;
  --bg-2:       #e4effa;
  --bg-3:       #d6e8f7;
  --bg-card:    #ffffff;
  --border:     #c2d9ef;
--accent-1:     #35b2db;
  --accent-2:   #cce4ff;
  --gradient:   linear-gradient(135deg, #35b2db, #cce4ff);
  --text:       #0f172a;
  --text-muted: #4b6a8a;
  --text-dim:   #94a3b8;
}

body.light .hero::before {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(37,99,235,.10) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(56,189,248,.07) 0%, transparent 60%);
}
body.light .header {
  background: rgba(240,246,255,0.88) !important;
}
body.light .feature-card,
body.light .login-card,
body.light .admin-card,
body.light .admin-section { box-shadow: 0 2px 12px rgba(37,99,235,.08); }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background .3s, color .3s;
}

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

/* ── HEADER ─────────────────────────────── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 100;
  background: rgba(11,11,11,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background .3s;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--text);
  white-space: nowrap;
}
.logo-bracket { color: var(--text-dim); }
.logo-accent  { color: var(--accent-1); }

.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  padding: 6px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .2s, background .2s;
}
.nav-link:hover,
.nav-link.active { color: var(--text); background: var(--bg-3); }
.nav-link.active { color: var(--accent-1); }

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: background .4s;
  flex-shrink: 0;
}
.status-dot.online  { background: #22c55e; box-shadow: 0 0 6px #22c55e88; }
.status-dot.offline { background: #ef4444; }

.status-label {
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.player-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--accent-1);
}

/* Theme toggle */
.theme-toggle {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: border-color .2s, color .2s, background .3s;
  white-space: nowrap;
  font-family: var(--font-body);
}
.theme-toggle:hover { border-color: var(--accent-1); color: var(--text); }

/* ── HERO ────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--header-h);
}

#emberCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(249,115,22,.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(251,191,36,.07) 0%, transparent 60%);
  transition: background .3s;
}

.hero-content {
  position: relative;
  text-align: center;
  padding: 0 24px;
  max-width: 800px;
}

.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-family: var(--font-mono);
  animation: fadeUp .8s ease both;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(80px, 16vw, 160px);
  line-height: 1;
  letter-spacing: 4px;
  color: var(--text);
  animation: fadeUp .8s .1s ease both;
}

.hero-accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  margin-top: 16px;
  animation: fadeUp .8s .2s ease both;
}

.hero-ip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  padding: 12px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .2s, transform .2s;
  animation: fadeUp .8s .3s ease both;
}
.hero-ip:hover { border-color: var(--accent-1); transform: translateY(-2px); }

.ip-icon { font-size: 18px; }
.ip-text {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.ip-copy {
  font-size: 12px;
  color: var(--accent-1);
  font-family: var(--font-mono);
  background: rgba(249,115,22,.12);
  padding: 2px 8px;
  border-radius: 4px;
}
body.light .ip-copy { background: rgba(37,99,235,.12); }

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 48px;
  animation: fadeUp .8s .4s ease both;
}

.stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 32px;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 40px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 4px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-family: var(--font-mono);
  animation: fadeIn 1s 1s ease both;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent-1), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ── SECTIONS ────────────────────────────── */
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 32px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 56px;
  color: var(--text);
}

/* ── FEATURES ────────────────────────────── */
.features { background: var(--bg-2); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 24px;
  transition: border-color .2s, transform .2s;
}
.feature-card:hover { border-color: var(--accent-1); transform: translateY(-4px); }

.feature-icon { font-size: 32px; margin-bottom: 16px; }

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--text);
  margin-bottom: 8px;
}

.feature-card p { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

/* ── DISCORD ─────────────────────────────── */
.discord-section { background: var(--bg); }

.discord-inner {
  display: flex;
  align-items: center;
  gap: 80px;
  flex-wrap: wrap;
}

.discord-text { flex: 1; min-width: 280px; }
.discord-text p { font-size: 16px; color: var(--text-muted); margin-bottom: 32px; }

.discord-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: #5865F2;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  transition: opacity .2s, transform .2s;
}
.discord-btn:hover { opacity: .9; transform: translateY(-2px); }

.discord-widget-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

/* ── PAGE HERO ───────────────────────────── */
.page-hero {
  padding: calc(var(--header-h) + 60px) 32px 60px;
  text-align: center;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 80px);
  letter-spacing: 3px;
}

.page-sub { color: var(--text-muted); margin-top: 8px; font-size: 16px; }

/* ── GALLERY ─────────────────────────────── */
.gallery-section .section-inner { padding-top: 60px; }

.gallery-grid { columns: 3; column-gap: 16px; }
@media (max-width: 900px) { .gallery-grid { columns: 2; } }
@media (max-width: 560px) { .gallery-grid { columns: 1; } }

.gallery-item {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.gallery-item img { width: 100%; display: block; transition: transform .3s; }

.gallery-item::after {
  content: '🔍';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  opacity: 0;
  transition: opacity .2s;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item:hover::after { opacity: 1; }

.gallery-loading, .gallery-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 80px 0;
  color: var(--text-muted);
  font-size: 15px;
}

.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent-1);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* ── LIGHTBOX ────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.93);
  z-index: 999;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }

.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: var(--radius);
  object-fit: contain;
}

.lightbox-close, .lightbox-nav {
  position: fixed;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 50%;
  width: 44px; height: 44px;
  cursor: pointer;
  font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
  line-height: 1;
}
.lightbox-close { top: 20px; right: 20px; }
.lightbox-close:hover, .lightbox-nav:hover { background: var(--accent-1); border-color: var(--accent-1); color: #fff; }
.lightbox-nav.prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-nav.next { right: 20px; top: 50%; transform: translateY(-50%); }

.lightbox-counter {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

/* ── LOGIN PAGE ──────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  background-image: radial-gradient(ellipse 70% 50% at 50% -10%, rgba(249,115,22,.15) 0%, transparent 60%);
}
body.light.login-page, body.light .login-page {
  background-image: radial-gradient(ellipse 70% 50% at 50% -10%, rgba(37,99,235,.12) 0%, transparent 60%);
}

.logo-fixed {
  position: fixed;
  top: 24px; left: 32px;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 2px;
  z-index: 10;
}

.login-wrap { width: 100%; max-width: 420px; padding: 24px; }

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
}

.login-header { text-align: center; margin-bottom: 32px; }
.login-icon { font-size: 36px; margin-bottom: 16px; }
.login-header h2 { font-family: var(--font-display); font-size: 28px; letter-spacing: 2px; margin-bottom: 8px; }
.login-header p { font-size: 14px; color: var(--text-muted); }

.login-form { display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-group input, .admin-input {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color .2s;
  outline: none;
}
.form-group input:focus, .admin-input:focus { border-color: var(--accent-1); }

.pw-wrap { position: relative; }
.pw-wrap input { width: 100%; padding-right: 44px; }
.pw-toggle {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer; font-size: 16px;
  color: var(--text-muted);
}

.form-error { font-size: 13px; color: #ef4444; min-height: 18px; text-align: center; }

.login-btn {
  padding: 14px;
  background: var(--gradient);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: opacity .2s, transform .2s;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
body:not(.light) .login-btn { color: #000; }
.login-btn:hover { opacity: .9; transform: translateY(-1px); }
.login-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(0,0,0,.3);
  border-top-color: #000;
  border-radius: 50%;
  display: none;
}
.btn-spinner.show { display: block; animation: spin .6s linear infinite; }

/* ── FOOTER ──────────────────────────────── */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 32px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy { font-size: 13px; color: var(--text-dim); }

.footer-lang {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.lang-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 10px;
  color: var(--text-muted);
  font-size: 12px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.lang-btn:hover,
.lang-btn.active { border-color: var(--accent-1); color: var(--accent-1); }

/* ── ANIMATIONS ──────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes scrollPulse {
  0%, 100% { opacity: .3; }
  50% { opacity: 1; }
}

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width: 768px) {
  .discord-inner { flex-direction: column; }
  .discord-widget-wrap { width: 100%; }
  .discord-widget-wrap iframe { width: 100%; }
}

@media (max-width: 560px) {
  .header-inner { padding: 0 16px; gap: 10px; }
  .status-label { display: none; }
  .section-inner { padding: 60px 20px; }
  .theme-toggle span:not(.toggle-icon) { display: none; }
}
