/**
 * Unified Game Layout System
 * Provides consistent structure for all game pages while allowing theme customization
 * All games use the same layout classes with theme-specific styling via CSS variables
 */

/* ============================================
   GAME PAGE STRUCTURE
   ============================================ */

.game-page {
  min-height: 100vh;
  background: var(--background-primary, #1a1a1a);
  color: var(--text-primary, #f5f5f5);
}

.game-page main {
  padding-top: var(--header-height, 116px);
}

/* ============================================
   HERO SECTION
   ============================================ */

.game-hero {
  height: calc(100vh - var(--header-height, 116px));
  min-height: calc(100vh - var(--header-height, 116px));
  max-height: calc(100vh - var(--header-height, 116px));
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 0;
}

@supports (height: 100dvh) {
  .game-hero {
    height: calc(100dvh - var(--header-height, 116px));
    min-height: calc(100dvh - var(--header-height, 116px));
  }
}

.game-hero-container {
  max-width: var(--container-width, 1200px);
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
}

.game-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: center;
  width: 100%;
  max-height: 100%;
  overflow: hidden;
}

@media (max-width: 768px) {
  .game-hero-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .game-hero {
    padding: 0;
  }
  
  .game-hero-container {
    padding: 0 1rem;
  }
  
  .game-hero-visual {
    display: none;
  }
}

.game-hero-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  overflow-y: auto;
  max-height: 100%;
  padding: 0.5rem 0;
}

.game-hero-eyebrow {
  font-size: clamp(0.8rem, 1.2vw, 1rem);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent, #c9a961);
  font-weight: 600;
  white-space: nowrap;
}

.game-hero-title {
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
  color: var(--text-primary, #f5f5f5);
}

.game-hero-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--text-secondary, #c9c9c9);
  line-height: 1.3;
  margin: 0;
}

.game-hero-description {
  font-size: clamp(0.9rem, 1.3vw, 1.1rem);
  color: var(--text-secondary, #c9c9c9);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.game-hero-actions .game-btn {
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  padding: clamp(0.6rem 1rem, 1vw, 0.8rem 1.5rem);
}

.game-hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  max-height: 100%;
  overflow: hidden;
  position: relative;
}

.game-hero-slider-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.game-hero-slider {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border, rgba(201, 169, 97, 0.2));
}

.game-hero-slider-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: none;
  animation: fadeIn 0.3s ease;
}

.game-hero-slider-image.active {
  display: block;
}

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

