@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap');

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #22223a;
  --accent-orange: #ff6b00;
  --accent-amber: #ffa500;
  --accent-red: #ff2d55;
  --accent-yellow: #ffd600;
  --text-primary: #f0f0f0;
  --text-secondary: #8888aa;
  --border-color: #2a2a40;
  --glow-orange: rgba(255, 107, 0, 0.4);
  --glow-red: rgba(255, 45, 85, 0.3);
  --radius: 12px;
  --radius-lg: 20px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── Animated Background ── */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(255, 107, 0, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(255, 45, 85, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(255, 214, 0, 0.05) 0%, transparent 50%);
  animation: bgDrift 20s ease-in-out infinite alternate;
  z-index: 0;
  pointer-events: none;
}

@keyframes bgDrift {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-3%, 2%) rotate(3deg); }
}

/* ── Tiger Stripes Decoration ── */
.stripes-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 40px,
    rgba(255, 107, 0, 0.015) 40px,
    rgba(255, 107, 0, 0.015) 42px
  );
  z-index: 0;
  pointer-events: none;
}

/* ── Header ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-color);
  padding: 0;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-red));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 20px var(--glow-orange);
}

.logo-icon::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
  0%, 100% { left: -100%; }
  50% { left: 100%; }
}

.logo-text {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  letter-spacing: 2px;
  color: var(--text-primary);
  text-transform: uppercase;
}

.logo-text span {
  color: var(--accent-orange);
}

/* ── Search Bar ── */
.search-container {
  flex: 1;
  max-width: 500px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1.25rem 0.75rem 3rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  outline: none;
}

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

.search-input:focus {
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px var(--glow-orange);
}

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

/* ── Nav Categories ── */
.nav-cats {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.nav-cat-btn {
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-cat-btn:hover,
.nav-cat-btn.active {
  background: var(--accent-orange);
  color: #fff;
  border-color: var(--accent-orange);
  box-shadow: 0 0 15px var(--glow-orange);
}

/* ── Member Button ── */
.header-right { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.member-btn { padding: 0.5rem 1.2rem; background: linear-gradient(135deg, #ffd600, #ff6b00); color: #000; border: none; border-radius: var(--radius); font-family: 'Bebas Neue', sans-serif; font-size: 1rem; text-decoration: none; cursor: pointer; transition: all 0.3s; box-shadow: 0 0 15px rgba(255,214,0,0.3); }
.member-btn:hover { box-shadow: 0 0 25px rgba(255,214,0,0.6); transform: scale(1.05); }

/* ── Hamburger Button (hidden by default, shown on mobile) ── */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 200;
  flex-shrink: 0;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ── Main ── */
.main {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

/* ── Hero Section ── */
.hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 3rem;
  min-height: 320px;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a0a00 0%, #2a1000 30%, #1a0000 60%, #0a0a1a 100%);
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 30px,
    rgba(255, 107, 0, 0.04) 30px,
    rgba(255, 107, 0, 0.04) 32px
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 3rem 4rem;
  max-width: 600px;
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: var(--accent-orange);
  color: #fff;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  animation: fadeSlideDown 0.6s ease-out;
}

.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.5rem;
  line-height: 1.1;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  animation: fadeSlideDown 0.6s ease-out 0.1s both;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  animation: fadeSlideDown 0.6s ease-out 0.2s both;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-red));
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  animation: fadeSlideDown 0.6s ease-out 0.3s both;
  box-shadow: 0 4px 20px var(--glow-orange);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--glow-orange);
}

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

/* ── Stats Bar ── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: var(--accent-orange);
  box-shadow: 0 0 20px var(--glow-orange);
  transform: translateY(-3px);
}

.stat-number {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  color: var(--accent-orange);
  line-height: 1;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* ── Section Titles ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title .icon {
  color: var(--accent-orange);
}

.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-orange), transparent);
  margin-left: 1rem;
  opacity: 0.5;
}

.view-all-btn {
  color: var(--accent-orange);
  background: none;
  border: 1px solid var(--accent-orange);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'DM Sans', sans-serif;
}

.view-all-btn:hover {
  background: var(--accent-orange);
  color: #fff;
}

/* ── Game Grid ── */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
}

.game-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--accent-orange);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px var(--glow-orange);
}

.game-thumb {
  width: 100%;
  height: 160px;
  position: relative;
  overflow: hidden;
}

.game-thumb-bg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  transition: transform 0.5s ease;
}

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

