:root {
  --bg-base: #050505;
  --bg-surface: #0b0c10;
  --bg-surface-light: #16181e;
  
  --text-main: #e0e2e4;
  --text-muted: #9ba0a6;
  --text-gold: #d4af37;
  
  --accent-dark: #4a0000;
  --accent-mid: #8a0303;
  --accent-bright: #ff1a1a;
  
  --border-radius-game: 20px;
  --border-radius-btn: 16px;
  --border-radius-card: 18px;
  
  --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 15px rgba(138, 3, 3, 0.3);
  --shadow-glow-hover: 0 0 25px rgba(255, 26, 26, 0.5);
  
  --font-heading: 'Cinzel', serif;
  --font-body: 'Lato', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-base);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: radial-gradient(circle at 50% 0%, var(--bg-surface) 0%, var(--bg-base) 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
}

a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-bright);
}

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

ul {
  list-style: none;
}

/* Utilities */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.py-4 { padding-top: 4rem; padding-bottom: 4rem; }

/* Header & Nav */
.site-header {
  background: rgba(5, 5, 5, 0.95);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(138, 3, 3, 0.2);
  box-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

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

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

.brand-logo img {
  height: 40px;
  width: auto;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--text-gold);
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

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

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

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

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

/* Button System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: var(--border-radius-btn);
  background: linear-gradient(to bottom, var(--accent-dark), var(--accent-mid));
  color: #fff;
  text-transform: uppercase;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 1px;
  border: 1px solid rgba(255, 26, 26, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

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

.btn:hover {
  transform: translateY(-3px);
  background: linear-gradient(to bottom, #5c0000, #a30404);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7), var(--shadow-glow-hover);
  color: #fff;
}

.btn:hover::after {
  left: 150%;
}

/* Main Content */
main {
  flex: 1;
}

/* Hero & Game Section */
.hero-section {
  position: relative;
  padding: 4rem 0 6rem;
  background: url('images/dragon-lair-dark-bg.webp') center/cover no-repeat;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(5,5,5,0.4) 0%, rgba(5,5,5,0.95) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  margin-bottom: 3rem;
  animation: fade-in-up 1s ease forwards;
}

.hero-title {
  font-size: 3.5rem;
  color: var(--text-gold);
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Game Container - STRICT REQUIREMENTS */
.game-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1250px; /* Desktop 1200-1300px */
  margin: 0 auto;
  border-radius: var(--border-radius-game);
  background-color: #000;
  box-shadow: var(--shadow-soft), var(--shadow-glow);
  border: 1px solid rgba(138, 3, 3, 0.3);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
  animation: glow-pulse 4s infinite alternate, fade-in-up 1.2s ease forwards;
}

.game-container:hover {
  transform: scale(1.01);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9), var(--shadow-glow-hover);
}

.game-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Features / Cards */
.features-section {
  padding: 4rem 0;
  background-color: var(--bg-base);
  position: relative;
  z-index: 5;
}

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

.feature-card {
  background: var(--bg-surface);
  border-radius: var(--border-radius-card);
  padding: 2.5rem 2rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  opacity: 0;
  animation: slide-up 0.8s ease forwards;
}

.feature-card:nth-child(1) { animation-delay: 0.2s; }
.feature-card:nth-child(2) { animation-delay: 0.4s; }
.feature-card:nth-child(3) { animation-delay: 0.6s; }

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 0 20px rgba(138, 3, 3, 0.1);
  border-color: rgba(138, 3, 3, 0.4);
}

.feature-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--bg-surface-light), var(--bg-base));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(212, 175, 55, 0.2);
  color: var(--text-gold);
  font-size: 1.5rem;
}

.feature-card h3 {
  color: var(--text-main);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

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

/* Content Pages (About, Terms, etc.) */
.page-header {
  padding: 5rem 0 3rem;
  text-align: center;
  background: linear-gradient(to bottom, rgba(138, 3, 3, 0.1), transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.page-title {
  font-size: 2.8rem;
  color: var(--text-gold);
  margin-bottom: 1rem;
}

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

.content-box {
  background: var(--bg-surface);
  border-radius: var(--border-radius-card);
  padding: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-soft);
  animation: fade-in 0.8s ease;
}

.content-box h2 {
  color: var(--text-gold);
  margin: 2rem 0 1rem;
  font-size: 1.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.5rem;
}

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

.content-box p {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

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

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

.content-box ul li::before {
  content: '•';
  color: var(--accent-bright);
  position: absolute;
  left: -1.5rem;
  font-size: 1.2rem;
}

/* Responsible Gaming specific */
.rg-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.rg-card {
  background: var(--bg-surface-light);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  border-top: 3px solid var(--accent-mid);
}

.rg-card h4 {
  margin-bottom: 1rem;
  color: #fff;
}

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

/* Contact Form */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  font-family: var(--font-heading);
  letter-spacing: 1px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: rgba(5, 5, 5, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-body);
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-mid);
  box-shadow: 0 0 10px rgba(138, 3, 3, 0.2);
}

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

/* Footer & Legal */
.site-footer {
  background: #020202;
  border-top: 1px solid rgba(138, 3, 3, 0.2);
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: var(--text-gold);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--accent-bright);
  padding-left: 5px;
}

