/* ==========================================================================
   SWING MONKEY - INDEX.HTML DEDICATED STYLESHEET (css/index.css)
   Tailored specifically for Homepage: Game Stage, New Games (20), Hot Games (30),
   Visual Showcase, Interactive FAQ, and Mobile Responsiveness.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

:root {
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Color Palette */
  --bg-dark: #0a0e17;
  --bg-stage: #111827;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(28, 38, 62, 0.95);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow-green: rgba(16, 185, 129, 0.4);
  --border-glow-hot: rgba(249, 115, 22, 0.4);
  
  /* Accents */
  --accent-emerald: #10b981;
  --accent-cyan: #06b6d4;
  --accent-orange: #f97316;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;
  --accent-purple: #a855f7;
  
  /* Text */
  --text-white: #ffffff;
  --text-gray-100: #f1f5f9;
  --text-gray-300: #cbd5e1;
  --text-gray-400: #94a3b8;
  --text-gray-500: #64748b;
  
  /* Radii & Shadows */
  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --radius-pill: 9999px;
  
  --shadow-stage: 0 20px 45px -10px rgba(0, 0, 0, 0.7), 0 0 35px rgba(16, 185, 129, 0.15);
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  --shadow-card-hover: 0 18px 35px -5px rgba(0, 0, 0, 0.7), 0 0 25px rgba(16, 185, 129, 0.35);
  --shadow-hot-hover: 0 18px 35px -5px rgba(0, 0, 0, 0.7), 0 0 25px rgba(249, 115, 22, 0.4);
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Page Scope & Background */
body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-gray-100);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 90% 70%, rgba(249, 115, 22, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.05) 0%, transparent 60%);
  background-attachment: fixed;
}

.main-wrapper {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 20px 80px 20px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* ==========================================================================
   1. HERO GAME STAGE (#play)
   ========================================================================== */
.game-stage-card {
  background: var(--bg-stage);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-stage);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.game-stage-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-emerald), var(--accent-cyan), var(--accent-amber));
}

.game-stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.game-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.game-title-group h1 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.02em;
  margin: 0;
}

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--accent-emerald);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse-glow 1.8s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.stage-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-subtle);
  color: var(--text-gray-100);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-action:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: var(--accent-emerald);
  color: #fff;
  transform: translateY(-1px);
}

/* Responsive Game Frame */
.game-iframe-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 480px;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

@media (min-width: 1200px) {
  .game-iframe-wrapper {
    min-height: 580px;
  }
}

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

/* Quick Control Bar */
.control-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.control-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.control-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.control-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.2));
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.control-text {
  display: flex;
  flex-direction: column;
}

.control-text strong {
  font-size: 0.9rem;
  color: var(--text-white);
}

.control-text span {
  font-size: 0.78rem;
  color: var(--text-gray-400);
}

/* ==========================================================================
   2. SECTION HEADERS & FILTER BARS
   ========================================================================== */
.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.section-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  width: fit-content;
}

.tag-new {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.tag-hot {
  background: rgba(249, 115, 22, 0.15);
  color: var(--accent-orange);
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.section-main-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.section-main-title i {
  font-size: 1.5rem;
}

.title-icon-new {
  color: var(--accent-emerald);
  filter: drop-shadow(0 0 12px rgba(16, 185, 129, 0.6));
}

.title-icon-hot {
  color: var(--accent-orange);
  filter: drop-shadow(0 0 12px rgba(249, 115, 22, 0.6));
}

.section-sub-text {
  font-size: 0.95rem;
  color: var(--text-gray-400);
  margin: 0;
}

.section-counter-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-gray-300);
}

/* ==========================================================================
   3. MODERN RESPONSIVE GAMES GRID (NEW GAMES & HOT GAMES)
   ========================================================================== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 20px;
}

@media (min-width: 1400px) {
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
    gap: 22px;
  }
}

/* Game Card */
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  position: relative;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.game-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--accent-emerald);
  box-shadow: var(--shadow-card-hover);
  z-index: 5;
}

.hot-games-section .game-card:hover {
  border-color: var(--accent-orange);
  box-shadow: var(--shadow-hot-hover);
}

.game-card.active-card {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.45);
}

/* Card Thumbnail */
.game-thumb-box {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #141b2d;
  overflow: hidden;
}

.game-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Badges */
.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 4;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 4px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.badge-new {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(6, 182, 212, 0.95));
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.badge-hot {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(249, 115, 22, 0.95));
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.badge-featured {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(217, 119, 6, 0.95));
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Play Overlay */
.play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 23, 0.72);
  backdrop-filter: blur(3px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity var(--transition-fast);
  z-index: 3;
}

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