.game-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-hot {
  background: var(--accent-red);
  color: #fff;
}

.badge-new {
  background: var(--accent-yellow);
  color: #000;
}

.badge-pop {
  background: var(--accent-orange);
  color: #fff;
}

.game-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.play-btn {
  width: 60px;
  height: 60px;
  background: var(--accent-orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  box-shadow: 0 0 30px var(--glow-orange);
  transition: transform 0.3s ease;
}

.play-btn:hover {
  transform: scale(1.15);
}

.game-info {
  padding: 1rem 1.25rem;
}

.game-cat-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: rgba(255, 107, 0, 0.15);
  color: var(--accent-orange);
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.game-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.5px;
  margin-bottom: 0.35rem;
  line-height: 1.2;
}

.game-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.game-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

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

/* ── Featured Strip ── */
.featured-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.featured-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.4s ease;
  cursor: pointer;
  display: flex;
  min-height: 220px;
}

.featured-card:hover {
  border-color: var(--accent-amber);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  transform: translateY(-4px);
}

.featured-thumb {
  width: 220px;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  flex-shrink: 0;
}

.featured-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.featured-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-red));
  color: #fff;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
  width: fit-content;
}

.featured-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.featured-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.featured-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ── Live Now Section ── */
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.8rem;
  background: rgba(255, 45, 85, 0.15);
  border: 1px solid rgba(255, 45, 85, 0.3);
  border-radius: 50px;
  font-size: 0.75rem;
  color: var(--accent-red);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-red);
  border-radius: 50%;
  animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 45, 85, 0.7); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(255, 45, 85, 0); }
}

/* ── Categories Section ── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}

.cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--card-accent, var(--accent-orange));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.cat-card:hover::before {
  transform: scaleX(1);
}

.cat-card:hover {
  border-color: var(--card-accent, var(--accent-orange));
  transform: translateY(-3px);
}

.cat-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
}

.cat-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.15rem;
  letter-spacing: 1px;
  margin-bottom: 0.25rem;
}

.cat-count {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

/* ── Footer ── */
.footer {
  position: relative;
  z-index: 1;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 2rem 2rem;
  margin-top: 3rem;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand .logo-text {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 1rem;
}

.footer-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.social-link:hover {
  background: var(--accent-orange);
  color: #fff;
  border-color: var(--accent-orange);
}

.footer-col h4 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  color: var(--accent-orange);
}

.footer-col a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.35rem 0;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: var(--accent-orange);
}

.footer-bottom {
  max-width: 1400px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

/* ── No Results ── */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  grid-column: 1 / -1;
}

.no-results-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.no-results h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

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

/* ── Responsive ── */
@media (max-width: 1024px) {
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 1rem 2rem;
    gap: 1rem;
  }
  
  .search-container {
    order: 3;
    max-width: 100%;
    flex-basis: 100%;
  }
  
  .nav-cats {
    flex-wrap: wrap;
  }
  
  .hero-content {
    padding: 2rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .main {
    padding: 1rem;
  }
  
  .hero {
    min-height: 280px;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
  }
  
  .featured-strip {
    grid-template-columns: 1fr;
  }
  
  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .categories-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-orange);
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--accent-orange);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  z-index: 1000;
  transform: translateY(120%);
  opacity: 0;
  transition: all 0.4s ease;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ── Game Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

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

.modal-header h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
}

.modal-close {
  width: 36px;
  height: 36px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-red);
}

.modal-body {
  padding: 2rem;
}

.game-iframe-placeholder {
  width: 100%;
  height: 400px;
  background: linear-gradient(135deg, #1a1a2e, #0a0a0f);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  border: 2px dashed var(--border-color);
  margin-bottom: 1.5rem;
}

.game-iframe-placeholder .play-icon {
  font-size: 4rem;
  opacity: 0.5;
}

.game-iframe-placeholder p {
  color: var(--text-secondary);
}

.game-detail-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.game-detail-stat {
  background: var(--bg-secondary);
  padding: 1rem;
  border-radius: var(--radius);
  text-align: center;
}

.game-detail-stat .label {
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.game-detail-stat .value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  color: var(--accent-orange);
  margin-top: 0.25rem;
}

/* ── Loading Animation ── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

/* ── Tiger stripe accent line ── */
.tiger-accent {
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--accent-orange) 0px,
    var(--accent-orange) 20px,
    var(--accent-red) 20px,
    var(--accent-red) 30px,
    var(--accent-yellow) 30px,
    var(--accent-yellow) 40px
  );
  margin-bottom: 2rem;
  border-radius: 2px;
}

