:root {
  --primary: #0A0F24;
  --secondary: #1A1025;
  --accent: #D4AF37;
  --background: #050711;
  --surface: #121A33;
  --text-primary: #EAEAEA;
  --text-secondary: #A9B3C4;
  --font-heading: 'Cinzel', serif;
  --font-body: 'Lora', serif;
  --spell-light: rgba(20, 224, 255, 0.4);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, ul, li { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }

body {
  font-family: var(--font-body);
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.text-center { text-align: center; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }
.pb-0 { padding-bottom: 0 !important; }
.hidden { display: none !important; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-heading);
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  min-height: 44px;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: var(--primary);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}
.btn-primary:hover, .btn-primary:focus {
  background: #f1c40f;
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.5);
  transform: translateY(-2px);
}
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-secondary:hover, .btn-secondary:focus {
  background: rgba(212, 175, 55, 0.1);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

/* Magic FX Kit */
.spell-trail-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
}
.spell-trail-divider::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(20,224,255,0.8), transparent);
  animation: spell-drift 3s linear infinite;
}

.crystal-shard-orbs {
  position: absolute;
  width: 10px; height: 10px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 10px 5px var(--spell-light);
  animation: crystal-pulse 4s infinite alternate;
}

.rotating-rune-ring {
  position: absolute;
  top: -10px; left: -10px; right: -10px; bottom: -10px;
  border: 2px dashed rgba(212, 175, 55, 0.3);
  border-radius: 50%;
  pointer-events: none;
  animation: rune-orbit 20s linear infinite;
}

.enchanted-border-glyphs {
  position: relative;
  border: 1px solid rgba(212, 175, 55, 0.4);
  padding: 1px;
}
.enchanted-border-glyphs::before, .enchanted-border-glyphs::after {
  content: '❖';
  position: absolute;
  color: var(--accent);
  font-size: 14px;
}
.enchanted-border-glyphs::before { top: -10px; left: -8px; }
.enchanted-border-glyphs::after { bottom: -10px; right: -8px; }

.parchment-scroll-frame {
  background: var(--surface);
  border: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5), 0 5px 15px rgba(0,0,0,0.4);
  position: relative;
  transition: transform 0.4s ease;
}
.parchment-scroll-frame::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(255,255,255,0.05);
  pointer-events: none;
}

/* Material System */
.moonlit-stone-with-blue-spelllight {
  background: radial-gradient(circle at 50% 0%, var(--surface), var(--primary) 70%);
  position: relative;
}
.moonlit-stone-with-blue-spelllight::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 50px var(--spell-light);
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* Header & Nav */
.site-header {
  background: var(--primary);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}
.brand-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--accent);
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}
.main-nav ul {
  display: flex;
  gap: 1.5rem;
}
.main-nav a {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  transition: color 0.3s;
}
.main-nav a:hover, .main-nav a[aria-current="page"] {
  color: var(--accent);
}
.burger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.burger-line {
  display: block;
  width: 25px; height: 3px;
  background: var(--text-primary);
  margin: 4px 0;
  transition: all 0.3s;
}

/* Sections */
.section-padding { padding: 4rem 1rem; }
.section-title { font-size: 2rem; margin-bottom: 1rem; }
.section-desc { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 2rem; }

/* Hero */
.hero-section {
  display: flex;
  flex-direction: column;
}
.hero-stage {
  padding: 4rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}
.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 600px;
  z-index: 2;
}
.hero-trust-signals {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.trust-badge {
  font-size: 0.8rem;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--accent);
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  color: var(--accent);
}
.hero-content h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.hero-subtitle { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-media-panel {
  flex: 1;
  max-width: 500px;
  width: 100%;
  position: relative;
  padding: 10px;
  background: var(--surface);
}
.hero-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.1);
}
.orb-1 { top: -5px; right: -5px; }
.orb-2 { bottom: -5px; left: -5px; animation-delay: 2s; }

.hero-support-ticker-row {
  background: var(--secondary);
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  padding: 0.5rem;
  overflow: hidden;
  white-space: nowrap;
}
.ticker-content {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--accent);
  animation: ticker-slide 20s linear infinite;
}
.ticker-separator { margin: 0 1rem; opacity: 0.5; }

