:root {
  /* Core Colors */
  --bg-primary: #030304;
  --bg-secondary: #0b0c10;
  
  /* Accents */
  --accent-primary-start: #ff3b1f;
  --accent-primary-end: #ff7a18;
  --accent-secondary-start: #ef4444;
  --accent-secondary-end: #dc2626;
  --accent-premium-start: #ff3b1f;
  --accent-premium-end: #facc15;
  
  /* Text */
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-muted: #6b7280;
  
  /* Glows */
  --glow-fire: rgba(255, 80, 30, 0.45);
  --glow-red: rgba(239, 68, 68, 0.35);
  --glow-gold: rgba(250, 204, 21, 0.35);
  
  /* Glass Surfaces */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent);
  
  /* Spacing & Layout */
  --max-width: 1280px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-pill: 100px;
}

/* =========================================
   RESET & BASE
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, 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;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

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

/* =========================================
   TYPOGRAPHY
   ========================================= */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(135deg, var(--text-primary), var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-fire {
  background: linear-gradient(135deg, var(--accent-primary-start), var(--accent-premium-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* =========================================
   UTILITIES & GLASSMORPHISM
   ========================================= */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.glass-panel::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 100%;
  background: var(--glass-highlight);
  pointer-events: none;
  z-index: 1;
}

.section-spacing {
  padding: 120px 0;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: none;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary-start), var(--accent-primary-end));
  color: #fff;
  box-shadow: 0 4px 15px var(--glow-fire);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.2), transparent);
  pointer-events: none;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px var(--glow-fire);
  filter: brightness(1.1);
}

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

.btn-glass {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.btn-glass:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* =========================================
   HEADER & TOP BAR
   ========================================= */
.top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 24px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  pointer-events: none; /* Let clicks pass through empty space */
}

.top-bar > * {
  pointer-events: auto; /* Re-enable clicks for items */
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-primary-start), var(--accent-primary-end));
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C8 6 4 10 4 15a8 8 0 1 0 16 0c0-5-4-9-8-13zm0 18a6 6 0 0 1-6-6c0-3.5 3-7 6-10 3 3 6 6.5 6 10a6 6 0 0 1-6 6z"/></svg>') center/cover;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C8 6 4 10 4 15a8 8 0 1 0 16 0c0-5-4-9-8-13zm0 18a6 6 0 0 1-6-6c0-3.5 3-7 6-10 3 3 6 6.5 6 10a6 6 0 0 1-6 6z"/></svg>') center/cover;
  animation: pulse-glow 2s infinite alternate;
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* =========================================
   FLOATING COMMAND NAV
   ========================================= */
.side-nav {
  position: fixed;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  width: 64px;
  border-radius: var(--radius-pill);
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  z-index: 100;
  border: 1px solid rgba(255, 122, 24, 0.3);
  box-shadow: 0 0 20px rgba(255, 59, 31, 0.15), inset 0 0 15px rgba(255, 59, 31, 0.05);
}

.nav-item {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  transition: all 0.3s ease;
}

.nav-item::before {
  content: attr(data-tooltip);
  position: absolute;
  left: 60px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-item:hover, .nav-item.active {
  color: #fff;
  background: rgba(255, 59, 31, 0.1);
  box-shadow: 0 0 15px var(--glow-fire);
}

.nav-item:hover svg, .nav-item.active svg {
  transform: scale(1.1);
  filter: drop-shadow(0 0 5px var(--accent-primary-start));
}

.nav-item:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('images/fire.png') center/cover no-repeat;
  filter: blur(8px) brightness(0.4);
  transform: scale(1.05);
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(3,3,4,0.2) 0%, var(--bg-primary) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
}

.hero-title {
  font-size: 4.5rem;
  font-weight: 800;
  margin-bottom: 24px;
  line-height: 1.1;
  text-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.hero-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 40px;
}

.hero-legal {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(0,0,0,0.4);
  padding: 8px 16px;
  border-radius: 8px;
  display: inline-block;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.05);
}

/* Embers Particle Container */
#embers-container {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.ember {
  position: absolute;
  bottom: -20px;
  background: radial-gradient(circle, #fff 0%, #ff7a18 40%, transparent 70%);
  border-radius: 50%;
  opacity: 0;
  animation: floatUp 5s linear infinite;
}

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

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

