:root {
  /* Colors */
  --bg-primary: #040308;
  --bg-secondary: #0b0f1a;
  
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-blur: 18px;
  
  --accent-gold-1: #f5d06f;
  --accent-gold-2: #d4a017;
  --accent-purple-1: #7c3aed;
  --accent-purple-2: #a78bfa;
  --accent-crimson-1: #ef4444;
  --accent-crimson-2: #f97316;
  
  --glow-gold: rgba(245, 208, 111, 0.45);
  --glow-purple: rgba(124, 58, 237, 0.45);
  --glow-crimson: rgba(239, 68, 68, 0.35);
  
  /* Gradients */
  --grad-gold: linear-gradient(135deg, var(--accent-gold-1), var(--accent-gold-2));
  --grad-purple: linear-gradient(135deg, var(--accent-purple-1), var(--accent-purple-2));
  --grad-crimson: linear-gradient(135deg, var(--accent-crimson-1), var(--accent-crimson-2));
  --grad-premium: linear-gradient(135deg, var(--accent-purple-1), var(--accent-gold-1));
  
  /* Typography */
  --text-primary: #f9fafb;
  --text-secondary: #cbd5f5;
  --text-muted: #6b7280;
  
  /* Spacing Variables */
  --space-desktop: 120px;
  --space-tablet: 80px;
  --space-mobile: 60px;
  
  /* Layout */
  --max-width: 1280px;
}

/* 2. Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 3. Utilities & Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.main-content {
  padding-left: 100px; /* Offset for floating nav */
}

@media (max-width: 1024px) {
  .main-content {
    padding-left: 0;
    padding-bottom: 80px; /* Offset for bottom nav */
  }
}

.section-spacing {
  padding: var(--space-desktop) 0;
}

@media (max-width: 1024px) {
  .section-spacing { padding: var(--space-tablet) 0; }
}

@media (max-width: 768px) {
  .section-spacing { padding: var(--space-mobile) 0; }
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.text-gradient-gold {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent-gold-1);
}

.text-gradient-premium {
  background: var(--grad-premium);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent-gold-1);
}

/* 4. Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 18px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--glass-bg);
  pointer-events: none;
}

.btn-primary {
  background: var(--grad-premium);
  color: #fff;
  box-shadow: 0 4px 15px var(--glow-purple);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--glow-gold);
}

.btn-primary:active {
  transform: translateY(1px) scale(0.98);
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

/* 5. Header / Navigation */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  pointer-events: none; /* Let clicks pass through empty areas */
}

.top-bar > * {
  pointer-events: auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.logo img {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 8px var(--glow-gold));
}

.cta-header .btn {
  padding: 10px 24px;
  font-size: 0.9rem;
  animation: pulse-glow 3s infinite alternate;
}

/* Floating Side Nav (Desktop) */
.side-nav {
  position: fixed;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 70px;
  border-radius: 24px;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  z-index: 900;
  border: 1px solid rgba(245, 208, 111, 0.2);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.15);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-item svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  transition: all 0.3s ease;
}

.nav-item:hover, .nav-item.active {
  color: var(--accent-gold-1);
  transform: scale(1.1);
}

.nav-item.active svg {
  filter: drop-shadow(0 0 8px var(--glow-gold));
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: var(--grad-gold);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px var(--glow-gold);
}

/* Mobile Bottom Nav */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 16px 20px;
  border-radius: 24px 24px 0 0;
  border-bottom: none;
  z-index: 900;
  justify-content: space-around;
  align-items: center;
}

@media (max-width: 1024px) {
  .side-nav { display: none; }
  .mobile-nav { display: flex; }
  .top-bar { padding: 16px 20px; }
}

/* 6. Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: 80px; /* Account for top bar */
}

.hero-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: url('images/egyptian-desert-pyramids-bg.jpg') center/cover no-repeat;
  filter: blur(6px) brightness(0.6);
  z-index: -3;
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at center, transparent 0%, var(--bg-primary) 100%),
              linear-gradient(to bottom, rgba(4,3,8,0.3) 0%, var(--bg-primary) 100%);
  z-index: -2;
}

.particles {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(var(--accent-gold-1) 1px, transparent 1px);
  background-size: 100px 100px;
  opacity: 0.15;
  animation: floating-sand 20s linear infinite;
}

.hero-content {
  max-width: 800px;
  padding: 0 20px;
  z-index: 1;
}

.hero-subtitle {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 30px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: var(--accent-purple-2);
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 24px;
  animation: fade-in-up 0.8s ease forwards;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: -1px;
  animation: fade-in-up 1s ease forwards;
}