/* Included Games Strip */
.game-strip-container { padding: 1.5rem; border-radius: 4px; }
.game-strip {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.strip-image-wrap {
  width: 100%;
  max-width: 300px;
  position: relative;
  aspect-ratio: 16/9;
  margin: 0 auto;
}
.strip-image-wrap .rotating-rune-ring { top: -5px; left: -5px; right: -5px; bottom: -5px; }
.strip-img { width: 100%; height: 100%; object-fit: cover; border: 1px solid rgba(212, 175, 55, 0.3); position: relative; z-index: 1;}
.strip-info { flex: 2; }
.game-name { font-size: 1.5rem; margin-bottom: 0.5rem; }
.game-meta { font-size: 0.9rem; color: var(--accent); margin-bottom: 0.5rem; }
.game-short-desc { color: var(--text-secondary); margin-bottom: 1rem; }
.badge { display: inline-block; font-size: 0.8rem; background: var(--secondary); border: 1px solid rgba(255,255,255,0.1); padding: 0.2rem 0.5rem; margin: 0 0.2rem 0.2rem 0; border-radius: 2px;}
.strip-actions { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; border-left: 1px solid rgba(212, 175, 55, 0.2); padding-left: 1rem; }
.rating-display { text-align: center; }
.rating-display .score { display: block; font-size: 2rem; font-family: var(--font-heading); color: var(--accent); }
.rating-display .score-label { font-size: 0.8rem; text-transform: uppercase; color: var(--text-secondary); }

/* Deep Guide */
.guide-intro { max-width: 800px; margin: 0 auto 3rem auto; text-align: center; font-size: 1.1rem; }
.guide-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.guide-block {
  padding: 1.5rem;
  background: rgba(18, 26, 51, 0.8);
  transition: background 0.3s;
}
.guide-block h3 { margin-bottom: 1rem; font-size: 1.3rem; }
.guide-block p { margin-bottom: 1rem; color: var(--text-secondary); }
.guide-block p:last-child { margin-bottom: 0; }

/* Interactive Spell: bestiary-accordion-reveal */
.bestiary-accordion-reveal .guide-block { cursor: pointer; }
.bestiary-accordion-reveal .guide-block p { max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.4s ease, opacity 0.4s ease, margin 0.4s ease; margin-bottom: 0; }
.bestiary-accordion-reveal .guide-block.active p { max-height: 500px; opacity: 1; margin-bottom: 1rem; }
.bestiary-accordion-reveal .guide-block.active { box-shadow: 0 0 20px var(--spell-light); border-color: var(--accent); }
.js-enabled .bestiary-accordion-reveal .guide-block:first-child p { max-height: 500px; opacity: 1; margin-bottom: 1rem; } /* Default open first */

/* Method Cards */
.method-cards-wrapper { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-top: 2rem; }
.method-card { padding: 2rem 1rem; position: relative; }
.icon-ring { width: 50px; height: 50px; margin: 0 auto 1rem; position: relative; border-radius: 50%; border: 2px dashed var(--accent); animation: rune-orbit 10s linear infinite; top: auto; left: auto; right: auto; bottom: auto; }
.method-card h4 { margin-bottom: 0.5rem; }
.method-card p { font-size: 0.9rem; color: var(--text-secondary); }

/* About Section */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.about-grid.align-center { align-items: center; }
.about-text p { margin-bottom: 1rem; }
.framed-image { width: 100%; height: auto; display: block; filter: sepia(0.2) contrast(1.1); }
.max-width-center { max-width: 700px; margin: 0 auto; }

/* Page Headers */
.page-header { padding: 4rem 1rem; border-bottom: 1px solid rgba(212, 175, 55, 0.2); }

/* Catalog Page */
.search-filter-runes { display: flex; flex-direction: column; gap: 1rem; padding: 1.5rem; margin-bottom: 2rem; }
.filter-group { display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.filter-group label { font-family: var(--font-heading); color: var(--accent); font-size: 0.9rem; }
.filter-group input, .filter-group select {
  padding: 0.75rem;
  background: var(--background);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--text-primary);
  font-family: var(--font-body);
}
.catalog-stack { display: flex; flex-direction: column; gap: 2rem; }
.catalog-row {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  padding: 1rem;
  gap: 1.5rem;
  transition: transform 0.3s, box-shadow 0.3s;
}
.catalog-row:hover { transform: translateY(-3px); box-shadow: 0 5px 20px rgba(0,0,0,0.6); }
.row-media { width: 100%; aspect-ratio: 16/9; position: relative; }
.row-media img { width: 100%; height: 100%; object-fit: cover; }
.row-content { flex: 2; }
.row-title { margin-bottom: 0.5rem; font-size: 1.5rem; }
.row-meta { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 1rem; }
.row-desc { font-size: 0.95rem; margin-bottom: 1rem; }
.row-action { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1rem; gap: 1rem; }
.astral-score { text-align: center; }
.astral-score .val { display: block; font-family: var(--font-heading); font-size: 2rem; color: var(--accent); }
.astral-score .lbl { font-size: 0.8rem; text-transform: uppercase; color: var(--text-secondary); }

/* Contact Form */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; }
.contact-form-wrapper { padding: 2rem; }
.form-title { margin-bottom: 1.5rem; text-align: center; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-family: var(--font-heading); color: var(--accent); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 0.75rem;
  background: var(--background);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--text-primary);
  font-family: var(--font-body);
}
.w-full { width: 100%; }