.legal-notice {
  background: var(--bg-surface);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  gap: 2rem;
}

.age-icon {
  background: var(--accent-dark);
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
  flex-shrink: 0;
  border: 2px solid var(--accent-bright);
  box-shadow: 0 0 10px rgba(255, 26, 26, 0.3);
}

.legal-text {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.legal-text strong {
  color: var(--text-main);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: #666;
  font-size: 0.85rem;
}

/* Animations & Effects */
.particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

.ember {
  position: absolute;
  bottom: -10px;
  width: 4px;
  height: 4px;
  background: #ff8c00;
  border-radius: 50%;
  filter: blur(1px);
  opacity: 0;
  animation: ember-float linear infinite;
}

.ember:nth-child(1) { left: 15%; animation-duration: 4s; animation-delay: 0s; }
.ember:nth-child(2) { left: 35%; width: 6px; height: 6px; animation-duration: 5s; animation-delay: 1s; }
.ember:nth-child(3) { left: 55%; animation-duration: 3.5s; animation-delay: 2s; background: #ff1a1a; }
.ember:nth-child(4) { left: 75%; width: 5px; height: 5px; animation-duration: 6s; animation-delay: 0.5s; }
.ember:nth-child(5) { left: 85%; animation-duration: 4.5s; animation-delay: 3s; }
.ember:nth-child(6) { left: 25%; width: 3px; height: 3px; animation-duration: 5.5s; animation-delay: 1.5s; background: #ff1a1a; }

@keyframes ember-float {
  0% { transform: translateY(0) scale(1) translateX(0); opacity: 0; }
  20% { opacity: 0.8; }
  80% { opacity: 0.6; }
  100% { transform: translateY(-300px) scale(0.2) translateX(30px); opacity: 0; }
}

@keyframes glow-pulse {
  0% { box-shadow: 0 10px 30px rgba(0,0,0,0.8), 0 0 10px rgba(138, 3, 3, 0.2); }
  100% { box-shadow: 0 10px 30px rgba(0,0,0,0.8), 0 0 25px rgba(138, 3, 3, 0.5); }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Shimmer effect for text/gold */
.shimmer {
  position: relative;
  display: inline-block;
  color: rgba(212, 175, 55, 0.3);
  background: -webkit-gradient(linear, left top, right top, from(#d4af37), to(#d4af37), color-stop(0.5, #fff));
  background: -moz-linear-gradient(left, #d4af37 0%, #fff 50%, #d4af37 100%);
  background: -webkit-linear-gradient(left, #d4af37 0%, #fff 50%, #d4af37 100%);
  background: linear-gradient(to right, #d4af37 0%, #fff 50%, #d4af37 100%);
  -webkit-background-size: 125px 100%;
  background-size: 125px 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: text-shimmer 3s infinite;
  background-repeat: no-repeat;
  background-position: 0 0;
}

@keyframes text-shimmer {
  0% { background-position: -125px 0; }
  100% { background-position: 125px 0; }
}

/* Media Queries */
@media (max-width: 1024px) { /* Tablet 95% */
  .game-container {
    width: 95%;
  }
  .hero-title {
    font-size: 2.8rem;
  }
}

@media (max-width: 768px) { /* Mobile 100% */
  .nav-links {
    display: none; /* In a real scenario, JS would toggle a mobile menu */
  }
  .game-container {
    width: 100%;
    border-radius: 12px;
    aspect-ratio: 4 / 3; /* Better fit for mobile screens */
  }
  .hero-section {
    padding: 2rem 0 4rem;
  }
  .hero-title {
    font-size: 2rem;
  }
  .content-box {
    padding: 1.5rem;
  }
  .legal-notice {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}