/* ========== FONTS ========== */
@import url('https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&display=swap');

/* ========== BASE ========== */
:root {
  --primary: #6366f1;
  --primary-dark: #292476;
  --primary-light: #858ff7;
  --secondary: #9ed768;
  --background: #000a38;
  --background-bg: #292230;
  --card-bg: #1e1b4b;
  --sidebar-bg: #0f0b2f;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --border: #4a4a7a;
  --hover: #6366f1;
  --accent: #fbbf24;
  --success: #9ed768;
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --gradient-secondary: linear-gradient(135deg, #9ed768 0%, #84cc16 100%);
  --gradient-gold: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  --gradient-cosmic: linear-gradient(135deg, #1e1b4b 0%, #292230 50%, #000a38 100%);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.6);
  --shadow-cosmic: 0 0 30px rgba(99, 102, 241, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: 'Figtree', system-ui, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

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

img {
  max-width: 100%;
  display: block;
  border-radius: 0.75rem;
}

/* ========== PRELOADER ========== */
.preloader {
  position: fixed;
  overflow: hidden;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--background);
  direction: ltr;
}

.preloader__container {
  width: 320px;
}

@media screen and (min-width: 768px) {
  .preloader__container {
    width: 400px;
  }
}

.preloader__image {
  max-width: 100%;
  max-height: 100%;
}

/* ========== SIDEBAR ========== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: var(--gradient-cosmic);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 1000;
  border-right: 1px solid var(--border);
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-cosmic);
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-md);
}

.logo .chip {
  color: var(--accent);
}

.logo img {
  max-width: 140px;
  height: auto;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.menu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
  border: 1px solid transparent;
}

.menu a:hover {
  background: rgba(99, 102, 241, 0.15);
  color: var(--text);
  transform: translateX(4px);
  border-color: rgba(99, 102, 241, 0.3);
}

.menu a.active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.menu a.active::before {
  content: '';
  position: absolute;
  left: -1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: var(--accent);
  border-radius: 2px;
}

.icon {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

/* Sidebar Bottom Section */
.sidebar-bottom {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

/* Language Switcher */
.language-switcher {
  position: relative;
  display: inline-block;
}

.lang-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--background-bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  color: var(--text);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s ease;
  height: 40px;
  padding: 0 0.75rem;
}

.lang-current:hover {
  background: var(--hover);
  color: white;
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.flag-icon {
  width: 16px;
  height: 12px;
  border-radius: 2px;
  object-fit: cover;
  margin-right: 6px;
}

.dropdown-arrow {
  font-size: 8px;
  transition: transform 0.3s ease;
  margin-left: 6px;
}

/* Dropdown menu */
.lang-dropdown {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 1001;
  margin-bottom: 5px;
}

.language-switcher.active .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.language-switcher.active .dropdown-arrow {
  transform: rotate(180deg);
}

.lang-option {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  color: var(--text);
  text-decoration: none;
  transition: background 0.2s;
  font-size: 0.8rem;
}

.lang-option:hover {
  background: var(--hover);
  color: white;
}

.lang-option .flag-icon {
  margin-right: 8px;
}

/* Support Button */
.support-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-secondary);
  border-radius: 0.75rem;
  color: white;
  text-decoration: none;
  transition: all 0.2s ease;
  height: 40px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.support-btn:hover {
  background: var(--gradient-gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.support-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  margin-right: 4px;
  font-size: 10px;
  font-weight: bold;
}

/* Mobile sidebar behavior */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.sidebar-open {
    transform: translateX(0);
  }
  
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 10, 56, 0.9);
    backdrop-filter: blur(8px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
  }
}

/* ========== BURGER ========== */
.burger {
  display: none;
  background: var(--gradient-primary);
  color: white;
  border: none;
  font-size: 1.2rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.burger:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

@media (max-width: 1024px) {
  .burger {
    display: block;
  }
}

/* ========== HEADER / TOPBAR ========== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  height: 80px;
  position: relative;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.subnav-toggle {
  display: none !important;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Search Bar */
.search-container {
  position: relative;
  width: 400px;
}

.search-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 2rem;
  color: var(--text);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  background: var(--background-bg);
}

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

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Subnav */
.subnav {
  display: flex;
  margin-left: 260px;
  gap: 1rem;
}

@media (max-width: 1024px) {
  .subnav {
    margin-left: 0;
  }
  .search-container {
    width: 300px;
  }
}

.subnav a {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 0.9rem;
  border: 1px solid transparent;
}

.subnav a:hover,
.subnav a:focus {
  background: var(--hover);
  color: white;
  transform: translateY(-2px);
  border-color: var(--primary-light);
}

/* Topbar Right */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar-right .btn {
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  border: 1px solid transparent;
}

.topbar-right .btn-register {
  background: var(--gradient-secondary);
  color: white;
}

.topbar-right .btn-register:hover {
  background: var(--gradient-gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.topbar-right .btn-login {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.topbar-right .btn-login:hover {
  background: rgba(99, 102, 241, 0.1);
  transform: translateY(-2px);
  border-color: var(--primary-light);
}

/* Responsive Topbar */
@media (max-width: 1024px) {
  .topbar {
    padding: 1rem;
    gap: 1rem;
  }
  
  .subnav {
    display: none;
  }
  
  .burger {
    display: block;
    order: 0;
  }
  
  .topbar-right .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {
  .topbar {
    padding: 0.75rem;
  }
  
  .search-container {
    width: 250px;
  }
  
  .subnav-toggle {
    display: none !important;
    order: 1;
  }
  
  .subnav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    flex-direction: column;
    padding: 1rem;
    border-top: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  
  .subnav.active {
    display: flex;
  }
  
  .subnav a {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
  }
  
  .subnav a:last-child {
    border-bottom: none;
  }
  
  .topbar-right .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
}

/* ========== MAIN ========== */
.main {
  padding: 2rem;
  margin-top: 80px;
  margin-left: 280px;
  width: calc(100% - 280px);
  box-sizing: border-box;
  min-height: calc(100vh - 80px);
  background: var(--background);
}

@media (max-width: 1024px) {
  .main {
    margin-left: 0;
    width: 100%; 
    padding: 1.5rem 1rem;
  }
}

/* ========== HERO ========== */
.hero-section {
  position: relative;
  padding: 4rem 2rem;
  background: var(--gradient-cosmic);
  border-radius: 1.5rem;
  margin-bottom: 3rem;
  overflow: hidden;
  box-shadow: var(--shadow-cosmic);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 20%, rgba(99, 102, 241, 0.3) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(158, 215, 104, 0.2) 0%, transparent 50%),
              url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="stars" x="0" y="0" width="25" height="25" patternUnits="userSpaceOnUse"><circle cx="2" cy="5" r="0.8" fill="rgba(255,255,255,0.4)"/><circle cx="15" cy="12" r="0.6" fill="rgba(251,191,36,0.6)"/><circle cx="22" cy="3" r="0.4" fill="rgba(99,102,241,0.5)"/></pattern></defs><rect width="100" height="100" fill="url(%23stars)"/></svg>');
  opacity: 0.7;
}

.hero-content {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  z-index: 2;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 900;
  margin-bottom: 1rem;
  color: white;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    text-shadow: 1 4px 8px rgba(0, 0, 0, 0.5);
      text-shadow: 1 4px 8px rgba(0, 0, 0, 0.5);
        text-shadow: 1 4px 8px rgba(0, 0, 0, 0.5);

  line-height: 1.1;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--gradient-secondary);
  color: white;
  border-radius: 2rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
  border: 2px solid transparent;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.hero-btn:hover {
  background: var(--gradient-gold);
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(251, 191, 36, 0.4);
}

@media (max-width: 600px) {
  .hero-section { 
    padding: 3rem 1.5rem; 
    margin-bottom: 2rem;
  }
  .hero-title { font-size: 2.5rem; }
  .hero-subtitle { font-size: 1rem; }
}

/* ========== GAME NAVIGATION ========== */
.game-nav {
  margin-bottom: 2rem;
}

.game-nav-container {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 1rem;
  background: var(--card-bg);
  border-radius: 1rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.game-nav-tab {
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 2rem;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.game-nav-tab:hover,
.game-nav-tab.active {
  background: var(--gradient-primary);
  color: white;
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ========== GAME SECTIONS ========== */
.game-section {
  margin-bottom: 3rem;
}

.game-section.hidden {
  display: none;
}

.game-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.game-section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.game-section-title::before {
  content: '';
  width: 4px;
  height: 2rem;
  background: var(--gradient-primary);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.game-section-controls {
  display: flex;
  gap: 0.5rem;
}

.game-nav-prev,
.game-nav-next {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--card-bg);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.game-nav-prev:hover,
.game-nav-next:hover {
  background: var(--gradient-primary);
  border-color: var(--primary-light);
  transform: scale(1.1);
  color: white;
  box-shadow: var(--shadow-md);
}

/* ========== DESKTOP GRID ========== */
.games-grid.desktop-games {
  display: grid;
  gap: 1.5rem;
  padding: 0 1rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.game-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.3s ease;
  aspect-ratio: 3/4;
  box-shadow: var(--shadow-sm);
}

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

.game-image-wrapper {
  position: relative;
  width: 100%;
  height: 70%;
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--background);
  box-shadow: var(--shadow-sm);
}

.game-image {
  border-radius: 0.75rem;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.game-actions {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 10, 56, 0.95);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  gap: 0.75rem;
}

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

.game-actions a {
  padding: 0.75rem 1.25rem;
  border-radius: 2rem;
  background: var(--gradient-secondary);
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  min-width: 100px;
  box-shadow: var(--shadow-md);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.game-actions a:hover {
  background: var(--gradient-gold);
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.btn-play-single {
  width: 90%;
  max-width: 140px;
}

/* Game badges */
.jackpot-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--gradient-gold);
  color: var(--primary-dark);
  padding: 0.375rem 0.625rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  box-shadow: var(--shadow-md);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.exclusive-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  padding: 0.375rem 0.625rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: var(--shadow-md);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.game-title {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--text);
  text-align: center;
  font-weight: 600;
  height: 20%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ========== MOBILE CAROUSEL ========== */
.games-carousel.mobile-games {
  display: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 1rem;
  padding: 1.5rem 1rem;
}

.games-carousel.mobile-games::-webkit-scrollbar {
  display: none;
}

.games-carousel .game-card {
  flex: 0 0 auto;
  width: 65%;
  max-width: 220px;
  scroll-snap-align: start;
  aspect-ratio: 3/4;
}

/* ========== RESPONSIVE BEHAVIOR ========== */
@media (max-width: 768px) {
  .games-grid.desktop-games {
    display: none !important;
  }
  
  .games-carousel.mobile-games {
    display: flex !important;
  }
  
  .game-section-header {
    padding: 0 1rem;
  }
  
  .game-section-title {
    font-size: 1.5rem;
  }
  
  .game-nav-container {
    padding: 0.75rem;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 1rem;
  }
  
  .game-nav-container::-webkit-scrollbar {
    display: none;
  }
  
  .game-nav-tab {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }
}

@media (min-width: 769px) {
  .games-carousel.mobile-games {
    display: none !important;
  }
  
  .games-grid.desktop-games {
    display: grid !important;
  }
}

/* ========== PROSE ========== */
.prose {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-top: 3rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin: 1.5em 0 0.75em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.prose p {
  margin-bottom: 1.5em;
}

.prose a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.prose a:hover {
  color: var(--primary-light);
}

/* ========== BONUS TILES ========== */
.bonus-tiles {
  display: grid;
  gap: 2rem;
  margin: 3rem 0;
  padding: 0 1rem;
  grid-auto-rows: 1fr;
}

@media (max-width: 768px) {
  .bonus-tiles { 
    grid-template-columns: 1fr; 
    padding: 0 1rem; 
    gap: 1.5rem;
  }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .bonus-tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1025px) {
  .bonus-tiles { grid-template-columns: repeat(3, 1fr); }
}

.bonus-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 2rem;
  border-radius: 1.5rem;
  color: var(--text);
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
}

.bonus-tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bonus-tile:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-cosmic);
  border-color: var(--primary-light);
}

.bonus-tile:hover::before {
  opacity: 1;
}

.bonus-tile .image-wrapper {
  height: 200px;
  margin-bottom: 1.5rem;
  overflow: hidden;
  border-radius: 1rem;
  position: relative;
  background: var(--background);
  box-shadow: var(--shadow-sm);
}

.bonus-tile .image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.bonus-tile:hover .image-wrapper img {
  transform: scale(1.05);
}

.bonus-tile h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.bonus-tile p {
  margin-bottom: 2rem;
  flex-grow: 1;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.bonus-tile a {
  display: inline-block;
  background: var(--gradient-secondary);
  color: white;
  font-weight: 700;
  padding: 0.875rem 1.5rem;
  border-radius: 2rem;
  text-decoration: none;
  transition: all 0.3s ease;
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 2px solid transparent;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.bonus-tile a:hover {
  background: var(--gradient-gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ========== TABLE OF CONTENTS ========== */
#TableOfContents {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 2rem;
  border-radius: 1.5rem;
  font-size: 1rem;
  margin: 2.5rem 0;
  color: var(--text);
  box-shadow: var(--shadow-md);
}

#TableOfContents ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

#TableOfContents li {
  margin-bottom: 0.75rem;
}

#TableOfContents a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border-left: 3px solid transparent;
}

#TableOfContents a:hover {
  color: var(--text);
  background: rgba(99, 102, 241, 0.1);
  border-left-color: var(--primary);
  transform: translateX(4px);
}

/* ========== TABLE STYLES ========== */
.table-container {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  margin: 2.5rem 0;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  color: var(--text);
  background: transparent;
}

thead {
  background: var(--gradient-primary);
}

th {
  padding: 1.5rem 1.25rem;
  text-align: left;
  font-weight: 700;
  color: white;
  border-bottom: none;
  position: relative;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

th::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

td {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}

tbody tr:hover {
  background: rgba(99, 102, 241, 0.05);
}

tbody tr:last-child td {
  border-bottom: none;
}

table a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

table a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

/* ========== MOBILE TABLE ADAPTATION ========== */
@media (max-width: 768px) {
  .table-container {
    margin: 1.5rem -1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  
  table {
    font-size: 0.85rem;
  }
  
  th, td {
    padding: 1rem 0.75rem;
  }
  
  th:first-child,
  td:first-child {
    position: sticky;
    left: 0;
    background: var(--card-bg);
    z-index: 1;
  }
  
  thead th:first-child {
    background: var(--primary);
  }
}

/* ========== FAQ BLOCK ========== */
.faq-block {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 3rem 2rem;
  margin: 4rem 0;
  border-radius: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.faq-heading {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 3rem;
  text-align: center;
  position: relative;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.faq-heading::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.faq-item {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 1.5rem;
  color: var(--text);
  font-size: 1rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.faq-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-primary);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.faq-item h3 {
  font-size: 1.4rem;
  color: var(--text);
  margin-bottom: 1.25rem;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.faq-item div {
  line-height: 1.7;
  color: var(--text-muted);
}

.faq-item:hover {
  background: rgba(99, 102, 241, 0.05);
  transform: translateY(-4px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-lg);
}

.faq-item:hover::before {
  transform: scaleY(1);
}

@media (max-width: 768px) {
  .faq-block {
    padding: 2rem 1.5rem;
    margin: 3rem 0;
  }
  
  .faq-heading {
    font-size: 2rem;
  }
  
  .faq-item {
    padding: 1.5rem;
  }
  
  .faq-item h3 {
    font-size: 1.25rem;
  }
}

/* ========== TOP NAVIGATION (MOBILE ONLY) ========== */
.topnav {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0.75rem;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 1025px) {
  .topnav {
    display: none;
  }
}

.topnav-visible {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  justify-content: space-between;
  overflow-x: auto;
  scrollbar-width: none;
}

.topnav-visible::-webkit-scrollbar {
  display: none;
}

.topnav-visible a {
  flex: 1 1 20%;
  min-width: 70px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 1rem;
  color: var(--text-muted);
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.875rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.topnav-visible a:hover,
.topnav-visible a.active {
  background: var(--gradient-primary);
  color: white;
  transform: translateY(-2px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.topnav-visible a i {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.mobile-logo {
  display: none;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin: 1.5rem 0;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.mobile-logo .chip {
  color: var(--accent);
}

@media (max-width: 1024px) {
  .mobile-logo {
    display: block !important;
    text-align: center;
    margin: 1.5rem 0;
  }
  .mobile-logo img {
    max-width: 140px !important;
    width: auto !important;
    height: auto !important;
    display: inline-block !important;
  }
}

/* ========== FOOTER STYLES ========== */
.footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  color: var(--text);
  margin-top: auto;
  box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.3);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-logo {
  height: 50px;
  width: auto;
}

.footer-title {
  font-size: 1.875rem;
  font-weight: 800;
  margin: 0;
  color: var(--text);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.footer-description {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
}

.footer-column h4 {
  color: var(--text);
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  position: relative;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.footer-column h4::after {
  content: '';
  position: absolute;
  bottom: -0.25rem;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column li {
  margin-bottom: 0.875rem;
}

.footer-column a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.2s ease;
  display: inline-block;
}

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

.footer-contact p {
  margin: 1rem 0;
  color: var(--text-muted);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-contact i {
  color: var(--primary);
  font-size: 1.2rem;
  width: 20px;
}

.footer-contact a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-contact a:hover {
  color: var(--text);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.footer-bottom-logo {
  height: 35px;
  width: auto;
}

.footer-copyright {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.footer-social a:hover {
  background: var(--gradient-primary);
  color: white;
  transform: translateY(-3px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.footer-text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Tablet Footer Styles */
@media (max-width: 1024px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
  
  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* Mobile Footer Styles */
@media (max-width: 768px) {
  .footer-container {
    padding: 2.5rem 1.5rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-brand {
    grid-column: 1;
    text-align: center;
    align-items: center;
  }
  
  .footer-column h4 {
    text-align: center;
  }
  
  .footer-column h4::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .footer-column ul {
    text-align: center;
  }
  
  .footer-contact {
    text-align: center;
  }
  
  .footer-contact p {
    justify-content: center;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }
  
  .footer-bottom-left {
    flex-direction: column;
    gap: 1rem;
  }
  
  .footer-social {
    justify-content: center;
    margin-top: 1rem;
  }
}

/* ========== LANGUAGE SWITCHER FUNCTIONALITY ========== */
.language-switcher {
  position: relative;
}

.lang-current.active + .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-current.active .dropdown-arrow {
  transform: rotate(180deg);
}

/* ========== UTILITY CLASSES ========== */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-effect {
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glow-effect {
  box-shadow: var(--shadow-cosmic);
}

.pulse-animation {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

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

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

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.bounce-in {
  animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ========== SCROLLBAR CUSTOMIZATION ========== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

/* Firefox Scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--background);
}

/* ========== LOADING STATES ========== */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.2), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* ========== ACCESSIBILITY ========== */
.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;
}

/* Focus styles for better accessibility */
*:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --background: #000000;
    --card-bg: #1a1a1a;
    --text: #ffffff;
    --border: #ffffff;
  }
}

/* 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;
  }
}

/* ========== PRINT STYLES ========== */
@media print {
  .sidebar,
  .topbar,
  .footer,
  .game-actions,
  .burger {
    display: none !important;
  }
  
  .main {
    margin-left: 0 !important;
    width: 100% !important;
  }
  
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
  }
}