/* 
   Playmaxi Game Portal Stylesheet
   Theme: Luxury Black and Gold (Obsidian / Gold Foil)
   Typography: Cinzel (Luxury Headings) & Outfit (Modern Sans UI)
*/

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

/* ==========================================================================
   Design Tokens / Variables
   ========================================================================== */
:root {
  /* Colors */
  --bg-obsidian: #050505;
  --bg-card: #0c0c0e;
  --bg-elevated: #141417;
  --bg-overlay: rgba(5, 5, 5, 0.95);
  
  --gold-primary: #ffcc00;      /* Rich glowing gold for standout contrast */
  --gold-secondary: #d4af37;    /* Muted classic gold */
  --gold-light: #f6e6b4;        /* Bright champagne gold */
  --gold-dark: #aa7c11;         /* Deep bronze shadow gold */
  
  --gold-grad: linear-gradient(135deg, #f6e6b4 0%, #ffd700 40%, #d4af37 70%, #aa7c11 100%);
  --gold-grad-hover: linear-gradient(135deg, #ffffff 0%, #f6e6b4 30%, #ffd700 70%, #8b6508 100%);
  --dark-grad: linear-gradient(180deg, #101012 0%, #050505 100%);
  --dark-radial: radial-gradient(circle at center, #1b1b1f 0%, #050505 100%);
  
  --border-gold: rgba(255, 204, 0, 0.12);
  --border-gold-hover: rgba(255, 204, 0, 0.35);
  --border-gold-focus: rgba(255, 204, 0, 0.6);
  
  --text-white: #ffffff;
  --text-gold: #ffcc00;         /* Glowing gold on dark background for high legibility */
  --text-muted: #8e8e93;
  --text-grey: #c7c7cc;
  
  /* System */
  --font-serif: 'Cinzel', serif;
  --font-sans: 'Outfit', sans-serif;
  --shadow-glow: 0 0 15px rgba(255, 204, 0, 0.08);
  --shadow-glow-active: 0 0 25px rgba(255, 204, 0, 0.22);
  --shadow-inset: inset 0 0 12px rgba(255, 204, 0, 0.05);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --max-width: 1400px;
}

/* Light Theme Variables Overrides - High Legibility Contrast */
body.light-theme {
  --bg-obsidian: #f5f5f7;
  --bg-card: #ffffff;
  --bg-elevated: #eaeaea;
  --bg-overlay: rgba(245, 245, 247, 0.95);
  
  --gold-primary: #785303;      /* Deep gold-tan/bronze for visibility */
  --gold-secondary: #5c4002;    /* Dark bronze */
  
  --border-gold: rgba(120, 83, 3, 0.25);
  --border-gold-hover: rgba(120, 83, 3, 0.55);
  --border-gold-focus: rgba(120, 83, 3, 0.8);
  
  --text-white: #0a0a0c;        /* High-contrast dark charcoal text */
  --text-gold: #785303;         /* Deep readable bronze gold */
  --text-muted: #555555;
  --text-grey: #222222;
  
  --dark-grad: linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 100%);
  --dark-radial: radial-gradient(circle at center, #ffffff 0%, #eeeeee 100%);
  
  --shadow-glow: 0 0 15px rgba(120, 83, 3, 0.04);
  --shadow-glow-active: 0 0 25px rgba(120, 83, 3, 0.12);
  --shadow-inset: inset 0 0 12px rgba(120, 83, 3, 0.02);
}

body.light-theme .header {
  background: rgba(255, 255, 255, 0.85);
}
body.light-theme .header.scrolled {
  background: rgba(245, 245, 247, 0.95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}
body.light-theme .hero {
  background: radial-gradient(circle at center, #ffffff 0%, #f0ebd9 100%);
}
body.light-theme .hero-title {
  color: #111111;
}
body.light-theme .hero-desc {
  color: #444444;
}
body.light-theme .category-chip {
  background: rgba(0, 0, 0, 0.04);
}
body.light-theme .category-chip.active {
  background: var(--gold-grad);
  color: #050505;
}
body.light-theme .newsletter {
  background: linear-gradient(135deg, #eaeaea 0%, #f5f5f7 100%);
}
body.light-theme .newsletter-title {
  color: #111111;
}
body.light-theme .rewards-modal,
body.light-theme .game-modal {
  background: #ffffff;
  border-color: var(--border-gold);
}
body.light-theme .modal-header {
  background: #f5f5f7;
  border-bottom-color: var(--border-gold);
}
body.light-theme .modal-game-title {
  color: #111111;
}
body.light-theme .panel-header {
  border-bottom-color: var(--border-gold);
}
body.light-theme .panel-title {
  color: #111111;
}
body.light-theme .rewards-form-group input,
body.light-theme .rewards-form-group select {
  background: #f5f5f7;
  border-color: var(--border-gold);
  color: #111111;
}
body.light-theme .game-editorial-guide h2,
body.light-theme .game-editorial-guide h3 {
  color: #111111;
}
body.light-theme .game-editorial-guide p,
body.light-theme .game-editorial-guide li {
  color: #444444;
}
body.light-theme .game-editorial-guide strong {
  color: #000000;
}

/* Theme Toggle Button Styles */
.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-gold);
  color: var(--text-gold);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.15rem;
  transition: var(--transition);
  user-select: none;
}
.theme-toggle-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-glow);
  transform: scale(1.05);
}
body.light-theme .theme-toggle-btn {
  background: rgba(0, 0, 0, 0.04);
}


/* ==========================================================================
   Global Resets & Base Styles
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-obsidian);
  color: var(--text-grey);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: var(--dark-grad);
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--text-white);
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
  width: 8px;
  height: 6px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-primary);
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
  background: rgba(12, 12, 14, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-gold);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.header.scrolled {
  background: rgba(5, 5, 5, 0.95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--gold-grad);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-obsidian);
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 1.25rem;
  box-shadow: var(--shadow-glow-active);
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 800;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.05em;
}

/* Nav Links */
.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-grey);
  position: relative;
  padding: 0.5rem 0;
  letter-spacing: 0.05em;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold-grad);
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--text-white);
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--text-white);
}