.game-hero-slider-nav {
  flex-shrink: 0;
  width: clamp(2rem, 4vw, 2.5rem);
  height: clamp(2rem, 4vw, 2.5rem);
  border: 1px solid var(--border, rgba(201, 169, 97, 0.3));
  background: var(--surface, rgba(26, 24, 19, 0.8));
  color: var(--accent, #c9a961);
  border-radius: 50%;
  cursor: pointer;
  font-size: clamp(1rem, 2vw, 1.2rem);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-weight: 600;
  z-index: 10;
}

.game-hero-slider-nav:hover {
  background: var(--surface-hover, rgba(201, 169, 97, 0.2));
  border-color: var(--accent, #c9a961);
  transform: scale(1.05);
}

.game-hero-slider-nav:active {
  transform: scale(0.95);
}

.game-hero-slider-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  z-index: 10;
}

.game-hero-slider-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: rgba(201, 169, 97, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(201, 169, 97, 0.3);
}

.game-hero-slider-dot:hover {
  background: rgba(201, 169, 97, 0.35);
}

.game-hero-slider-dot.active {
  background: var(--accent, #c9a961);
  border-color: var(--accent, #c9a961);
  transform: scale(1.2);
}

@media (max-width: 768px) {
  .game-hero-slider-nav {
    display: none;
  }
}

.game-hero-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* ============================================
   GAME METADATA TABLETS
   ============================================ */

.game-meta-tablets {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.game-meta-tablet {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.35rem 0.6rem;
  background: var(--surface, rgba(26, 24, 19, 0.92));
  border: 1px solid var(--border, rgba(201, 169, 97, 0.22));
  border-radius: 4px;
  min-width: 50px;
}

.game-meta-tablet strong {
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  font-weight: 700;
  color: var(--accent, #c9a961);
  line-height: 1;
}

.game-meta-tablet span {
  font-size: clamp(0.55rem, 0.8vw, 0.65rem);
  color: var(--text-secondary, #c9c9c9);
  text-transform: uppercase;
  margin-top: 0.15rem;
}

/* ============================================
   SECTIONS
   ============================================ */

.game-section {
  padding: 4rem 0;
}

.game-section-container {
  max-width: var(--container-width, 1200px);
  margin: 0 auto;
  padding: 0 1rem;
}

.game-section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.game-section-eyebrow {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent, #c9a961);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.game-section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text-primary, #f5f5f5);
  margin: 0 0 1rem 0;
}

.game-section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary, #c9c9c9);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   FEATURE GRID
   ============================================ */

.game-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.game-feature-card {
  background: var(--surface, rgba(26, 24, 19, 0.92));
  border: 1px solid var(--border, rgba(201, 169, 97, 0.22));
  border-radius: 12px;
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.game-feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--accent, #c9a961);
}

.game-feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary, #f5f5f5);
  margin: 0 0 0.75rem 0;
}

.game-feature-text {
  font-size: 1rem;
  color: var(--text-secondary, #c9c9c9);
  line-height: 1.6;
  margin: 0;
}

/* ============================================
   TIMELINE / STEPS
   ============================================ */

.game-timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.game-step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.game-step-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent, #c9a961);
  color: var(--background-primary, #1a1a1a);
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: 50%;
}

.game-step-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary, #f5f5f5);
  margin: 0 0 0.5rem 0;
}

.game-step-content p {
  font-size: 1rem;
  color: var(--text-secondary, #c9c9c9);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 768px) {
  .game-step {
    flex-direction: column;
    gap: 1rem;
  }
  
  .game-step-number {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

/* ============================================
   CARD GRID
   ============================================ */

.game-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.game-card {
  background: var(--surface, rgba(26, 24, 19, 0.92));
  border: 1px solid var(--border, rgba(201, 169, 97, 0.22));
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.game-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.game-card-content {
  padding: 1.5rem;
}

.game-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary, #f5f5f5);
  margin: 0 0 0.5rem 0;
}

.game-card-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary, #c9c9c9);
  line-height: 1.5;
  margin: 0;
}

/* ============================================
   GAME TABS NAVIGATION
   ============================================ */

.game-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.game-tab {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: 1px solid var(--border, rgba(201, 169, 97, 0.22));
  border-radius: 8px;
  color: var(--text-secondary, #c9c9c9);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.game-tab:hover {
  background: var(--surface-hover, rgba(201, 169, 97, 0.12));
  color: var(--text-primary, #f5f5f5);
}

.game-tab.active {
  background: var(--accent, #c9a961);
  border-color: var(--accent, #c9a961);
  color: var(--background-primary, #1a1a1a);
}

/* ============================================
   BUTTONS
   ============================================ */

.game-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.game-btn--primary {
  background: var(--accent, #c9a961);
  color: var(--background-primary, #1a1a1a);
}

.game-btn--primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.game-btn--secondary {
  background: transparent;
  border: 2px solid var(--accent, #c9a961);
  color: var(--accent, #c9a961);
}

.game-btn--secondary:hover {
  background: var(--surface-hover, rgba(201, 169, 97, 0.12));
}

.game-btn--ghost {
  background: transparent;
  color: var(--text-secondary, #c9c9c9);
}

.game-btn--ghost:hover {
  color: var(--text-primary, #f5f5f5);
}

/* ============================================
   PRICE BLOCK
   ============================================ */

.game-price-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.game-price-old {
  font-size: 1rem;
  color: var(--text-secondary, #c9c9c9);
  text-decoration: line-through;
}

.game-price-new {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent, #c9a961);
}

.game-price-note {
  font-size: 0.875rem;
  color: var(--text-secondary, #c9c9c9);
}

/* ============================================
   BOX CONTENTS
   ============================================ */

.game-box-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.game-box-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.game-box-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.game-box-item strong {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary, #f5f5f5);
  display: block;
  margin-bottom: 0.25rem;
}

.game-box-item p {
  font-size: 0.875rem;
  color: var(--text-secondary, #c9c9c9);
  line-height: 1.5;
  margin: 0;
}

/* ============================================
   AUDIENCE CHIPS
   ============================================ */

.game-audience-strip {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.game-audience-chip {
  padding: 0.5rem 1rem;
  background: var(--surface, rgba(26, 24, 19, 0.92));
  border: 1px solid var(--border, rgba(201, 169, 97, 0.22));
  border-radius: 20px;
  font-size: 0.875rem;
  color: var(--text-secondary, #c9c9c9);
}

/* ============================================
   CONTACT SECTION
   ============================================ */

.game-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.game-contact-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
  background: var(--surface, rgba(26, 24, 19, 0.92));
  border: 1px solid var(--border, rgba(201, 169, 97, 0.22));
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.game-contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.game-contact-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary, #f5f5f5);
}

.game-contact-hint {
  font-size: 0.875rem;
  color: var(--text-secondary, #c9c9c9);
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

.game-animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

.game-animate-delay-1 {
  animation-delay: 0.1s;
}

.game-animate-delay-2 {
  animation-delay: 0.2s;
}

.game-animate-delay-3 {
  animation-delay: 0.3s;
}

.game-animate-delay-4 {
  animation-delay: 0.4s;
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

@media (max-width: 768px) {
  .game-section {
    padding: 2rem 0;
  }
  
  .game-hero-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .game-btn {
    width: 100%;
    justify-content: center;
  }
  
  .game-meta-tablets {
    flex-wrap: wrap;
  }
}
