/* Reset & Base */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; color: #1a1a1a; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

:root {
  --bg-primary: #667eea;
  --bg-secondary: #764ba2;
  --card: #ffffff;
  --card-hover: #f8fafc;
  --text-primary: #1a1a1a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --success: #10b981;
  --border: #e2e8f0;
  --shadow: rgba(0, 0, 0, 0.1);
  --shadow-lg: rgba(0, 0, 0, 0.15);
  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 24px;
}

.container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 20px; }
.header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); box-shadow: 0 1px 3px var(--shadow); }
.header-content { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-img { width: 40px; height: 40px; }
.logo-text { font-weight: 800; font-size: 24px; color: var(--primary); letter-spacing: -0.5px; }

.main-nav .nav-list { list-style: none; padding: 0; margin: 0; display: flex; gap: 24px; }
.main-nav a { color: var(--text-secondary); font-weight: 600; padding: 8px 16px; border-radius: var(--radius-sm); transition: all 0.2s ease; }
.main-nav a:hover { color: var(--primary); background: rgba(59, 130, 246, 0.1); }

.header-actions { display: flex; align-items: center; gap: 16px; }
.search-container { display: flex; align-items: center; background: white; border: 2px solid var(--border); border-radius: 50px; padding: 4px; box-shadow: 0 2px 8px var(--shadow); transition: all 0.2s ease; }
.search-container:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.search-input { background: transparent; border: none; outline: none; color: var(--text-primary); padding: 8px 16px; width: 200px; font-size: 14px; }
.search-btn { background: var(--primary); border: none; border-radius: 50px; padding: 8px 12px; cursor: pointer; color: white; transition: background 0.2s ease; }
.search-btn:hover { background: var(--primary-hover); }

.filter-container { margin-left: 16px; }
.category-filter { background: white; border: 2px solid var(--border); border-radius: 50px; padding: 8px 16px; font-size: 14px; color: var(--text-primary); cursor: pointer; transition: all 0.2s ease; outline: none; min-width: 150px; }
.category-filter:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.category-filter:hover { border-color: var(--primary); }

.language-selector select { background: white; color: var(--text-primary); border: 2px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; font-weight: 500; cursor: pointer; transition: border-color 0.2s ease; }
.language-selector select:focus { outline: none; border-color: var(--primary); }

/* Mobile Menu Styles */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s ease;
}

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

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 80px 20px 20px;
    overflow-y: auto;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu-content {
    max-width: 400px;
    margin: 0 auto;
}

.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s ease;
}

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

.mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0 0 40px;
}

.mobile-nav-links li {
    margin: 0;
}

.mobile-nav-links a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 16px 0;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: color 0.2s ease;
}

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

.mobile-search {
    margin-bottom: 30px;
}

.mobile-search input {
    width: 100%;
    padding: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    backdrop-filter: blur(10px);
}

.mobile-search input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

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

.mobile-categories {
    margin-bottom: 30px;
}

.mobile-categories h3 {
    color: white;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px;
}

.mobile-category-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.mobile-category-links a {
    display: block;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    padding: 16px 12px;
    border-radius: var(--radius);
    text-align: center;
    font-weight: 600;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.mobile-category-links a:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.mobile-language-selector {
    text-align: center;
}

.mobile-language-selector select {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(10px);
    min-width: 150px;
}

.mobile-language-selector select:focus {
    outline: none;
    border-color: var(--primary);
}

.mobile-language-selector option {
    background: var(--bg);
    color: var(--text-primary);
}

.ad-banner-top { width: 100%; padding: 16px 0; background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); }

.hero { background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); padding: 60px 0 40px; margin: 20px 0; border-radius: var(--radius-lg); }
.hero-title { color: white; font-size: 48px; font-weight: 900; margin: 0 0 16px; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }
.hero-description { color: rgba(255, 255, 255, 0.9); margin: 0 0 24px; max-width: 600px; font-size: 18px; line-height: 1.6; }
.hero-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.stat { color: white; background: rgba(255, 255, 255, 0.2); padding: 12px 20px; border-radius: 50px; border: 1px solid rgba(255, 255, 255, 0.3); font-weight: 700; font-size: 16px; backdrop-filter: blur(10px); }