/* Policies */
.policy-content h2 { margin-top: 2rem; margin-bottom: 1rem; }
.policy-content p { margin-bottom: 1rem; color: var(--text-secondary); }

/* Footer */
.site-footer {
  background: var(--primary);
  border-top: 2px solid var(--accent);
  padding: 4rem 1rem 2rem;
  margin-top: 4rem;
}
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-logo { font-size: 1.5rem; color: var(--accent); margin-bottom: 0.5rem; }
.footer-links h4, .footer-legal h4 { color: var(--text-primary); margin-bottom: 1rem; }
.footer-links li, .footer-legal li { margin-bottom: 0.5rem; }
.footer-links a:hover, .footer-legal a:hover { color: var(--accent); }
.small-text { font-size: 0.8rem; color: var(--text-secondary); margin-top: 1rem; }

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 1000;
  padding: 1.5rem;
}
.cookie-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
}
.cookie-content a { color: var(--accent); text-decoration: underline; }

/* Reveal Animation */
.reveal-el { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.reveal-el.is-visible { opacity: 1; transform: translateY(0); }

/* Keyframes */
@keyframes spell-drift {
  0% { left: -100%; }
  100% { left: 100%; }
}
@keyframes crystal-pulse {
  0% { box-shadow: 0 0 10px 5px var(--spell-light); transform: translateY(0); }
  100% { box-shadow: 0 0 20px 10px rgba(212, 175, 55, 0.4); transform: translateY(-10px); }
}
@keyframes rune-orbit {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes ticker-slide {
  0% { transform: translateX(50%); }
  100% { transform: translateX(-100%); }
}
@keyframes parchment-unfurl {
  from { transform: scaleY(0.9) rotateX(10deg); opacity: 0; }
  to { transform: scaleY(1) rotateX(0deg); opacity: 1; }
}

/* Media Queries */
@media (min-width: 768px) {
  .hero-stage { flex-direction: row; justify-content: space-between; padding: 6rem 2rem; max-width: 1200px; margin: 0 auto; }
  .hero-content { align-items: flex-start; text-align: left; }
  .game-strip { flex-direction: row; align-items: center; }
  .strip-image-wrap { margin: 0; }
  .strip-actions { border-left: 1px solid rgba(212, 175, 55, 0.2); border-top: none; padding-top: 0; }
  .guide-grid { grid-template-columns: repeat(2, 1fr); }
  .method-cards-wrapper { grid-template-columns: repeat(3, 1fr); }
  .about-grid, .contact-grid { grid-template-columns: 1fr 1fr; }
  .search-filter-runes { flex-direction: row; align-items: flex-end; }
  .catalog-row { flex-direction: row; align-items: center; }
  .row-media { width: 250px; }
  .row-action { border-top: none; border-left: 1px solid rgba(255,255,255,0.1); padding-top: 0; padding-left: 1rem; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .cookie-banner { left: auto; right: 20px; width: 400px; }
  
  .burger-menu { display: none; }
  .main-nav { display: block !important; }
}

@media (max-width: 767px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--surface);
    padding: 1rem;
    border-bottom: 1px solid var(--accent);
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 1rem; }
  .burger-menu { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-el { opacity: 1; transform: none; }
  .ticker-content { animation: none; transform: none; }
}
