:root {
  --bg-primary: #08110b;
  --bg-secondary: #112218;
  --bg-surface: #183224;
  --accent-primary: #d4af37;
  --accent-emerald: #3ac76f;
  --highlight-royal: #f5d97b;
  --text-primary: #f9fbf8;
  --text-secondary: #c5d6cb;
  --text-muted: #7e9586;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --glass-bg: rgba(24, 50, 36, 0.6);
  --glass-border: rgba(212, 175, 55, 0.15);
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

body {
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--highlight-royal);
  line-height: 1.2;
}

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

ul {
  list-style: none;
}

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

/* Typography Utilities */
.text-emerald { color: var(--accent-emerald); }
.text-gold { color: var(--accent-primary); }
.text-center { text-align: center; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
  z-index: -1;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #b8860b 100%);
  color: var(--bg-primary);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

.btn-emerald {
  background: linear-gradient(135deg, var(--accent-emerald) 0%, #2a9d55 100%);
  color: var(--bg-primary);
  box-shadow: 0 4px 15px rgba(58, 199, 111, 0.3);
}

.btn-emerald:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(58, 199, 111, 0.5);
}

.btn-outline {
  background: transparent;
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary);
}

.btn-outline:hover {
  background: rgba(212, 175, 55, 0.1);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 1000;
  background: rgba(8, 17, 11, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--highlight-royal);
  font-weight: 700;
  letter-spacing: 1px;
}

.brand-logo svg {
  width: 32px;
  height: 32px;
  fill: var(--accent-primary);
  filter: drop-shadow(0 0 5px rgba(58, 199, 111, 0.5));
}

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

.main-nav a {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--highlight-royal);
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent-emerald);
  transition: width 0.3s ease;
  box-shadow: 0 0 8px var(--accent-emerald);
}

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

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--highlight-royal);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  padding: 12rem 2rem 6rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: radial-gradient(circle at center, rgba(24, 50, 36, 0.8) 0%, var(--bg-primary) 70%),
              url('images/photo-1605806616949-1e87b487cb2a.png') center/cover no-repeat;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(8, 17, 11, 0.3) 0%, var(--bg-primary) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
}

.hero-title {
  font-size: clamp(3rem, 5vw, 5.5rem);
  margin-bottom: 1.5rem;
  text-transform: capitalize;
  text-shadow: 0 4px 20px rgba(0,0,0,0.8);
  letter-spacing: 2px;
}

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

.hero-actions {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

/* Game Section */
.game-section {
  padding: 4rem 2rem;
  background: var(--bg-primary);
  display: flex;
  justify-content: center;
}

.game-container {
  width: 80%;
  max-width: 1200px;
  background: var(--bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 30px rgba(58, 199, 111, 0.1);
  border: 1px solid var(--glass-border);
}

.game-container iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  display: block;
}

/* Story/Content System */
.story-system {
  padding: 6rem 2rem;
  background: var(--bg-primary);
}

.story-row {
  max-width: 1200px;
  margin: 0 auto 6rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.story-row:last-child {
  margin-bottom: 0;
}

.story-row:nth-child(even) {
  direction: rtl;
}

.story-row:nth-child(even) > * {
  direction: ltr;
}

.story-image-wrap {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border: 1px solid var(--glass-border);
}

.story-image-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
  z-index: 1;
  pointer-events: none;
}

.story-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.story-image-wrap:hover img {
  transform: scale(1.05);
}

.story-content {
  padding: 2rem;
}

.context-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(58, 199, 111, 0.1);
  border: 1px solid var(--accent-emerald);
  color: var(--accent-emerald);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-radius: 50px;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 10px rgba(58, 199, 111, 0.2);
}

.story-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.story-content p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.8;
}

/* Rewards Section */
.rewards-section {
  padding: 6rem 2rem;
  background: var(--bg-secondary);
  background-image: radial-gradient(circle at top right, rgba(212, 175, 55, 0.05), transparent 50%);
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 4rem;
}

.rewards-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.reward-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  padding: 2.5rem;
  border-radius: 8px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.reward-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-emerald), transparent);
  opacity: 0;
  transition: var(--transition);
}

.reward-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.4), 0 0 20px rgba(58, 199, 111, 0.15);
  border-color: rgba(58, 199, 111, 0.3);
}

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

.reward-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: var(--highlight-royal);
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.4));
}

.reward-card h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

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

