:root {
  /* Base Colors */
  --bg-primary: #0b0b0c;
  --bg-secondary: #161617;
  
  /* Accent Colors */
  --flame-red: #ef4444;
  --ember-orange: #f97316;
  --lantern-gold: #facc15;
  --mystic-purple: #a855f7;
  --glow-white: #fafafa;
  
  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #d4d4d8;
  --text-muted: #71717a;
  
  /* Gradients */
  --grad-flame: linear-gradient(135deg, var(--flame-red), var(--ember-orange));
  --grad-lantern: linear-gradient(135deg, var(--lantern-gold), var(--ember-orange));
  --grad-mystic: linear-gradient(135deg, var(--mystic-purple), var(--flame-red));
  
  /* Glow Effects */
  --glow-red: rgba(239, 68, 68, 0.45);
  --glow-gold: rgba(250, 204, 21, 0.35);
  --glow-purple: rgba(168, 85, 247, 0.35);
  
  /* Surface */
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(18px);
  
  /* Dimensions */
  --max-width: 1280px;
  --nav-height: 80px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  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;
}

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

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  margin-bottom: 1rem;
  background: var(--grad-lantern);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px var(--glow-gold);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
  color: var(--glow-white);
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--lantern-gold);
}

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* =========================================
   LAYOUT & CONTAINERS
   ========================================= */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
}

.section {
  padding: 100px 0;
  position: relative;
  z-index: 1;
}

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255,255,255,0.02);
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 100;
  transition: all 0.3s ease;
  background: rgba(11, 11, 12, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

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

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--glow-white);
  text-shadow: 0 0 10px var(--glow-red);
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--grad-flame);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 2L15 8H9L12 2Z" fill="currentColor"/><path d="M16 9C16 9 18 14 18 16C18 19.3137 15.3137 22 12 22C8.68629 22 6 19.3137 6 16C6 14 8 9 8 9H16Z" fill="currentColor"/></svg>') no-repeat center / contain;
  mask: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 2L15 8H9L12 2Z" fill="currentColor"/><path d="M16 9C16 9 18 14 18 16C18 19.3137 15.3137 22 12 22C8.68629 22 6 19.3137 6 16C6 14 8 9 8 9H16Z" fill="currentColor"/></svg>') no-repeat center / contain;
  animation: flicker 3s infinite alternate;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  transition: color 0.3s ease;
  padding: 8px 0;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--glow-white);
  text-shadow: 0 0 8px var(--glow-gold);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--grad-lantern);
  transition: width 0.3s ease;
  box-shadow: 0 0 10px var(--glow-gold);
}

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

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--glow-white);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 992px) {
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    right: -100%;
    width: 250px;
    height: calc(100vh - var(--nav-height));
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 40px 24px;
    gap: 24px;
    transition: right 0.3s ease;
    border-left: 1px solid var(--glass-border);
    box-shadow: -10px 0 30px rgba(0,0,0,0.8);
  }
  
  .nav-links.show {
    right: 0;
  }
  
  .mobile-menu-btn {
    display: block;
  }
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary {
  background: var(--grad-flame);
  color: #fff;
  box-shadow: 0 4px 20px var(--glow-red);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--grad-lantern);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

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

.btn-primary:hover::before {
  opacity: 1;
}

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

.btn-outline {
  background: transparent;
  color: var(--glow-white);
  border: 2px solid var(--mystic-purple);
  box-shadow: 0 0 15px var(--glow-purple) inset, 0 0 15px var(--glow-purple);
}

.btn-outline:hover {
  background: rgba(168, 85, 247, 0.1);
  box-shadow: 0 0 25px var(--glow-purple) inset, 0 0 25px var(--glow-purple);
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-height);
  text-align: center;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('assets/images/floating-lanterns-night-sky-festival.jpg');
  background-size: cover;
  background-position: center;
  z-index: 0;
  opacity: 0.4;
  animation: parallax 20s linear infinite alternate;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, transparent 0%, var(--bg-primary) 100%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

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