/* Header Right - Search & Menu */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

/* Maxi Coins Header Component */
.coins-display {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  color: var(--text-gold);
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid var(--border-gold);
  border-radius: 20px;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.coins-display:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-glow);
}

.coin-icon {
  display: inline-block;
  font-size: 1rem;
}

.coin-spin {
  animation: coin-spin-anim 2.5s infinite linear;
}

@keyframes coin-spin-anim {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}

.search-box {
  position: relative;
  width: 200px;
  transition: var(--transition);
}

.search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-gold);
  border-radius: 30px;
  padding: 0.6rem 1.2rem 0.6rem 2.2rem;
  color: var(--text-white);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-gold-focus);
  box-shadow: var(--shadow-glow);
  width: 250px;
}

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

.menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.2rem;
  transition: var(--transition);
}

.menu-btn:hover {
  color: var(--gold-primary);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  position: relative;
  padding: 6rem 0;
  background: var(--dark-radial);
  border-bottom: 1px solid var(--border-gold);
  overflow: hidden;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(rgba(212, 175, 55, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.6;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--border-gold);
  border-radius: 40px;
  color: var(--text-gold);
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: 0.5rem 1.5rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  box-shadow: var(--shadow-inset);
  animation: pulse-glow 2s infinite ease-in-out;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  background: linear-gradient(to bottom, #ffffff 40%, #e5c158 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-grey);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-btns {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 2.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 30px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-sans);
}

.btn-primary {
  background: var(--gold-grad);
  border: 1px solid var(--gold-primary);
  color: var(--bg-obsidian);
  box-shadow: var(--shadow-glow-active);
}

.btn-primary:hover {
  background: var(--gold-grad-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.35);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-gold);
  color: var(--text-white);
}

.btn-secondary:hover {
  border-color: var(--gold-primary);
  background: rgba(212, 175, 55, 0.05);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   Category Navigation Bar
   ========================================================================== */
.categories-wrapper {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-gold);
  position: sticky;
  top: 80px;
  z-index: 900;
  padding: 1rem 0;
}

.categories-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.8rem;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 0.2rem;
}

.categories-container::-webkit-scrollbar {
  height: 4px;
}

.category-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-gold);
  border-radius: 30px;
  color: var(--text-grey);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.5rem 1.4rem;
  text-transform: uppercase;
  transition: var(--transition);
}

.category-chip:hover {
  border-color: var(--gold-primary);
  color: var(--text-white);
  background: rgba(212, 175, 55, 0.04);
}

