/* ========================================================
   Elvarnix — Master Stylesheet
   ======================================================== */

/* ── Google Fonts ──────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ── Design Tokens ─────────────────────────────────────── */
:root {
  --purple-deep: #08131d;
  --purple-dark: #10263c;
  --purple-mid: #184c7d;
  --purple-main: #1d9bf0;
  --purple-light: #7dd3fc;
  --pink-main: #8b5cf6;
  --pink-light: #c084fc;
  --cyan-main: #22d3ee;
  --gold-main: #fbbf24;
  --gold-light: #fde68a;
  --emerald: #34d399;
  --bg-page: #07131d;
  --bg-card: rgba(11, 22, 34, 0.78);
  --bg-card-hover: rgba(17, 30, 43, 0.9);
  --border-glass: rgba(125, 211, 252, 0.2);
  --text-primary: #ecfeff;
  --text-sec: #d7f9ff;
  --text-muted: #8aa7bb;
  --grad-primary: linear-gradient(135deg, #0ea5e9 0%, #22d3ee 35%, #8b5cf6 100%);
  --grad-dark: linear-gradient(180deg, #07131d 0%, #0c1723 100%);
  --shadow-glow: 0 0 40px rgba(34, 211, 238, 0.28);
  --shadow-card: 0 15px 40px rgba(8, 17, 24, 0.5);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ──────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

ul {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input,
select,
textarea {
  font-family: inherit;
}

/* ── Utility Classes ────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-pad {
  padding: 100px 0;
}

.text-grad {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
}

.hidden {
  display: none !important;
}

/* ── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--purple-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--purple-main);
  border-radius: 3px;
}

/* ╔══════════════════════════════════════════════════════╗
   ║  HEADER                                              ║
   ╚══════════════════════════════════════════════════════╝ */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
}

#site-header.scrolled {
  background: rgba(13, 1, 24, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-glass);
  padding: 12px 0;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(34, 211, 238, 0.25);
}

.logo-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.September {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

.logo-text {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
}

.logo-text span {
  color: var(--purple-light);
}

.logo-text em {
  font-style: normal;
  color: var(--purple-light);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: auto;
}

.main-nav a {
  color: var(--text-sec);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-primary);
  transform: scaleX(0);
  transition: var(--transition);
}

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

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-nav-login {
  padding: 8px 20px;
  border: 1px solid var(--border-glass);
  border-radius: 50px;
  color: var(--text-sec);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  background: transparent;
}

.btn-nav-login:hover {
  border-color: var(--purple-light);
  color: var(--text-primary);
}

.btn-nav-signup {
  padding: 8px 20px;
  background: var(--grad-primary);
  border-radius: 50px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-nav-signup:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

/* User Pill */
.user-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 8px;
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid rgba(124, 58, 237, 0.4);
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
}

.user-pill:hover {
  background: rgba(124, 58, 237, 0.3);
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.user-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #1e0640;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  min-width: 180px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
  z-index: 100;
}

.user-pill:hover .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dd-item {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-sec);
  transition: var(--transition);
}

.dd-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--text-sec);
  border-radius: 2px;
  transition: var(--transition);
  display: block;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 16px 24px;
  background: rgba(13, 1, 24, 0.97);
  border-top: 1px solid var(--border-glass);
  gap: 4px;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  padding: 12px 0;
  color: var(--text-sec);
  font-weight: 500;
  border-bottom: 1px solid var(--border-glass);
}

.mobile-nav a:last-child {
  border-bottom: none;
}

/* ╔══════════════════════════════════════════════════════╗
   ║  FOOTER                                              ║
   ╚══════════════════════════════════════════════════════╝ */
#site-footer {
  background: linear-gradient(180deg, #110222 0%, #0D0118 100%);
  border-top: 1px solid var(--border-glass);
  margin-top: 80px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px 40px;
  display: grid;
  grid-template-columns: 2fr 1.5fr;
  gap: 60px;
}

.footer-brand {
  max-width: 380px;
}

.footer-brand p {
  margin: 16px 0 24px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--purple-light);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 10px;
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--text-primary);
  transform: translateX(4px);
}

.footer-bottom {
  border-top: 1px solid var(--border-glass);
  padding: 24px;
}

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

.footer-bottom-inner p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-legal-links {
  display: flex;
  gap: 20px;
}

.footer-legal-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-legal-links a:hover {
  color: var(--purple-light);
}

.disclaimer {
  max-width: 1200px;
  margin: 0 auto;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  line-height: 1.5;
}

