:root {
    --deep-cave: #0D1624;
    --midnight-stone: #1A2434;
    --crystal-blue: #42C4FF;
    --gem-cyan: #7CEEFF;
    --treasure-gold: #D8A441;
    --amber-glow: #F2B84B;
    --stone-gray: #5C6675;
    --surface: #FFFFFF;
    --primary-text: #1B2430;
    --secondary-text: #617085;
    --muted-text: #8E9AA8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--midnight-stone);
    color: var(--primary-text);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

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

h1, h2, h3, h4 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* Typography for Dark Sections */
.dark-bg {
    background-color: var(--deep-cave);
    color: var(--surface);
}

.dark-bg h1, .dark-bg h2, .dark-bg h3 {
    color: var(--gem-cyan);
}

.dark-bg p {
    color: var(--muted-text);
}

/* Typography for Light Sections */
.light-bg {
    background-color: var(--surface);
    color: var(--primary-text);
}

.light-bg p {
    color: var(--secondary-text);
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, var(--treasure-gold), var(--amber-glow));
    color: var(--primary-text);
    font-weight: 700;
    padding: 1rem 2rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(216, 164, 65, 0.4);
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--gem-cyan);
    font-weight: 700;
    padding: 1rem 2rem;
    border-radius: 8px;
    border: 2px solid var(--gem-cyan);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(124, 238, 255, 0.1);
    transform: translateY(-2px);
}

/* Top Bar */
.top-bar {
    background-color: #000000;
    color: var(--muted-text);
    text-align: center;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    z-index: 1001;
    position: relative;
    border-bottom: 1px solid rgba(92, 102, 117, 0.3);
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    background-color: rgba(26, 36, 52, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--stone-gray);
    padding: 0.5rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

/* Brand Logo Styles */
.logo-link {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.02);
}

.logo-img {
    height: 54px;
    width: auto;
    max-width: 100%;
}

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

.nav-links a {
    color: var(--surface);
    font-weight: 500;
}

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

.nav-btn {
    padding: 0.5rem 1.5rem;
}

/* Sections */
section {
    padding: 5rem 2rem;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem auto;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(13, 22, 36, 0.7), rgba(13, 22, 36, 0.9)), url('images/glowing-crystal-cavern-hero-bg.jpg') center/cover no-repeat;
    padding: 2rem;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--surface);
    margin-bottom: 1.5rem;
    text-shadow: 0 0 20px rgba(66, 196, 255, 0.5);
}

.hero p {
    font-size: 1.2rem;
    color: var(--gem-cyan);
    margin-bottom: 2.5rem;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Game Section */
.game-section {
    background-color: var(--midnight-stone);
    padding: 4rem 2rem;
}

.game-wrapper {
    margin: 0 auto;
    background: var(--deep-cave);
    border: 2px solid var(--stone-gray);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    /* Width rules */
    width: 75%; 
    max-width: 1200px;
}

.game-wrapper iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    display: block;
}

/* Discoveries */
.discoveries {
    background-color: var(--surface);
}

.discoveries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.discovery-card {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid rgba(92, 102, 117, 0.2);
    transition: transform 0.3s ease;
}

.discovery-card:hover {
    transform: translateY(-5px);
}

.discovery-img {
    height: 180px;
    width: 100%;
    object-fit: cover;
}

.discovery-content {
    padding: 1.5rem;
}

.discovery-content h3 {
    color: var(--primary-text);
    font-size: 1.25rem;
}

/* Explorer Statistics */
.stats {
    background-color: var(--deep-cave);
    padding: 4rem 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.stat-item h4 {
    font-size: 3rem;
    color: var(--treasure-gold);
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--muted-text);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

/* Crystal Chambers */
.chambers {
    background-color: var(--midnight-stone);
}

.chambers .section-header h2 {
    color: var(--surface);
}

.chambers .section-header p {
    color: var(--muted-text);
}

.chambers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.chamber-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 400px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
}

.chamber-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.chamber-card:hover .chamber-img {
    transform: scale(1.05);
}

.chamber-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(transparent, var(--deep-cave));
    color: var(--surface);
}

.chamber-overlay h3 {
    color: var(--gem-cyan);
    margin-bottom: 0.5rem;
}

/* Rewards Section */
.rewards {
    background-color: var(--surface);
}

.rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.reward-card {
    background: var(--surface);
    border: 1px solid rgba(92, 102, 117, 0.2);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.reward-img {
    height: 220px;
    width: 100%;
    object-fit: cover;
}

.reward-content {
    padding: 2rem;
}

.reward-content h3 {
    color: var(--primary-text);
}

/* About Section */
.about-section {
    background-color: var(--deep-cave);
    text-align: center;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

/* FAQ Section */
.faq {
    background-color: var(--midnight-stone);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--deep-cave);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--crystal-blue);
}