.category-chip.active {
  background: var(--gold-grad);
  border-color: var(--gold-primary);
  color: var(--bg-obsidian);
  box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   Main Game Catalog Grid
   ========================================================================== */
.section {
  padding: 4rem 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.2rem;
  border-left: 4px solid var(--gold-primary);
  padding-left: 1rem;
}

.section-title {
  font-size: 1.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

/* Game Card */
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-inset);
}

.game-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-gold-hover);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8), var(--shadow-glow);
}

/* Image Thumbnail Container (with actual Featured Image) */
.game-thumb-container {
  position: relative;
  width: 100%;
  padding-top: 60%; /* 5:3 Aspect Ratio */
  overflow: hidden;
  background: #020202;
  border-bottom: 1px solid rgba(212, 175, 55, 0.06);
}

.game-thumb-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.game-card:hover .game-thumb-image {
  transform: scale(1.08);
  filter: brightness(0.85);
}

.game-thumb-overlay-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(5, 5, 5, 0.2) 0%, rgba(5, 5, 5, 0.7) 100%);
  pointer-events: none;
}

.game-thumb-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  transition: var(--transition);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  z-index: 2;
}

.game-thumb-icon {
  font-size: 2.5rem;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
  margin-bottom: 0.3rem;
  transition: var(--transition);
}

.game-thumb-label {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Badges on Card */
.badge-new {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #bf2d2d;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  z-index: 10;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.badge-favorite-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid var(--border-gold);
  color: var(--text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}

.badge-favorite-toggle:hover {
  background: var(--bg-obsidian);
  color: #ff3b30;
  transform: scale(1.1);
  border-color: #ff3b30;
}

.badge-favorite-toggle.is-fav {
  color: #ff3b30;
  background: var(--bg-obsidian);
  border-color: rgba(255, 59, 48, 0.4);
}

/* Card Hover Play Overlay */
.card-hover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 5, 5, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  z-index: 5;
}

.game-card:hover .card-hover-overlay {
  opacity: 1;
  pointer-events: auto;
}

.btn-play-overlay {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: var(--gold-grad);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-obsidian);
  font-size: 1.4rem;
  cursor: pointer;
  transform: scale(0.7);
  transition: var(--transition);
  box-shadow: var(--shadow-glow-active);
}

.game-card:hover .btn-play-overlay {
  transform: scale(1);
}

.btn-play-overlay:hover {
  background: var(--gold-grad-hover);
  transform: scale(1.1);
}

/* Card Info Block */
.game-info {
  padding: 1.25rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.game-category {
  color: var(--gold-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}

.game-title {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.6em;
}

.game-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 0.8rem;
}

.game-rating {
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-gold);
}

.game-action-btn {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--bg-obsidian);
  background: var(--gold-grad);
  border: none;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
}

.game-card:hover .game-action-btn {
  background: var(--gold-grad-hover);
  box-shadow: 0 4px 10px rgba(212, 175, 55, 0.2);
}

/* Empty Catalog State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  border: 1px dashed var(--border-gold);
  border-radius: 12px;
}

.empty-state-icon {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* ==========================================================================
   Fullscreen Game Player Modal (Clean Centered Viewer - No Ad sections)
   ========================================================================== */
.game-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-obsidian);
  z-index: 2000;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  border: none;
}

.game-modal.active {
  display: flex;
}

/* Modal Header Options */
.modal-header {
  min-height: 70px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 10;
  flex-shrink: 0;
}

.modal-game-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.modal-game-title {
  font-size: 1.25rem;
  text-transform: uppercase;
}

.modal-game-category {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--border-gold);
  color: var(--text-gold);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.modal-action-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-gold);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
}

.modal-action-btn:hover {
  background: var(--gold-grad);
  color: var(--bg-obsidian);
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-glow);
}

.modal-close-btn {
  border-color: rgba(255, 59, 48, 0.4);
  color: #ff3b30;
}

.modal-close-btn:hover {
  background: #ff3b30;
  color: #fff;
  border-color: #ff3b30;
  box-shadow: 0 0 15px rgba(255, 59, 48, 0.3);
}

/* Modal Body / Game Arena & Info Section Below */
.modal-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background: #000;
}

.game-play-area {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  background: radial-gradient(circle at center, #141416 0%, #000000 100%);
  position: relative;
  min-height: 480px;
}

.iframe-container {
  width: 100%;
  max-width: 1000px; /* 16:9 widescreen maximum */
  aspect-ratio: 16/9;
  background: #000;
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), var(--shadow-glow-active);
  transition: var(--transition);
}

