:root {
  /* Background Palette */
  --bg-primary: #050816;
  --bg-secondary: #0f172a;
  --bg-surface: #131c31;

  /* Candy Accent Colors - Gradients */
  --neon-pink: linear-gradient(135deg, #ff4fd8, #ff8bdc);
  --electric-blue: linear-gradient(135deg, #38bdf8, #6366f1);
  --candy-purple: linear-gradient(135deg, #8b5cf6, #d946ef);
  --sweet-orange: linear-gradient(135deg, #fb7185, #f97316);
  --premium-blend: linear-gradient(135deg, #ff4fd8, #8b5cf6, #38bdf8);

  /* Glow System */
  --glow-pink: rgba(255, 79, 216, 0.45);
  --glow-blue: rgba(56, 189, 248, 0.45);
  --glow-purple: rgba(139, 92, 246, 0.45);
  --glow-orange: rgba(249, 115, 22, 0.35);

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.1);

  /* Typography */
  --text-primary: #ffffff;
  --text-secondary: #dbe4ff;
  --text-muted: #94a3b8;
  
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing & Layout */
  --max-width: 1320px;
  --sidebar-width: 80px;
  --spacing-desktop: 120px;
  --spacing-tablet: 80px;
  --spacing-mobile: 60px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

/* ================== BACKGROUND & EFFECTS ================== */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float 20s infinite ease-in-out alternate;
}

.orb-1 { width: 400px; height: 400px; background: var(--candy-purple); top: -10%; left: -10%; }
.orb-2 { width: 500px; height: 500px; background: var(--electric-blue); bottom: -20%; right: -10%; animation-delay: -5s; }
.orb-3 { width: 300px; height: 300px; background: var(--neon-pink); top: 40%; left: 50%; animation-delay: -10s; }

.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.3;
  animation: drift 100s linear infinite;
}

/* ================== UTILITIES ================== */
.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 0 rgba(0, 0, 0, 0.3);
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

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

/* ================== TYPOGRAPHY ================== */
.hero-title {
  font-size: clamp(3rem, 5vw, 5.5rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: -0.04em;
}

.section-title {
  font-size: clamp(2rem, 3vw, 3rem);
  margin-bottom: 1rem;
  text-align: center;
}

.section-subtitle {
  color: var(--text-muted);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 4rem;
  font-size: 1.1rem;
}

/* ================== BUTTONS ================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  border-radius: 20px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--premium-blend);
  color: white;
  box-shadow: 0 0 20px var(--glow-purple);
  z-index: 1;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  z-index: -1;
  transition: opacity 0.3s;
}

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

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

.btn-secondary:hover {
  background: var(--glass-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* ================== LAYOUT ARCHITECTURE ================== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  margin-left: 120px; /* Sidebar width + gap */
  padding-right: 20px;
  display: flex;
  flex-direction: column;
}

/* ================== NAVIGATION (SIDEBAR) ================== */
.sidebar {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 80px;
  border-radius: 40px;
  padding: 30px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  z-index: 100;
  transition: all 0.4s ease;
}

.sidebar::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 42px;
  background: var(--premium-blend);
  z-index: -1;
  opacity: 0.5;
  filter: blur(5px);
}

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

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

.nav-item:hover, .nav-item.active {
  color: white;
  background: var(--glass-hover);
  box-shadow: 0 0 15px var(--glow-blue);
  transform: scale(1.1);
}

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

.nav-tooltip {
  position: absolute;
  left: 70px;
  background: var(--bg-surface);
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-10px);
  transition: all 0.3s ease;
  white-space: nowrap;
  border: 1px solid var(--glass-border);
}

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

/* ================== TOP RIGHT FLOATING BAR ================== */
.top-bar {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 100;
  padding: 10px 20px;
  border-radius: 28px;
}

.mobile-logo {
  display: none;
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
  letter-spacing: 1px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--candy-purple);
  border: 2px solid rgba(255,255,255,0.2);
  padding: 2px;
}

/* ================== HERO SECTION ================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding-top: 80px;
}

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

.hero-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 2rem;
  background: rgba(255, 79, 216, 0.1);
  border: 1px solid var(--glow-pink);
  color: #ff8bdc;
  text-transform: uppercase;
  box-shadow: 0 0 20px var(--glow-pink);
}

.hero-desc {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
}

.legal-disclaimer {
  margin-top: 4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  opacity: 0.8;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
}

/* ================== GAME SECTION ================== */
.game-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 10;
}

.game-container-wrapper {
  width: 100%;
  max-width: 1200px;
  position: relative;
  border-radius: 32px;
  padding: 4px;
  background: linear-gradient(135deg, #ff4fd8, #38bdf8, #8b5cf6, #f97316);
  background-size: 300% 300%;
  animation: gradientShift 8s ease infinite;
  box-shadow: 0 20px 80px rgba(139, 92, 246, 0.3);
  transition: transform 0.3s ease;
}

.game-container-wrapper:hover {
  transform: scale(1.01);
  box-shadow: 0 30px 100px rgba(255, 79, 216, 0.4);
}

.game-container {
  background: var(--bg-primary);
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 28px;
  z-index: 2;
}

.game-overlay-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  z-index: 1;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid var(--glass-border);
  border-top-color: #ff4fd8;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.game-header {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
}

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