.section-title { color: white; font-size: 32px; margin: 40px 0 24px; font-weight: 900; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }

.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.game-card { background: var(--card); border-radius: var(--radius); overflow: hidden; border: none; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 4px 12px var(--shadow); display: flex; flex-direction: column; height: 100%; }
.game-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 20px 40px var(--shadow-lg); }
.game-thumbnail { position: relative; aspect-ratio: 4/3; background: linear-gradient(135deg, #f1f5f9, #e2e8f0); overflow: hidden; }
.game-thumbnail img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform 0.3s ease; }
.game-card:hover .game-thumbnail img { transform: scale(1.05); }
.play-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,0.6)); opacity: 0; transition: opacity 0.3s ease; }
.game-card:hover .play-overlay { opacity: 1; }
.play-button { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: white; font-weight: 900; box-shadow: 0 6px 24px rgba(59, 130, 246, 0.4); transition: all 0.2s ease; }
.play-button:hover { transform: scale(1.1); background: var(--primary-hover); }
.game-info { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.game-content { flex: 1; }
.game-title { color: var(--text-primary); margin: 0 0 6px; font-size: 17px; font-weight: 700; line-height: 1.3; }
.game-description { color: var(--text-secondary); margin: 0; font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.game-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.game-category { background: var(--primary); color: white; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.game-rating { color: var(--accent); font-weight: 600; font-size: 14px; }

.coming-soon .placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--text-secondary); background: linear-gradient(135deg, var(--card), rgba(255, 255, 255, 0.05)); aspect-ratio: 16/9; border-radius: var(--radius); }

.categories-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.category-card { background: var(--card); border-radius: var(--radius-lg); padding: 24px; border: none; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 4px 12px var(--shadow); }
.category-card:hover { transform: translateY(-6px); box-shadow: 0 16px 32px var(--shadow-lg); }
.category-icon { width: 56px; height: 56px; border-radius: var(--radius); display: grid; place-items: center; margin: 0 0 16px; font-size: 28px; background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; }
.category-card h3 { color: var(--text-primary); margin: 0 0 8px; font-size: 20px; font-weight: 700; }
.category-card p { color: var(--text-secondary); margin: 0; font-size: 14px; }

.sidebar-ad { background: linear-gradient(135deg, var(--card), rgba(255, 255, 255, 0.1)); border-radius: var(--radius-lg); padding: 24px; border: none; text-align: center; box-shadow: 0 4px 12px var(--shadow); margin: 20px 0; }
.desktop-only { display: none; }

/* No Results Message */
.no-results-message {
    display: none;
    text-align: center;
    padding: 60px 20px;
    margin: 40px 0;
}

.no-results-content {
    max-width: 400px;
    margin: 0 auto;
}

.no-results-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.6;
}

.no-results-message h3 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 600;
}

.no-results-message p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.5;
}

.footer { background: linear-gradient(135deg, var(--card), rgba(255, 255, 255, 0.05)); border-top: none; padding: 40px 0; margin-top: 60px; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 32px; padding: 16px 0; }
.footer-section h4 { color: var(--text-primary); margin: 0 0 16px; font-size: 18px; font-weight: 700; }
.footer-section p, .footer-section ul { color: var(--text-secondary); margin: 0; padding: 0; list-style: none; }
.footer-section li { margin: 12px 0; }
.footer-section a { color: var(--text-secondary); text-decoration: none; transition: color 0.2s ease; }
.footer-section a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding: 24px 0; margin-top: 32px; text-align: center; color: var(--text-secondary); }

/* Game Page Styles */
.game-hero { background: linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(245, 158, 11, 0.05)); padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.game-hero-content { max-width: 800px; }
.game-title { color: white; font-size: 32px; font-weight: 900; margin: 0 0 8px; }
.game-description { color: var(--muted); margin: 0 0 12px; }
.game-container { padding: 20px 0; }
.game-wrapper { display: flex; gap: 20px; max-width: 1000px; margin: 0 auto; }
.game-area { flex: 1; min-width: 0; }