/* Aspect ratio modifier classes */
.iframe-container.ratio-4-3 {
  max-width: 750px;
  aspect-ratio: 4/3;
}

.iframe-container.ratio-square {
  max-width: 560px;
  aspect-ratio: 1/1;
}

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

/* ==========================================================================
   Details Area Below Game Canvas (500-word desc, ratings & Maxi coins UI)
   ========================================================================== */
.modal-details-section {
  background: var(--bg-card);
  border-top: 1px solid var(--border-gold);
  padding: 4rem 2rem;
  width: 100%;
  display: flex;
  justify-content: center;
}

.modal-details-wrapper {
  max-width: 1000px;
  width: 100%;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3.5rem;
}

/* Detailed 500-word game guide styling */
.game-editorial-guide h2,
.game-editorial-guide h3 {
  text-transform: uppercase;
  margin-top: 1.8rem;
  margin-bottom: 0.8rem;
  color: var(--text-gold);
}

.game-editorial-guide h2 {
  font-size: 1.4rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
  padding-bottom: 0.4rem;
}

.game-editorial-guide h2:first-of-type {
  margin-top: 0;
}

.game-editorial-guide p {
  font-size: 0.9rem;
  color: var(--text-grey);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

.game-editorial-guide ul {
  list-style: none;
  padding-left: 1.2rem;
  margin-bottom: 1.2rem;
}

.game-editorial-guide li {
  position: relative;
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}

.game-editorial-guide li::before {
  content: '✦';
  color: var(--gold-primary);
  position: absolute;
  left: -1.2rem;
  font-size: 0.85rem;
}

/* Play-to-Earn Maxi Coins Dashboard Panel */
.rewards-dashboard-panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  padding: 1.8rem;
  height: fit-content;
  box-shadow: var(--shadow-inset);
}

.panel-header {
  border-bottom: 1px dashed var(--border-gold);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.panel-title {
  font-size: 1.1rem;
  text-transform: uppercase;
  color: var(--text-gold);
}

.session-stat {
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.session-stat-label {
  color: var(--text-muted);
}

.session-stat-value {
  font-weight: 700;
  color: var(--text-white);
}

.bonus-claim-btn {
  width: 100%;
  padding: 0.8rem 0;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 4px;
  border: 1px solid var(--gold-primary);
  background: transparent;
  color: var(--text-gold);
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 1rem;
}

.bonus-claim-btn:hover {
  background: var(--gold-grad);
  color: var(--bg-obsidian);
  box-shadow: var(--shadow-glow);
}

/* User Star Rating Component */
.rating-action-box {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  text-align: center;
}

.rating-prompt {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rating-stars {
  font-size: 1.6rem;
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  color: var(--text-muted);
}

.rating-stars span {
  transition: var(--transition);
}

.rating-stars span:hover,
.rating-stars span.hover,
.rating-stars span.active {
  color: var(--gold-primary);
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

/* ==========================================================================
   Newsletter Section
   ========================================================================== */
.newsletter {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-obsidian) 100%);
  border-top: 1px solid var(--border-gold);
  border-bottom: 1px solid var(--border-gold);
  padding: 5rem 0;
  text-align: center;
}

.newsletter-content {
  max-width: 600px;
  margin: 0 auto;
}

.newsletter-title {
  font-size: 2.2rem;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
}

.newsletter-desc {
  color: var(--text-grey);
  margin-bottom: 2rem;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-input {
  flex-grow: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-gold);
  border-radius: 30px;
  padding: 0.8rem 1.5rem;
  color: var(--text-white);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: var(--transition);
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--border-gold-focus);
  box-shadow: var(--shadow-glow);
}

.newsletter-btn {
  background: var(--gold-grad);
  border: none;
  color: var(--bg-obsidian);
  font-weight: 700;
  padding: 0 2rem;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition);
}

.newsletter-btn:hover {
  background: var(--gold-grad-hover);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
}

/* ==========================================================================
   Toast / Popups Notifications
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--bg-elevated);
  border: 1px solid var(--gold-primary);
  box-shadow: 0 10px 30px rgba(0,0,0,0.6), var(--shadow-glow-active);
  border-radius: 8px;
  padding: 1rem 1.8rem;
  color: var(--text-white);
  z-index: 3000;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.toast-icon {
  color: var(--gold-primary);
  font-size: 1.2rem;
}

.toast-error {
  border-color: #ff3b30;
}

.toast-error .toast-icon {
  color: #ff3b30;
}

/* ==========================================================================
   Redeem Rewards Dashboard Dialog Modal
   ========================================================================== */
