:root {
  --bg-light: #FFFFFF;
  --bg-secondary: #F8F9FA;
  --bg-tertiary: #F5F7FA;

  --primary: #6366F1;
  --primary-dark: #4F46E5;
  --secondary: #06B6D4;
  --tertiary: #F59E0B;

  --text-main: #1F2937;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;

  --font-display: 'Outfit', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;

  --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg-light);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

.background-fx {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background: linear-gradient(135deg, #F8F9FA 0%, #E0E7FF 50%, #DBEAFE 100%);
  pointer-events: none;
}

.background-fx::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 20s ease-in-out infinite;
}

.background-fx::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -30px) scale(1.1);
  }

  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
  line-height: 1.1;
  color: var(--text-main);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

section {
  padding: 6rem 0;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: var(--shadow-sm);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

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

.logo-mark {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.main-nav {
  display: flex;
  gap: 2rem;
}

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

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

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

.main-nav a:hover::after {
  width: 100%;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-family: var(--font-display);
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  border: none;
  font-size: 0.95rem;
}

.button.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.button.primary.glow {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {

  0%,
  100% {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  }

  50% {
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5);
  }
}

.button.secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.button.secondary:hover {
  background: var(--primary);
  color: white;
}

.button.outline {
  background: white;
  border: 2px solid rgba(0, 0, 0, 0.1);
  color: var(--text-main);
  width: 100%;
}

.button.outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.button.large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.hero {
  padding-top: 180px;
  padding-bottom: 100px;
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 5%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 12s ease-in-out infinite;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-image {
  width: 100%;
  max-width: 500px;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(99, 102, 241, 0.3));
  object-fit: contain;
  -webkit-mask-image: radial-gradient(circle at center, black 60%, transparent 100%);
  mask-image: radial-gradient(circle at center, black 60%, transparent 100%);
}

.visual-inner {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.badge {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(6, 182, 212, 0.1));
  border: 2px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-full);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-title {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.lead {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 4rem;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-top: 2rem;
  border-top: 2px solid rgba(0, 0, 0, 0.08);
}

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

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--primary);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(0, 0, 0, 0.1);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.game-preview-card {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 4/5;
  background: white;
  border-radius: 24px;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

.preview-screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
}

.preview-ui {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
}

.score-pill {
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  backdrop-filter: blur(4px);
  color: white;
}

.preview-player {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  background: var(--secondary);
  box-shadow: 0 0 20px var(--secondary);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.preview-enemy {
  position: absolute;
  top: 100px;
  left: 30%;
  width: 30px;
  height: 30px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--primary);
}

.preview-glow {
  position: absolute;
  inset: -20px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  z-index: -1;
  filter: blur(40px);
  opacity: 0.3;
  border-radius: 40px;
}

.floating {
  animation: float-card 6s ease-in-out infinite;
}

@keyframes float-card {

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

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

.games-section {
  background: var(--bg-secondary);
  position: relative;
  /* Scroll margin for sticky header offset */
  scroll-margin-top: 100px;
}

/* Category Navigation & Search */
.category-nav-wrapper {
  position: sticky;
  top: 70px;
  z-index: 90;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.nav-layout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.search-container {
  position: relative;
  flex: 1;
  max-width: 320px;
}

.search-input {
  width: 100%;
  padding: 0.85rem 1.25rem 0.85rem 3rem;
  border: 2px solid rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.3s var(--ease-out);
  outline: none;
  background: white;
  box-shadow: var(--shadow-sm);
  color: var(--text-main);
}

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

.search-input:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.search-input:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), var(--shadow-lg);
  transform: translateY(-1px);
}

.search-icon {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.3s ease;
}

.search-input:focus+.search-icon {
  color: var(--primary);
}

.category-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 5px;
  /* For scrollbar */
  /* Scrollbar spacing if needed */
  -ms-overflow-style: none;
  /* IE/Edge */
  scrollbar-width: none;
  /* Firefox */
  justify-content: center;
}

.category-nav::-webkit-scrollbar {
  display: none;
}

.category-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.category-pill:hover {
  background: white;
  color: var(--primary);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.category-pill.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.category-pill.active .category-icon {
  filter: grayscale(0) brightness(2);
}

.category-icon {
  font-size: 1.1rem;
  line-height: 1;
}

/* Responsive adjustments for nav */
@media (max-width: 768px) {
  .category-nav {
    justify-content: flex-start;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .category-nav-wrapper {
    margin: 0 -1rem;
    /* Bleed to edges on mobile */
    padding: 1rem 0;
  }
}

.games-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.game-card {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s var(--ease-out);
  box-shadow: var(--shadow-md);
}

.game-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(99, 102, 241, 0.3);
}

.card-image {
  height: 200px;
  position: relative;
  overflow: hidden;
}



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

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

.play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: grid;
  place-items: center;
  opacity: 0;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
}

.game-card:hover .play-overlay {
  opacity: 1;
}

.play-icon {
  width: 60px;
  height: 60px;
  background: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--primary);
  font-size: 1.5rem;
  padding-left: 4px;
  transform: scale(0.8);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.game-card:hover .play-icon {
  transform: scale(1);
}

.game-cover-text {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: transform 0.5s ease;
}

.game-card:hover .game-cover-text {
  transform: scale(1.1);
}

.cover-english {
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  text-shadow: 0 4px 12px rgba(29, 78, 216, 0.3);
}

.cover-french {
  background: linear-gradient(135deg, #EF4444 0%, #B91C1C 100%);
  text-shadow: 0 4px 12px rgba(185, 28, 28, 0.3);
}

.cover-spanish {
  background: linear-gradient(135deg, #F59E0B 0%, #B45309 100%);
  text-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.cover-german {
  background: linear-gradient(135deg, #1F2937 0%, #EF4444 50%, #F59E0B 100%);
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.cover-italian {
  background: linear-gradient(135deg, #10B981 0%, #FFFFFF 50%, #EF4444 100%);
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  color: #1F2937;
  /* Dark text for better contrast */
}

.cover-portuguese {
  background: linear-gradient(135deg, #059669 0%, #DC2626 100%);
  text-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.cover-dutch {
  background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
  text-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

.cover-swedish {
  background: linear-gradient(135deg, #3B82F6 0%, #EAB308 100%);
  text-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.cover-norwegian {
  background: linear-gradient(135deg, #EF4444 0%, #1D4ED8 100%);
  text-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.cover-danish {
  background: linear-gradient(135deg, #EF4444 0%, #F87171 100%);
  text-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.cover-finnish {
  background: linear-gradient(135deg, #FFFFFF 0%, #3B82F6 100%);
  text-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  color: #1F2937;
}

.cover-polish {
  background: linear-gradient(135deg, #FFFFFF 0%, #EF4444 100%);
  text-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
  color: #1F2937;
}

/* Food Trivia Styles */
.cover-food-italian {
  background: linear-gradient(135deg, #009246 0%, #FFFFFF 50%, #CE2B37 100%);
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  color: #1F2937;
}

.cover-food-japanese {
  background: linear-gradient(135deg, #FFFFFF 0%, #BC002D 100%);
  text-shadow: 0 4px 12px rgba(188, 0, 45, 0.3);
  color: #1F2937;
}

.cover-food-mexican {
  background: linear-gradient(135deg, #006847 0%, #FFFFFF 50%, #CE1126 100%);
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  color: #1F2937;
}

.cover-food-indian {
  background: linear-gradient(135deg, #FF9933 0%, #FFFFFF 50%, #138808 100%);
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  color: #1F2937;
}

.cover-food-american {
  background: linear-gradient(135deg, #3C3B6E 0%, #B22234 100%);
  text-shadow: 0 4px 12px rgba(60, 59, 110, 0.3);
}

.cover-food-french {
  background: linear-gradient(135deg, #002395 0%, #FFFFFF 50%, #ED2939 100%);
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  color: #1F2937;
}

.card-content {
  padding: 1.5rem;
}

.card-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.card-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.about-section {
  background: white;
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin-top: 2rem;
  display: grid;
  gap: 2rem;
}

.feature-list li {
  display: flex;
  gap: 1rem;
}

.feature-icon {
  font-size: 1.5rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(6, 182, 212, 0.1));
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(99, 102, 241, 0.2);
  flex-shrink: 0;
}

.code-block {
  background: #1e1e1e;
  border-radius: 12px;
  padding: 1.5rem;
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  color: #d4d4d4;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.code-header {
  display: flex;
  gap: 8px;
  margin-bottom: 1rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.red {
  background: #ff5f56;
}

.yellow {
  background: #ffbd2e;
}

.green {
  background: #27c93f;
}

.contact-section {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(99, 102, 241, 0.05) 100%);
}

.center-content {
  text-align: center;
  max-width: 600px;
}

.site-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 3rem 0;
  background: white;
}

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

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--primary);
}

.game-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.game-overlay:not(.hidden) {
  opacity: 1;
  pointer-events: all;
}

.game-stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.preflight-panel {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 15, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem 2rem;
  text-align: center;
  color: #f8fafc;
  transition: opacity 0.3s ease;
}

.preflight-panel.hidden {
  opacity: 0;
  pointer-events: none;
}

.preflight-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.5rem;
  max-width: 460px;
  color: rgba(248, 250, 252, 0.85);
}

.preflight-list li::before {
  content: '•';
  margin-right: 0.4rem;
  color: var(--secondary);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.overlay-header {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.overlay-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
}

.overlay-controls {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.score-display {
  font-family: 'Fira Code', monospace;
  color: var(--secondary);
}

.close-button {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.close-button:hover {
  opacity: 1;
}

.game-container {
  flex: 1;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.game-container canvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.memory-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 600px;
  width: 100%;
  padding: 2rem;
}

.memory-card {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 2rem;
  transition: all 0.3s ease;
  color: white;
}

.memory-card.flipped,
.memory-card.matched {
  background: var(--primary);
  transform: rotateY(180deg);
}

.logic-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(48px, 1fr));
  gap: 0.6rem;
  width: min(420px, 90vw);
  padding: 1.5rem;
}

.logic-cell {
  border: none;
  border-radius: 12px;
  height: 0;
  padding-bottom: 100%;
  position: relative;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.logic-cell::after {
  content: '';
  position: absolute;
  inset: 25%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.2s ease;
}

.logic-cell.on {
  background: rgba(80, 250, 123, 0.35);
  transform: scale(0.98);
}

.logic-cell.on::after {
  background: #50fa7b;
}

.reaction-pad {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 3rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: background 0.1s;
  color: white;
}

.reaction-pad.ready {
  background: #27c93f;
  color: black;
}

.overlay-footer {
  height: 40px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.3);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ================= LEADERBOARD PAGE STYLES ================= */

.leaderboard-hero {
  padding-top: 140px;
  padding-bottom: 60px;
  min-height: 50vh;
}

.hero-text.centered {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.leaderboard-section {
  background: var(--bg-secondary);
  padding: 4rem 0;
}

.leaderboard-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid rgba(0, 0, 0, 0.1);
  background: white;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
}

.filter-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.filter-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.filter-tab .tab-icon {
  font-size: 1.2rem;
}

.leaderboard-container {
  max-width: 800px;
  margin: 0 auto;
}

/* Game of the Month */
.game-of-month-card {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  box-shadow: 0 10px 30px rgba(49, 46, 129, 0.4);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-of-month-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.3), transparent 60%);
}

.gom-content {
  position: relative;
  z-index: 2;
  flex: 1;
}

.gom-badge {
  display: inline-block;
  background: rgba(255, 215, 0, 0.2);
  color: #ffd700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.gom-content h3 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
}

.gom-content p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
}

.gom-visual {
  position: relative;
  z-index: 2;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: float-subtle 4s ease-in-out infinite;
}

.leaderboard-content {
  display: grid;
  gap: 1rem;
}

.player-row {
  background: white;
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 1.5rem;
  align-items: center;
  border: 2px solid rgba(0, 0, 0, 0.08);
  transition: all 0.3s var(--ease-out);
}

.player-row:hover {
  transform: translateX(8px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.player-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(6, 182, 212, 0.1));
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
  border: 2px solid rgba(99, 102, 241, 0.2);
}

.player-row.rank-1 .player-rank {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: white;
  border-color: #FFD700;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.player-row.rank-2 .player-rank {
  background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
  color: white;
  border-color: #C0C0C0;
  box-shadow: 0 4px 12px rgba(192, 192, 192, 0.4);
}

.player-row.rank-3 .player-rank {
  background: linear-gradient(135deg, #CD7F32, #B87333);
  color: white;
  border-color: #CD7F32;
  box-shadow: 0 4px 12px rgba(205, 127, 50, 0.4);
}

.player-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.player-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

.player-details {
  flex: 1;
}

.player-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.player-game {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.game-badge {
  padding: 0.2rem 0.6rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(6, 182, 212, 0.1));
  border-radius: var(--radius-sm);
  color: var(--primary);
  font-weight: 500;
  font-size: 0.75rem;
}

.player-score {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ================= COMING SOON PAGE STYLES ================= */

.coming-soon-hero {
  padding-top: 140px;
  padding-bottom: 60px;
  min-height: 50vh;
}

.upcoming-games-section {
  padding: 4rem 0;
}

.upcoming-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.upcoming-game-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 2rem;
  border: 2px solid rgba(0, 0, 0, 0.08);
  transition: all 0.3s var(--ease-out);
  text-align: center;
}

.upcoming-game-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: var(--shadow-xl);
}

.upcoming-card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: inline-block;
  animation: float-subtle 3s ease-in-out infinite;
}

@keyframes float-subtle {

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

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

.upcoming-game-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.upcoming-game-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.game-tag {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(6, 182, 212, 0.1));
  border: 2px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-full);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.email-signup-section {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(99, 102, 241, 0.05) 100%);
  padding: 5rem 0;
}

.signup-card {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
  border: 2px solid rgba(0, 0, 0, 0.08);
  box-shadow: var(--shadow-xl);
}

.signup-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.signup-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.email-form {
  margin-bottom: 1rem;
}

.form-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.email-input {
  flex: 1;
  min-width: 250px;
  padding: 1rem 1.5rem;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
}

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

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

.search-container {
  position: relative;
  flex: 1;
  max-width: 320px;
}

.search-input {
  width: 100%;
  padding: 0.85rem 1.25rem 0.85rem 3rem;
  border: 2px solid rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.3s var(--ease-out);
  outline: none;
  background: white;
  box-shadow: var(--shadow-sm);
  color: var(--text-main);
}

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

.search-input:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.search-input:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), var(--shadow-lg);
  transform: translateY(-1px);
}

.search-icon {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.3s ease;
}

.search-input:focus+.search-icon {
  color: var(--primary);
}

.form-message {
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  display: none;
}

.form-message.success {
  display: block;
  background: rgba(39, 201, 63, 0.1);
  color: #27c93f;
  border: 2px solid rgba(39, 201, 63, 0.3);
}

.form-message.error {
  display: block;
  background: rgba(255, 0, 85, 0.1);
  color: #ff0055;
  border: 2px solid rgba(255, 0, 85, 0.3);
}

.signup-note {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 1rem;
}

/* ================= CONTACT PAGE STYLES ================= */

.contact-hero {
  padding-top: 140px;
  padding-bottom: 60px;
  min-height: 50vh;
}

.contact-form-section {
  padding: 4rem 0 6rem;
  background: var(--bg-secondary);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 3rem;
  border: 2px solid rgba(0, 0, 0, 0.08);
  box-shadow: var(--shadow-lg);
}

.contact-card-title {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.contact-card-desc {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.contact-form {
  display: grid;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-field label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
  font-family: var(--font-display);
}

.form-input,
.form-textarea {
  padding: 0.875rem 1.25rem;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
  background: white;
  color: var(--text-main);
}

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

.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.button.full-width {
  width: 100%;
}

.contact-info {
  display: grid;
  gap: 1.5rem;
}

.info-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 1.75rem;
  border: 2px solid rgba(0, 0, 0, 0.08);
  transition: all 0.3s var(--ease-out);
}

.info-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow: var(--shadow-md);
}

.info-card.highlight {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(6, 182, 212, 0.05));
  border-color: rgba(99, 102, 241, 0.2);
}

.info-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.info-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.info-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.info-card a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.info-card a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.social-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 500;
}

.social-link:hover {
  color: var(--primary);
}

.social-link::before {
  content: '→ ';
  color: var(--primary);
  margin-right: 0.5rem;
}

.main-nav a.active {
  color: var(--primary);
  font-weight: 600;
}

@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .split-layout {
    grid-template-columns: 1fr;
  }

  .main-nav {
    display: none;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .player-row {
    grid-template-columns: 50px 1fr;
    gap: 1rem;
    padding: 1rem;
  }

  .player-score {
    grid-column: 2;
    text-align: right;
    font-size: 1.25rem;
  }

  .form-group {
    flex-direction: column;
  }

  .email-input {
    min-width: 100%;
  }

  .upcoming-games-grid {
    grid-template-columns: 1fr;
  }

  .signup-card {
    padding: 2rem 1.5rem;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .contact-card {
    padding: 2rem 1.5rem;
  }

  .info-card {
    padding: 1.5rem;
  }
}

/* Authentication Styles */
.auth-hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
}

.auth-card {
  background: white;
  padding: 3rem;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.auth-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.auth-toggle-wrapper {
  background: #f5f5f7;
  padding: 4px;
  border-radius: var(--radius-full);
  margin-bottom: 2rem;
}

.auth-toggle {
  display: flex;
  position: relative;
}

.toggle-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.75rem;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.toggle-btn.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.phone-input-wrapper {
  display: flex;
  gap: 0.5rem;
}

.country-code {
  padding: 0.8rem;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  background: white;
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: pointer;
  outline: none;
}

.auth-input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
}

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

.auth-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.hidden {
  display: none !important;
}

@media (max-width: 600px) {
  .auth-card {
    padding: 2rem;
  }
}

/* ================= ARTICLES PAGE STYLES ================= */

.articles-hero {
  padding-top: 140px;
  padding-bottom: 60px;
  min-height: 40vh;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.article-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 2rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s var(--ease-out);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(99, 102, 241, 0.2);
}

.article-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.article-tag.mobile {
  background: #e0f2fe;
  color: #0284c7;
}

.article-tag.pc {
  background: #f3e8ff;
  color: #7e22ce;
}

.article-tag.genre {
  background: #ffedd5;
  color: #c2410c;
}

.article-tag.guide {
  background: #dcfce7;
  color: #166534;
}

.article-tag.tech {
  background: #f1f5f9;
  color: #475569;
}

.article-tag.competitive {
  background: #fee2e2;
  color: #b91c1c;
}

.article-tag.security {
  background: #fae8ff;
  color: #a21caf;
}

.article-tag.community {
  background: #fef9c3;
  color: #854d0e;
}

.article-tag.news {
  background: #e0e7ff;
  color: #4338ca;
}

.article-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-main);
  line-height: 1.4;
}

.article-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1;
  /* Pushes button down if needed */
}

.read-more {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.read-more:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.bg-secondary {
  background: var(--bg-secondary);
}