.btn-play-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-emerald), #059669);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.8);
  transform: scale(0.9);
  transition: transform var(--transition-fast);
}

.hot-games-section .btn-play-circle {
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.8);
}

.game-card:hover .btn-play-circle {
  transform: scale(1.08);
}

.play-overlay-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Card Body */
.game-card-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  flex-grow: 1;
  background: var(--bg-card);
}

.game-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.game-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.78rem;
}

.game-rating {
  color: var(--accent-amber);
  display: flex;
  align-items: center;
  gap: 3px;
  font-weight: 700;
}

.badge-tag {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  color: var(--text-gray-400);
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 105px;
}

/* ==========================================================================
   4. SCREENSHOT SHOWCASE & SEO CONTENT SECTIONS
   ========================================================================== */
.image-showcase-section,
.content-section,
.faq-section {
  background: var(--bg-stage);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  box-shadow: var(--shadow-stage);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title i {
  color: var(--accent-emerald);
}

.section-subtitle {
  color: var(--text-gray-400);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

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

.gallery-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-fast);
}

.gallery-card:hover {
  border-color: var(--accent-emerald);
  transform: translateY(-4px);
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.gallery-caption {
  padding: 16px;
}

.gallery-caption h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.gallery-caption p {
  font-size: 0.85rem;
  color: var(--text-gray-400);
  line-height: 1.5;
  margin: 0;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.feature-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  gap: 16px;
  transition: var(--transition-fast);
}

.feature-box:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.feature-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.2));
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.feature-content h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 4px;
}

.feature-content p {
  font-size: 0.85rem;
  color: var(--text-gray-400);
  line-height: 1.5;
  margin: 0;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-fast);
}

.faq-item.active {
  border-color: var(--accent-emerald);
  background: rgba(19, 27, 46, 0.9);
}

.faq-question {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-white);
  user-select: none;
}

.faq-question i {
  color: var(--accent-emerald);
  transition: transform var(--transition-fast);
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 20px;
  color: var(--text-gray-300);
  font-size: 0.92rem;
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 0 20px 18px 20px;
}

/* Shortcut Modal */
.shortcut-modal {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  background: #111827;
  border: 1px solid var(--accent-emerald);
  border-radius: var(--radius-lg);
  padding: 20px;
  width: 360px;
  max-width: calc(100vw - 40px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(16, 185, 129, 0.3);
}

.shortcut-modal.active {
  display: block;
  animation: slide-up 0.3s ease;
}

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

.shortcut-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.shortcut-modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-gray-400);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.btn-close-modal:hover {
  color: #fff;
}

.shortcut-modal-body p {
  font-size: 0.82rem;
  color: var(--text-gray-300);
  margin-bottom: 8px;
  line-height: 1.4;
}

/* ==========================================================================
   5. MOBILE & TABLET RESPONSIVENESS
   ========================================================================== */
@media (max-width: 992px) {
  .game-iframe-wrapper {
    min-height: 380px;
  }
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .main-wrapper {
    padding: 16px 14px 60px 14px;
    gap: 36px;
  }
  
  .game-stage-card {
    padding: 14px;
  }
  
  .game-stage-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .game-title-group h1 {
    font-size: 1.2rem;
  }
  
  .game-iframe-wrapper {
    min-height: 280px;
    border-radius: var(--radius-md);
  }
  
  .control-bar {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .section-main-title {
    font-size: 1.4rem;
  }
  
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .game-card-body {
    padding: 10px;
  }
  
  .game-card-title {
    font-size: 0.88rem;
  }
  
  .badge-tag {
    max-width: 75px;
    font-size: 0.68rem;
  }
}

@media (max-width: 420px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .card-badge {
    top: 6px;
    left: 6px;
    font-size: 0.62rem;
    padding: 2px 6px;
  }
  
  .btn-play-circle {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .play-overlay-text {
    font-size: 0.72rem;
  }
}

/* Header Navbar Links Styling */
.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-gray-300);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  transition: var(--transition-fast);
  white-space: nowrap;
}

.nav-link i {
  font-size: 0.85rem;
  color: var(--accent-emerald);
}

.nav-link[href*="hot-games"] i {
  color: var(--accent-orange);
}

.nav-link:hover {
  color: #fff;
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-emerald);
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    gap: 8px;
    scrollbar-width: none;
  }
  
  .nav-links::-webkit-scrollbar {
    display: none;
  }
  
  .nav-link {
    font-size: 0.82rem;
    padding: 6px 12px;
  }
}
