:root {
  --base-dark: #0a0604;
  --surface-dark: rgba(26, 15, 10, 0.65);
  --surface-glass: rgba(40, 22, 12, 0.4);
  --brown-neon: #a0522d;
  --sand-gold: #e2b056;
  --ember-orange: #ff5722;
  --text-primary: #fdf5e6;
  --text-secondary: #c4b5a3;
  --glow-ember: 0 0 25px rgba(255, 87, 34, 0.3);
  --glow-ember-intense: 0 0 45px rgba(255, 87, 34, 0.6), 0 0 15px rgba(226, 176, 86, 0.4);
  --border-glass: 1px solid rgba(226, 176, 86, 0.15);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --font-main: 'Inter', -apple-system, sans-serif;
  --font-display: 'Cinzel', serif;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--base-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Global Background Textures & Particles */
.bg-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -3;
  object-fit: cover;
  opacity: 0.15;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.bg-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  object-fit: cover;
  opacity: 0.6;
  pointer-events: none;
  animation: floatDust 40s linear infinite;
}

.bg-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background: radial-gradient(circle at 50% 100%, rgba(160, 82, 45, 0.15) 0%, rgba(10, 6, 4, 1) 70%);
  pointer-events: none;
}

@keyframes floatDust {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
  100% { transform: translateY(0) scale(1); }
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 1px;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  text-transform: uppercase;
  background: linear-gradient(to bottom, #fff, var(--sand-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  text-shadow: 0 0 30px rgba(226, 176, 86, 0.3);
}

h2 {
  font-size: clamp(2rem, 3vw, 3rem);
  color: var(--sand-gold);
  margin-bottom: 2rem;
  text-align: center;
}

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

a:hover {
  color: var(--ember-orange);
  text-shadow: 0 0 10px rgba(255, 87, 34, 0.5);
}

/* Header */
.smart-header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 0;
  z-index: 1000;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--border-glass);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s ease-in-out, background 0.3s;
}

.smart-header.hidden {
  transform: translateY(-100%);
}

.nav-container {
  max-width: 1350px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--sand-gold);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-shadow: 0 0 15px rgba(226, 176, 86, 0.4);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Mobile Menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  width: 30px;
  height: 2px;
  background: var(--sand-gold);
  transition: var(--transition);
}

/* Buttons */
.btn-primary {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--base-dark);
  background: linear-gradient(135deg, var(--sand-gold), var(--ember-orange));
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: var(--glow-ember);
  transition: var(--transition);
  text-align: center;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--glow-ember-intense);
  color: #fff;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 2rem;
  overflow: hidden;
}

.hero-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 0.4;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 50%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 50%, rgba(0,0,0,0) 100%);
}

.hero-content {
  max-width: 900px;
  z-index: 1;
  animation: fadeIn 1.5s ease-out;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* Game Section */
.game-section {
  padding: 4rem 2rem;
  max-width: 1350px;
  margin: 0 auto;
  position: relative;
}

.game-backdrop {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 110%;
  height: 120%;
  object-fit: cover;
  z-index: -1;
  opacity: 0.15;
  filter: blur(10px);
  pointer-events: none;
}

.game-wrapper {
  position: relative;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  background: var(--surface-dark);
  border-radius: 16px;
  border: var(--border-glass);
  padding: 1rem;
  box-shadow: var(--glow-ember);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  animation: emberBreathe 4s infinite alternate ease-in-out;
}

.game-wrapper::before {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 10%;
  width: 80%;
  height: 20px;
  background: rgba(255, 87, 34, 0.4);
  filter: blur(20px);
  z-index: -1;
}

.game-wrapper iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 500px;
  border: none;
  border-radius: 8px;
  background: #000;
  display: block;
}

@keyframes emberBreathe {
  0% { box-shadow: 0 0 20px rgba(255, 87, 34, 0.2); border-color: rgba(226, 176, 86, 0.1); }
  100% { box-shadow: 0 0 45px rgba(255, 87, 34, 0.4), 0 0 15px rgba(226, 176, 86, 0.2); border-color: rgba(226, 176, 86, 0.4); }
}

/* Card System / Features */
.features-section {
  padding: 5rem 2rem;
  max-width: 1350px;
  margin: 0 auto;
}

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

.glass-card {
  background: var(--surface-glass);
  border: var(--border-glass);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.glass-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(226, 176, 86, 0.1), transparent);
  transform: skewX(-20deg);
  transition: 0.5s;
}

.glass-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--glow-ember);
  border-color: rgba(226, 176, 86, 0.4);
}

.glass-card:hover::after {
  left: 200%;
}

.glass-card h3 {
  color: var(--sand-gold);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

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

/* Content Pages (Legal, About, etc.) */
.content-page {
  padding: 10rem 2rem 5rem;
  max-width: 1000px;
  margin: 0 auto;
  min-height: calc(100vh - 300px);
}

.content-box {
  background: var(--surface-glass);
  border: var(--border-glass);
  border-radius: 16px;
  padding: 3rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.content-box h2 {
  text-align: left;
  margin-top: 2rem;
  font-size: 1.8rem;
}

.content-box h2:first-child {
  margin-top: 0;
}

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

.content-box ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

.content-box li {
  margin-bottom: 0.5rem;
}

/* Footer / Legal Section */
.site-footer {
  background: rgba(10, 6, 4, 0.9);
  border-top: var(--border-glass);
  padding: 4rem 2rem 2rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1350px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-transform: uppercase;
}

.footer-links a:hover {
  color: var(--sand-gold);
}

.legal-warning {
  background: rgba(255, 87, 34, 0.1);
  border: 1px solid rgba(255, 87, 34, 0.3);
  padding: 1.5rem 2rem;
  border-radius: 8px;
  max-width: 800px;
}

.legal-warning p {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: bold;
  letter-spacing: 0.5px;
  margin: 0;
  text-transform: uppercase;
}

.copyright {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-top: 2rem;
  opacity: 0.7;
}

/* Utilities */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 1199px) {
  .game-wrapper iframe {
    min-height: 450px;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }
  
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--surface-dark);
    backdrop-filter: blur(15px);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: var(--border-glass);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path 0.4s ease-in-out;
  }

  .nav-links.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }

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

  .game-wrapper {
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 0;
  }

  .game-wrapper iframe {
    aspect-ratio: auto;
    height: 60vh;
    min-height: 400px;
    border-radius: 0;
  }

  .content-page {
    padding: 7rem 1rem 3rem;
  }
  
  .content-box {
    padding: 1.5rem;
  }
}