/* Variables & Theme Setup */
:root {
  --bg-primary: #06070c;
  --bg-secondary: #0f1220;
  --surface-layer: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --surface-border: rgba(255, 255, 255, 0.05);
  
  --grad-primary: linear-gradient(135deg, #7c3aed, #06b6d4);
  --grad-secondary: linear-gradient(135deg, #a78bfa, #22d3ee);
  --glow-accent: rgba(124, 58, 237, 0.6);
  --glow-subtle: rgba(124, 58, 237, 0.2);
  
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  
  --section-pad-desktop: 110px;
  --section-pad-tablet: 80px;
  --section-pad-mobile: 60px;
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 20px;
  
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, iframe {
  max-width: 100%;
  display: block;
}

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

ul {
  list-style: none;
}

/* Typography */
h1, h2, h3, h4 {
  color: var(--text-primary);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
p { color: var(--text-secondary); margin-bottom: 1rem; }

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

/* Layout System */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

.section {
  padding: var(--section-pad-mobile) 0;
}

/* Grid System */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-md);
}

/* Header & Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(6, 7, 12, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--surface-border);
  transition: var(--transition-smooth);
}

.navbar::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--grad-primary);
  opacity: 0.3;
}

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

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  z-index: 1001;
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  transition: var(--transition-fast);
}

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

.nav-link:hover {
  color: var(--text-primary);
}

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

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1001;
}

/* Button System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
  text-align: center;
}

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

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px var(--glow-accent);
}

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

.btn-ghost {
  background: var(--surface-layer);
  color: var(--text-primary);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: var(--surface-hover);
  transform: translateY(-3px);
  border-color: rgba(124, 58, 237, 0.4);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  overflow: hidden;
  background: radial-gradient(circle at 80% 20%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 20% 80%, rgba(6, 182, 212, 0.05) 0%, transparent 50%);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjQiPgo8cmVjdCB3aWR0aD0iNCIgaGVpZ2h0PSI0IiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAuMDIiLz4KPC9zdmc+') repeat;
  opacity: 0.5;
  pointer-events: none;
}

.hero-grid {
  align-items: center;
}

.hero-content {
  grid-column: span 12;
  z-index: 2;
}

.hero-visual {
  grid-column: span 12;
  position: relative;
  z-index: 1;
}

.hero-visual img {
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.8);
  border: 1px solid var(--surface-border);
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  flex-wrap: wrap;
}

.hero-disclaimer {
  margin-top: var(--space-xl);
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: var(--space-sm);
  background: var(--surface-layer);
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border);
  display: inline-block;
  backdrop-filter: blur(4px);
}

/* Game Section (Core Product) */
.game-section {
  position: relative;
  background: var(--bg-secondary);
  border-top: 1px solid var(--surface-border);
  border-bottom: 1px solid var(--surface-border);
}

.game-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.game-container {
  max-width: 1300px;
  margin: 0 auto;
  background: var(--surface-layer);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  border: 1px solid rgba(124, 58, 237, 0.2);
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.8),
              0 0 40px rgba(124, 58, 237, 0.1);
  transition: var(--transition-smooth);
  position: relative;
}

.game-container::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: var(--grad-primary);
  border-radius: calc(var(--radius-lg) + 2px);
  z-index: -1;
  opacity: 0.3;
  animation: pulse-border 4s infinite alternate;
}

.game-container:hover {
  transform: scale(1.01);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.9),
              0 0 60px rgba(124, 58, 237, 0.2);
}

.game-frame-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio fallback */
  height: 0;
  border-radius: calc(var(--radius-lg) - 8px);
  overflow: hidden;
  background: #000;
}

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

/* Glass Panels & Content Cards */
.glass-panel {
  background: var(--surface-layer);
  backdrop-filter: blur(12px);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: var(--surface-hover);
}

.legal-card {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.icon-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.icon-card {
  padding: var(--space-lg);
  text-align: left;
}

.icon-card h4 {
  margin-bottom: var(--space-sm);
  color: #fff;
}

/* Footer */
.footer {
  background: var(--bg-primary);
  padding: var(--space-xl) 0 var(--space-md);
  border-top: 1px solid var(--surface-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-brand h3 {
  margin-bottom: var(--space-sm);
}

.footer-links h4 {
  color: #fff;
  margin-bottom: var(--space-md);
  font-size: 1.1rem;
}

.footer-links ul li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--surface-border);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-disclaimer {
  max-width: 800px;
  margin: 0 auto var(--space-md);
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Forms */
.form-group {
  margin-bottom: var(--space-md);
}

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

.form-control {
  width: 100%;
  padding: 14px 16px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-main);
  transition: var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

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

/* Page Headers */
.page-header {
  padding: 160px 0 80px;
  text-align: center;
  background: radial-gradient(circle at top center, rgba(124, 58, 237, 0.1) 0%, transparent 60%);
  border-bottom: 1px solid var(--surface-border);
}

/* Utilities & Animations */
.text-center { text-align: center; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: opacity, visibility;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes pulse-border {
  0% { opacity: 0.2; }
  100% { opacity: 0.5; }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

/* Media Queries */
@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-md);
  }
  .section {
    padding: var(--section-pad-tablet) 0;
  }
  .hero-content {
    grid-column: span 6;
  }
  .hero-visual {
    grid-column: span 6;
  }
  .icon-card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
  .game-frame-wrapper {
    padding-top: 0;
    height: 600px; /* Fixed height for tablet */
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 var(--space-lg);
  }
  .section {
    padding: var(--section-pad-desktop) 0;
  }
  .game-frame-wrapper {
    height: 700px; /* Fixed height for desktop */
  }
}

@media (max-width: 767px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 100px var(--space-lg) var(--space-lg);
    border-left: 1px solid var(--surface-border);
    transition: right var(--transition-smooth);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    z-index: 1000;
  }
  .nav-links.active {
    right: 0;
  }
  .mobile-toggle {
    display: block;
  }
  .nav-cta {
    width: 100%;
    margin-top: var(--space-md);
  }
  .hero {
    text-align: center;
    padding-top: 120px;
  }
  .hero-actions {
    justify-content: center;
  }
}