:root {
    --color-primary: #1DBA84;    /* Emerald */
    --color-secondary: #0E7C66;  /* Deep Jade */
    --color-accent: #F3C85A;     /* Arcane Gold */
    --color-bg: #081311;         /* Deep Graphite */
    --color-surface: rgba(18, 33, 29, 0.85); /* Obsidian glass */
    --color-text-primary: #EAF7F2;
    --color-text-secondary: #A9C5BB;
    --font-heading: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;
    --border-magical: 1px solid rgba(243, 200, 90, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

h1, h2, h3, h4, .brand-logo {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-accent);
}

a { color: var(--color-primary); text-decoration: none; transition: 0.3s; }
a:hover { color: var(--color-accent); }

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

/* Material System: obsidian-glass-with-violet-sigils (adapted to emerald-noir) */
.obsidian-glass {
    background: var(--color-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--border-magical);
    box-shadow: 0 4px 30px rgba(0,0,0,0.5), inset 0 0 20px rgba(14, 124, 102, 0.2);
    border-radius: 8px;
}

/* Layout Utilities */
.hidden { display: none !important; }
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-family: var(--font-heading);
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}
.btn-primary {
    background: var(--color-primary);
    color: var(--color-bg);
    box-shadow: 0 0 15px rgba(29, 186, 132, 0.4);
}
.btn-primary:hover {
    background: var(--color-accent);
    box-shadow: 0 0 25px rgba(243, 200, 90, 0.6);
}
.btn-secondary {
    background: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
}
.btn-secondary:hover {
    background: rgba(243, 200, 90, 0.1);
}
.btn-small { padding: 0.5rem 1rem; font-size: 0.9rem; }
.btn-block { display: block; width: 100%; }

/* Navigation */
.guild-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
    border-bottom: 2px solid var(--color-secondary);
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.brand-logo { font-size: 1.5rem; color: var(--color-primary); display: flex; align-items: center; gap: 0.5rem; margin-bottom:0;}
.nav-links { list-style: none; display: flex; gap: 1.5rem; }
.nav-links a { color: var(--color-text-primary); font-weight: 500; font-family: var(--font-heading);}
.nav-links a:hover, .nav-links a.active { color: var(--color-accent); text-shadow: 0 0 8px var(--color-accent); }

/* Mobile Burger */
.burger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}
.burger-menu span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--color-text-primary);
    transition: 0.3s;
}

/* Magic FX Kit */
.magic-particles {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: -1;
    background-image: radial-gradient(circle at 15% 50%, rgba(29, 186, 132, 0.05), transparent 25%),
                      radial-gradient(circle at 85% 30%, rgba(243, 200, 90, 0.05), transparent 25%);
    animation: drift 20s infinite alternate linear;
}
@keyframes drift {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-50px) scale(1.1); }
}

.portal-glow {
    animation: portalPulse 4s infinite alternate ease-in-out;
}
@keyframes portalPulse {
    0% { box-shadow: 0 0 15px rgba(29, 186, 132, 0.2), inset 0 0 20px rgba(14, 124, 102, 0.2); }
    100% { box-shadow: 0 0 30px rgba(29, 186, 132, 0.5), inset 0 0 40px rgba(14, 124, 102, 0.4); }
}

.rune-ring {
    display: inline-block;
    width: 16px; height: 16px;
    border: 2px dotted var(--color-accent);
    border-radius: 50%;
    animation: runeSpin 6s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}
@keyframes runeSpin {
    100% { transform: rotate(360deg); }
}

.enchanted-glyphs {
    text-shadow: 0 0 10px var(--color-primary), 0 0 20px var(--color-primary);
    color: #fff;
    display: inline-block;
}

.arcane-compass {
    position: absolute;
    bottom: 10px; right: 10px;
    width: 40px; height: 40px;
    border: 1px solid var(--color-accent);
    border-radius: 50%;
    opacity: 0.5;
    background: conic-gradient(from 0deg, transparent, rgba(243, 200, 90, 0.3), transparent);
    animation: compassTurn 10s linear infinite;
    pointer-events: none;
}
@keyframes compassTurn {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spell-trail-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-primary), var(--color-accent), transparent);
    margin: 4rem auto;
    opacity: 0.5;
}

/* Hero Section (Dashboard Command + Stacked) */
.hero-dashboard-command {
    padding: 4rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hero-structure-editorial-stack {
    text-align: center;
    max-width: 900px;
}
.hero-emphasis-trust-first {
    margin-bottom: 1.5rem;
}
.trust-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-secondary);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    background: rgba(8, 19, 17, 0.8);
}
.hero-title { font-size: 3rem; margin-bottom: 1rem; }
.hero-subtitle { font-size: 1.2rem; color: var(--color-text-secondary); margin-bottom: 2.5rem; }

.dashboard-command-panel {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 2rem;
    gap: 2rem;
    text-align: left;
    position: relative;
    overflow: hidden;
}
.hero-visual-framed-media-panel {
    flex: 1;
    position: relative;
    border: var(--border-magical);
    border-radius: 4px;
    padding: 5px;
}
.framed-media-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
    object-fit: cover;
}
.command-quest-board { flex: 1; }
.quest-board-title { border-bottom: 1px solid var(--color-secondary); padding-bottom: 0.5rem; margin-bottom: 1rem; }
.quest-row { margin-bottom: 0.8rem; font-size: 1rem; }
.quest-row strong { color: var(--color-accent); }
.command-actions { margin-top: 1.5rem; display: flex; gap: 1rem; }

