/* ============================================
   Global Styles - Dark Mode Modern Design
   ============================================ */
:root {
  --primary-color: #6366f1;
  --primary-hover: #4f46e5;
  --bg-dark: #0f172a;
  --bg-darker: #0a0f1b;
  --bg-card: #1e293b;
  --bg-hover: #334155;
  --text-white: #ffffff;
  --text-light: #e2e8f0;
  --text-muted: #94a3b8;
  --border-color: #475569;
  --spacing-unit: 16px;
  --accent-tag: #3b82f6;
  --accent-tag-bg: rgba(59, 130, 246, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  font-size: 15px;
}

/* ============================================
   Layout
   ============================================ */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-unit);
}

/* ============================================
   Header
   ============================================ */


/* ======================
   Navigation Menu Spacing
   ====================== */
.nav {
  display: flex;
  align-items: center;
  gap: 24px; /* yahi main spacing control hai */
}

.nav-link {
  text-decoration: none;
  color: var(--text-light);
  font-size: 15px;
  font-weight: 500;
  padding: 6px 10px; /* click area better hoga */
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background-color: var(--bg-hover);
  color: var(--text-white);
}


.header {
  background-color: var(--bg-darker);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(var(--spacing-unit) * 1) 0;
}

.logo {
  font-family: "Poppins", sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-white);
  text-decoration: none;
  transition: color 0.2s;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-tag));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo:hover {
  opacity: 0.8;
}

.fullscreen-mode-btn {
  background-color: var(--primary-color);
  color: var(--text-white);
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
  font-family: inherit;
}

.fullscreen-mode-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

/* ============================================
   Main Content
   ============================================ */
main {
  min-height: calc(100vh - 200px);
  padding: calc(var(--spacing-unit) * 2) 0;
}

/* ============================================
   Section Title
   ============================================ */
.section-title {
  font-family: "Poppins", sans-serif;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing-unit) * 2);
  text-align: center;
  color: var(--text-white);
}

/* ============================================
   Games Section
   ============================================ */
.games-section {
  padding: calc(var(--spacing-unit) * 3) 0;
  border-bottom: 1px solid var(--border-color);
}

.games-section:last-of-type {
  border-bottom: none;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: calc(var(--spacing-unit) * 1.5);
}

.large-grid {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background-color: var(--bg-card);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-light);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.game-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
  transition: left 0.5s;
  pointer-events: none;
}

.game-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-color);
  box-shadow: 0 12px 24px rgba(99, 102, 241, 0.2);
  background-color: var(--bg-hover);
}

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

.game-thumbnail {
  font-size: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(59, 130, 246, 0.1));
  border-radius: 6px;
  transition: all 0.3s;
}

.game-card:hover .game-thumbnail {
  transform: scale(1.1);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(59, 130, 246, 0.2));
}

.game-card h3 {
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
}

.category-tag {
  font-size: 11px;
  font-weight: 600;
  background-color: var(--accent-tag-bg);
  color: var(--accent-tag);
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   Footer
   ============================================ */

/* === FIX FOOTER EXTRA GAP === */
.footer {
  padding: 16px 0 !important;
  margin-top: 0 !important;
}

.footer-content {
  margin-bottom: 8px !important;
}

.footer-bottom {
  padding-top: 8px !important;
  margin-top: 8px !important;
}



.footer {
  background-color: var(--bg-darker);
  color: var(--text-light);
  padding: calc(var(--spacing-unit) * 3) 0;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(var(--spacing-unit) * 2);
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.footer-left h3 {
  font-family: "Poppins", sans-serif;
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text-white);
}

.footer-left p {
  color: var(--text-muted);
  font-size: 14px;
}

.footer-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: flex-start;
}

.footer-right {
  display: flex;
  flex-direction: row;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
}


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

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: calc(var(--spacing-unit) * 1.5);
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================
   Removed modal styles - replaced with game page container styles
   ============================================ */

/* Game Page Container Styles */
.game-container {
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  background: #0a0a0f;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  position: relative;
  margin: 0 auto;
}

.game-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.game-controls {
  position: absolute;
  top: 15px;
  right: 15px;
  display: flex;
  gap: 10px;
  z-index: 100;
}

.game-controls button {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}

.game-controls button:hover {
  background: rgba(0, 0, 0, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
}

.game-controls .back-btn {
  background: rgba(79, 70, 229, 0.6);
}

.game-controls .back-btn:hover {
  background: rgba(79, 70, 229, 0.8);
}

.game-controls .fullscreen-btn {
  background: rgba(0, 0, 0, 0.6);
}

.game-controls .fullscreen-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
  .logo {
    font-size: 20px;
  }

  .section-title {
    font-size: 24px;
    margin-bottom: calc(var(--spacing-unit) * 1.5);
  }

  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: var(--spacing-unit);
  }

  .large-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }

  .game-card {
    padding: 12px;
    gap: 8px;
  }

  .game-thumbnail {
    font-size: 36px;
  }

  .game-card h3 {
    font-size: 12px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-unit);
  }

  .footer-right {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
  }

  .game-container {
    max-width: 100%;
  }

  .game-controls button {
    padding: 6px 10px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

  .logo {
    font-size: 18px;
  }

  .fullscreen-mode-btn {
    padding: 8px 12px;
    font-size: 12px;
  }

  .section-title {
    font-size: 20px;
  }

  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
  }

  .game-card {
    padding: 10px;
    gap: 6px;
  }

  .game-thumbnail {
    font-size: 28px;
  }

  .game-card h3 {
    font-size: 11px;
  }

  .category-tag {
    font-size: 9px;
    padding: 3px 6px;
  }
}