/* ══════════════════════════════════════════════════
   MOBILE RESPONSIVE — Comprehensive
   ══════════════════════════════════════════════════ */

/* ── Tablet (max-width: 1024px) ── */
@media (max-width: 1024px) {
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 0.75rem 1.5rem;
    gap: 0.75rem;
  }

  .search-container {
    order: 3;
    max-width: 100%;
    flex-basis: 100%;
  }

  .nav-cats {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .nav-cat-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.78rem;
  }

  .hero-content {
    padding: 2rem;
  }

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

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .member-btn {
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
  }
}

/* ── Mobile (max-width: 768px) ── */
@media (max-width: 768px) {
  /* Hide desktop nav categories and show hamburger */
  .nav-cats {
    display: none !important;
  }

  .hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 200;
    margin-left: 0.75rem;
  }

  .hamburger-line {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  .hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
  }

  .hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  /* Header adjustments */
  .header-inner {
    padding: 0.6rem 1rem;
    gap: 0.5rem;
    height: 60px;
  }

  .logo-icon {
    width: 36px;
    height: 36px;
    font-size: 1.3rem;
  }

  .logo-text {
    font-size: 1.4rem;
  }

  .search-container {
    max-width: calc(100% - 120px);
  }

  .search-input {
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    font-size: 0.85rem;
  }

  .member-btn {
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
  }

  /* Main padding */
  .main {
    padding: 1rem;
  }

  /* Hero section */
  .hero {
    min-height: 260px;
    margin-bottom: 2rem;
    border-radius: var(--radius);
  }

  .hero-content {
    padding: 1.5rem;
    max-width: 100%;
  }

  .hero-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.75rem;
    margin-bottom: 0.75rem;
  }

  .hero-title {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
  }

  .hero-desc {
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
  }

  .hero-cta {
    padding: 0.7rem 1.25rem;
    font-size: 0.9rem;
  }

  /* Stats bar */
  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  /* Section titles */
  .section-title {
    font-size: 1.5rem;
  }

  .section-header {
    margin-bottom: 1rem;
  }

  .view-all-btn {
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
  }

  /* Game grid */
  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .game-thumb {
    height: 130px;
  }

  .game-name {
    font-size: 1.1rem;
  }

  .game-meta {
    font-size: 0.7rem;
    gap: 0.5rem;
  }

  /* Featured strip */
  .featured-strip {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .featured-card {
    min-height: auto;
    flex-direction: column;
  }

  .featured-thumb {
    width: 100%;
    min-height: 120px;
    font-size: 2rem;
  }

  .featured-body {
    padding: 1rem;
  }

  .featured-title {
    font-size: 1.4rem;
  }

  .featured-desc {
    font-size: 0.8rem;
  }

  /* Categories grid */
  .categories-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
    margin-bottom: 2rem;
  }

  .cat-card {
    padding: 1rem 0.5rem;
  }

  .cat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }

  .cat-name {
    font-size: 1rem;
  }

  .cat-count {
    font-size: 0.7rem;
  }

  /* Live indicator */
  .live-indicator {
    font-size: 0.65rem;
    padding: 0.25rem 0.6rem;
    margin-bottom: 0.75rem;
  }

  /* Filter buttons */
  .filter-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
  }

  /* Full library cards */
  #full-library {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
    gap: 1rem !important;
  }

  #full-library a {
    padding: 1rem;
  }

  #full-library div:first-child {
    font-size: 2.2rem;
  }

  #full-library .lib-name {
    font-size: 1rem;
  }

  /* Footer */
  .footer {
    padding: 2rem 1rem 1.5rem;
    margin-top: 2rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-brand .logo-text {
    font-size: 1.3rem;
  }

  .footer-desc {
    font-size: 0.8rem;
  }

  .footer-col h4 {
    font-size: 1.1rem;
  }

  .footer-col a {
    font-size: 0.8rem;
    padding: 0.25rem 0;
  }

  .footer-bottom {
    font-size: 0.7rem;
    padding-top: 1rem;
  }

  /* Toast */
  .toast {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
  }

  /* Modal */
  .modal {
    width: 95%;
    max-height: 85vh;
    border-radius: var(--radius);
  }

  .modal-header {
    padding: 1rem 1.25rem;
  }

  .modal-header h2 {
    font-size: 1.4rem;
  }

  .modal-body {
    padding: 1.25rem;
  }

  .game-iframe-placeholder {
    height: 200px;
  }

  .game-iframe-placeholder .play-icon {
    font-size: 2.5rem;
  }
}