.hero-desc {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  animation: fade-in-up 1.2s ease forwards;
}

.hero-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  animation: fade-in-up 1.4s ease forwards;
}

.hero-legal {
  margin-top: 40px;
  font-size: 0.75rem;
  color: var(--text-muted);
  animation: fade-in-up 1.6s ease forwards;
}

@media (max-width: 600px) {
  .hero-actions { flex-direction: column; }
}

/* 7. Game Section */
.game-section {
  position: relative;
  z-index: 10;
  margin-top: -60px; /* Pull up slightly over hero */
}

.game-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.game-border-wrap {
  position: relative;
  padding: 4px; /* Border thickness */
  border-radius: 28px;
  background: linear-gradient(135deg, var(--accent-gold-1), var(--accent-purple-1), var(--accent-crimson-1), var(--accent-gold-1));
  background-size: 300% 300%;
  animation: gradient-border-anim 6s ease infinite;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 30px var(--glow-purple);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.game-border-wrap:hover {
  transform: scale(1.02);
  box-shadow: 0 30px 60px rgba(0,0,0,0.6), 0 0 50px var(--glow-gold);
}

.game-card {
  background: var(--bg-secondary);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.game-header {
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(4, 3, 8, 0.8);
}

.game-title-wrap h2 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.game-title-wrap p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.game-controls {
  display: flex;
  gap: 12px;
}

.btn-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-icon:hover {
  background: rgba(255,255,255,0.1);
  color: var(--accent-gold-1);
}

.iframe-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  background: #000;
}

.iframe-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* 8. Asymmetric Grid Features */
.features-section {
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.bento-card {
  border-radius: 24px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.bento-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 0 20px rgba(255,255,255,0.02);
}

.bento-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at top right, var(--glow-purple), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.bento-card:hover::before {
  opacity: 1;
}

.bento-card > * {
  position: relative;
  z-index: 1;
}

.bento-icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--accent-gold-1);
}

.bento-icon svg {
  width: 30px; height: 30px;
}

.bento-card h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.bento-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Grid Spans */
.span-8 { grid-column: span 8; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.span-12 { grid-column: span 12; }

@media (max-width: 992px) {
  .span-8, .span-4, .span-6 { grid-column: span 12; }
}

/* 9. Legal / Interior Pages */
.page-header {
  padding: 160px 0 80px;
  text-align: center;
  background: radial-gradient(circle at center top, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border-bottom: 1px solid var(--glass-border);
}

.page-header h1 {
  font-size: 3rem;
  margin-bottom: 16px;
}

.content-box {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px;
  border-radius: 24px;
  margin-top: -40px;
  position: relative;
  z-index: 10;
}

.content-box h2 {
  font-size: 1.8rem;
  margin: 32px 0 16px;
  color: var(--accent-gold-1);
}

.content-box p {
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.content-box ul {
  margin-bottom: 24px;
  padding-left: 20px;
  color: var(--text-secondary);
}

.content-box li {
  margin-bottom: 10px;
  list-style-type: disc;
}

@media (max-width: 768px) {
  .content-box { padding: 30px; }
}

/* Contact Form */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 16px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-gold-1);
  box-shadow: 0 0 15px rgba(245, 208, 111, 0.2);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* 10. Footer */
.footer {
  border-top: 1px solid var(--glass-border);
  padding: 80px 0 40px;
  background: var(--bg-secondary);
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-brand p {
  color: var(--text-secondary);
  margin-top: 16px;
  max-width: 300px;
  font-size: 0.9rem;
}

.footer-links h4 {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.footer-links ul li {
  margin-bottom: 12px;
}

.footer-links ul li a {
  color: var(--text-secondary);
  transition: color 0.3s ease;
  font-size: 0.9rem;
}

.footer-links ul li a:hover {
  color: var(--accent-gold-1);
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.footer-legal-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 800px;
}

.copyright {
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* 11. Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(4,3,8,0.8);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  width: 90%;
  max-width: 500px;
  padding: 40px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

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

.modal-close {
  position: absolute;
  top: 20px; right: 20px;
  background: none; border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 5px;
}

.modal-close:hover { color: var(--text-primary); }

/* 12. Animations */
@keyframes floating-sand {
  0% { background-position: 0 0; }
  100% { background-position: 100px 100px; }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 10px var(--glow-purple); }
  100% { box-shadow: 0 0 25px var(--glow-gold); }
}

@keyframes gradient-border-anim {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.scrolled {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for grids */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple-1);
}