/* Game HUD */
.game-hud { 
  display: flex; 
  align-items: center; 
  gap: 10px; 
  justify-content: space-between; 
  margin-bottom: 12px; 
  padding: 8px; 
  background: rgba(255,255,255,0.04); 
  border-radius: 10px; 
  border: 1px solid rgba(255,255,255,0.08);
  flex-wrap: wrap;
}
.hud-item { color: white; font-weight: 600; }
.hud-button {
  background: var(--primary);
  color: #0b1220;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}

/* Game Canvas */
.game-canvas-container { 
  position: relative; 
  background: #0b1220; 
  border-radius: 12px; 
  border: 1px solid rgba(255,255,255,0.08); 
  overflow: hidden;
  max-width: 100%;
}
.game-canvas-container canvas {
  display: block;
  max-width: 100%;
  height: auto;
}
.game-instructions {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  max-width: 200px;
}
.game-instructions p { margin: 4px 0; }

/* Game Over Screen */
.game-over-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  display: none;
}
.game-over-content {
  background: var(--card);
  padding: 24px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.06);
  text-align: center;
  max-width: 90%;
  width: 400px;
}
.game-over-content h2 { color: white; margin: 0 0 16px; }
.game-over-content p { color: var(--muted); margin: 8px 0; }
.game-button {
  background: var(--primary);
  color: #0b1220;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  margin: 8px 4px;
  font-size: 16px;
}
.game-button.secondary {
  background: rgba(255,255,255,0.1);
  color: white;
}

/* Game Sidebar */
.game-sidebar { width: 300px; flex-shrink: 0; }

/* Language Toggle Button */
.lang-toggle {
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}
.lang-toggle:hover {
  background: rgba(255,255,255,0.2);
}

