:root {
  /* BASE COLORS */
  --void-black: #050507;
  --midnight-steel: #0f1720;
  --armor-grey: #1a2230;
  --glass-layer: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(139, 69, 19, 0.15);
  
  /* ACCENT COLORS */
  --royal-gold: #8B4513;
  --royal-gold-dim: rgba(139, 69, 19, 0.4);
  --ember-glow: #A0522D;
  --mystic-blue: #3ab0ff;
  --blood-crimson: #8b0000;
  
  /* TYPOGRAPHY COLORS */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  
  /* GRADIENTS */
  --gold-flame: linear-gradient(135deg, #8B4513, #5C2E0B);
  --mystic-energy: linear-gradient(135deg, #3ab0ff, #6a5cff);
  --metal-shine: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--void-black);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .cinematic-text {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  letter-spacing: 1px;
}

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

/* UTILITIES */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 5%;
}

.text-gradient-gold {
  background: var(--gold-flame);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.glass-panel {
  background: var(--glass-layer);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.gold-glow {
  box-shadow: 0 0 20px var(--royal-gold-dim);
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1;
}

.btn-primary {
  background: var(--gold-flame);
  color: var(--text-primary);
  border: none;
  box-shadow: 0 0 15px rgba(139, 69, 19, 0.4);
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(139, 69, 19, 0.7);
}

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

/* HEADER */
header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 100;
  transition: all 0.4s ease;
  border-bottom: 1px solid transparent;
}

header.scrolled {
  background: rgba(5, 5, 7, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(139, 69, 19, 0.15);
  padding: 15px 0;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.logo span {
  color: var(--royal-gold);
}

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--royal-gold);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

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

/* HERO SECTION */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('images/photo-1599839619722-39751411ea63.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: 0;
  transform: scale(1.1); /* For parallax */
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(5,5,7,0.4) 0%, rgba(5,5,7,0.8) 60%, rgba(5,5,7,1) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  width: 100%;
  max-width: 900px;
  padding: 0 20px;
}

.hero-title {
  font-size: clamp(3rem, 6vw, 5.5rem);
  line-height: 1.1;
  text-shadow: 0 10px 30px rgba(0,0,0,0.8);
  margin-bottom: 10px;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
}

.hero-legal-box {
  margin-top: 40px;
  padding: 20px 30px;
  border-radius: 8px;
  max-width: 600px;
  border-left: 4px solid var(--royal-gold);
}

.hero-legal-box p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.hero-legal-box p strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 5px;
  font-family: 'Cinzel', serif;
  letter-spacing: 1px;
}

/* EMBERS / PARTICLES */
.ember-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.ember {
  position: absolute;
  bottom: -20px;
  background: var(--ember-glow);
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0;
  box-shadow: 0 0 10px var(--ember-glow), 0 0 20px var(--royal-gold);
}

/* KINGDOM LORE SECTION */
.lore-section {
  padding: 120px 0;
  background: var(--void-black);
  position: relative;
}

.lore-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.lore-content {
  padding-right: 40px;
}

.section-tag {
  font-family: 'Cinzel', serif;
  color: var(--royal-gold);
  font-size: 0.9rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: block;
}

.lore-title {
  font-size: 3rem;
  margin-bottom: 30px;
  line-height: 1.2;
}

.lore-text {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.lore-image-wrapper {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

.lore-image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  pointer-events: none;
}

.lore-img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.7s ease;
}

.lore-image-wrapper:hover .lore-img {
  transform: scale(1.05);
}

/* GAME SHOWCASE */
.game-showcase {
  padding: 100px 0;
  background: var(--midnight-steel);
  position: relative;
  text-align: center;
}

.game-showcase::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--royal-gold-dim), transparent);
}

.game-showcase-title {
  font-size: 3.5rem;
  margin-bottom: 50px;
}

.game-frame-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  border-radius: 20px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(26,34,48,1) 0%, rgba(15,23,32,1) 100%);
  box-shadow: 0 30px 60px rgba(0,0,0,0.8), 0 0 40px rgba(139, 69, 19, 0.15);
  border: 1px solid rgba(139, 69, 19, 0.3);
  transition: box-shadow 0.5s ease;
}