/* ── Small Mobile (max-width: 480px) ── */
@media (max-width: 480px) {
  .header-inner {
    height: 55px;
    padding: 0.5rem 0.75rem;
  }

  .logo-icon {
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
  }

  .logo-text {
    font-size: 1.2rem;
  }

  .hero {
    min-height: 220px;
  }

  .hero-content {
    padding: 1rem;
  }

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

  .hero-desc {
    font-size: 0.8rem;
  }

  .hero-cta {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }

  .stats-bar {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .stat-card {
    padding: 0.75rem;
  }

  .stat-number {
    font-size: 1.6rem;
  }

  .game-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .game-thumb {
    height: 100px;
    font-size: 2rem;
  }

  .game-info {
    padding: 0.75rem;
  }

  .game-name {
    font-size: 0.95rem;
  }

  .game-cat-tag {
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
  }

  .game-meta {
    font-size: 0.65rem;
  }

  .section-title {
    font-size: 1.3rem;
  }

  #full-library {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }

  #full-library a {
    padding: 0.75rem;
  }

  #full-library div:first-child {
    font-size: 1.8rem;
  }

  #full-library .lib-name {
    font-size: 0.9rem;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
}

/* ── Mobile Menu Overlay & Drawer ── */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}

.mobile-menu-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height for mobile */
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  z-index: 301;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding: 1.5rem;
}

.mobile-menu.active {
  transform: translateX(0);
}

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

.mobile-search {
  position: relative;
  margin-bottom: 0.5rem;
}

.mobile-search .search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  font-size: 0.95rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
  outline: none;
}

.mobile-search .search-input:focus {
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px var(--glow-orange);
}

.mobile-search .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
}

.mobile-cats {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-cats .nav-cat-btn {
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  width: 100%;
}

.mobile-cats .nav-cat-btn:hover,
.mobile-cats .nav-cat-btn.active {
  background: var(--accent-orange);
  color: #fff;
  border-color: var(--accent-orange);
  box-shadow: 0 0 15px var(--glow-orange);
}

.mobile-member-btn {
  display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #ffd600, #ff6b00);
    color: #000;
    border: none;
    border-radius: var(--radius);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 15px rgba(255,214,0,0.3);
    margin-top: 0.5rem;
    text-align: center;
}

.mobile-member-btn:hover {
  box-shadow: 0 0 25px rgba(255,214,0,0.6);
  transform: scale(1.05);
}

/* ── Mobile body scroll lock ── */
body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* ── Full library responsive fix ── */
#full-library {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

/* ── Prevent horizontal scroll on all elements ── */
img, video, canvas, iframe {
  max-width: 100%;
  height: auto;
}

/* ── Safe area for notched devices ── */
@supports (padding: max(0px)) {
  .header-inner {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
  
  .main {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }

  .footer {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-orange);
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--accent-orange);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  z-index: 1000;
  transform: translateY(120%);
  opacity: 0;
  transition: all 0.4s ease;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ── Game Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

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

.modal-header h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
}

.modal-close {
  width: 36px;
  height: 36px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-red);
}

.modal-body {
  padding: 2rem;
}

.game-iframe-placeholder {
  width: 100%;
  height: 400px;
  background: linear-gradient(135deg, #1a1a2e, #0a0a0f);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  border: 2px dashed var(--border-color);
  margin-bottom: 1.5rem;
}

.game-iframe-placeholder .play-icon {
  font-size: 4rem;
  opacity: 0.5;
}

.game-iframe-placeholder p {
  color: var(--text-secondary);
}

.game-detail-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.game-detail-stat {
  background: var(--bg-secondary);
  padding: 1rem;
  border-radius: var(--radius);
  text-align: center;
}

.game-detail-stat .label {
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.game-detail-stat .value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  color: var(--accent-orange);
  margin-top: 0.25rem;
}

/* ── Loading Animation ── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

/* ── Featured strip responsive (in lobby-lounge.css) ── */
@media (max-width: 768px) {
  .featured-strip {
    grid-template-columns: 1fr !important;
  }
  
  .featured-card {
    flex-direction: column;
    min-height: auto;
  }
  
  .featured-thumb {
    width: 100% !important;
    min-height: 120px !important;
    flex-shrink: 0;
  }
}
