:root {
    --bg: #090A0D;
    --surface: #14171D;
    --stone: #1F242B;
    --slate: #2F3742;
    --gold: #D89C3A;
    --amber: #F2C45A;
    --blue: #3BA7D9;
    --purple: #6D3FA0;
    --grey: #8C96A3;
    --ivory: #E8DDC7;
    --text-pri: #F4EBD8;
    --text-mut: #A8A095;
    
    --grad-acc: linear-gradient(135deg, #D89C3A, #6D3FA0);
    --grad-sec: linear-gradient(135deg, #3BA7D9, #F2C45A);
    
    --font-main: 'Segoe UI', system-ui, sans-serif;
}

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

body {
    background-color: var(--bg);
    color: var(--text-pri);
    font-family: var(--font-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--ivory);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.25s ease, opacity 0.25s ease;
}

a:hover {
    color: var(--amber);
}

p {
    color: var(--text-mut);
    margin-bottom: 1rem;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.flex-split {
    display: flex;
    gap: 40px;
    align-items: center;
}

.flex-split > * {
    flex: 1;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--grad-acc);
    color: #fff;
}

.btn-secondary {
    background: var(--grad-sec);
    color: var(--bg);
}

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

.btn-primary:hover, .btn-secondary:hover, .btn-outline:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Ancient Notice Bar */
.notice-bar {
    background-color: var(--stone);
    text-align: center;
    padding: 6px 20px;
    font-size: 0.8rem;
    color: var(--text-mut);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.notice-bar a {
    color: var(--blue);
    font-weight: 600;
}

/* Vault Gate Header */
.site-header {
    background-color: var(--stone);
    border-bottom: 1px solid var(--gold);
    height: 72px;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ivory);
}

.logo-icon {
    width: 24px;
    height: 24px;
    fill: var(--gold);
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    color: var(--text-pri);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    padding-bottom: 4px;
}

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

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--purple);
}

/* Dungeon Gate Opening */
.dungeon-gate {
    padding: 60px 0;
    background-color: var(--bg);
}

.hero-image-container img {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--slate);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    object-fit: cover;
    max-height: 400px;
}

.hero-text h1 {
    font-size: 2.8rem;
    margin-bottom: 16px;
    background: var(--grad-acc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 24px;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

/* Treasure Path Highlights */
.highlights {
    background-color: var(--surface);
    padding: 30px 0;
    border-top: 1px solid var(--slate);
    border-bottom: 1px solid var(--slate);
}

.highlight-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.highlight-card {
    background-color: var(--stone);
    padding: 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid transparent;
    transition: border-color 0.25s ease;
}

.highlight-card:hover {
    border-color: var(--purple);
}

.highlight-card svg {
    width: 32px;
    height: 32px;
    fill: var(--blue);
    margin-bottom: 12px;
}

.highlight-card h3 {
    font-size: 1rem;
    margin-bottom: 6px;
    color: var(--amber);
}

.highlight-card p {
    font-size: 0.85rem;
    margin: 0;
}

/* Vault Chamber Game Section */
.vault-chamber {
    padding: 60px 0;
    text-align: center;
}

.vault-chamber h2 {
    margin-bottom: 30px;
    font-size: 2rem;
}

.game-wrapper {
    max-width: 1020px;
    margin: 0 auto;
    background-color: var(--stone);
    border: 2px solid var(--gold);
    border-radius: 28px;
    padding: 12px;
    position: relative;
    box-shadow: 0 0 40px rgba(59, 167, 217, 0.15); /* Crystal blue corner glow simulation */
}

.game-wrapper::before, .game-wrapper::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--blue);
    filter: blur(20px);
    opacity: 0.4;
    z-index: -1;
}
.game-wrapper::before { top: -10px; left: -10px; }
.game-wrapper::after { bottom: -10px; right: -10px; }

.game-inner {
    background-color: var(--bg);
    border: 1px solid var(--purple);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.game-inner iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}