/* Responsive Mobile Improvements */
@media (max-width: 767px) {
  /* Header Mobile */
  .header-content { padding: 8px 0; }
  .logo { gap: 8px; }
  .logo-img { width: 32px; height: 32px; }
  .logo-text { font-size: 18px; }
  .header-actions { gap: 8px; flex-wrap: wrap; }
  .search-container { flex: 1; max-width: 200px; }
  .search-input { width: 100%; font-size: 16px; }
  .filter-container { margin-left: 8px; flex: 1; max-width: 140px; }
  .category-filter { width: 100%; min-width: auto; font-size: 14px; padding: 10px 12px; }
  
  /* Navigation Mobile */
  .nav { display: none; }
  .mobile-menu-btn { display: block; }
  .nav.mobile-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 16px;
    gap: 12px;
  }
  
  /* Hero Mobile */
  .hero { padding: 24px 0 12px; }
  .hero-title { font-size: 24px; }
  .hero-stats { gap: 8px; }
  .stat { font-size: 14px; padding: 4px 8px; }
  
  /* Game Page Mobile */
  .game-hero { padding: 16px 0; }
  .game-title { font-size: 24px; }
  .game-container { padding: 16px 0; }
  .game-wrapper { flex-direction: column; gap: 16px; }
  .game-sidebar { width: 100%; order: 2; }
  
  /* Game HUD Mobile */
  .game-hud { 
    flex-direction: row; 
    gap: 8px; 
    padding: 6px; 
    font-size: 14px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .game-hud::-webkit-scrollbar { display: none; }
  .hud-item { 
    white-space: nowrap; 
    flex-shrink: 0;
    font-size: 13px;
  }
  .hud-button { 
    padding: 4px 8px; 
    font-size: 13px; 
    flex-shrink: 0;
  }
  
  /* Canvas Mobile */
  .game-canvas-container { 
    margin: 0 -16px; 
    border-radius: 0; 
    border-left: none; 
    border-right: none; 
  }
  .game-canvas-container canvas {
    width: 100% !important;
    height: auto !important;
    max-height: 60vh;
  }
  .game-instructions {
    position: static;
    background: rgba(0,0,0,0.9);
    margin: 8px;
    border-radius: 8px;
    font-size: 13px;
    max-width: none;
  }
  
  /* Game Over Mobile */
  .game-over-content { 
    margin: 16px; 
    padding: 20px; 
    max-width: calc(100% - 32px);
  }
  .game-button { 
    display: block; 
    width: 100%; 
    margin: 8px 0; 
    font-size: 14px; 
    padding: 10px;
  }
  
  /* Touch Improvements */
  .game-card, .hud-button, .game-button, .lang-toggle {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .hud-button, .lang-toggle { min-height: 36px; }
}

@media (min-width: 768px) {
  .desktop-only { display: block; }
  .games-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .footer-content { grid-template-columns: repeat(3, 1fr); }
  .hero-title { font-size: 56px; }
  .section-title { font-size: 36px; }
}

@media (min-width: 1024px) {
  .container { max-width: 1200px; }
  .games-grid { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .categories-grid { grid-template-columns: repeat(4, 1fr); }
  .desktop-only { display: block; }
  .game-wrapper { gap: 24px; }
  .hero-title { font-size: 64px; }
  .section-title { font-size: 40px; }
}

@media (min-width: 1280px) {
  .games-grid { grid-template-columns: repeat(4, 1fr); }
  .categories-grid { grid-template-columns: repeat(6, 1fr); }
  .hero { padding: 80px 0 60px; }
}

/* Touch and Accessibility */
@media (hover: none) and (pointer: coarse) {
  .game-card:hover { transform: none; box-shadow: none; }
  .game-card:active { transform: translateY(-1px); }
  .play-overlay { opacity: 1; }
}

/* Safe area support for iOS notch */
.header { padding-top: constant(safe-area-inset-top); padding-top: env(safe-area-inset-top); }

/* Fullscreen overlay height fix on mobile browsers */
.game-over-screen { height: 100dvh; }

/* Prevent game content from being hidden on small screens */
.game-over-content { max-height: 80dvh; overflow: auto; }

/* Improve touch handling within canvas */
@media (max-width: 767px) {
  .game-area { overscroll-behavior: contain; }
  .game-canvas-container canvas { touch-action: none; }
  body, .game-button, .hud-button, .lang-toggle { -webkit-tap-highlight-color: transparent; }
}

/* Ads: responsive visibility helpers */
.mobile-only { display: block; }
@media (min-width: 768px) {
  .mobile-only { display: none; }
}
/* Ads: placeholders to reduce CLS and ensure visible area before init */
.ad-banner-top .adsbygoogle,
.ad-container .adsbygoogle {
  display: block;
  width: 100%;
  min-height: 90px; /* mobile baseline */
}

@media (min-width: 768px) {
  .ad-banner-top .adsbygoogle {
    min-height: 120px; /* desktop/top banner baseline */
  }
}

.sidebar-ad .adsbygoogle {
  display: block;
  width: 100%;
  min-height: 250px; /* sidebar baseline, typical 300x250 */
}

/* Guides Page Styles */
.guides-section {
  padding: 40px 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  margin: 20px 0;
  border-radius: var(--radius-lg);
}

.guides-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

.guide-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: 0 4px 20px var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.guide-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px var(--shadow-lg);
}

.guide-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border);
}

.guide-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.difficulty {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

.guide-content h3 {
  color: var(--primary);
  font-size: 18px;
  font-weight: 600;
  margin: 20px 0 10px 0;
}

.guide-content ul {
  margin: 0 0 20px 0;
  padding-left: 20px;
}

.guide-content li {
  margin-bottom: 8px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.guide-content li strong {
  color: var(--text-primary);
  font-weight: 600;
}

.pro-tip {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(16, 185, 129, 0.1));
  border-left: 4px solid var(--primary);
  padding: 15px 20px;
  margin-top: 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-primary);
}

.pro-tip strong {
  color: var(--primary);
  font-weight: 700;
}

.general-tips {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(239, 68, 68, 0.1));
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-top: 40px;
}

.tips-container h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.tip-card {
  background: var(--card);
  padding: 25px;
  border-radius: var(--radius);
  box-shadow: 0 4px 15px var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.tip-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px var(--shadow-lg);
}

.tip-card h3 {
  margin: 0 0 15px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
  .guides-section {
    margin: 10px;
    padding: 20px 0;
    border-radius: var(--radius);
  }
  
  .guide-card {
    padding: 20px;
    margin: 0 10px;
  }
  
  .guide-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .guide-header h2 {
    font-size: 20px;
  }
  
  .general-tips {
    margin: 10px;
    padding: 20px;
    border-radius: var(--radius);
  }
  
  .tips-container h2 {
    font-size: 24px;
  }
  
  .tips-grid {
    grid-template-columns: 1fr;
  }
  
  .tip-card {
    padding: 20px;
  }
}