/* ╔══════════════════════════════════════════════════════╗
   ║  AUTH MODAL                                          ║
   ╚══════════════════════════════════════════════════════╝ */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.auth-modal {
  background: linear-gradient(145deg, #1e0640, #0f0225);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 440px;
  padding: 40px;
  position: relative;
  animation: slideUp 0.3s ease;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(124, 58, 237, 0.2);
}

.auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.auth-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.auth-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50px;
  padding: 4px;
  margin-bottom: 32px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
}

.auth-tab.active {
  background: var(--grad-primary);
  color: #fff;
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.auth-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-sec);
  margin-bottom: 8px;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}

.form-group input:focus {
  border-color: var(--purple-light);
  background: rgba(124, 58, 237, 0.1);
}

.pass-wrap {
  position: relative;
}

.pass-wrap input {
  padding-right: 48px;
}

.pass-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-muted);
}

.field-error {
  display: none;
  color: #f87171;
  font-size: 0.78rem;
  margin-top: 4px;
}

.form-error {
  color: #f87171;
  font-size: 0.85rem;
  text-align: center;
  margin-bottom: 12px;
  display: none;
}

.form-error:not(:empty) {
  display: block;
}

.checkbox-group label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--purple-main);
  flex-shrink: 0;
}

.checkbox-label span {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
}

.checkbox-label a {
  color: var(--purple-light);
}

.btn-auth-submit {
  width: 100%;
  padding: 14px;
  background: var(--grad-primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  transition: var(--transition);
  margin-top: 8px;
}

.btn-auth-submit:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.auth-switch a {
  color: var(--purple-light);
  font-weight: 600;
}

/* ╔══════════════════════════════════════════════════════╗
   ║  SECTION HEADER (reusable)                           ║
   ╚══════════════════════════════════════════════════════╝ */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 50px;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.3);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--purple-light);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ╔══════════════════════════════════════════════════════╗
   ║  BUTTONS                                             ║
   ╚══════════════════════════════════════════════════════╝ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--grad-primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 50px;
  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(124, 58, 237, 0.5);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: transparent;
  color: var(--text-sec);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  border: 1px solid var(--border-glass);
  transition: var(--transition);
}

.btn-outline:hover {
  border-color: var(--purple-light);
  color: var(--text-primary);
  background: rgba(124, 58, 237, 0.08);
}

.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--grad-primary);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 50px;
  transition: var(--transition);
  width: 100%;
  justify-content: center;
}

.btn-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.5);
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: linear-gradient(135deg, #F59E0B, #FCD34D);
  color: #1A0533;
  font-size: 1rem;
  font-weight: 800;
  border-radius: 50px;
  transition: var(--transition);
}

.btn-gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.5);
}

/* ╔══════════════════════════════════════════════════════╗
   ║  GAME CARDS                                          ║
   ╚══════════════════════════════════════════════════════╝ */
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}

.game-card:hover {
  transform: translateY(-8px);
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: var(--shadow-glow);
}

.game-card-img {
  width: 100%;
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.game-card-body {
  padding: 20px;
}

.game-badge {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--purple-light);
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.game-card-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.game-card-body p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

.game-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.meta-tag {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 10px;
  border-radius: 50px;
}

/* ╔══════════════════════════════════════════════════════╗
   ║  LEGAL PAGES                                         ║
   ╚══════════════════════════════════════════════════════╝ */
.legal-page {
  padding: 140px 0 80px;
}

.legal-hero {
  text-align: center;
  margin-bottom: 60px;
}

.legal-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.legal-hero p {
  color: var(--text-muted);
  font-size: 1rem;
}

.legal-content {
  max-width: 820px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 48px;
}

.legal-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--purple-light);
  margin: 32px 0 12px;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 16px;
}

.legal-content ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.legal-content ul li {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 8px;
  list-style: disc;
}

.legal-content strong {
  color: var(--text-primary);
}

.legal-last-updated {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* ╔══════════════════════════════════════════════════════╗
   ║  ANIMATIONS                                          ║
   ╚══════════════════════════════════════════════════════╝ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse-glow {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
  }

  50% {
    box-shadow: 0 0 60px rgba(124, 58, 237, 0.7);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }

  100% {
    background-position: 200% center;
  }
}

/* ╔══════════════════════════════════════════════════════╗
   ║  RESPONSIVE                                          ║
   ╚══════════════════════════════════════════════════════╝ */
@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-brand {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .btn-nav-login,
  .btn-nav-signup {
    display: none;
  }

  .section-pad {
    padding: 60px 0;
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
  }

  .legal-content {
    padding: 28px 20px;
  }

  .auth-modal {
    padding: 28px 20px;
  }
}

@media (max-width: 480px) {
  .footer-links {
    grid-template-columns: 1fr;
  }

  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
  }
}