.legal-warning {
  margin-top: 32px;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(0,0,0,0.5);
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.05);
}

/* Floating Particles/Lanterns */
.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--grad-lantern);
  box-shadow: 0 0 20px 5px var(--glow-gold);
  opacity: 0.6;
  z-index: 1;
  animation: floatUp 15s infinite linear;
}

/* =========================================
   GAME SECTION
   ========================================= */
.game-section {
  background: linear-gradient(to bottom, var(--bg-primary), var(--bg-secondary));
  position: relative;
}

.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 40px;
}

.game-wrapper {
  width: 100%;
  max-width: 1000px;
  aspect-ratio: 16/9;
  border-radius: 24px;
  padding: 4px;
  background: var(--grad-mystic);
  box-shadow: 0 0 40px var(--glow-purple), inset 0 0 20px rgba(0,0,0,0.8);
  position: relative;
  overflow: hidden;
}

.game-wrapper iframe {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  border: none;
  background: #000;
  display: block;
}

.game-image-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('assets/images/fantasy-lantern-slot-machine-glowing-reels.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  z-index: -1;
}

/* =========================================
   FEATURES SECTION (MAGIC CARDS)
   ========================================= */
.features-section {
  background: var(--bg-secondary);
}

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

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

.magic-card {
  position: relative;
  overflow: hidden;
  padding: 40px 30px;
  border-radius: 24px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 1;
}

.magic-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: var(--card-bg);
  background-size: cover;
  background-position: center;
  opacity: 0.1;
  z-index: -1;
  transition: opacity 0.4s ease;
}

.magic-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 2px;
  background: var(--grad-mystic);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.magic-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 30px var(--glow-purple);
  background: rgba(255,255,255,0.08);
}

.magic-card:hover::before {
  opacity: 0.3;
}

.magic-card:hover::after {
  opacity: 1;
}

.card-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 24px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 0 20px var(--glow-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
  animation: pulseGlow 3s infinite alternate;
}

/* =========================================
   INTERNAL PAGES (ABOUT, CONTACT, LEGAL)
   ========================================= */
.page-hero {
  padding: 180px 0 80px;
  text-align: center;
  background: radial-gradient(circle at top center, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border-bottom: 1px solid var(--glass-border);
  position: relative;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: var(--page-bg, none);
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  z-index: 0;
}

.page-content {
  padding: 80px 0;
}

.content-box {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px;
}

.content-box h2 {
  margin-top: 40px;
  font-size: 1.8rem;
}

.content-box ul {
  list-style: disc inside;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

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

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 14px 20px;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--ember-orange);
  box-shadow: 0 0 15px var(--glow-gold);
}

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

.contact-info {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 20px;
}

.info-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--lantern-gold);
  box-shadow: 0 0 15px var(--glow-gold);
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--glass-border);
  padding: 60px 0 20px;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--grad-mystic);
  opacity: 0.3;
}

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

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

.footer-about p {
  margin-top: 16px;
  max-width: 400px;
}

.footer-links h4 {
  color: var(--glow-white);
  margin-bottom: 20px;
  font-size: 1.2rem;
}

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

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

.footer-links a:hover {
  color: var(--ember-orange);
  text-shadow: 0 0 8px var(--glow-gold);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.9rem;
}

.eighteen-plus {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  color: #fff;
  background: var(--flame-red);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
}

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes flicker {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 10px var(--flame-red)); }
  50% { opacity: 0.8; filter: drop-shadow(0 0 4px var(--ember-orange)); }
  75% { opacity: 0.9; filter: drop-shadow(0 0 15px var(--lantern-gold)); }
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 10px var(--glow-red); transform: scale(1); }
  100% { box-shadow: 0 0 25px var(--glow-gold); transform: scale(1.05); }
}

@keyframes parallax {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

@keyframes floatUp {
  0% { transform: translateY(100vh) scale(0.5); opacity: 0; }
  20% { opacity: 0.6; }
  80% { opacity: 0.6; }
  100% { transform: translateY(-20vh) scale(1.2); opacity: 0; }
}

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

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