@media (min-width: 768px) {
  .guides-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
   .guides-grid {
     grid-template-columns: repeat(3, 1fr);
   }
 }

/* Leaderboard Page Styles */
.leaderboard-section {
  padding: 40px 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  margin: 20px 0;
  border-radius: var(--radius-lg);
}

.game-selector {
  margin-bottom: 40px;
  text-align: center;
}

.game-selector h2 {
  margin-bottom: 20px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.game-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}

.game-tab {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 25px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}

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

.game-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.leaderboard-container {
  margin-bottom: 40px;
}

.leaderboard-content {
  display: none;
}

.leaderboard-content.active {
  display: block;
}

.leaderboard-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(16, 185, 129, 0.1));
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.leaderboard-header h3 {
  margin: 0 0 15px 0;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

.stats-summary {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.stat-item {
  color: var(--text-secondary);
  font-size: 14px;
}

.stat-item strong {
  color: var(--primary);
  font-weight: 700;
}

.leaderboard-table {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
  border: 1px solid var(--border);
}

.table-header {
  display: grid;
  grid-template-columns: 80px 1fr 100px 120px 100px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  font-weight: 600;
  padding: 15px 20px;
  font-size: 14px;
}

.table-body {
  max-height: 600px;
  overflow-y: auto;
}

.table-row {
  display: grid;
  grid-template-columns: 80px 1fr 100px 120px 100px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  transition: all 0.2s ease;
  align-items: center;
}

.table-row:hover {
  background: var(--card-hover);
}

.table-row.champion {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 193, 7, 0.1));
  border-left: 4px solid #ffd700;
}

.rank-col {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.rank-badge {
  font-size: 18px;
}

.rank-number {
  font-size: 16px;
  color: var(--text-primary);
}

.player-col {
  display: flex;
  align-items: center;
}

.player-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.player-country {
  font-size: 16px;
}

.score-col {
  font-weight: 700;
  font-size: 16px;
  color: var(--primary);
}

.date-col {
  color: var(--text-secondary);
  font-size: 14px;
}

.level-col {
  background: var(--accent);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.coming-soon {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.coming-soon h4 {
  margin: 0 0 15px 0;
  font-size: 24px;
  color: var(--text-primary);
}

.coming-soon p {
  margin: 0;
  font-size: 16px;
}

.submit-score-section {
  background: var(--card);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: 0 4px 20px var(--shadow);
  border: 1px solid var(--border);
  text-align: center;
}

.submit-score-section h3 {
  margin: 0 0 15px 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.submit-score-section p {
  margin: 0 0 25px 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.score-form {
  max-width: 500px;
  margin: 0 auto;
  text-align: left;
}

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

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  background: white;
  transition: all 0.2s ease;
  outline: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group small {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 12px;
}

.submit-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  border: none;
  border-radius: 25px;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  width: 100%;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

/* Mobile Responsive for Leaderboard */
@media (max-width: 768px) {
  .leaderboard-section {
    margin: 10px;
    padding: 20px 0;
    border-radius: var(--radius);
  }
  
  .game-tabs {
    gap: 8px;
  }
  
  .game-tab {
    padding: 10px 15px;
    font-size: 12px;
  }
  
  .leaderboard-header {
    padding: 15px;
  }
  
  .leaderboard-header h3 {
    font-size: 22px;
  }
  
  .stats-summary {
    flex-direction: column;
    gap: 10px;
  }
  
  .table-header,
  .table-row {
    grid-template-columns: 60px 1fr 80px;
    padding: 12px 15px;
  }
  
  .date-col,
  .level-col {
    display: none;
  }
  
  .submit-score-section {
    margin: 0 10px;
    padding: 20px;
  }
  
  .submit-score-section h3 {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .game-tabs {
    flex-direction: column;
    align-items: center;
  }
  
  .game-tab {
    width: 200px;
  }
  
  .table-header,
  .table-row {
    grid-template-columns: 50px 1fr 70px;
    padding: 10px;
  }
  
  .player-name {
    font-size: 14px;
  }
  
  .score-col {
    font-size: 14px;
  }
}