/* Crystal Cavern Gallery */
.cavern-gallery {
    padding: 50px 0;
    background-color: var(--surface);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.gallery-panel {
    background-color: var(--stone);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--slate);
}

.gallery-panel img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-bottom: 1px solid var(--slate);
}

.panel-content {
    padding: 20px;
}

.panel-content h3 {
    font-size: 1.1rem;
    color: var(--blue);
}

.panel-content p {
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.panel-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold);
    display: inline-flex;
    align-items: center;
}

/* Dungeon Chronicle */
.chronicle {
    padding: 60px 0;
}

.chronicle-image img {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--gold);
    max-height: 400px;
    object-fit: cover;
}

.chronicle-text h2 {
    color: var(--amber);
    margin-bottom: 20px;
}

.chronicle-text ul {
    list-style: none;
    margin-top: 20px;
}

.chronicle-text li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    color: var(--text-pri);
    font-size: 0.95rem;
}

.chronicle-text li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--purple);
}

/* Guardian Support Hall */
.support-hall {
    background-color: var(--surface);
    padding: 60px 0;
    border-top: 1px solid var(--slate);
}

.support-info h2 {
    color: var(--ivory);
}

.support-email {
    font-size: 1.1rem;
    color: var(--gold);
    background: var(--stone);
    padding: 12px 20px;
    border-radius: 6px;
    display: inline-block;
    margin: 16px 0 24px;
    border: 1px solid var(--slate);
}

.faq-preview h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--blue);
}

.faq-preview ul {
    list-style: none;
}

.faq-preview li {
    padding: 10px 0;
    border-bottom: 1px solid var(--slate);
    color: var(--text-mut);
    font-size: 0.9rem;
}

.contact-form {
    background-color: var(--stone);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--slate);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: var(--text-pri);
}

.form-group input, .form-group textarea {
    width: 100%;
    background-color: var(--bg);
    border: 1px solid var(--slate);
    padding: 12px;
    border-radius: 4px;
    color: var(--text-pri);
    font-family: inherit;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
}

/* Footer */
.vault-footer {
    background-color: var(--bg);
    border-top: 2px solid var(--stone);
    padding: 50px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

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

.footer-col p {
    font-size: 0.85rem;
    margin-bottom: 16px;
}

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

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

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

.footer-col a:hover {
    color: var(--blue);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--stone);
    font-size: 0.8rem;
    color: var(--grey);
}

.footer-bottom p {
    margin-bottom: 8px;
    font-size: 0.75rem;
}

/* Cookie Popup */
.cookie-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(9, 10, 13, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.cookie-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.cookie-popup {
    background-color: var(--stone);
    border: 1px solid var(--gold);
    border-radius: 24px;
    padding: 30px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8);
    position: relative;
    overflow: hidden;
}

.cookie-popup::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: var(--blue);
}

.cookie-icon {
    width: 48px;
    height: 48px;
    fill: var(--gold);
    margin-bottom: 16px;
}

.cookie-popup h3 {
    margin-bottom: 12px;
    color: var(--ivory);
}

.cookie-popup p {
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.cookie-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* Subpage Template Styles */
.subpage-container {
    max-width: 800px;
    margin: 60px auto;
    padding: 40px;
    background-color: var(--surface);
    border: 1px solid var(--slate);
    border-radius: 12px;
}

.subpage-container h1 {
    color: var(--amber);
    margin-bottom: 24px;
    border-bottom: 1px solid var(--slate);
    padding-bottom: 12px;
}

.subpage-container h2 {
    margin-top: 24px;
    color: var(--blue);
    font-size: 1.2rem;
}

.return-home {
    margin-bottom: 30px;
    display: inline-block;
}

/* Responsive */
@media (max-width: 900px) {
    .flex-split { flex-direction: column; }
    .highlight-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .nav-links { display: none; }
}
@media (max-width: 600px) {
    .highlight-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; }
}