/* ---------- RESET & BASE ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html,body { height:100%; font-family:"Inter",system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial; background:#0a0a0a; color:#f8f9fa; scroll-behavior: smooth; }
html { overflow-x: hidden; }
body { line-height: 1.6; }
.container { width:min(1200px,95%); margin:0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; transition: color 0.2s ease; }

/* ---------- SIMPLIFIED LOADING SCREEN ---------- */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--background);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-light);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.loading-text {
  color: var(--text-primary);
  font-size: 16px;
  text-align: center;
}

/* ---------- CSS VARIABLES & THEMES ---------- */
:root {
  /* Colors */
  --primary: #ff6b35;
  --secondary: #00d4aa;
  --background: #0a0a0a;
  --surface: #111111;
  --text-primary: #f8f9fa;
  --text-secondary: #adb5bd;
  --text-muted: #6c757d;
  --border: rgba(255, 255, 255, 0.1);
  --border-light: rgba(255, 255, 255, 0.05);
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Typography */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  
  /* Border radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  
  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal: 1040;
  --z-popover: 1050;
  --z-tooltip: 1060;
}

/* Dark theme (default) */
[data-theme="dark"] {
  --background: #0a0a0a;
  --surface: #111111;
  --surface-elevated: #1a1a1a;
  --text-primary: #f8f9fa;
  --text-secondary: #adb5bd;
  --text-muted: #6c757d;
}

/* Light theme */
[data-theme="light"] {
  --background: #ffffff;
  --surface: #f8f9fa;
  --surface-elevated: #ffffff;
  --text-primary: #212529;
  --text-secondary: #495057;
  --text-muted: #6c757d;
  --border: rgba(0, 0, 0, 0.1);
  --border-light: rgba(0, 0, 0, 0.05);
  --shadow: rgba(0, 0, 0, 0.1);
  --shadow-elevated: rgba(0, 0, 0, 0.15);
}

/* particle canvas covers background */
.particle-canvas { position:fixed; inset:0; z-index:0; pointer-events:none; }

/* UI wrapper sits above canvas */
.ui { position:relative; z-index:10; }

main {
  position: relative;
  z-index: 1;
}

/* ---------- TOPBAR ---------- */
.topbar { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: var(--space-lg) var(--space-xl); 
  backdrop-filter: blur(20px) saturate(180%); 
  background: rgba(17, 17, 17, 0.8); 
  border-bottom: 1px solid var(--border-light); 
  position: sticky; 
  top: 0; 
  z-index: var(--z-sticky); 
  box-shadow: 0 8px 32px var(--shadow); 
  transition: all var(--transition-normal); 
}

.topbar.scrolled { 
  background: rgba(17, 17, 17, 0.95); 
  box-shadow: 0 12px 48px var(--shadow-elevated); 
  border-bottom-color: var(--border); 
}

.brand { 
  display: flex; 
  align-items: center; 
  gap: var(--space-md); 
}

.brand-title { 
  font-weight: 700; 
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); 
  -webkit-background-clip: text; 
  -webkit-text-fill-color: transparent; 
  background-clip: text; 
  font-size: var(--font-size-xl); 
  letter-spacing: -0.025em; 
  position: relative; 
}

.brand-title::after { 
  content: ''; 
  position: absolute; 
  bottom: -4px; 
  left: 0; 
  width: 100%; 
  height: 2px; 
  background: linear-gradient(90deg, var(--primary), var(--secondary)); 
  opacity: 0; 
  transition: opacity var(--transition-normal); 
}

.brand:hover .brand-title::after { 
  opacity: 1; 
}

.brand-sub { 
  font-size: var(--font-size-sm); 
  color: var(--text-secondary); 
  opacity: 0.8; 
  margin-top: 2px; 
}

.logo-icon {
  width: 48px; 
  height: 48px; 
  border-radius: 50%; 
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
  transition: all var(--transition-normal);
}

.logo-icon:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.3);
}

.about-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: white;
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.3);
  flex-shrink: 0;
}

/* Navigation */
.nav { 
  display: flex; 
  gap: var(--space-lg); 
  align-items: center; 
}

.nav-link { 
  color: var(--text-secondary); 
  padding: var(--space-sm) var(--space-md); 
  position: relative; 
  transition: all var(--transition-normal); 
  font-weight: 500; 
  border-radius: var(--radius-md); 
  font-size: var(--font-size-sm); 
}

.nav-link::after { 
  content: ''; 
  position: absolute; 
  left: 50%; 
  transform: translateX(-50%); 
  bottom: -8px; 
  height: 2px; 
  width: 0; 
  border-radius: var(--radius-sm); 
  background: linear-gradient(90deg, var(--primary), var(--secondary)); 
  transition: width var(--transition-normal); 
}

.nav-link:hover { 
  color: var(--text-primary); 
  background: rgba(255, 107, 53, 0.1); 
}

.nav-link:hover::after, .nav-link.active::after { 
  width: 80%; 
}

.nav-link.active { 
  color: var(--text-primary); 
  background: rgba(255, 107, 53, 0.15); 
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
}

.mobile-menu-toggle:hover {
  background: rgba(255, 107, 53, 0.1);
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }
  
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: var(--space-lg);
    box-shadow: 0 8px 32px var(--shadow);
    z-index: var(--z-dropdown);
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .nav.open {
    display: flex;
  }
  
  .nav-link {
    padding: var(--space-md);
    text-align: center;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
  }
  
  .theme-toggle-container {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-light);
  }
  
  .topbar {
    padding: var(--space-md) var(--space-lg);
    position: relative;
  }
  
  .brand {
    flex: 1;
  }
  
  .brand-title {
    font-size: var(--font-size-lg);
  }
  
  .brand-sub {
    font-size: var(--font-size-xs);
  }
}

/* Theme toggle button */
.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.theme-toggle:hover {
  background: var(--surface-elevated);
  color: var(--text-primary);
  border-color: var(--primary);
}

/* ---------- HERO SECTION ---------- */
.hero { 
  min-height: 100vh; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  position: relative; 
  padding: var(--space-3xl) var(--space-lg); 
  text-align: center; 
  z-index: 2; 
  background: radial-gradient(ellipse at center, rgba(255, 107, 53, 0.1) 0%, transparent 70%);
}

@keyframes heroGlow { 
  0%, 100% { 
    opacity: 0.3; 
    transform: scale(1); 
  } 
  50% { 
    opacity: 0.8; 
    transform: scale(1.2); 
  } 
}

.hero-inner { 
  max-width: 1200px; 
  transform-style: preserve-3d; 
  position: relative; 
  z-index: 3; 
}

.hero-logo { 
  width: 280px; 
  max-width: 50vw; 
  margin: 0 auto var(--space-xl); 
  filter: drop-shadow(0 20px 40px rgba(255, 107, 53, 0.2)); 
  transform: translateZ(0); 
  transition: all var(--transition-slow); 
}

.hero-logo:hover {
  transform: translateZ(20px) scale(1.05);
  filter: drop-shadow(0 30px 60px rgba(255, 107, 53, 0.3));
}

.hero-title { 
  font-size: clamp(2.5rem, 5vw, 4rem); 
  letter-spacing: -0.02em; 
  color: var(--text-primary); 
  margin-bottom: var(--space-lg); 
  text-shadow: 0 8px 32px rgba(255, 107, 53, 0.1); 
  font-weight: 800; 
  line-height: 1.1; 
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary) 50%, var(--secondary) 100%); 
  -webkit-background-clip: text; 
  -webkit-text-fill-color: transparent; 
  background-clip: text; 
}

.hero-sub { 
  color: var(--text-secondary); 
  margin-bottom: var(--space-2xl); 
  opacity: 0.9; 
  font-size: var(--font-size-lg); 
  line-height: 1.6; 
  max-width: 600px; 
  margin-left: auto; 
  margin-right: auto; 
}

/* neon depth layers */
.neon-layer { position:absolute; inset:0; pointer-events:none; mix-blend-mode:screen; opacity:0.18; transform:translateZ(0); }
.neon-1 { background: radial-gradient(600px 300px at 20% 30%, rgba(255,90,60,0.14), transparent 18%); }
.neon-2 { background: radial-gradient(500px 300px at 80% 60%, rgba(255,160,90,0.08), transparent 18%); }
.neon-3 { background: radial-gradient(900px 480px at 50% 10%, rgba(255,40,40,0.06), transparent 20%); }

/* ---------- BUTTONS ---------- */
.btn { 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  gap: var(--space-sm); 
  padding: var(--space-md) var(--space-xl); 
  border-radius: var(--radius-xl); 
  font-weight: 600; 
  cursor: pointer; 
  border: none; 
  transition: all var(--transition-normal); 
  text-decoration: none; 
  font-size: var(--font-size-base); 
  position: relative; 
  overflow: hidden; 
  min-height: 48px; 
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary { 
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); 
  color: white; 
  box-shadow: 0 8px 32px rgba(255, 107, 53, 0.3); 
}

.btn-primary:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 12px 48px rgba(255, 107, 53, 0.4); 
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); 
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary) 0%, #00b894 100%);
  color: white;
  box-shadow: 0 8px 32px rgba(0, 212, 170, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 48px rgba(0, 212, 170, 0.4);
}

.btn-ghost { 
  background: rgba(255, 255, 255, 0.05); 
  color: var(--text-primary); 
  border: 1px solid var(--border); 
  backdrop-filter: blur(10px); 
}

.btn-ghost:hover { 
  border-color: var(--primary); 
  background: rgba(255, 107, 53, 0.1); 
  transform: translateY(-2px); 
}

.btn:active { 
  transform: translateY(0) scale(0.98); 
}

.btn-small { 
  display: inline-flex; 
  align-items: center; 
  gap: var(--space-xs); 
  padding: var(--space-sm) var(--space-md); 
  border-radius: var(--radius-lg); 
  font-weight: 500; 
  font-size: var(--font-size-sm); 
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); 
  color: white; 
  cursor: pointer; 
  transition: all var(--transition-normal); 
  text-decoration: none; 
  min-height: 36px; 
}

.btn-small:hover { 
  transform: translateY(-1px); 
  box-shadow: 0 6px 24px rgba(255, 107, 53, 0.3); 
}

.btn-small.disabled { 
  opacity: 0.5; 
  cursor: not-allowed; 
  pointer-events: none; 
  background: var(--text-muted); 
}

/* Floating action button */
.fab {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(255, 107, 53, 0.3);
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xl);
  z-index: var(--z-fixed);
}

.fab:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 48px rgba(255, 107, 53, 0.4);
}

/* ---------- SECTIONS ---------- */
.section-title { 
  font-size: clamp(1.5rem, 4vw, 2.5rem); 
  color: var(--text-primary); 
  margin-bottom: var(--space-xl); 
  font-weight: 700; 
  text-align: center; 
  position: relative; 
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: var(--radius-sm);
}

.features { 
  padding: var(--space-3xl) 0; 
  background: linear-gradient(180deg, transparent 0%, rgba(17, 17, 17, 0.5) 100%); 
  position: relative; 
}

.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.feature-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
  gap: var(--space-xl); 
  margin-top: var(--space-2xl); 
}

.feature-card { 
  padding: var(--space-xl); 
  border-radius: var(--radius-2xl); 
  background: rgba(17, 17, 17, 0.6); 
  backdrop-filter: blur(20px); 
  border: 1px solid var(--border-light); 
  box-shadow: 0 8px 32px var(--shadow); 
  transition: all var(--transition-normal); 
  position: relative; 
  overflow: hidden; 
  transform-style: preserve-3d; 
}

.feature-card::before { 
  content: ''; 
  position: absolute; 
  top: 0; 
  left: -100%; 
  width: 100%; 
  height: 100%; 
  background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.1), transparent); 
  transition: left 0.6s ease; 
}

.feature-card:hover { 
  transform: translateY(-8px) scale(1.02); 
  box-shadow: 0 20px 60px rgba(255, 107, 53, 0.2); 
  border-color: var(--primary); 
  background: rgba(17, 17, 17, 0.8); 
}

.feature-card:hover::before { 
  left: 100%; 
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  color: white;
  box-shadow: 0 8px 32px rgba(255, 107, 53, 0.3);
  transition: all var(--transition-normal);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 48px rgba(255, 107, 53, 0.4);
}

.feature-card h3 { 
  color: var(--primary); 
  margin-bottom: var(--space-md); 
  font-size: var(--font-size-xl); 
  font-weight: 600; 
}

.feature-card p { 
  color: var(--text-secondary); 
  opacity: 0.9; 
  font-size: var(--font-size-base); 
  line-height: 1.6; 
}

/* ---------- PREVIEW & GAME CARDS ---------- */
.preview { 
  padding: var(--space-3xl) 0; 
  position: relative; 
}