/* Ticker Row */
.hero-support-ticker-row {
    width: 100%;
    background: var(--color-secondary);
    padding: 0.8rem 0;
    overflow: hidden;
    white-space: nowrap;
    border-top: 1px solid var(--color-primary);
    border-bottom: 1px solid var(--color-primary);
}
.ticker-content {
    display: inline-block;
    animation: tickerMove 20s linear infinite;
}
.ticker-content span {
    display: inline-block;
    margin: 0 2rem;
    font-family: var(--font-heading);
    color: var(--color-bg);
    font-weight: bold;
}
@keyframes tickerMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Sections & Typography */
section { padding: 4rem 0; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header p { color: var(--color-text-secondary); }

/* Included Games (Artifact Shelf) */
.artifact-shelf-game-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}
.artifact-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    perspective: 1000px;
}
.artifact-media { position: relative; }
.artifact-media img { width: 100%; height: 200px; object-fit: cover; border-bottom: var(--border-magical); }
.score-badge {
    position: absolute; top: 10px; right: 10px;
    background: var(--color-bg); border: 1px solid var(--color-accent);
    color: var(--color-accent); padding: 5px 10px;
    font-family: var(--font-heading); font-weight: bold;
    border-radius: 4px; box-shadow: 0 0 10px rgba(243,200,90,0.5);
}
.artifact-content { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.artifact-meta { margin-bottom: 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.meta-tag {
    font-size: 0.8rem; background: rgba(14, 124, 102, 0.3);
    padding: 2px 8px; border-radius: 12px; border: 1px solid var(--color-primary);
}
.artifact-desc { font-size: 0.95rem; color: var(--color-text-secondary); margin-bottom: 1.5rem; flex: 1; }
.catalog-modes { margin-bottom: 1rem; font-size: 0.9rem; color: var(--color-primary); }

/* Rating Methodology Grid */
.methodology-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
}

/* Deep Editorial Guide */
.parchment-scroll-frame, .guide-parchment-scroll {
    padding: 3rem;
    border: var(--border-magical);
    border-radius: 4px;
    position: relative;
}
.parchment-scroll-frame::before, .guide-parchment-scroll::before,
.parchment-scroll-frame::after, .guide-parchment-scroll::after {
    content: '✧'; position: absolute; color: var(--color-accent); font-size: 1.5rem;
}
.parchment-scroll-frame::before, .guide-parchment-scroll::before { top: 10px; left: 15px; }
.parchment-scroll-frame::after, .guide-parchment-scroll::after { bottom: 10px; right: 15px; }

.fantasy-game-guide h2 { text-align: center; margin-bottom: 2rem; font-size: 2.2rem; }
.fantasy-game-guide h3 { margin-top: 2.5rem; color: var(--color-primary); border-bottom: 1px dashed var(--color-secondary); padding-bottom: 0.5rem;}
.fantasy-game-guide p { margin-bottom: 1.2rem; text-align: justify; }

/* Contact CTA */
.cta-box { text-align: center; padding: 4rem 2rem; border: var(--border-magical); background: rgba(14, 124, 102, 0.1); border-radius: 8px;}
.cta-box p { margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }

/* Footer */
.guild-footer { background: #040908; border-top: 2px solid var(--color-secondary); padding: 3rem 0 1rem; margin-top: 4rem; }
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2rem; margin-bottom: 2rem; }
.footer-brand h3 { margin-bottom: 0.5rem; }
.company-address { font-size: 0.9rem; color: var(--color-text-secondary); margin-top: 1rem; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-bottom { text-align: center; border-top: 1px solid #12211D; padding-top: 1rem; font-size: 0.85rem; color: var(--color-text-secondary); }

/* Catalog specific */
.catalog-header { text-align: center; }
.search-rune-filters {
    display: flex; gap: 1rem; padding: 1.5rem; flex-wrap: wrap;
    align-items: center; justify-content: center; margin-bottom: 2rem;
}
.search-input, .filter-select {
    background: rgba(8, 19, 17, 0.8);
    border: 1px solid var(--color-secondary);
    color: var(--color-text-primary);
    padding: 0.75rem; border-radius: 4px;
    font-family: var(--font-body);
}
.search-input:focus, .filter-select:focus { outline: none; border-color: var(--color-primary); }
.empty-state { text-align: center; padding: 3rem; color: var(--color-accent); font-style: italic; }

/* Forms */
.form-wrapper { padding: 2.5rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: var(--color-primary); }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 0.8rem;
    background: rgba(8, 19, 17, 0.6);
    border: 1px solid var(--color-secondary);
    color: var(--color-text-primary); border-radius: 4px;
}
.form-success { margin-top: 1rem; color: var(--color-accent); border: 1px dashed var(--color-accent); padding: 1rem; text-align: center; }
.spell-divider { border: 0; height: 1px; background: var(--color-secondary); margin: 2rem 0; }

/* Cookie Banner */
.cookie-banner {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    width: 90%; max-width: 600px; padding: 1.5rem;
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    z-index: 1000; flex-wrap: wrap; opacity: 1; transition: opacity 0.5s;
}

/* Animations */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .magic-particles, .rune-ring, .portal-glow, .arcane-compass { animation: none !important; }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none; position: absolute; top: 100%; left: 0; width: 100%;
        background: var(--color-surface); flex-direction: column; padding: 1rem 0;
        text-align: center; box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    }
    .nav-links.open { display: flex; }
    .burger-menu { display: flex; }
    .hero-title { font-size: 2rem; }
    .dashboard-command-panel { flex-direction: column; }
    .methodology-grid { grid-template-columns: 1fr; }
    .footer-content { flex-direction: column; text-align: center; }
    .parchment-scroll-frame, .guide-parchment-scroll { padding: 1.5rem; }
}
@media (max-width: 360px) {
    .btn-primary, .btn-secondary { width: 100%; margin-bottom: 0.5rem; }
    .command-actions { flex-direction: column; }
}