.game-header {
  text-align: center;
  margin-bottom: 30px;
}

.game-header h2 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.game-card {
  position: relative;
  padding: 4px; /* Border thickness */
  border-radius: calc(var(--radius-lg) + 4px);
  background: var(--bg-secondary);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
  transition: transform 0.4s ease;
}

.game-card:hover {
  transform: scale(1.02);
}

/* Animated Border */
.game-card::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background: conic-gradient(from 0deg, transparent 0%, transparent 40%, var(--accent-primary-start) 50%, var(--accent-premium-end) 60%, transparent 100%);
  animation: rotateBorder 4s linear infinite;
  z-index: 0;
}

.game-inner {
  position: relative;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  z-index: 1;
  aspect-ratio: 16/9;
  display: flex;
  flex-direction: column;
}

.game-inner iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
}

/* =========================================
   FEATURES SECTION
   ========================================= */
.features-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 30px;
}

.feature-card {
  padding: 40px;
  border-radius: var(--radius-lg);
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 300px;
}

.feature-card:hover {
  transform: translateY(-10px);
  border-color: rgba(255, 122, 24, 0.4);
  box-shadow: 0 20px 40px rgba(255, 59, 31, 0.1);
}

.fc-large { grid-column: span 8; }
.fc-small { grid-column: span 4; }
.fc-half { grid-column: span 6; }

.feature-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 59, 31, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: auto;
  border: 1px solid rgba(255, 59, 31, 0.2);
  color: var(--accent-primary-end);
}

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

.feature-card h3 {
  font-size: 1.75rem;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-secondary);
}

/* =========================================
   CONTENT PAGES (Legal, About, Contact)
   ========================================= */
.page-header {
  padding: 180px 20px 80px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255,59,31,0.05) 0%, var(--bg-primary) 100%);
  border-bottom: 1px solid var(--glass-border);
}

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

.content-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 20px;
}

.prose {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.prose h2 {
  color: var(--text-primary);
  margin: 40px 0 20px;
  font-size: 2rem;
}

.prose p {
  margin-bottom: 20px;
}

.prose ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 20px;
}

.prose li {
  margin-bottom: 10px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.form-control {
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--glass-border);
  padding: 16px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-primary-start);
  box-shadow: 0 0 15px rgba(255, 59, 31, 0.2);
}

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

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

.footer-brand .brand {
  margin-bottom: 20px;
}

.footer-brand p {
  color: var(--text-muted);
  max-width: 300px;
}

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

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

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

.footer-bottom {
  border-top: 1px solid var(--glass-border);
  padding-top: 30px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-disclaimer {
  max-width: 600px;
  margin: 0 auto 16px;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 12px;
  border-radius: 8px;
  background: rgba(0,0,0,0.3);
}

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes rotateBorder {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse-glow {
  0% { filter: drop-shadow(0 0 5px var(--glow-fire)); }
  100% { filter: drop-shadow(0 0 15px var(--accent-premium-end)); }
}

@keyframes floatUp {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) scale(0);
    opacity: 0;
  }
}

.fade-in {
  animation: fadeIn 1s ease forwards;
}

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

/* =========================================
   MEDIA QUERIES (RESPONSIVE)
   ========================================= */
@media (max-width: 1024px) {
  .hero-title { font-size: 3.5rem; }
  .fc-large, .fc-small, .fc-half { grid-column: span 12; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  body { padding-bottom: 80px; } /* Space for mobile nav */
  
  .top-bar { padding: 16px 20px; }
  .container { padding: 0 20px; }
  .section-spacing { padding: 80px 0; }
  
  /* Mobile Nav App Style */
  .side-nav {
    top: auto;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 400px;
    height: 64px;
    flex-direction: row;
    justify-content: space-around;
    padding: 0 20px;
    background: rgba(11, 12, 16, 0.85);
    backdrop-filter: blur(25px);
  }
  
  .nav-item::before { display: none; }
  
  .hero-title { font-size: 2.5rem; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; }
  
  .game-section { margin-top: 40px; }
}