.preview-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); 
  gap: var(--space-xl); 
  margin-top: var(--space-2xl); 
}

.game-preview { 
  border-radius: var(--radius-2xl); 
  overflow: hidden; 
  background: rgba(17, 17, 17, 0.6); 
  backdrop-filter: blur(20px); 
  border: 1px solid var(--border-light); 
  box-shadow: 0 8px 32px var(--shadow); 
  cursor: pointer; 
  transform-style: preserve-3d; 
  transition: all var(--transition-normal); 
  display: flex; 
  flex-direction: column; 
  position: relative; 
  group: hover; 
}

.game-preview::after { 
  content: ''; 
  position: absolute; 
  inset: 0; 
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(0, 212, 170, 0.05) 100%); 
  opacity: 0; 
  transition: opacity var(--transition-normal); 
  pointer-events: none; 
}

.game-preview:hover { 
  transform: translateY(-12px) scale(1.02); 
  box-shadow: 0 24px 80px rgba(255, 107, 53, 0.3); 
  border-color: var(--primary); 
}

.game-preview:hover::after { 
  opacity: 1; 
}

.game-preview img { 
  width: 100%; 
  height: 240px; 
  object-fit: cover; 
  display: block; 
  transition: transform var(--transition-slow); 
}

.game-preview:hover img { 
  transform: scale(1.08); 
}

.preview-meta { 
  padding: var(--space-lg) var(--space-xl); 
  flex: 1; 
  display: flex; 
  flex-direction: column; 
}

.preview-meta h3 { 
  color: var(--primary); 
  margin-bottom: var(--space-sm); 
  font-size: var(--font-size-lg); 
  font-weight: 600; 
}

.preview-meta p { 
  color: var(--text-secondary); 
  opacity: 0.9; 
  font-size: var(--font-size-sm); 
  line-height: 1.5; 
  flex: 1; 
}

/* 3D card style */
.card-3d { perspective:1000px; }
.card-3d img { backface-visibility:hidden; transform:translateZ(0); }

/* coming soon subtle mask */
.coming-soon { position:relative; opacity:0.92; }
.coming-soon::after { content:'COMING SOON'; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:rgba(255,255,255,0.06); font-size:3.2rem; font-weight:900; pointer-events:none; transform:rotate(-10deg); }