.game-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tag {
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

.game-footer {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding: 20px;
  border-radius: 24px;
}

.game-desc {
  color: var(--text-secondary);
  max-width: 600px;
}

/* ================== FEATURES - BENTO GRID ================== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.bento-card {
  border-radius: 30px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

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

.bento-card:hover::after {
  left: 150%;
}

.bento-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  border-color: rgba(255,255,255,0.2);
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

.card-icon svg {
  width: 32px;
  height: 32px;
  color: white;
}

.bento-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 20px;
  border: 1px solid var(--glass-border);
  background: rgba(0,0,0,0.2);
}

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

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

/* Grid Spans */
.card-wide { grid-column: span 8; background: linear-gradient(145deg, var(--bg-surface), #1a233a); }
.card-square { grid-column: span 4; background: linear-gradient(145deg, rgba(255, 79, 216, 0.05), var(--bg-surface)); }
.card-half { grid-column: span 6; background: linear-gradient(145deg, var(--bg-surface), rgba(56, 189, 248, 0.05)); }

/* ================== REWARDS DASHBOARD ================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.stat-card {
  padding: 30px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.stat-wide {
  grid-column: span 2;
}

.stat-value {
  font-size: 2.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  background: var(--electric-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.energy-meter {
  width: 100%;
  height: 8px;
  background: var(--glass-border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
}

.energy-fill {
  height: 100%;
  background: var(--sweet-orange);
  width: 85%;
  border-radius: 4px;
  box-shadow: 0 0 10px var(--glow-orange);
}

/* ================== FOOTER ================== */
.site-footer {
  margin-top: 100px;
  padding: 80px 0 40px;
  border-top: 1px solid var(--glass-border);
  background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
}

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

.footer-brand h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  background: var(--premium-blend);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.company-info {
  margin-top: 25px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.company-info strong {
  color: var(--text-secondary);
}

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

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

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

.footer-links a:hover {
  color: var(--text-primary);
  text-shadow: 0 0 8px rgba(255,255,255,0.5);
}

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

.footer-disclaimer {
  font-size: 0.8rem;
  margin-bottom: 15px;
  color: var(--text-secondary);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

/* ================== ANIMATIONS ================== */
@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.05); }
  100% { transform: translate(-20px, 20px) scale(0.95); }
}

@keyframes drift {
  from { background-position: 0 0; }
  to { background-position: 1000px 1000px; }
}

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ================== RESPONSIVE DESIGN ================== */
@media (max-width: 1024px) {
  .hero-title { font-size: 3.5rem; }
  .bento-grid { grid-template-columns: repeat(8, 1fr); }
  .card-wide, .card-square, .card-half { grid-column: span 8; }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: auto;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 70px;
    flex-direction: row;
    justify-content: space-between;
    gap: 0;
    padding: 0 15px;
    border-radius: 35px;
  }
  
  .nav-tooltip { display: none; }
  .main-content { margin-left: 0; padding: 0 20px; padding-bottom: 100px; }
  
  .top-bar {
    top: 15px; right: 15px; left: 15px;
    justify-content: space-between;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
  }
  
  .mobile-logo { display: block; }

  .hero { padding-top: 120px; }
  .hero-title { font-size: 2.5rem; }
  
  .game-header { flex-direction: column; align-items: flex-start; gap: 15px; }
  .game-footer { flex-direction: column; gap: 20px; text-align: center; }
  
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  
  .stat-wide { grid-column: span 1; }
}

/* LEGAL PAGES SPECIFIC */
.legal-container {
  max-width: 800px;
  margin: 150px auto 100px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 60px;
  backdrop-filter: blur(20px);
}

.legal-hero-image {
  width: 100%;
  max-height: 250px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 2rem;
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.legal-container h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  background: var(--premium-blend);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.legal-container section {
  margin-bottom: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--glass-border);
}

.legal-container h2 {
  font-size: 1.8rem;
  margin-bottom: 1.2rem;
  color: var(--text-secondary);
}

.legal-container h3 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.8rem;
  color: var(--text-primary);
}

.legal-container p {
  margin-bottom: 1.2rem;
  color: var(--text-muted);
}

.legal-container ul {
  margin-bottom: 1.5rem;
  padding-left: 20px;
  color: var(--text-muted);
}

.legal-container ul li {
  margin-bottom: 0.8rem;
  list-style-type: disc;
}

.legal-container ul li strong {
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .legal-container {
    padding: 30px;
    margin-top: 120px;
  }
  .legal-container h1 {
    font-size: 2.2rem;
  }
}