.game-frame-wrapper:hover {
  box-shadow: 0 30px 60px rgba(0,0,0,0.8), 0 0 60px rgba(139, 69, 19, 0.3);
}

.game-frame {
  width: 100%;
  height: 700px;
  border-radius: 12px;
  border: none;
  background: #000;
  display: block;
}

/* FEATURES GRID */
.features-section {
  padding: 120px 0;
  background: var(--void-black);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 60px;
}

.feature-card {
  padding: 40px 30px;
  text-align: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.5), 0 0 20px rgba(139, 69, 19, 0.1);
  border-color: rgba(139, 69, 19, 0.4);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
  display: inline-block;
}

.feature-title {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.feature-desc {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* CINEMATIC PARALLAX SECTION */
.parallax-scene {
  height: 70vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-image: url('images/photo-1534447677768-be436bb09401.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.parallax-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5,5,7,0.7);
}

.parallax-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 800px;
  padding: 0 20px;
}

.parallax-title {
  font-size: 3rem;
  margin-bottom: 20px;
  text-shadow: 0 5px 15px rgba(0,0,0,0.8);
}

/* TRUST & LEGAL (HOMEPAGE) */
.trust-section {
  padding: 80px 0;
  background: var(--midnight-steel);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.trust-card {
  padding: 30px 20px;
  text-align: center;
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
}

.trust-icon {
  font-size: 2rem;
  margin-bottom: 15px;
  color: var(--royal-gold);
}

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

/* PAGE HEADERS (FOR INNER PAGES) */
.page-header {
  height: 50vh;
  min-height: 400px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-image: url('images/photo-1540306132717-3c5cb6378eeb.png');
  background-size: cover;
  background-position: center;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(5,5,7,0.6) 0%, rgba(5,5,7,1) 100%);
}

.page-header-content {
  position: relative;
  z-index: 10;
}

.page-title {
  font-size: 4rem;
  margin-bottom: 15px;
}

/* GENERIC CONTENT SECTION */
.content-section {
  padding: 80px 0 120px;
  background: var(--void-black);
}

.content-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.prose h2 {
  font-size: 2rem;
  margin: 40px 0 20px;
  color: var(--royal-gold);
}

.prose p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
  font-size: 1.05rem;
}

.prose ul {
  color: var(--text-secondary);
  margin-left: 20px;
  margin-bottom: 20px;
  line-height: 1.8;
}

.prose li {
  margin-bottom: 10px;
}

/* CONTACT FORM */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 40px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-family: 'Cinzel', serif;
  color: var(--royal-gold);
  letter-spacing: 1px;
}

.form-control {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 15px;
  border-radius: 4px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--royal-gold);
}

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

/* FOOTER */
footer {
  background: var(--midnight-steel);
  padding: 60px 0 30px;
  border-top: 1px solid rgba(139, 69, 19, 0.1);
}

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

.footer-brand .logo {
  margin-bottom: 20px;
}

.footer-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-links-container {
  display: flex;
  justify-content: flex-end;
  gap: 60px;
}

.footer-col h4 {
  color: var(--royal-gold);
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-col ul li a:hover {
  color: var(--royal-gold);
}

.global-legal-footer {
  padding: 30px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  margin-bottom: 30px;
  text-align: center;
}

.global-legal-footer p {
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.6;
}

.copyright {
  text-align: center;
  color: rgba(255,255,255,0.3);
  font-size: 0.8rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 20px;
}

/* RESPONSIVE */
@media (max-width: 992px) {
  .lore-grid {
    grid-template-columns: 1fr;
  }
  .lore-content {
    padding-right: 0;
    text-align: center;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-links-container {
    justify-content: center;
    flex-wrap: wrap;
  }
  .game-frame {
    height: 500px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; /* In a full build, implement a mobile menu toggle here */
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .game-frame-wrapper {
    width: 95%;
  }
  .game-frame {
    height: 400px;
  }
}

@media (max-width: 480px) {
  .game-frame-wrapper {
    width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}