/* about card */
.about-card { padding:22px; border-radius:14px; margin-top:18px; background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.12)); display:flex; align-items:center; gap:18px; border:1px solid rgba(255,255,255,0.02); transition:transform .3s ease, box-shadow .3s ease; }
.about-card:hover { transform:translateY(-4px); box-shadow:0 12px 40px rgba(255,90,60,0.1); }
.about-avatar { width:96px; height:96px; border-radius:12px; object-fit:cover; border:3px solid rgba(255,100,70,0.06); transition:transform .3s ease; }
.about-card:hover .about-avatar { transform:scale(1.05); }
.about-content a { color:#ffb36a; transition:color .3s ease; }
.about-content a:hover { color:#ff6a4d; text-decoration:underline; }

/* footer */
.footer-cta { 
  padding: var(--space-3xl) 0; 
  text-align: center; 
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(6, 6, 8, 0.08)); 
}

.footer-cta p { 
  font-size: var(--font-size-lg); 
  color: var(--text-secondary); 
}

.footer-cta a { 
  color: var(--primary); 
  font-weight: 600; 
  transition: color var(--transition-normal); 
}

.footer-cta a:hover { 
  color: var(--secondary); 
}

.site-footer { padding:28px 20px; text-align:center; color:#bdbdbd; border-top:1px solid rgba(255,255,255,0.02); background:linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0.04)); font-size:0.9rem; }
.site-footer a { color:#ffb36a; transition:color .3s ease; }
.site-footer a:hover { color:#ff6a4d; }

/* helper */
.muted { color:#c7c7c7; opacity:.9; font-weight:400; line-height:1.7; margin-bottom:12px; }
.hero-cta { display:flex; gap:14px; justify-content:center; flex-wrap:wrap; margin-top:24px; }

/* ---------- GAME CARDS ---------- */
.game-row { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); 
  gap: var(--space-xl); 
  margin-top: var(--space-2xl); 
}

/* ---------- GAME INTERFACES ---------- */
.game-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.game-header {
  text-align: center;
  margin-bottom: 30px;
}

.game-title {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--primary);
  margin-bottom: 10px;
  font-weight: 700;
}

.game-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(17, 17, 17, 0.6);
  border-radius: 10px;
  border: 1px solid var(--border-light);
  backdrop-filter: blur(10px);
}

.game-status {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.game-controls {
  display: flex;
  gap: 10px;
}

.difficulty-selector {
  text-align: center;
  margin-bottom: 20px;
}

.difficulty-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.difficulty-btn {
  padding: 8px 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.difficulty-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.difficulty-btn:hover {
  background: rgba(255, 107, 53, 0.1);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.board-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.game-stats {
  text-align: center;
  margin-top: 20px;
}

.stat-card {
  background: rgba(17, 17, 17, 0.6);
  padding: 20px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* ---------- BOARD GAMES ---------- */
.checkers-board, .chess-board {
  display: grid;
  grid-template-columns: repeat(8, 60px);
  grid-template-rows: repeat(8, 60px);
  border: 3px solid var(--primary);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.connect4-board {
  display: grid;
  grid-template-columns: repeat(7, 60px);
  grid-template-rows: repeat(6, 60px);
  border: 3px solid var(--primary);
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  padding: 5px;
  gap: 2px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.tic-tac-toe-board {
  display: grid;
  grid-template-columns: repeat(3, 120px);
  grid-template-rows: repeat(3, 120px);
  border: 3px solid var(--primary);
  border-radius: 10px;
  overflow: hidden;
  gap: 3px;
  background: var(--primary);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.board-square, .board-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.board-square.light {
  background-color: #f0d9b5;
}

.board-square.dark {
  background-color: #b58863;
}

.board-cell {
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.board-cell:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.board-cell.red {
  background: linear-gradient(135deg, #ff4444, #cc0000);
  border-color: #aa0000;
  box-shadow: 0 4px 8px rgba(255, 68, 68, 0.3);
}

.board-cell.yellow {
  background: linear-gradient(135deg, #ffdd00, #ffaa00);
  border-color: #cc8800;
  box-shadow: 0 4px 8px rgba(255, 221, 0, 0.3);
}

.board-square.highlighted, .board-cell.highlighted {
  background-color: rgba(255, 107, 53, 0.5) !important;
  box-shadow: inset 0 0 0 3px var(--primary);
}

.board-square.selected, .board-cell.selected {
  background-color: rgba(0, 212, 170, 0.5) !important;
  box-shadow: inset 0 0 0 3px var(--secondary);
}

.board-cell.winning, .board-square.winning {
  animation: pulse 1s infinite;
  box-shadow: 0 0 20px rgba(0, 212, 170, 0.8);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* ---------- GAME PIECES ---------- */
.checker-piece {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid #333;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.checker-piece.red {
  background: linear-gradient(135deg, #ff4444, #cc0000);
}

.checker-piece.black {
  background: linear-gradient(135deg, #333, #000);
}

.checker-piece.king::after {
  content: '♔';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: gold;
  font-size: 20px;
  font-weight: bold;
}

.checker-piece:hover {
  transform: scale(1.1);
}

.chess-piece {
  width: 50px;
  height: 50px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.chess-piece:hover {
  transform: scale(1.1);
}

.chess-piece.white {
  color: #fff;
}

.chess-piece.black {
  color: #333;
}

/* ---------- CONNECT FOUR SPECIFIC ---------- */
.column-header {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.column-indicator {
  width: 60px;
  height: 20px;
  background: rgba(255, 107, 53, 0.3);
  border-radius: 10px;
  margin: 0 2px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.column-indicator:hover {
  background: rgba(255, 107, 53, 0.6);
  transform: translateY(-2px);
}

.column-indicator.active {
  background: var(--primary);
  box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

/* ---------- TIC TAC TOE SPECIFIC ---------- */
.board-cell.x {
  color: var(--primary);
  font-weight: bold;
}

.board-cell.o {
  color: var(--secondary);
  font-weight: bold;
}

/* ---------- CHESS SPECIFIC ---------- */
.move-history {
  max-height: 200px;
  overflow-y: auto;
  background: rgba(17, 17, 17, 0.6);
  border-radius: 10px;
  padding: 15px;
  margin-top: 20px;
  border: 1px solid var(--border-light);
}

.move-history h3 {
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 1.1rem;
}

.move-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  font-family: monospace;
  font-size: 0.85rem;
}

.move-item {
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.move-item:hover {
  background: rgba(255, 107, 53, 0.1);
}

/* ---------- RESPONSIVE GAME DESIGN ---------- */
@media (max-width: 1024px) {
  .game-container {
    padding: 18px;
  }
  
  .checkers-board, .chess-board {
    grid-template-columns: repeat(8, 55px);
    grid-template-rows: repeat(8, 55px);
  }
  
  .connect4-board {
    grid-template-columns: repeat(7, 55px);
    grid-template-rows: repeat(6, 55px);
  }
  
  .tic-tac-toe-board {
    grid-template-columns: repeat(3, 110px);
    grid-template-rows: repeat(3, 110px);
  }
}

@media (max-width: 768px) {
  .game-container {
    padding: 15px;
  }
  
  .game-header {
    margin-bottom: 20px;
  }
  
  .game-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
  }
  
  .game-info {
    flex-direction: column;
    gap: 15px;
    text-align: center;
    padding: 12px;
  }
  
  .game-controls {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .checkers-board, .chess-board {
    grid-template-columns: repeat(8, 45px);
    grid-template-rows: repeat(8, 45px);
  }
  
  .connect4-board {
    grid-template-columns: repeat(7, 45px);
    grid-template-rows: repeat(6, 45px);
  }
  
  .tic-tac-toe-board {
    grid-template-columns: repeat(3, 100px);
    grid-template-rows: repeat(3, 100px);
  }
  
  .board-square, .board-cell {
    font-size: 0.9rem;
  }
  
  .checker-piece {
    width: 35px;
    height: 35px;
  }
  
  .chess-piece {
    width: 35px;
    height: 35px;
    font-size: 1.5rem;
  }
  
  .column-indicator {
    width: 45px;
  }
  
  .move-list {
    grid-template-columns: 1fr;
  }
  
  .difficulty-buttons {
    gap: 8px;
    flex-wrap: wrap;
  }
  
  .difficulty-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  
  .game-stats {
    margin-top: 15px;
  }
  
  .stat-card {
    padding: 15px;
    margin: 5px;
  }
}

@media (max-width: 480px) {
  .game-container {
    padding: 10px;
  }
  
  .game-header {
    margin-bottom: 15px;
  }
  
  .game-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }
  
  .game-info {
    padding: 10px;
    gap: 10px;
  }
  
  .checkers-board, .chess-board {
    grid-template-columns: repeat(8, 40px);
    grid-template-rows: repeat(8, 40px);
  }
  
  .connect4-board {
    grid-template-columns: repeat(7, 40px);
    grid-template-rows: repeat(6, 40px);
  }
  
  .tic-tac-toe-board {
    grid-template-columns: repeat(3, 90px);
    grid-template-rows: repeat(3, 90px);
  }
  
  .board-cell {
    font-size: 2.5rem;
  }
  
  .checker-piece {
    width: 30px;
    height: 30px;
  }
  
  .chess-piece {
    width: 30px;
    height: 30px;
    font-size: 1.2rem;
  }
  
  .column-indicator {
    width: 40px;
    height: 15px;
  }
  
  .difficulty-btn {
    padding: 5px 10px;
    font-size: 0.75rem;
  }
  
  .game-controls .btn {
    padding: 8px 12px;
    font-size: 0.9rem;
  }
  
  .stat-card {
    padding: 12px;
    margin: 3px;
  }
  
  .stat-card h3 {
    font-size: 1rem;
  }
}

@media (max-width: 360px) {
  .game-container {
    padding: 8px;
  }
  
  .checkers-board, .chess-board {
    grid-template-columns: repeat(8, 35px);
    grid-template-rows: repeat(8, 35px);
  }
  
  .connect4-board {
    grid-template-columns: repeat(7, 35px);
    grid-template-rows: repeat(6, 35px);
  }
  
  .tic-tac-toe-board {
    grid-template-columns: repeat(3, 80px);
    grid-template-rows: repeat(3, 80px);
  }
  
  .board-cell {
    font-size: 2rem;
  }
  
  .checker-piece {
    width: 25px;
    height: 25px;
  }
  
  .chess-piece {
    width: 25px;
    height: 25px;
    font-size: 1rem;
  }
  
  .column-indicator {
    width: 35px;
    height: 12px;
  }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
  .board-square, .board-cell {
    min-height: 44px;
    min-width: 44px;
  }
  
  .difficulty-btn, .btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  .checker-piece, .chess-piece {
    min-height: 32px;
    min-width: 32px;
  }
}

/* Landscape mobile optimization */
@media (max-height: 500px) and (orientation: landscape) {
  .game-container {
    padding: 8px;
  }
  
  .game-header {
    margin-bottom: 10px;
  }
  
  .game-title {
    font-size: 1.5rem;
  }
  
  .game-info {
    margin-bottom: 10px;
    padding: 8px;
  }
  
  .board-container {
    margin-bottom: 10px;
  }
  
  .game-stats {
    margin-top: 10px;
  }
}

.game-card { 
  border-radius: var(--radius-2xl); 
  overflow: hidden; 
  background: rgba(17, 17, 17, 0.6); 
  backdrop-filter: blur(20px); 
  border: 1px solid var(--border-light); 
  box-shadow: 0 8px 32px var(--shadow); 
  cursor: pointer; 
  transform-style: preserve-3d; 
  transition: all var(--transition-normal); 
  display: flex; 
  flex-direction: column; 
  position: relative; 
}

.game-card::before { 
  content: ''; 
  position: absolute; 
  inset: 0; 
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 107, 53, 0.15) 0%, transparent 50%); 
  opacity: 0; 
  transition: opacity var(--transition-normal); 
  pointer-events: none; 
}

.game-card:hover { 
  transform: translateY(-12px) scale(1.02); 
  box-shadow: 0 24px 80px rgba(255, 107, 53, 0.3); 
  border-color: var(--primary); 
}

.game-card:hover::before { 
  opacity: 1; 
}

.card-media { 
  width: 100%; 
  height: 220px; 
  overflow: hidden; 
  position: relative; 
}

.card-media img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  display: block; 
  transition: transform var(--transition-slow); 
}

.game-card:hover .card-media img { 
  transform: scale(1.08); 
}

.card-body { 
  padding: var(--space-lg) var(--space-xl); 
  flex: 1; 
  display: flex; 
  flex-direction: column; 
}

.card-body h3 { 
  color: var(--primary); 
  margin-bottom: var(--space-sm); 
  font-size: var(--font-size-lg); 
  font-weight: 600; 
}

.card-body p { 
  color: var(--text-secondary); 
  opacity: 0.9; 
  font-size: var(--font-size-sm); 
  margin-bottom: var(--space-md); 
  flex: 1; 
  line-height: 1.5; 
}

.card-actions { 
  display: flex; 
  gap: var(--space-sm); 
  margin-top: auto; 
}

/* ---------- PAGES ---------- */
.games-hero { padding:60px 0 40px; text-align:center; }
.games-gallery { padding:40px 0 80px; }
.about-page { padding:60px 0 80px; }
.about-inner { display:flex; align-items:center; gap:20px; flex-wrap:wrap; }
.legal-page { padding:60px 0 80px; }
.legal-page h2 { color:#ffb36a; margin-top:32px; margin-bottom:12px; font-size:1.4rem; }
.legal-page p { margin-bottom:14px; line-height:1.7; color:#d6d6d6; }
.legal-page ul { margin-left:24px; margin-bottom:18px; }
.legal-page li { margin-bottom:8px; line-height:1.7; color:#d6d6d6; }
.good-to-know { padding:60px 0; }
.good-to-know ul { margin-left:24px; margin-top:16px; }
.good-to-know li { margin-bottom:12px; line-height:1.7; color:#d6d6d6; }
.faq { padding:60px 0; }
.faq ul { list-style:none; margin-top:16px; }
.faq li { margin-bottom:20px; padding:16px; background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.12)); border-radius:10px; border:1px solid rgba(255,255,255,0.02); line-height:1.7; }

/* ---------- NEWSLETTER SECTION ---------- */
.newsletter-section {
  padding: var(--space-3xl) 0;
  background: radial-gradient(ellipse at center, rgba(255, 107, 53, 0.1) 0%, transparent 70%);
}

/* ---------- DAILY CHALLENGE WIDGET ---------- */
.daily-challenge-widget {
  padding: var(--space-3xl) 0;
  background: radial-gradient(ellipse at center, rgba(0, 212, 170, 0.1) 0%, transparent 70%);
}

.challenge-widget-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2xl);
  align-items: center;
  padding: var(--space-2xl);
  background: rgba(17, 17, 17, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-2xl);
  box-shadow: 0 8px 32px var(--shadow);
}

.challenge-widget-content h3 {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.challenge-widget-content p {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  font-size: var(--font-size-base);
}

.challenge-widget-info {
  display: flex;
  gap: var(--space-xl);
  margin-bottom: var(--space-lg);
}

.challenge-widget-timer,
.challenge-widget-streak {
  text-align: center;
}

.challenge-widget-timer span,
.challenge-widget-streak span {
  display: block;
  font-size: var(--font-size-xl);
  font-weight: bold;
  color: var(--secondary);
  margin-bottom: var(--space-xs);
}

.challenge-widget-timer small,
.challenge-widget-streak small {
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.challenge-widget-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.challenge-widget-icon {
  font-size: 4rem;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

@media (max-width: 768px) {
  .challenge-widget-card {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-lg);
  }
  
  .challenge-widget-info {
    justify-content: center;
  }
}

.newsletter-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2xl);
  align-items: center;
  padding: var(--space-2xl);
  background: rgba(17, 17, 17, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-2xl);
  box-shadow: 0 8px 32px var(--shadow);
}

.newsletter-content h3 {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.newsletter-content p {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  font-size: var(--font-size-base);
}

.form-group {
  display: flex;
  gap: var(--space-sm);
  max-width: 400px;
}

.form-group input {
  flex: 1;
  padding: var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: var(--font-size-base);
  transition: all var(--transition-normal);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.newsletter-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.newsletter-visual svg {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

/* ---------- SIMPLE ANIMATIONS ---------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

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

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% { transform: translate3d(0,0,0); }
  40%, 43% { transform: translate3d(0,-8px,0); }
  70% { transform: translate3d(0,-4px,0); }
  90% { transform: translate3d(0,-2px,0); }
}

/* End of simple animations */

/* ---------- ANIMATION UTILITY CLASSES ---------- */
.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

.animate-slide-up {
  animation: slideUp 0.6s ease-out forwards;
}

.animate-slide-down {
  animation: slideDown 0.6s ease-out forwards;
}

.animate-scale-in {
  animation: scaleIn 0.4s ease-out forwards;
}

.animate-bounce {
  animation: bounce 1s ease-in-out;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* ---------- ENHANCED UI POLISH ---------- */

/* Enhanced accessibility features */
.btn:focus-visible,
.nav-link:focus-visible,
.theme-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.2);
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 10000;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 6px;
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border: rgba(255, 255, 255, 0.3);
    --text-secondary: #ffffff;
  }
  
  .btn {
    border: 2px solid currentColor;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .loading-spinner {
    animation: none;
  }
  
  .game-preview:hover,
  .feature-card:hover {
    transform: none;
  }
}

/* Keyboard navigation styles */
.keyboard-navigation *:focus {
  outline: 2px solid var(--primary) !important;
  outline-offset: 2px !important;
}

.keyboard-navigation .game-preview:focus {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 16px 60px rgba(255, 107, 53, 0.3);
}

/* Focus indicators for interactive elements */
.game-preview:focus,
.feature-card:focus {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

/* Enhanced hover states */
.nav-link:hover {
  color: var(--primary);
  transform: translateY(-1px);
}

/* Better loading states */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Improved card shadows */
.game-preview,
.feature-card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: box-shadow var(--transition-normal);
}

.game-preview:hover,
.feature-card:hover {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
}

/* Better text contrast */
.text-muted {
  color: var(--text-muted);
}

.text-secondary {
  color: var(--text-secondary);
}

/* Enhanced spacing utilities */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }

/* Text alignment utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Display utilities */
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* Flex utilities */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

/* ---------- SIMPLE UTILITY CLASSES ---------- */

.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

.slide-up {
  animation: slideUp 0.6s ease-out;
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

.spin {
  animation: spin 1s linear infinite;
}

/* ---------- SIMPLE COMPONENT CLASSES ---------- */

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

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

.button {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-lg);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* End of simple component classes */

/* ---------- RESPONSIVE DESIGN ---------- */

@media (max-width: 1024px) {
  .container {
    padding: 0 var(--space-lg);
  }
  
  .hero {
    padding: var(--space-3xl) 0;
  }
  
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero {
    padding: var(--space-2xl) 0;
  }
  
  .features {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .card {
    padding: var(--space-md);
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 var(--space-md);
  }
  
  .hero h1 {
    font-size: var(--font-size-2xl);
  }
  
  .button {
    width: 100%;
    padding: var(--space-md);
  }
}

/* ---------- SEO CONTENT STYLES ---------- */
.seo-content {
  padding: 60px 0;
  background: linear-gradient(180deg, rgba(17, 17, 17, 0.3), rgba(10, 10, 10, 0.8));
}

.seo-content h2 {
  text-align: center;
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 40px;
}

.seo-content h3 {
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.seo-content h4 {
  color: var(--secondary);
  font-size: 1.2rem;
  margin: 25px 0 15px 0;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.content-card {
  background: rgba(17, 17, 17, 0.6);
  padding: 25px;
  border-radius: 15px;
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
}

.content-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 10px 30px rgba(255, 107, 53, 0.1);
}

.content-card p {
  margin-bottom: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.content-card ul {
  list-style: none;
  padding: 0;
}

.content-card li {
  padding: 5px 0;
  color: var(--text-secondary);
  position: relative;
  padding-left: 20px;
}

.content-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--secondary);
  font-weight: bold;
}

.seo-section {
  background: rgba(17, 17, 17, 0.4);
  padding: 40px;
  border-radius: 15px;
  border: 1px solid var(--border-light);
  margin-top: 30px;
}

.seo-section p {
  margin-bottom: 20px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.seo-section ul {
  margin: 20px 0;
  padding-left: 20px;
}

.seo-section li {
  margin-bottom: 10px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ---------- GO GAME SPECIFIC ---------- */
.go-board {
  display: grid;
  grid-template-columns: repeat(19, 20px);
  grid-template-rows: repeat(19, 20px);
  gap: 1px;
  background: #8B4513;
  padding: 10px;
  border-radius: 10px;
  margin: 0 auto;
  max-width: 400px;
}

.go-intersection {
  width: 20px;
  height: 20px;
  background: #DEB887;
  border: 1px solid #8B4513;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.go-intersection:hover {
  background: #F4A460;
  transform: scale(1.1);
}

.go-intersection.star-point::before {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: #000;
  border-radius: 50%;
}

.go-stone {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  z-index: 1;
}

.go-stone.black {
  background: #000;
  border: 1px solid #333;
}

.go-stone.white {
  background: #fff;
  border: 1px solid #ccc;
}

.go-stone:hover {
  transform: scale(1.1);
}

.go-stone.last-move::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  background: #ff0000;
  border-radius: 50%;
  z-index: 2;
}

/* ---------- REVERSI GAME SPECIFIC ---------- */
.reversi-board {
  display: grid;
  grid-template-columns: repeat(8, 60px);
  grid-template-rows: repeat(8, 60px);
  gap: 2px;
  background: #228B22;
  padding: 10px;
  border-radius: 10px;
  margin: 0 auto;
  max-width: 500px;
}

.reversi-square {
  width: 60px;
  height: 60px;
  background: #32CD32;
  border: 1px solid #228B22;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reversi-square:hover {
  background: #90EE90;
  transform: scale(1.05);
}

.reversi-square.possible-move {
  background: #FFD700;
  animation: pulse 1s infinite;
}

.reversi-piece {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.reversi-piece.black {
  background: #000;
  border: 2px solid #333;
}

.reversi-piece.white {
  background: #fff;
  border: 2px solid #ccc;
}

.reversi-piece:hover {
  transform: scale(1.1);
}

.reversi-piece.flipping {
  animation: flip 0.3s ease-in-out;
}

@keyframes flip {
  0% { transform: scaleX(1); }
  50% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

/* ---------- BACKGAMMON GAME SPECIFIC ---------- */
.backgammon-board {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 2px;
  background: #8B4513;
  padding: 15px;
  border-radius: 15px;
  margin: 0 auto;
  max-width: 600px;
  height: 300px;
}

.backgammon-point {
  background: #DEB887;
  border: 1px solid #8B4513;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 5px;
}

.backgammon-point:hover {
  background: #F4A460;
}

.backgammon-point.selected {
  background: #FFD700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.backgammon-point.possible-move {
  background: #90EE90;
  animation: pulse 1s infinite;
}

.backgammon-checker {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  z-index: 1;
}

.backgammon-checker.white {
  background: #fff;
  border: 1px solid #ccc;
}

.backgammon-checker.black {
  background: #000;
  border: 1px solid #333;
}

.backgammon-checker:hover {
  transform: scale(1.1);
}

.backgammon-checker.selected {
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.backgammon-dice {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 20px 0;
}

.die {
  width: 50px;
  height: 50px;
  background: #fff;
  border: 2px solid #333;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  color: #000;
  cursor: pointer;
  transition: all 0.2s ease;
}

.die:hover {
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.die.used {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive styles for new games */
@media (max-width: 768px) {
  .go-board {
    grid-template-columns: repeat(19, 15px);
    grid-template-rows: repeat(19, 15px);
    max-width: 300px;
  }
  
  .go-intersection {
    width: 15px;
    height: 15px;
  }
  
  .go-stone {
    width: 13px;
    height: 13px;
  }
  
  .reversi-board {
    grid-template-columns: repeat(8, 45px);
    grid-template-rows: repeat(8, 45px);
    max-width: 380px;
  }
  
  .reversi-square {
    width: 45px;
    height: 45px;
  }
  
  .reversi-piece {
    width: 35px;
    height: 35px;
  }
  
  .backgammon-board {
    max-width: 450px;
    height: 250px;
  }
  
  .backgammon-checker {
    width: 15px;
    height: 15px;
  }
  
  .die {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .go-board {
    grid-template-columns: repeat(19, 12px);
    grid-template-rows: repeat(19, 12px);
    max-width: 250px;
  }
  
  .go-intersection {
    width: 12px;
    height: 12px;
  }
  
  .go-stone {
    width: 10px;
    height: 10px;
  }
  
  .reversi-board {
    grid-template-columns: repeat(8, 35px);
    grid-template-rows: repeat(8, 35px);
    max-width: 300px;
  }
  
  .reversi-square {
    width: 35px;
    height: 35px;
  }
  
  .reversi-piece {
    width: 25px;
    height: 25px;
  }
  
  .backgammon-board {
    max-width: 350px;
    height: 200px;
  }
  
  .backgammon-checker {
    width: 12px;
    height: 12px;
  }
  
  .die {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }
}

/* ---------- ACHIEVEMENT SYSTEM ---------- */
.achievement-popup {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.9), rgba(0, 212, 170, 0.9));
  color: white;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  max-width: 300px;
  animation: slideInRight 0.5s ease-out;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.achievement-item {
  display: flex;
  align-items: center;
  padding: 15px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
}

.achievement-item.unlocked {
  background: rgba(0, 212, 170, 0.1);
  border-color: var(--secondary);
}

.achievement-item.locked {
  opacity: 0.6;
}

.achievement-item.common {
  border-left: 4px solid #9ca3af;
}

.achievement-item.uncommon {
  border-left: 4px solid #10b981;
}

.achievement-item.rare {
  border-left: 4px solid #3b82f6;
}

.achievement-item.epic {
  border-left: 4px solid #8b5cf6;
}

.achievement-item.legendary {
  border-left: 4px solid #f59e0b;
}

.achievement-icon {
  font-size: 2rem;
  margin-right: 15px;
}

.achievement-info {
  flex: 1;
}

.achievement-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.achievement-description {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  margin-bottom: 5px;
}

.achievement-points {
  color: var(--primary);
  font-size: var(--font-size-xs);
  font-weight: 600;
}

.achievement-status {
  font-size: 1.5rem;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* ---------- EMAIL SUBSCRIPTION SECTION ---------- */
.email-subscription-section {
  padding: var(--space-3xl) 0;
  background: radial-gradient(ellipse at center, rgba(255, 107, 53, 0.1) 0%, transparent 70%);
}

/* ---------- EMAIL SUBSCRIPTION SYSTEM ---------- */
.email-subscription-widget {
  background: rgba(17, 17, 17, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: 15px;
  padding: 25px;
  text-align: center;
}

/* ---------- MINI GAMES CAROUSEL ---------- */
.mini-games-carousel {
  padding: var(--space-3xl) 0;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
}

.carousel-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.carousel-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.carousel-title {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.carousel-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.carousel-main {
  position: relative;
  margin-bottom: var(--space-xl);
}

.carousel-game-display {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-card-main {
  width: 100%;
  max-width: 600px;
  height: 100%;
  background: rgba(17, 17, 17, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-2xl);
  padding: var(--space-2xl);
  text-align: center;
  position: relative;
  transition: all 0.3s ease;
}

.game-card-main:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.game-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.game-badge.new {
  background: linear-gradient(135deg, #ff6b35, #f59e0b);
  color: white;
}

.game-badge.featured {
  background: linear-gradient(135deg, #00d4aa, #059669);
  color: white;
}

.game-icon-large {
  font-size: 4rem;
  margin-bottom: var(--space-lg);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.game-title-large {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.game-description-large {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  line-height: 1.6;
}

.game-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.stat-item {
  text-align: center;
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.stat-label {
  display: block;
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.stat-value {
  display: block;
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
}

.game-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

.carousel-controls {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(17, 17, 17, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.carousel-controls:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-50%) scale(1.1);
}

.carousel-controls.prev {
  left: -25px;
}

.carousel-controls.next {
  right: -25px;
}

.carousel-controls svg {
  width: 20px;
  height: 20px;
  color: var(--text-primary);
}

.carousel-game-list {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  padding: var(--space-md) 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.carousel-game-list::-webkit-scrollbar {
  display: none;
}

.game-item {
  flex-shrink: 0;
  width: 200px;
  padding: var(--space-md);
  background: rgba(17, 17, 17, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.game-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.game-item.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
}

.game-item-icon {
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
  text-align: center;
}

.game-item-info {
  text-align: center;
}

.game-item-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.game-item-rating {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.game-item-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: var(--text-xs);
  font-weight: 600;
}

.game-item-badge.new {
  background: var(--accent);
  color: white;
}

.game-item-badge.featured {
  background: var(--primary);
  color: white;
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator.active {
  background: var(--primary);
  transform: scale(1.2);
}

.carousel-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.carousel-autoplay-btn {
  background: rgba(17, 17, 17, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: var(--text-lg);
}

.carousel-autoplay-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.carousel-info {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .carousel-game-display {
    height: 350px;
  }
  
  .game-card-main {
    padding: var(--space-lg);
  }
  
  .game-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }
  
  .game-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .carousel-controls {
    display: none;
  }
  
  .game-item {
    width: 150px;
  }
  
  .carousel-game-list {
    padding: var(--space-sm) 0;
  }
}

@media (max-width: 480px) {
  .carousel-game-display {
    height: 300px;
  }
  
  .game-icon-large {
    font-size: 3rem;
  }
  
  .game-title-large {
    font-size: var(--text-xl);
  }
  
  .game-description-large {
    font-size: var(--text-md);
  }
  
  .game-stats {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
  
  .game-item {
    width: 120px;
    padding: var(--space-sm);
  }
}

/* ---------- SHARE RESULTS SYSTEM ---------- */
.share-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.share-modal-content {
  background: var(--surface);
  border-radius: 20px;
  padding: 30px;
  max-width: 600px;
  width: 100%;
  position: relative;
  border: 1px solid var(--border);
}

.share-modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.share-modal-header h2 {
  color: var(--text-primary);
  margin-bottom: 10px;
}

.share-modal-header p {
  color: var(--text-secondary);
}

.share-preview {
  text-align: center;
  margin-bottom: 25px;
}

.share-preview img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.template-selector {
  margin-bottom: 25px;
}

.template-selector h3 {
  color: var(--text-primary);
  margin-bottom: 15px;
  text-align: center;
}

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

.template-btn {
  padding: 10px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.template-btn:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.template-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.share-actions {
  text-align: center;
}

.share-actions .btn {
  margin: 0 5px;
}

/* Share button in games */
.share-btn {
  background: linear-gradient(135deg, #ff6b35, #f59e0b);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 12px 20px;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
}

.share-btn:active {
  transform: translateY(0);
}

.share-btn svg {
  width: 16px;
  height: 16px;
}

/* Game result sharing section */
.game-result-sharing {
  margin-top: var(--space-xl);
  padding: var(--space-lg);
  background: rgba(255, 107, 53, 0.1);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 107, 53, 0.2);
  text-align: center;
}

.game-result-sharing h3 {
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  font-size: var(--text-lg);
}

.game-result-sharing p {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  font-size: var(--text-sm);
}

.share-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.share-buttons .btn {
  min-width: 120px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .share-modal-content {
    padding: 20px;
    margin: 10px;
  }
  
  .template-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .share-actions .btn {
    margin: 5px;
    min-width: 100px;
  }
  
  .share-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .share-buttons .btn {
    width: 100%;
    max-width: 200px;
  }
}

@media (max-width: 480px) {
  .template-grid {
    grid-template-columns: 1fr;
  }
  
  .share-modal-content {
    padding: 15px;
  }
}

/* ---------- MOBILE OPTIMIZATIONS ---------- */
/* Prevent zoom on input focus */
input, textarea, select {
  font-size: 16px;
}

/* Improve touch targets */
button, .btn, .nav-link, .game-button {
  min-height: 44px;
  min-width: 44px;
}

/* Prevent text selection on game elements */
.game-board, .chess-board, .checkers-board, .connect4-board, .tictactoe-board, .go-board, .reversi-board, .backgammon-board {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* Smooth scrolling for mobile */
html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Optimize animations for mobile */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Mobile device specific styles */
.mobile-device {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

.mobile-device .hero {
  min-height: 100vh;
  min-height: 100dvh; /* Dynamic viewport height for mobile browsers */
}

.mobile-device .topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  backdrop-filter: blur(10px);
  background: rgba(17, 17, 17, 0.9);
}

/* Low power device optimizations */
.low-power-device * {
  will-change: auto !important;
}

.low-power-device .particle-canvas {
  display: none;
}

.low-power-device .hero-logo {
  filter: none;
}

.low-power-device .hero-logo:hover {
  transform: none;
  filter: none;
}

/* Mobile-specific accessibility improvements */
@media (max-width: 768px) {
  .skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
  }
  
  .skip-link:focus {
    top: 6px;
  }
  
  /* Improve focus indicators for touch devices */
  button:focus, .btn:focus, .nav-link:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
  }
  
  /* Ensure sufficient contrast for mobile */
  .text-muted {
    color: var(--text-secondary) !important;
  }
}

/* ---------- MOBILE GAME INTERFACES ---------- */
.game-container {
  max-width: 100%;
  margin: 0 auto;
  padding: var(--space-md);
}

.game-board {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.game-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin: var(--space-lg) 0;
}

.game-button {
  min-height: 44px;
  min-width: 44px;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-size-base);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-normal);
  touch-action: manipulation;
}

.game-button:hover {
  background: var(--surface-elevated);
  border-color: var(--primary);
}

.game-button:active {
  transform: scale(0.95);
}

.game-info {
  text-align: center;
  margin: var(--space-lg) 0;
  padding: var(--space-md);
  background: rgba(17, 17, 17, 0.6);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.game-status {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.game-stats {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.stat-item {
  text-align: center;
  min-width: 80px;
}

.stat-value {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-top: var(--space-xs);
}

/* Touch-friendly piece selection */
.game-piece {
  cursor: pointer;
  transition: all var(--transition-normal);
  touch-action: manipulation;
}

.game-piece:hover {
  transform: scale(1.1);
}

.game-piece.selected {
  transform: scale(1.2);
  filter: drop-shadow(0 0 8px var(--primary));
}

.game-piece.dragging {
  transform: scale(1.3);
  z-index: 1000;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

/* Mobile-specific game layouts */
@media (max-width: 768px) {
  .game-container {
    padding: var(--space-sm);
  }
  
  .game-board {
    max-width: 100vw;
    max-height: 60vh;
    margin: 0 auto;
  }
  
  .game-controls {
    flex-direction: column;
    align-items: center;
  }
  
  .game-button {
    width: 100%;
    max-width: 200px;
    font-size: var(--font-size-lg);
    padding: var(--space-md);
  }
  
  .game-info {
    margin: var(--space-md) 0;
    padding: var(--space-sm);
  }
  
  .game-status {
    font-size: var(--font-size-base);
  }
  
  .game-stats {
    gap: var(--space-sm);
  }
  
  .stat-item {
    min-width: 60px;
  }
  
  .stat-value {
    font-size: var(--font-size-lg);
  }
  
  .stat-label {
    font-size: var(--font-size-xs);
  }
}

@media (max-width: 480px) {
  .game-container {
    padding: var(--space-xs);
  }
  
  .game-board {
    max-height: 50vh;
  }
  
  .game-button {
    font-size: var(--font-size-base);
    padding: var(--space-sm);
  }
  
  .game-info {
    padding: var(--space-xs);
  }
  
  .game-stats {
    flex-direction: column;
    gap: var(--space-xs);
  }
  
  .stat-item {
    min-width: auto;
  }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
  .game-board {
    max-height: 70vh;
  }
  
  .game-controls {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .game-button {
    width: auto;
    min-width: 120px;
  }
}

/* Chess-specific mobile styles */
@media (max-width: 768px) {
  .chess-board {
    max-width: 90vw;
    max-height: 90vw;
    margin: 0 auto;
  }
  
  .chess-square {
    min-height: 40px;
    min-width: 40px;
  }
  
  .chess-piece {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .chess-board {
    max-width: 95vw;
    max-height: 95vw;
  }
  
  .chess-square {
    min-height: 35px;
    min-width: 35px;
  }
  
  .chess-piece {
    font-size: 1.5rem;
  }
}

/* Checkers-specific mobile styles */
@media (max-width: 768px) {
  .checkers-board {
    max-width: 90vw;
    max-height: 90vw;
    margin: 0 auto;
  }
  
  .checkers-square {
    min-height: 40px;
    min-width: 40px;
  }
  
  .checkers-piece {
    width: 80%;
    height: 80%;
  }
}

@media (max-width: 480px) {
  .checkers-board {
    max-width: 95vw;
    max-height: 95vw;
  }
  
  .checkers-square {
    min-height: 35px;
    min-width: 35px;
  }
  
  .checkers-piece {
    width: 75%;
    height: 75%;
  }
}

/* Connect Four specific mobile styles */
@media (max-width: 768px) {
  .connect4-board {
    max-width: 90vw;
    max-height: 80vh;
    margin: 0 auto;
  }
  
  .connect4-column {
    min-width: 40px;
  }
  
  .connect4-slot {
    min-height: 40px;
    min-width: 40px;
  }
}

@media (max-width: 480px) {
  .connect4-board {
    max-width: 95vw;
    max-height: 70vh;
  }
  
  .connect4-column {
    min-width: 35px;
  }
  
  .connect4-slot {
    min-height: 35px;
    min-width: 35px;
  }
}

/* Tic Tac Toe specific mobile styles */
@media (max-width: 768px) {
  .tictactoe-board {
    max-width: 80vw;
    max-height: 80vw;
    margin: 0 auto;
  }
  
  .tictactoe-cell {
    min-height: 60px;
    min-width: 60px;
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .tictactoe-board {
    max-width: 85vw;
    max-height: 85vw;
  }
  
  .tictactoe-cell {
    min-height: 50px;
    min-width: 50px;
    font-size: 1.5rem;
  }
}

/* Go specific mobile styles */
@media (max-width: 768px) {
  .go-board {
    max-width: 90vw;
    max-height: 90vw;
    margin: 0 auto;
  }
  
  .go-intersection {
    min-height: 25px;
    min-width: 25px;
  }
  
  .go-stone {
    width: 80%;
    height: 80%;
  }
}

@media (max-width: 480px) {
  .go-board {
    max-width: 95vw;
    max-height: 95vw;
  }
  
  .go-intersection {
    min-height: 20px;
    min-width: 20px;
  }
  
  .go-stone {
    width: 75%;
    height: 75%;
  }
}

/* Reversi specific mobile styles */
@media (max-width: 768px) {
  .reversi-board {
    max-width: 90vw;
    max-height: 90vw;
    margin: 0 auto;
  }
  
  .reversi-square {
    min-height: 40px;
    min-width: 40px;
  }
  
  .reversi-piece {
    width: 80%;
    height: 80%;
  }
}

@media (max-width: 480px) {
  .reversi-board {
    max-width: 95vw;
    max-height: 95vw;
  }
  
  .reversi-square {
    min-height: 35px;
    min-width: 35px;
  }
  
  .reversi-piece {
    width: 75%;
    height: 75%;
  }
}

/* Backgammon specific mobile styles */
@media (max-width: 768px) {
  .backgammon-board {
    max-width: 95vw;
    max-height: 60vh;
    margin: 0 auto;
  }
  
  .backgammon-point {
    min-height: 30px;
  }
  
  .backgammon-checker {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 480px) {
  .backgammon-board {
    max-width: 98vw;
    max-height: 50vh;
  }
  
  .backgammon-point {
    min-height: 25px;
  }
  
  .backgammon-checker {
    width: 18px;
    height: 18px;
  }
}

/* ---------- AI PROFILES SYSTEM ---------- */


.match-card {
  background: rgba(17, 17, 17, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.match-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border-color: var(--primary);
}

.match-card.playing {
  border-left: 4px solid var(--primary);
}

.match-card.finished {
  opacity: 0.7;
}

.match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.match-game-type {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.game-icon {
  font-size: var(--text-xl);
}

.game-name {
  font-weight: 600;
  color: var(--text-primary);
}

.match-status {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.starting {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}

.status-badge.playing {
  background: rgba(40, 167, 69, 0.2);
  color: #28a745;
}

.status-badge.finished {
  background: rgba(108, 117, 125, 0.2);
  color: #6c757d;
}

.viewer-count {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.match-players {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.player {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex: 1;
}

.player-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  color: white;
  font-weight: 600;
}

.player-info {
  flex: 1;
}

.player-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.player-rating {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.vs {
  font-weight: 700;
  color: var(--text-secondary);
  font-size: var(--text-lg);
  margin: 0 var(--space-md);
}

.match-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  padding: var(--space-sm) 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.move-count {
  font-size: var(--text-sm);
  color: var(--text-primary);
  font-weight: 600;
}

.match-timer {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-family: monospace;
}

.match-actions {
  text-align: center;
}

.watch-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.watch-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.no-matches {
  text-align: center;
  padding: var(--space-3xl);
  color: var(--text-muted);
}

.no-matches-icon {
  font-size: 4rem;
  margin-bottom: var(--space-lg);
}

.no-matches h3 {
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

/* Match Viewer Modal */
.match-viewer-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.match-viewer-content {
  background: var(--surface);
  border-radius: 20px;
  padding: 30px;
  max-width: 1000px;
  width: 100%;
  height: 80vh;
  position: relative;
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
}

.match-board-container {
  overflow-y: auto;
}

.match-board {
  background: var(--surface-secondary);
  border-radius: 15px;
  padding: 20px;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.match-moves {
  margin-top: 20px;
}

.match-moves h3 {
  color: var(--text-primary);
  margin-bottom: 10px;
}

.moves-list {
  max-height: 150px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 15px;
}

.match-chat-container {
  display: flex;
  flex-direction: column;
}

.chat-header {
  margin-bottom: 15px;
}

.chat-header h3 {
  color: var(--text-primary);
}

.viewer-count {
  color: var(--text-muted);
  font-size: 14px;
}

.chat-messages {
  height: 300px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
}

.chat-input-container {
  margin-top: auto;
}

.chat-input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-secondary);
  color: var(--text-primary);
  font-size: 14px;
}

.chat-input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Game Board Styles */
.chess-board,
.checkers-board,
.connect4-board,
.tic-tac-toe-board {
  display: grid;
  gap: 2px;
}

.chess-board {
  grid-template-columns: repeat(8, 1fr);
  width: 320px;
  height: 320px;
}

.checkers-board {
  grid-template-columns: repeat(8, 1fr);
  width: 320px;
  height: 320px;
}

.connect4-board {
  grid-template-columns: repeat(7, 1fr);
  width: 280px;
  height: 240px;
}

.tic-tac-toe-board {
  grid-template-columns: repeat(3, 1fr);
  width: 180px;
  height: 180px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  
  .match-viewer-content {
    grid-template-columns: 1fr;
    height: 90vh;
    padding: 20px;
  }
  
  .match-chat-container {
    order: -1;
    height: 200px;
  }
  
  .chat-messages {
    height: 120px;
  }
  
  .match-board {
    min-height: 300px;
  }
  
  .chess-board,
  .checkers-board {
    width: 280px;
    height: 280px;
  }
  
  .connect4-board {
    width: 240px;
    height: 200px;
  }
  
  .tic-tac-toe-board {
    width: 160px;
    height: 160px;
  }
}

@media (max-width: 480px) {
  .match-players {
    flex-direction: column;
    gap: var(--space-md);
  }
  
  .vs {
    margin: var(--space-sm) 0;
  }
  
  .match-viewer-content {
    padding: 15px;
  }
  
  .chess-board,
  .checkers-board {
    width: 240px;
    height: 240px;
  }
  
  .connect4-board {
    width: 200px;
    height: 170px;
  }
  
  .tic-tac-toe-board {
    width: 140px;
    height: 140px;
  }
}

/* AI Players Section */
.ai-players-section {
  padding: var(--space-3xl) 0;
  background: radial-gradient(ellipse at center, rgba(0, 212, 170, 0.1) 0%, transparent 70%);
}

.ai-players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.ai-player-card {
  background: rgba(17, 17, 17, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  transition: all 0.3s ease;
  text-align: center;
}

.ai-player-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.ai-player-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  margin: 0 auto var(--space-md);
  font-weight: 600;
}

.ai-player-name {
  color: var(--text-primary);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.ai-player-description {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-bottom: var(--space-lg);
  line-height: 1.5;
}

.ai-player-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.ai-player-stats .stat {
  text-align: center;
}

.ai-player-stats .stat-value {
  display: block;
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.ai-player-stats .stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ai-player-personality {
  margin-top: var(--space-md);
}

.personality-tag {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Match History Section */
.match-history-section {
  padding: var(--space-3xl) 0;
  background: radial-gradient(ellipse at center, rgba(255, 107, 53, 0.1) 0%, transparent 70%);
}

.match-history-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.match-history-card {
  background: rgba(17, 17, 17, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  transition: all 0.3s ease;
}

.match-history-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.match-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.match-game-info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.match-game-info .game-icon {
  font-size: var(--text-xl);
}

.match-game-info .game-name {
  font-weight: 600;
  color: var(--text-primary);
}

.match-result {
  font-weight: 600;
  color: var(--accent);
  font-size: var(--text-sm);
}

.match-players-history {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.player-history {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex: 1;
}

.player-avatar-small {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  color: white;
  font-weight: 600;
}

.player-history .player-name {
  font-size: var(--text-sm);
  color: var(--text-primary);
  font-weight: 600;
}

.match-players-history .vs {
  font-weight: 700;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin: 0 var(--space-md);
}

.match-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  border-top: 1px solid var(--border-light);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.match-details span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Responsive adjustments for new sections */
@media (max-width: 768px) {
  .ai-players-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  .match-history-container {
    grid-template-columns: 1fr;
  }
  
  .ai-player-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .match-players-history {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .match-players-history .vs {
    margin: var(--space-sm) 0;
  }
}

@media (max-width: 480px) {
  .ai-players-grid {
    grid-template-columns: 1fr;
  }
  
  .ai-player-stats {
    grid-template-columns: 1fr;
  }
  
  .match-history-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }
  
  .match-details {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
  }
}

/* ---------- TOURNAMENT SYSTEM ---------- */
.tournaments-section {
  padding: var(--space-3xl) 0;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
}

.tournament-section {
  margin-bottom: var(--space-3xl);
}

.tournament-section h3 {
  color: var(--text-primary);
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-xl);
  text-align: center;
}

.tournament-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: var(--space-lg);
}

.tournament-card {
  background: rgba(17, 17, 17, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.tournament-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.tournament-card.upcoming {
  border-left: 4px solid var(--accent);
}

.tournament-card.active {
  border-left: 4px solid var(--primary);
}

.tournament-card.completed {
  opacity: 0.8;
}

.tournament-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.tournament-game {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.tournament-game .game-icon {
  font-size: var(--text-xl);
}

.tournament-game .game-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.tournament-status {
  display: flex;
  align-items: center;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.upcoming {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}

.status-badge.active {
  background: rgba(40, 167, 69, 0.2);
  color: #28a745;
}

.status-badge.completed {
  background: rgba(108, 117, 125, 0.2);
  color: #6c757d;
}

.tournament-info {
  margin-bottom: var(--space-lg);
}

.tournament-name {
  color: var(--text-primary);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.tournament-description {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-bottom: var(--space-lg);
  line-height: 1.5;
}

.tournament-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--border-light);
}

.detail-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  font-size: var(--text-sm);
  color: var(--text-primary);
  font-weight: 600;
}

.tournament-timing {
  margin-bottom: var(--space-lg);
}

.countdown {
  text-align: center;
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.countdown-label {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tournament-countdown {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--accent);
  font-family: monospace;
}

.tournament-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.tournament-actions .btn {
  flex: 1;
  min-width: 120px;
}

/* Brackets Section */
.brackets-section {
  padding: var(--space-3xl) 0;
  background: radial-gradient(ellipse at center, rgba(0, 212, 170, 0.1) 0%, transparent 70%);
}

.bracket-section {
  margin-bottom: var(--space-3xl);
}

.bracket-section h3 {
  color: var(--text-primary);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-lg);
  text-align: center;
}

.bracket-container {
  background: rgba(17, 17, 17, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  overflow-x: auto;
}

.single-elimination-bracket {
  display: flex;
  gap: var(--space-lg);
  min-width: 800px;
}

.bracket-round {
  flex: 1;
  min-width: 200px;
}

.round-title {
  color: var(--text-primary);
  font-size: var(--text-lg);
  font-weight: 600;
  text-align: center;
  margin-bottom: var(--space-lg);
  padding: var(--space-sm);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
}

.round-matches {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.bracket-match {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: all 0.3s ease;
}

.bracket-match:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
}

.bracket-match.completed {
  border-color: var(--accent);
}

.match-player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.match-player:last-child {
  margin-bottom: 0;
}

.player-name {
  color: var(--text-primary);
  font-weight: 600;
  font-size: var(--text-sm);
}

.player-avatar {
  font-size: var(--text-lg);
}

.match-vs {
  text-align: center;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: var(--text-sm);
  margin: var(--space-sm) 0;
}

.match-winner {
  text-align: center;
  color: var(--accent);
  font-weight: 600;
  font-size: var(--text-xs);
  margin-top: var(--space-sm);
  padding: var(--space-xs);
  background: rgba(255, 107, 53, 0.1);
  border-radius: var(--radius-sm);
}

/* Round Robin Bracket */
.round-robin-bracket {
  display: grid;
  gap: var(--space-lg);
}

.standings-table {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  overflow-x: auto;
}

.standings-table h4 {
  color: var(--text-primary);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-lg);
  text-align: center;
}

.standings-table table {
  width: 100%;
  border-collapse: collapse;
}

.standings-table th,
.standings-table td {
  padding: var(--space-sm);
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.standings-table th {
  color: var(--text-primary);
  font-weight: 600;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.standings-table td {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.standings-table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
}

/* Tournament History */
.tournament-history-section {
  padding: var(--space-3xl) 0;
  background: radial-gradient(ellipse at center, rgba(255, 107, 53, 0.1) 0%, transparent 70%);
}

.tournament-history-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-lg);
}

.tournament-history-card {
  background: rgba(17, 17, 17, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  transition: all 0.3s ease;
}

.tournament-history-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.history-game {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.history-game .game-icon {
  font-size: var(--text-xl);
}

.history-game .game-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.history-status {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
}

.history-status.completed {
  background: rgba(108, 117, 125, 0.2);
  color: #6c757d;
}

.history-info {
  margin-bottom: var(--space-lg);
}

.history-name {
  color: var(--text-primary);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.history-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

/* No Content States */
.no-brackets,
.no-history {
  text-align: center;
  padding: var(--space-3xl);
  color: var(--text-muted);
}

.no-brackets-icon,
.no-history-icon {
  font-size: 4rem;
  margin-bottom: var(--space-lg);
}

.no-brackets h3,
.no-history h3 {
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

/* Modal Styles */
.bracket-modal,
.tournament-details-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.bracket-modal-content,
.tournament-details-modal-content {
  background: var(--surface);
  border-radius: 20px;
  padding: 30px;
  max-width: 90vw;
  max-height: 90vh;
  width: 100%;
  position: relative;
  border: 1px solid var(--border);
  overflow-y: auto;
}

.tournament-details-modal-content {
  max-width: 600px;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text-primary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .tournament-grid {
    grid-template-columns: 1fr;
  }
  
  .tournament-details {
    grid-template-columns: 1fr;
  }
  
  .single-elimination-bracket {
    flex-direction: column;
    min-width: auto;
  }
  
  .bracket-round {
    min-width: auto;
  }
  
  .tournament-actions {
    flex-direction: column;
  }
  
  .tournament-actions .btn {
    width: 100%;
  }
  
  .bracket-modal-content {
    padding: 20px;
  }
  
  .tournament-details-modal-content {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .tournament-card {
    padding: var(--space-md);
  }
  
  .tournament-history-container {
    grid-template-columns: 1fr;
  }
  
  .history-details {
    grid-template-columns: 1fr;
  }
  
  .bracket-modal-content {
    padding: 15px;
  }
  
  .tournament-details-modal-content {
    padding: 15px;
  }
}

/* Tournament Info Section */
.tournament-info-section {
  padding: var(--space-3xl) 0;
  background: radial-gradient(ellipse at center, rgba(255, 107, 53, 0.1) 0%, transparent 70%);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.info-card {
  background: rgba(17, 17, 17, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  text-align: center;
  transition: all 0.3s ease;
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.info-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
}

.info-card h3 {
  color: var(--text-primary);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.info-card p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.6;
}

/* Responsive adjustments for info grid */
@media (max-width: 768px) {
  .info-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

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

/* ---------- AI PROFILES SYSTEM ---------- */
.ai-profiles-section {
  padding: var(--space-3xl) 0;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
}

.ai-profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.ai-profile-card {
  background: rgba(17, 17, 17, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.ai-profile-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.profile-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  font-weight: 600;
}

.profile-status {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-muted);
}

.status-indicator.active {
  background: var(--primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.difficulty-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
}

.difficulty-badge.easy {
  background: rgba(40, 167, 69, 0.2);
  color: #28a745;
}

.difficulty-badge.medium {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}

.difficulty-badge.hard {
  background: rgba(220, 53, 69, 0.2);
  color: #dc3545;
}

.difficulty-badge.expert {
  background: rgba(111, 66, 193, 0.2);
  color: #6f42c1;
}

.profile-info {
  margin-bottom: var(--space-lg);
}

.profile-name {
  color: var(--text-primary);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.profile-description {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-bottom: var(--space-lg);
  line-height: 1.5;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.profile-stats .stat-item {
  text-align: center;
  padding: var(--space-sm);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-lg);
}

.profile-stats .stat-value {
  display: block;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.profile-stats .stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-specialties {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.specialty-tag {
  background: rgba(0, 212, 170, 0.1);
  color: var(--primary);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: var(--text-xs);
  font-weight: 600;
  border: 1px solid rgba(0, 212, 170, 0.2);
}

.profile-personality {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.personality-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.personality-value {
  font-size: var(--text-sm);
  color: var(--text-primary);
  font-weight: 600;
}

.profile-actions {
  display: flex;
  gap: var(--space-sm);
}

.profile-actions .btn {
  flex: 1;
}

/* Profile Stats Section */
.profile-stats-section {
  padding: var(--space-3xl) 0;
  background: radial-gradient(ellipse at center, rgba(0, 212, 170, 0.1) 0%, transparent 70%);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.stat-card {
  background: rgba(17, 17, 17, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.stat-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
}

.stat-card .stat-value {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.stat-card .stat-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Profile Rankings Section */
.profile-rankings-section {
  padding: var(--space-3xl) 0;
  background: radial-gradient(ellipse at center, rgba(255, 107, 53, 0.1) 0%, transparent 70%);
}

.rankings-list {
  background: rgba(17, 17, 17, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  margin-top: var(--space-xl);
}

.ranking-item {
  display: grid;
  grid-template-columns: 60px 1fr 100px 80px 80px;
  gap: var(--space-md);
  align-items: center;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-light);
}

.ranking-item:last-child {
  border-bottom: none;
}

.ranking-position {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
}

.ranking-profile {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.profile-avatar-small {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  color: white;
  font-weight: 600;
}

.ranking-profile .profile-name {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.ranking-profile .profile-difficulty {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.ranking-rating,
.ranking-games,
.ranking-winrate {
  text-align: center;
  font-weight: 600;
  color: var(--text-primary);
}

.ranking-rating {
  color: var(--accent);
}

/* Profile Modal */
.profile-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.profile-modal-content {
  background: var(--surface);
  border-radius: 20px;
  padding: 30px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  position: relative;
  border: 1px solid var(--border);
  overflow-y: auto;
}

.profile-modal-header {
  text-align: center;
  margin-bottom: 30px;
}

.profile-avatar-large {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  margin: 0 auto 20px;
}

.profile-tags {
  margin-bottom: 15px;
}

.profile-sections {
  display: grid;
  gap: var(--space-xl);
}

.profile-section {
  margin-bottom: var(--space-lg);
}

.profile-section h3 {
  color: var(--text-primary);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-light);
}

.stats-grid-detailed {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.stat-item-detailed {
  background: rgba(255, 255, 255, 0.03);
  padding: 15px;
  border-radius: 10px;
  text-align: center;
}

.game-ratings {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.specialties-list,
.weaknesses-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.recent-activity {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 15px;
}

.profile-modal-actions {
  text-align: center;
  margin-top: 30px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .ai-profiles-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .ranking-item {
    grid-template-columns: 40px 1fr 80px 60px 60px;
    gap: var(--space-sm);
  }
  
  .profile-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .profile-actions {
    flex-direction: column;
  }
  
  .profile-modal-content {
    padding: 20px;
  }
  
  .stats-grid-detailed {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .game-ratings {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .ranking-item {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-xs);
  }
  
  .profile-stats {
    grid-template-columns: 1fr;
  }
  
  .profile-modal-content {
    padding: 15px;
  }
  
  .stats-grid-detailed {
    grid-template-columns: 1fr;
  }
  
  .profile-sections {
    gap: var(--space-lg);
  }
}

/* ---------- THEME SYSTEM ---------- */
.theme-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  min-width: 200px;
  display: none;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.theme-option:hover {
  background-color: var(--surface-secondary);
}

.theme-option.active {
  background-color: rgba(99, 102, 241, 0.1);
  border: 1px solid var(--primary);
}

.theme-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  max-width: 300px;
}

/* Theme-specific styles */
.theme-dark {
  color-scheme: dark;
}

.theme-light {
  color-scheme: light;
}

.theme-blue {
  color-scheme: dark;
}

.theme-green {
  color-scheme: dark;
}

.theme-purple {
  color-scheme: dark;
}

.theme-retro {
  color-scheme: dark;
}

/* Theme toggle container */
.theme-toggle-container {
  position: relative;
  display: inline-block;
}

/* Enhanced theme toggle button */
.theme-toggle {
  position: relative;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.theme-toggle:hover svg {
  color: var(--primary);
}

/* Theme transition animations */
* {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Theme-specific component styles */
.theme-dark .game-card,
.theme-dark .tournament-card,
.theme-dark .ai-profile-card {
  background: rgba(17, 17, 17, 0.6);
  border: 1px solid var(--border-light);
}

.theme-light .game-card,
.theme-light .tournament-card,
.theme-light .ai-profile-card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.theme-blue .game-card,
.theme-blue .tournament-card,
.theme-blue .ai-profile-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-light);
}

.theme-green .game-card,
.theme-green .tournament-card,
.theme-green .ai-profile-card {
  background: rgba(20, 83, 45, 0.6);
  border: 1px solid var(--border-light);
}

.theme-purple .game-card,
.theme-purple .tournament-card,
.theme-purple .ai-profile-card {
  background: rgba(22, 33, 62, 0.6);
  border: 1px solid var(--border-light);
}

.theme-retro .game-card,
.theme-retro .tournament-card,
.theme-retro .ai-profile-card {
  background: rgba(45, 45, 45, 0.8);
  border: 2px solid var(--border-light);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

/* Theme-specific button styles */
.theme-retro .btn {
  background: linear-gradient(45deg, var(--primary), var(--accent));
  border: 2px solid var(--border-light);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.theme-retro .btn:hover {
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
  transform: translateY(-2px);
}

/* Theme-specific text styles */
.theme-retro h1,
.theme-retro h2,
.theme-retro h3 {
  text-shadow: 0 0 10px var(--text-primary);
}

.theme-retro .hero-title {
  text-shadow: 0 0 20px var(--primary);
}

/* Theme-specific input styles */
.theme-retro input,
.theme-retro textarea,
.theme-retro select {
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid var(--border-light);
  color: var(--text-primary);
  box-shadow: inset 0 0 10px rgba(0, 255, 255, 0.2);
}

.theme-retro input:focus,
.theme-retro textarea:focus,
.theme-retro select:focus {
  box-shadow: inset 0 0 20px rgba(0, 255, 255, 0.4), 0 0 20px rgba(0, 255, 255, 0.3);
}

/* Theme-specific modal styles */
.theme-retro .modal,
.theme-retro .share-modal,
.theme-retro .profile-modal {
  background: rgba(0, 0, 0, 0.9);
  border: 2px solid var(--border-light);
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

/* Theme-specific navigation styles */
.theme-retro .nav-link {
  text-shadow: 0 0 5px var(--text-primary);
}

.theme-retro .nav-link:hover {
  text-shadow: 0 0 10px var(--primary);
}

/* Theme-specific loading screen */
.theme-retro .loading-screen {
  background: radial-gradient(circle, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 1));
}

.theme-retro .loading-spinner {
  border: 4px solid var(--border-light);
  border-top: 4px solid var(--primary);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.theme-retro .loading-text {
  text-shadow: 0 0 10px var(--text-primary);
}

/* Responsive theme adjustments */
@media (max-width: 768px) {
  .theme-dropdown {
    right: -10px;
    min-width: 180px;
  }
  
  .theme-notification {
    right: 10px;
    max-width: 250px;
  }
}

@media (max-width: 480px) {
  .theme-dropdown {
    right: -20px;
    min-width: 160px;
  }
  
  .theme-notification {
    right: 5px;
    max-width: 200px;
  }
  
  .theme-toggle {
    width: 35px;
    height: 35px;
  }
  
  .theme-toggle svg {
    width: 18px;
    height: 18px;
  }
}

/* ---------- IN-GAME CHAT SYSTEM ---------- */
.in-game-chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 350px;
  max-height: 500px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  font-family: var(--font-family);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background: var(--surface-secondary);
  border-radius: 15px 15px 0 0;
  border-bottom: 1px solid var(--border);
}

.chat-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-icon {
  font-size: 18px;
}

.chat-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: var(--font-size-sm);
}

.chat-controls {
  display: flex;
  gap: 8px;
}

.chat-toggle-btn,
.chat-settings-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

.chat-toggle-btn:hover,
.chat-settings-btn:hover {
  background: var(--surface-secondary);
  border-color: var(--primary);
  color: var(--primary);
}

.chat-toggle-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.chat-toggle-btn svg,
.chat-settings-btn svg {
  width: 16px;
  height: 16px;
}

.chat-content {
  display: flex;
  flex-direction: column;
  height: 400px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: var(--surface-secondary);
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

.chat-welcome {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-secondary);
}

.welcome-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.welcome-text {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.welcome-subtext {
  font-size: var(--font-size-sm);
  line-height: 1.4;
}

.chat-message {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-message.user .message-content {
  background: var(--primary);
  color: white;
  margin-left: 20px;
}

.chat-message.ai .message-content {
  background: var(--surface-secondary);
  color: var(--text-primary);
  margin-right: 20px;
}

.chat-message.system .message-content {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  margin: 0 10px;
  text-align: center;
}

.message-content {
  padding: 10px 15px;
  border-radius: 15px;
  max-width: 100%;
  word-wrap: break-word;
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.message-user {
  font-weight: 600;
  font-size: var(--font-size-xs);
  opacity: 0.8;
}

.message-time {
  font-size: var(--font-size-xs);
  opacity: 0.6;
}

.message-text {
  font-size: var(--font-size-sm);
  line-height: 1.4;
}

.chat-input-container {
  padding: 15px;
  border-top: 1px solid var(--border);
  background: var(--surface-secondary);
}

.chat-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.chat-input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid var(--border-light);
  border-radius: 25px;
  background: var(--surface);
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  outline: none;
  transition: all 0.2s ease;
}

.chat-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.chat-input::placeholder {
  color: var(--text-secondary);
}

.emoji-btn,
.send-btn {
  background: var(--primary);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: white;
}

.emoji-btn:hover,
.send-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.emoji-btn:active,
.send-btn:active {
  transform: scale(0.95);
}

.emoji-btn span {
  font-size: 16px;
}

.send-btn svg {
  width: 16px;
  height: 16px;
}

.quick-emojis {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.quick-emoji-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
}

.quick-emoji-btn:hover {
  background: var(--surface-secondary);
  border-color: var(--primary);
  transform: scale(1.1);
}

.chat-footer {
  padding: 10px 15px;
  border-top: 1px solid var(--border);
  background: var(--surface-secondary);
  border-radius: 0 0 15px 15px;
}

.chat-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
}

.online-count {
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-rules {
  font-style: italic;
}

/* Chat Settings Modal */
.chat-settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.chat-settings-modal .modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
}

.chat-settings-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.chat-settings-modal .modal-header h3 {
  color: var(--text-primary);
  font-size: var(--font-size-lg);
  font-weight: 600;
}

.chat-settings-modal .modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.chat-settings-modal .modal-close:hover {
  color: var(--text-primary);
}

.chat-settings-modal .modal-body {
  padding: 20px;
}

.setting-item {
  margin-bottom: 20px;
}

.setting-item label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
}

.setting-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.setting-item input[type="number"] {
  width: 80px;
  padding: 5px 10px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-primary);
  margin-left: 10px;
}

.setting-description {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  margin-top: 5px;
  margin-left: 28px;
}

.chat-settings-modal .modal-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
  text-align: right;
}

/* Responsive chat adjustments */
@media (max-width: 768px) {
  .in-game-chat-widget {
    width: 300px;
    right: 10px;
    bottom: 10px;
  }
  
  .chat-content {
    height: 350px;
  }
}

@media (max-width: 480px) {
  .in-game-chat-widget {
    width: calc(100vw - 20px);
    right: 10px;
    left: 10px;
  }
  
  .chat-content {
    height: 300px;
  }
  
  .chat-messages {
    padding: 10px;
  }
  
  .chat-input-container {
    padding: 10px;
  }
}

/* Theme-specific chat styles */
.theme-retro .in-game-chat-widget {
  background: rgba(0, 0, 0, 0.9);
  border: 2px solid var(--border-light);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.theme-retro .chat-message.user .message-content {
  background: linear-gradient(45deg, var(--primary), var(--accent));
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.theme-retro .chat-input {
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid var(--border-light);
  box-shadow: inset 0 0 10px rgba(0, 255, 255, 0.2);
}

.theme-retro .chat-input:focus {
  box-shadow: inset 0 0 20px rgba(0, 255, 255, 0.4), 0 0 20px rgba(0, 255, 255, 0.3);
}

/* ---------- FEEDBACK SYSTEM ---------- */
.feedback-floating-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
}

.feedback-btn {
  background: var(--primary);
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
  color: white;
}

.feedback-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.4);
}

.feedback-btn:active {
  transform: scale(0.95);
}

.feedback-btn svg {
  width: 24px;
  height: 24px;
}

.feedback-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: var(--font-size-xs);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  margin-bottom: 8px;
  border: 1px solid var(--border-light);
}

.feedback-btn:hover + .feedback-tooltip {
  opacity: 1;
}

.feedback-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--surface);
}

/* Feedback Modal */
.feedback-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.feedback-modal .modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

.feedback-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.feedback-modal .modal-header h3 {
  color: var(--text-primary);
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin: 0;
}

.feedback-modal .modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.feedback-modal .modal-close:hover {
  color: var(--text-primary);
  background: var(--surface-secondary);
}

.feedback-modal .modal-body {
  padding: 20px;
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.form-group label {
  font-weight: 500;
  color: var(--text-primary);
  font-size: var(--font-size-sm);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 15px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  transition: all 0.2s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.char-count {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  text-align: right;
}

.rating-input {
  display: flex;
  gap: 8px;
  align-items: center;
}

.rating-input input[type="radio"] {
  display: none;
}

.rating-star {
  font-size: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #d1d5db;
}

.rating-star:hover {
  color: #fbbf24;
  transform: scale(1.1);
}

.rating-input input[type="radio"]:checked + .rating-star {
  color: #fbbf24;
}

.form-group small {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  margin-top: 4px;
}

.form-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  margin-right: 8px;
}

.form-group label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.form-actions .btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-size: var(--font-size-sm);
}

.form-actions .btn-secondary {
  background: var(--surface-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.form-actions .btn-secondary:hover {
  background: var(--border-light);
}

.form-actions .btn-primary {
  background: var(--primary);
  color: white;
}

.form-actions .btn-primary:hover {
  background: var(--primary-dark);
}

/* Bug Report Modal Specific Styles */
.bug-report-modal .modal-content {
  max-width: 700px;
}

.bug-report-modal .form-group:has(#bug-priority) select {
  border-left: 4px solid var(--primary);
}

.bug-report-modal .form-group:has(#bug-screenshot) input[type="file"] {
  padding: 8px 12px;
  border: 2px dashed var(--border-light);
  background: var(--surface-secondary);
}

.bug-report-modal .form-group:has(#bug-screenshot) input[type="file"]:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

/* Notification Styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  z-index: 10001;
  max-width: 400px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: slideInRight 0.3s ease;
}

.notification-success {
  background: #10b981;
}

.notification-warning {
  background: #f59e0b;
}

.notification-error {
  background: #ef4444;
}

.notification-info {
  background: var(--primary);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive Feedback System */
@media (max-width: 768px) {
  .feedback-modal {
    padding: 10px;
  }
  
  .feedback-modal .modal-content {
    max-height: 95vh;
  }
  
  .feedback-modal .modal-header,
  .feedback-modal .modal-body {
    padding: 15px;
  }
  
  .feedback-floating-btn {
    bottom: 15px;
    left: 15px;
  }
  
  .feedback-btn {
    width: 48px;
    height: 48px;
  }
  
  .feedback-btn svg {
    width: 20px;
    height: 20px;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .form-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .feedback-modal .modal-content {
    border-radius: 10px;
  }
  
  .feedback-modal .modal-header h3 {
    font-size: var(--font-size-md);
  }
  
  .rating-star {
    font-size: 20px;
  }
  
  .notification {
    right: 10px;
    left: 10px;
    max-width: none;
  }
}

/* Theme-specific feedback styles */
.theme-retro .feedback-btn {
  background: linear-gradient(45deg, var(--primary), var(--accent));
  border: 2px solid var(--border-light);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.theme-retro .feedback-btn:hover {
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
}

.theme-retro .feedback-modal .modal-content {
  background: rgba(0, 0, 0, 0.9);
  border: 2px solid var(--border-light);
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

.theme-retro .form-group input,
.theme-retro .form-group select,
.theme-retro .form-group textarea {
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid var(--border-light);
  box-shadow: inset 0 0 10px rgba(0, 255, 255, 0.2);
}

.theme-retro .form-group input:focus,
.theme-retro .form-group select:focus,
.theme-retro .form-group textarea:focus {
  box-shadow: inset 0 0 20px rgba(0, 255, 255, 0.4), 0 0 20px rgba(0, 255, 255, 0.3);
}

/* ---------- PWA SUPPORT ---------- */
.pwa-install-prompt {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  max-width: 350px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  display: none;
}

.pwa-install-prompt.show {
  transform: translateY(0);
}

.install-content {
  display: flex;
  align-items: center;
  gap: 15px;
}

.install-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.install-text {
  flex: 1;
}

.install-text h3 {
  color: var(--text-primary);
  font-size: var(--font-size-md);
  font-weight: 600;
  margin: 0 0 5px 0;
}

.install-text p {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  margin: 0;
}

.install-actions {
  display: flex;
  gap: 8px;
  margin-top: 15px;
}

.install-actions .btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: var(--font-size-xs);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.install-actions .btn-secondary {
  background: var(--surface-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.install-actions .btn-secondary:hover {
  background: var(--border-light);
}

.install-actions .btn-primary {
  background: var(--primary);
  color: white;
}

.install-actions .btn-primary:hover {
  background: var(--primary-dark);
}

.install-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.install-close:hover {
  color: var(--text-primary);
  background: var(--surface-secondary);
}

/* PWA Update Prompt */
.pwa-update-prompt {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  max-width: 350px;
  animation: slideInRight 0.3s ease;
}

.update-content {
  display: flex;
  align-items: center;
  gap: 15px;
}

.update-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.update-text {
  flex: 1;
}

.update-text h3 {
  color: var(--text-primary);
  font-size: var(--font-size-md);
  font-weight: 600;
  margin: 0 0 5px 0;
}

.update-text p {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  margin: 0;
}

.update-actions {
  display: flex;
  gap: 8px;
  margin-top: 15px;
}

.update-actions .btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: var(--font-size-xs);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.update-actions .btn-secondary {
  background: var(--surface-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.update-actions .btn-secondary:hover {
  background: var(--border-light);
}

.update-actions .btn-primary {
  background: var(--primary);
  color: white;
}

.update-actions .btn-primary:hover {
  background: var(--primary-dark);
}

/* Offline Indicator */
.offline-indicator {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #f59e0b;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: var(--font-size-xs);
  font-weight: 500;
  z-index: 10000;
  animation: slideInDown 0.3s ease;
}

.offline-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.offline-icon {
  font-size: 14px;
}

/* Offline Page */
.offline-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--background);
  padding: 20px;
}

.offline-content {
  text-align: center;
  max-width: 600px;
}

.offline-content .offline-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.offline-content h2 {
  color: var(--text-primary);
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: 15px;
}

.offline-content p {
  color: var(--text-secondary);
  font-size: var(--font-size-md);
  margin-bottom: 30px;
  line-height: 1.5;
}

.offline-games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.offline-game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.offline-game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.offline-game-card .game-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.offline-game-card h3 {
  color: var(--text-primary);
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: 10px;
}

.offline-game-card p {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  margin-bottom: 15px;
}

.offline-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.offline-actions .btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-size: var(--font-size-sm);
}

.offline-actions .btn-secondary {
  background: var(--surface-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.offline-actions .btn-secondary:hover {
  background: var(--border-light);
}

.offline-actions .btn-primary {
  background: var(--primary);
  color: white;
}

.offline-actions .btn-primary:hover {
  background: var(--primary-dark);
}

/* PWA Animations */
@keyframes slideInDown {
  from {
    transform: translateX(-50%) translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

/* Responsive PWA Styles */
@media (max-width: 768px) {
  .pwa-install-prompt {
    bottom: 15px;
    right: 15px;
    left: 15px;
    max-width: none;
  }
  
  .pwa-update-prompt {
    top: 15px;
    right: 15px;
    left: 15px;
    max-width: none;
  }
  
  .offline-games {
    grid-template-columns: 1fr;
  }
  
  .offline-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .offline-actions .btn {
    width: 100%;
    max-width: 200px;
  }
}

@media (max-width: 480px) {
  .pwa-install-prompt,
  .pwa-update-prompt {
    padding: 15px;
  }
  
  .install-content,
  .update-content {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  
  .install-actions,
  .update-actions {
    justify-content: center;
  }
  
  .offline-content .offline-icon {
    font-size: 48px;
  }
  
  .offline-content h2 {
    font-size: var(--font-size-lg);
  }
  
  .offline-content p {
    font-size: var(--font-size-sm);
  }
}

/* Theme-specific PWA styles */
.theme-retro .pwa-install-prompt,
.theme-retro .pwa-update-prompt {
  background: rgba(0, 0, 0, 0.9);
  border: 2px solid var(--border-light);
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

.theme-retro .offline-indicator {
  background: linear-gradient(45deg, #f59e0b, #ef4444);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.theme-retro .offline-game-card {
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid var(--border-light);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.theme-retro .offline-game-card:hover {
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.4);
}

/* ---------- LANGUAGE SELECTOR ---------- */
.language-selector {
  position: relative;
  display: inline-block;
}

.language-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  backdrop-filter: blur(10px);
}

.language-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--primary);
}

.language-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.language-selector:has(.language-dropdown.show) .language-toggle svg {
  transform: rotate(180deg);
}

.current-flag {
  font-size: 18px;
}

.current-lang {
  font-weight: 500;
}

.language-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  min-width: 200px;
  max-height: 300px;
  overflow-y: auto;
  display: none;
}

.language-dropdown.show {
  display: block;
  animation: slideInDown 0.2s ease;
}

.language-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 2px;
}

.language-option:hover {
  background: var(--surface-secondary);
}

.language-option.active {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid var(--primary);
}

.language-flag {
  font-size: 20px;
  flex-shrink: 0;
}

.language-name {
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
}

.language-english {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  font-style: italic;
}

/* RTL Support */
[dir="rtl"] .language-dropdown {
  right: auto;
  left: 0;
}

[dir="rtl"] .language-toggle {
  flex-direction: row-reverse;
}

[dir="rtl"] .language-option {
  flex-direction: row-reverse;
}

/* Responsive Language Selector */
@media (max-width: 768px) {
  .language-toggle {
    padding: 6px 10px;
    font-size: var(--font-size-xs);
  }
  
  .current-flag {
    font-size: 16px;
  }
  
  .language-dropdown {
    min-width: 180px;
    right: -10px;
  }
  
  .language-option {
    padding: 8px 10px;
  }
  
  .language-flag {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .language-toggle {
    padding: 5px 8px;
  }
  
  .current-lang {
    display: none;
  }
  
  .language-dropdown {
    min-width: 160px;
    right: -20px;
  }
  
  .language-english {
    display: none;
  }
}

/* Theme-specific language selector styles */
.theme-retro .language-toggle {
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid var(--border-light);
  box-shadow: inset 0 0 10px rgba(0, 255, 255, 0.2);
}

.theme-retro .language-toggle:hover {
  box-shadow: inset 0 0 20px rgba(0, 255, 255, 0.4), 0 0 20px rgba(0, 255, 255, 0.3);
}

.theme-retro .language-dropdown {
  background: rgba(0, 0, 0, 0.9);
  border: 2px solid var(--border-light);
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

.theme-retro .language-option:hover {
  background: rgba(0, 255, 255, 0.1);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.theme-retro .language-option.active {
  background: rgba(0, 255, 255, 0.2);
  border: 1px solid var(--primary);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

/* Language-specific font adjustments */
[lang="ar"], [lang="fa"], [lang="ur"] {
  font-family: 'Arial', 'Tahoma', sans-serif;
}

[lang="zh"], [lang="ja"], [lang="ko"] {
  font-family: 'Arial', 'Helvetica', sans-serif;
}

[lang="hi"], [lang="bn"], [lang="ta"] {
  font-family: 'Arial', 'Tahoma', sans-serif;
}

/* RTL Layout Adjustments */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .nav {
  flex-direction: row-reverse;
}

[dir="rtl"] .hero-content {
  text-align: right;
}

[dir="rtl"] .game-card {
  text-align: right;
}

[dir="rtl"] .feature-card {
  text-align: right;
}

[dir="rtl"] .btn {
  text-align: right;
}

[dir="rtl"] .form-group {
  text-align: right;
}

[dir="rtl"] .form-group label {
  text-align: right;
}

[dir="rtl"] .form-group input,
[dir="rtl"] .form-group select,
[dir="rtl"] .form-group textarea {
  text-align: right;
}

[dir="rtl"] .modal-content {
  text-align: right;
}

[dir="rtl"] .modal-header {
  flex-direction: row-reverse;
}

[dir="rtl"] .modal-footer {
  text-align: left;
}

[dir="rtl"] .form-actions {
  flex-direction: row-reverse;
}

[dir="rtl"] .chat-message.user .message-content {
  margin-left: 0;
  margin-right: 20px;
}

[dir="rtl"] .chat-message.ai .message-content {
  margin-right: 0;
  margin-left: 20px;
}

[dir="rtl"] .feedback-floating-btn {
  left: auto;
  right: 20px;
}

[dir="rtl"] .pwa-install-prompt {
  right: auto;
  left: 20px;
}

[dir="rtl"] .pwa-update-prompt {
  right: auto;
  left: 20px;
}

[dir="rtl"] .offline-indicator {
  left: auto;
  right: 50%;
  transform: translateX(50%);
}

.subscription-header h3 {
  color: var(--text-primary);
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: 10px;
}

.subscription-header p {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  margin-bottom: 20px;
}

.email-subscription-form {
  margin-bottom: 15px;
}

.subscription-input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.subscription-input-group input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  transition: all 0.3s ease;
}

.subscription-input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.subscription-input-group button {
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  border-radius: 8px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.subscription-input-group button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.subscription-input-group button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.subscription-preferences {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 15px;
  text-align: left;
}

.subscription-preferences label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  cursor: pointer;
}

.subscription-preferences input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.subscription-stats {
  color: var(--text-muted);
  font-size: var(--font-size-xs);
}

.subscribe-btn {
  display: inline-block;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  text-decoration: none;
  border-radius: 20px;
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.subscribe-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.subscribe-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 768px) {
  .subscription-input-group {
    flex-direction: column;
  }
  
  .subscription-preferences {
    grid-template-columns: 1fr;
  }
  
  .email-subscription-widget {
    padding: 20px;
  }
}

/* Auto-update notification */
.update-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #ff6b35, #ff8a65);
  color: white;
  padding: 15px 20px;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(255, 107, 53, 0.3);
  z-index: 10000;
  animation: slideInRight 0.3s ease-out;
  max-width: 300px;
}

.update-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.update-btn, .dismiss-btn {
  padding: 5px 12px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.update-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.update-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.dismiss-btn {
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.dismiss-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Enhanced navigation */
.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-link:hover {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
}

.nav-link.active {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.theme-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 10px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.theme-toggle:hover {
  background: rgba(255, 107, 53, 0.2);
  border-color: var(--primary);
  transform: scale(1.05);
}

/* Simplified hero section */
.hero {
  padding: 60px 0;
  text-align: center;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(0, 212, 170, 0.1));
  border-radius: 0 0 20px 20px;
  margin-bottom: 40px;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 30px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Simplified feature cards */
.feature-card {
  background: rgba(17, 17, 17, 0.4);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(255, 107, 53, 0.15);
  border-color: var(--primary);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: white;
}

/* Simplified game cards */
.game-preview, .game-card {
  background: rgba(17, 17, 17, 0.4);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.game-preview:hover, .game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(255, 107, 53, 0.15);
  border-color: var(--primary);
}

.card-media {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: white;
}

.preview-meta, .card-body {
  padding: 20px;
}

.preview-meta h3, .card-body h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.preview-meta p, .card-body p {
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

/* Mobile responsive updates */
@media (max-width: 768px) {
  .update-notification {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .update-content {
    flex-direction: column;
    gap: 8px;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .nav {
    gap: 6px;
    justify-content: center;
  }
  
  .nav-link {
    padding: 10px 16px;
    font-size: 12px;
    letter-spacing: 0.3px;
  }
  
  .theme-toggle {
    padding: 8px;
  }
}

/* User Engagement Section */
.user-engagement-section {
  padding: 60px 0;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.05), rgba(0, 212, 170, 0.05));
  border-radius: 20px;
  margin: 40px 0;
}

.engagement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.engagement-card {
  background: rgba(17, 17, 17, 0.6);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.engagement-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(255, 107, 53, 0.2);
  border-color: var(--primary);
}

.engagement-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  display: block;
}

.engagement-card h3 {
  color: var(--primary);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.engagement-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 25px;
}

/* Progress Stats */
.progress-stats, .goal-progress {
  margin-top: 20px;
}

.progress-item, .goal-item {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  font-size: 14px;
}

.progress-item span:first-child, .goal-item span:first-child {
  min-width: 120px;
  text-align: left;
  color: var(--text-secondary);
}

.progress-bar, .goal-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill, .goal-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 4px;
  transition: width 0.5s ease;
}

.progress-item span:last-child, .goal-item span:last-child {
  min-width: 40px;
  text-align: right;
  color: var(--primary);
  font-weight: 600;
}

/* Achievement Preview */
.achievement-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.achievement-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  font-size: 14px;
}

.achievement-icon {
  font-size: 1.2rem;
}

.achievement-item span:nth-child(2) {
  flex: 1;
  text-align: left;
  color: var(--text-secondary);
}

.achievement-status {
  font-size: 1rem;
}

/* Challenge Stats */
.challenge-stats {
  display: flex;
  gap: 30px;
  justify-content: center;
  margin: 20px 0;
}

.challenge-stats .stat-item {
  text-align: center;
}

.challenge-stats .stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.challenge-stats .stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Achievement Notifications */
.achievement-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ff6b35, #ff8a65);
  color: white;
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(255, 107, 53, 0.4);
  z-index: 10001;
  animation: slideInDown 0.5s ease-out;
  max-width: 400px;
  text-align: center;
}

.achievement-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.achievement-title {
  font-size: 1.2rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.achievement-message {
  font-size: 0.9rem;
  opacity: 0.9;
  line-height: 1.4;
}

@keyframes slideInDown {
  from {
    transform: translateX(-50%) translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

/* Return Visitor Section */
.return-visitor-section {
  padding: 60px 0;
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.1), rgba(255, 107, 53, 0.1));
  border-radius: 20px;
  margin: 40px 0;
}

.return-incentives {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin: 40px 0;
}

.incentive-card {
  background: rgba(17, 17, 17, 0.6);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 25px;
  text-align: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.incentive-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(255, 107, 53, 0.2);
  border-color: var(--primary);
}

.incentive-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
  display: block;
}

.incentive-card h3 {
  color: var(--primary);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.incentive-card p {
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.incentive-stats {
  background: rgba(255, 107, 53, 0.1);
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: 8px;
  padding: 10px 15px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
}

.bookmark-reminder {
  text-align: center;
  margin-top: 40px;
  padding: 30px;
  background: rgba(17, 17, 17, 0.4);
  border-radius: 16px;
  border: 1px solid var(--border-light);
}

.bookmark-reminder p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.bookmark-reminder strong {
  color: var(--primary);
}

/* All complex animations removed */