.rewards-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 90%;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8), var(--shadow-glow-active);
  z-index: 2500;
  display: none;
  flex-direction: column;
  padding: 2.5rem;
}

.rewards-modal.active {
  display: flex;
  transform: translate(-50%, -50%) scale(1);
}

.rewards-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.rewards-modal-title {
  font-size: 1.3rem;
  text-transform: uppercase;
  color: var(--text-gold);
}

.rewards-modal-close {
  background: none;
  border: none;
  color: var(--text-white);
  font-size: 1.4rem;
  cursor: pointer;
  transition: var(--transition);
}

.rewards-modal-close:hover {
  color: #ff3b30;
}

.conversion-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(212, 175, 55, 0.08);
  border-radius: 6px;
  padding: 1.25rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.conversion-rate {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text-gold);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.rewards-balance-stat {
  font-size: 0.9rem;
  color: var(--text-grey);
}

.payout-progress-container {
  margin-bottom: 1.8rem;
}

.payout-progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.payout-bar-outer {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(212,175,55,0.1);
}

.payout-bar-inner {
  height: 100%;
  background: var(--gold-grad);
  width: 0%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(212,175,55,0.5);
}

.rewards-form-group {
  margin-bottom: 1.25rem;
}

.rewards-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.rewards-select, .rewards-input {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-gold);
  border-radius: 4px;
  padding: 0.7rem;
  color: var(--text-white);
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.rewards-select:focus, .rewards-input:focus {
  outline: none;
  border-color: var(--border-gold-focus);
}

.payout-submit-btn {
  width: 100%;
  background: var(--gold-grad);
  border: none;
  color: var(--bg-obsidian);
  font-weight: 700;
  padding: 0.8rem 0;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  margin-top: 1rem;
}

.payout-submit-btn:hover {
  background: var(--gold-grad-hover);
  box-shadow: var(--shadow-glow);
}

.payout-submit-btn:disabled {
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: not-allowed;
  box-shadow: none;
}

/* ==========================================================================
   Footer (Curated Grid - Legal Links Placed Beside Quick Navigation)
   ========================================================================== */
.footer {
  background: #020202;
  border-top: 1px solid var(--border-gold);
  padding: 5rem 0 2rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr 1.2fr 1.5fr;
  gap: 2.2rem;
  margin-bottom: 4rem;
}

.footer-info-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.footer-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.8rem;
  max-width: 320px;
}

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

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-gold);
  color: var(--text-grey);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 1.1rem;
}

.social-icon:hover {
  background: var(--gold-grad);
  color: var(--bg-obsidian);
  border-color: var(--gold-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.footer-col-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  color: var(--text-gold);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.footer-link-item a {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-link-item a:hover {
  color: var(--text-white);
  padding-left: 5px;
}

.footer-contact-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-contact-icon {
  color: var(--gold-secondary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Mobile Slide-out Menu
   ========================================================================== */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1500;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.mobile-nav-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border-gold);
  z-index: 1600;
  display: flex;
  flex-direction: column;
  padding: 2.5rem 2rem;
  transition: var(--transition);
  box-shadow: -10px 0 30px rgba(0,0,0,0.6);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3rem;
}

.mobile-menu-close {
  background: none;
  border: none;
  color: var(--text-white);
  font-size: 1.6rem;
  cursor: pointer;
  transition: var(--transition);
}

.mobile-menu-close:hover {
  color: var(--gold-primary);
}

.mobile-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  margin-bottom: 2.5rem;
}

.mobile-link {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-grey);
}

.mobile-link:hover,
.mobile-link.active {
  color: var(--text-white);
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* ==========================================================================
   Legal Pages Styles
   ========================================================================== */
.legal-body {
  background-color: var(--bg-obsidian);
  color: var(--text-grey);
  line-height: 1.7;
}

.legal-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-gold);
  padding: 4rem 0;
  text-align: center;
}