.faq-item h4 {
    color: var(--surface);
    margin-bottom: 0.5rem;
}

.faq-item p {
    color: var(--muted-text);
}

/* CTA Section */
.cta {
    background: linear-gradient(rgba(13, 22, 36, 0.8), rgba(13, 22, 36, 0.9)), url('images/glowing-crystal-cavern-hero-bg.jpg') center/cover no-repeat;
    text-align: center;
    padding: 6rem 2rem;
}

.cta h2 {
    font-size: 2.5rem;
    color: var(--surface);
}

.cta p {
    font-size: 1.2rem;
    color: var(--gem-cyan);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
footer {
    color: var(--surface);
    margin-top: auto;
}

.footer-top {
    background: linear-gradient(rgba(26, 36, 52, 0.8), rgba(13, 22, 36, 0.9)), url('images/crystal-formations-footer-bg.jpg') center/cover no-repeat;
    padding: 4rem 2rem;
}

.footer-top-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

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

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

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    color: var(--muted-text);
}

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

.footer-bottom {
    background-color: var(--deep-cave);
    border-top: 3px solid var(--treasure-gold);
    padding: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--muted-text);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.disclaimer {
    font-size: 0.8rem !important;
    color: var(--stone-gray) !important;
    margin-top: 1rem;
}

/* Legal Pages */
.legal-container {
    max-width: 800px;
    margin: 4rem auto;
    padding: 3rem;
    background: var(--surface);
    border-radius: 12px;
    color: var(--primary-text);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.legal-container h1 {
    color: var(--primary-text);
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--gem-cyan);
    padding-bottom: 1rem;
}

.legal-container h2 {
    color: var(--primary-text);
    margin-top: 2rem;
}

.legal-container p {
    color: var(--secondary-text);
    margin-bottom: 1rem;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 600px;
    margin: 0 auto;
    background: var(--deep-cave);
    border: 1px solid var(--treasure-gold);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.cookie-text {
    color: var(--surface);
    font-size: 0.9rem;
    margin-right: 1rem;
}

.cookie-btns {
    display: flex;
    gap: 0.5rem;
}

.btn-cookie {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85rem;
}

.btn-cookie-accept {
    background: var(--treasure-gold);
    color: var(--primary-text);
}

.btn-cookie-reject {
    background: transparent;
    border: 1px solid var(--stone-gray);
    color: var(--surface);
}

/* Contact Page Specifics */
.contact-page {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.contact-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.contact-header h1 {
    font-size: 3rem;
    color: var(--primary-text);
    margin-bottom: 1rem;
}

.contact-header p {
    color: var(--secondary-text);
    font-size: 1.1rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid rgba(92, 102, 117, 0.2);
}

.contact-info {
    padding: 4rem;
    background: linear-gradient(135deg, var(--deep-cave), var(--midnight-stone));
    color: var(--surface);
}

.contact-info h2 {
    color: var(--treasure-gold);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.contact-info > p {
    color: var(--muted-text);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.info-block {
    margin-bottom: 2.5rem;
}

.info-block h3 {
    color: var(--gem-cyan);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.info-block p {
    color: var(--surface);
    font-size: 1rem;
    line-height: 1.6;
}

.contact-form-container {
    padding: 4rem 4rem 4rem 0;
}

.contact-form-container h2 {
    color: var(--primary-text);
    margin-bottom: 2rem;
    font-size: 2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--primary-text);
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 1rem;
    border: 1px solid rgba(92, 102, 117, 0.4);
    border-radius: 8px;
    background-color: var(--surface);
    color: var(--primary-text);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--crystal-blue);
    box-shadow: 0 0 0 3px rgba(66, 196, 255, 0.2);
}

.form-group textarea {
    resize: vertical;
}

.contact-form .btn-primary {
    align-self: flex-start;
    margin-top: 1rem;
    padding: 1rem 3rem;
}

/* Responsive */
@media (max-width: 992px) {
    .game-wrapper {
        width: 90%;
    }
    .hero h1 {
        font-size: 2.8rem;
    }
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .contact-form-container {
        padding: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .game-wrapper {
        width: 100%;
    }
    .cookie-banner {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    .cookie-text {
        margin-right: 0;
    }
    .contact-header h1 {
        font-size: 2.5rem;
    }
    .contact-info {
        padding: 2rem;
    }
    .contact-form-container {
        padding: 2rem;
    }
}