/* Stats Section */
.stats-section {
  padding: 5rem 2rem;
  background: var(--bg-primary);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.stats-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item h4 {
  font-size: 3rem;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
  text-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.stat-item p {
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Standard Pages (About, Terms, etc.) */
.page-hero {
  padding: 10rem 2rem 5rem;
  text-align: center;
  background: linear-gradient(to bottom, var(--bg-secondary), var(--bg-primary));
  border-bottom: 1px solid var(--glass-border);
}

.page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 2rem 8rem;
}

.text-block {
  margin-bottom: 3rem;
}

.text-block h2 {
  margin-bottom: 1.5rem;
  font-size: 2rem;
}

.text-block p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.text-block ul {
  list-style: disc;
  margin-left: 2rem;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.text-block li {
  margin-bottom: 0.5rem;
}

/* Form Styles */
.contact-wrapper {
  max-width: 600px;
  margin: 0 auto;
  background: var(--glass-bg);
  padding: 3rem;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.form-group {
  margin-bottom: 1.5rem;
}

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

.form-control {
  width: 100%;
  padding: 1rem;
  background: rgba(8, 17, 11, 0.8);
  border: 1px solid var(--text-muted);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: var(--font-body);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-emerald);
  box-shadow: 0 0 10px rgba(58, 199, 111, 0.2);
}

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

.form-status {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 4px;
  display: none;
  text-align: center;
  font-weight: 600;
}

.form-status.loading {
  display: block;
  background: rgba(212, 175, 55, 0.1);
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary);
}

.form-status.success {
  display: block;
  background: rgba(58, 199, 111, 0.1);
  color: var(--accent-emerald);
  border: 1px solid var(--accent-emerald);
}

.form-status.error {
  display: block;
  background: rgba(255, 50, 50, 0.1);
  color: #ff4444;
  border: 1px solid #ff4444;
}

/* Footer Redesign */
.site-footer {
  background: linear-gradient(to bottom, var(--bg-secondary), var(--bg-primary));
  position: relative;
  margin-top: auto;
  overflow: hidden;
  border-top: 1px solid var(--glass-border);
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-emerald), transparent);
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem 2rem 2rem;
  position: relative;
  z-index: 2;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4rem;
  justify-content: space-between;
  margin-bottom: 3rem;
}

.footer-brand-col {
  flex: 1 1 350px;
  max-width: 400px;
}

.site-footer .brand-logo {
  font-size: 1.8rem;
  margin-bottom: 1.2rem;
  display: inline-flex;
}

.site-footer .brand-logo svg {
  filter: none;
}

.footer-desc {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.footer-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.footer-badges-row .badge-item {
  display: inline-flex;
  align-items: center;
  color: var(--highlight-royal);
  background: rgba(212, 175, 55, 0.05);
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  font-size: 0.8rem;
  font-weight: 500;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.footer-nav-groups {
  flex: 1 1 500px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
}

.footer-heading {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.footer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-nav-list a {
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
}

.footer-nav-list a::before {
  content: '→';
  margin-right: 8px;
  color: var(--accent-emerald);
  opacity: 0;
  transform: translateX(-10px);
  transition: var(--transition);
}

.footer-nav-list a:hover {
  color: var(--accent-primary);
  transform: translateX(5px);
}

.footer-nav-list a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.footer-bottom {
  padding-top: 2.5rem;
  border-top: 1px solid var(--glass-border);
  text-align: center;
}

.footer-bottom .disclaimer {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 1.5rem;
  line-height: 1.8;
  max-width: 900px;
  margin: 0 auto;
}

.footer-bottom .copyright {
  color: var(--text-secondary);
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  right: 2rem;
  max-width: 600px;
  margin: 0 auto;
  background: rgba(17, 34, 24, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--accent-emerald);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8), 0 0 20px rgba(58, 199, 111, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  z-index: 9999;
  transform: translateY(150%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.cookie-actions {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

/* Responsive System */
@media (max-width: 1024px) {
  .game-container { width: 85%; }
  .story-row { gap: 2rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  
  .footer-grid {
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .main-nav {
    position: fixed;
    top: 70px; left: 0; width: 100%;
    background: rgba(8, 17, 11, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    padding: 2rem;
    clip-path: circle(0 at top right);
    transition: clip-path 0.5s ease-in-out;
  }
  
  .main-nav.open {
    clip-path: circle(150% at top right);
  }

  .main-nav ul {
    flex-direction: column;
    gap: 1.5rem;
  }

  .mobile-toggle { display: block; }
  
  .game-container { width: 100%; border-radius: 0; border-left: none; border-right: none; }
  .game-section { padding: 2rem 0; }
  
  .story-row, .story-row:nth-child(even) {
    grid-template-columns: 1fr;
    direction: ltr;
  }
  
  .story-image-wrap { order: -1; }
  .hero { padding: 8rem 1rem 4rem; }
  
  .cookie-banner {
    flex-direction: column;
    text-align: center;
    bottom: 0; left: 0; right: 0;
    max-width: 100%;
    border-radius: 12px 12px 0 0;
  }
  
  .footer-grid {
    flex-direction: column;
    gap: 2.5rem;
  }
  .footer-brand-col {
    max-width: 100%;
    text-align: center;
  }
  .site-footer .brand-logo {
    justify-content: center;
  }
  .footer-badges-row {
    justify-content: center;
  }
  .footer-nav-groups {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    text-align: center;
    gap: 2.5rem;
  }
  .footer-nav-list a {
    justify-content: center;
  }
  .footer-nav-list a::before {
    display: none;
  }
  .footer-nav-list a:hover {
    transform: none;
    color: var(--accent-primary);
  }
  .footer-bottom {
    padding-top: 2rem;
  }
}