.legal-title {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.legal-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.legal-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.legal-section {
  margin-bottom: 2.5rem;
}

.legal-section h2 {
  font-size: 1.4rem;
  color: var(--text-gold);
  margin-bottom: 1rem;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
  padding-bottom: 0.5rem;
}

.legal-section p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.legal-section ul {
  list-style: none;
  margin-bottom: 1.2rem;
  padding-left: 1.2rem;
}

.legal-section li {
  position: relative;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

.legal-section li::before {
  content: '✦';
  color: var(--gold-primary);
  position: absolute;
  left: -1.2rem;
  font-size: 0.8rem;
}

.back-home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gold-primary);
  font-weight: 600;
  margin-bottom: 2rem;
  transition: var(--transition);
}

.back-home-link:hover {
  color: var(--text-white);
  transform: translateX(-5px);
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: inset 0 0 12px rgba(212, 175, 55, 0.05);
    border-color: rgba(212, 175, 55, 0.15);
  }
  50% {
    box-shadow: inset 0 0 20px rgba(212, 175, 55, 0.15), 0 0 10px rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.4);
  }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1200px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  
  .iframe-container {
    max-width: 90%;
  }
}

@media (max-width: 992px) {
  .hero-title {
    font-size: 2.8rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.25rem;
  }
  
  .nav-links, .search-box {
    display: none;
  }
  
  .menu-btn {
    display: block;
  }
  
  .hero-title {
    font-size: 2.2rem;
  }
  
  .hero-btns {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 280px;
  }
  
  .categories-wrapper {
    top: 80px;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .modal-details-wrapper {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1.2rem;
    text-align: center;
  }
  
  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.2rem;
  }
  
  .game-play-area {
    padding: 0.8rem;
  }
  
  .iframe-container {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16/9;
  }
  
  .newsletter-form {
    flex-direction: column;
    gap: 0.8rem;
  }
  
  .newsletter-btn {
    padding: 0.8rem 0;
  }
}

@media (max-width: 480px) {
  .logo-text {
    font-size: 1.3rem;
  }
  
  .nav-container {
    height: 70px;
  }
  
  .categories-wrapper {
    top: 70px;
  }
}

/* Ad Spacer Row */
.ad-spacer-row {
  margin: 2rem 0;
  min-height: 90px;
  width: 100%;
  display: block;
}

/* Category Grid Row Split Elements */
.category-row-section {
  margin-bottom: 3rem;
}
.category-row-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--text-white);
  border-left: 4px solid var(--gold-primary);
  padding-left: 0.8rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.category-row-title span {
  font-size: 0.85rem;
  color: var(--text-gold);
  font-family: var(--font-sans);
  font-weight: 500;
  text-transform: none;
}

/* Pagination Styles */
.pagination-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin: 3.5rem 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border-gold);
}
.pagination-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-gold);
  color: var(--text-white);
  padding: 0.7rem 1.6rem;
  border-radius: 30px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  user-select: none;
}
.pagination-btn:hover:not(:disabled) {
  background: var(--gold-grad);
  color: #050505;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}
.pagination-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.page-indicator {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-gold);
  font-family: var(--font-serif);
  letter-spacing: 0.05em;
}

/* Bottom Portal About/Guide Section */
.portal-guide-section {
  padding: 5rem 0;
  background: radial-gradient(circle at center, rgba(255, 204, 0, 0.03) 0%, transparent 80%);
  border-top: 1px solid var(--border-gold);
  border-bottom: 1px solid var(--border-gold);
  margin-bottom: 3.5rem;
}
.portal-guide-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3.5rem auto;
}
.portal-guide-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-gold);
  border: 1px solid var(--border-gold);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  margin-bottom: 0.8rem;
}
.portal-guide-title {
  font-size: 2.2rem;
  margin-bottom: 0.8rem;
  color: var(--text-white);
}
.portal-guide-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
}
.portal-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  padding: 2rem;
  transition: var(--transition);
}
.guide-card:hover {
  border-color: var(--border-gold-hover);
  box-shadow: var(--shadow-glow-active);
  transform: translateY(-4px);
}
.guide-icon {
  font-size: 2.2rem;
  margin-bottom: 1.2rem;
  display: block;
}
.guide-card h3 {
  font-size: 1.3rem;
  color: var(--text-white);
  margin-bottom: 0.8rem;
  font-family: var(--font-serif);
}
.guide-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}
body.light-theme .portal-guide-section {
  background: radial-gradient(circle at center, rgba(120, 83, 3, 0.03) 0%, transparent 80%);
}

