:root {
    --bg-main: #0B1721;
    --bg-surface: #142433;
    --bg-surface-secondary: #1C3245;
    --royal-blue: #204B76;
    --lapis-blue: #2E6FA3;
    --ancient-gold: #D6B25E;
    --burnished-bronze: #A8762A;
    --papyrus-beige: #E6D5B3;
    --sandstone: #C6A46B;
    --turquoise: #4DA7A0;
    --text-primary: #F7F2E8;
    --text-secondary: #D4C8B4;
    --text-muted: #9EAAB6;
    --grad-accent: linear-gradient(135deg, #2E6FA3, #D6B25E);
    --grad-secondary: linear-gradient(135deg, #204B76, #4DA7A0);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
    --transition: all 0.25s ease;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    color: var(--ancient-gold);
    margin-bottom: 1rem;
}

a {
    color: var(--ancient-gold);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--papyrus-beige);
}

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

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Golden Ribbon */
.top-ribbon {
    background: var(--burnished-bronze);
    background: linear-gradient(90deg, #A8762A 0%, #D6B25E 50%, #A8762A 100%);
    color: var(--bg-main);
    text-align: center;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.top-ribbon a {
    color: var(--bg-main);
    text-decoration: underline;
    font-size: 0.8rem;
}

/* Navigation */
.floating-nav {
    position: sticky;
    top: 20px;
    z-index: 1000;
    margin: 0 auto 2rem auto;
    max-width: 1200px;
    background: rgba(20, 36, 51, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid var(--ancient-gold);
    border-radius: 26px;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.nav-logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--ancient-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-primary);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--grad-accent);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(214, 178, 94, 0.3);
    color: #fff;
}

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

.btn-outline:hover {
    background: rgba(214, 178, 94, 0.1);
    box-shadow: none;
    color: var(--papyrus-beige);
}

/* Hero Section */
.hero-gallery {
    padding: 4rem 0;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero-content h1 span {
    color: var(--ancient-gold);
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
}

.hero-visual {
    position: relative;
    height: 600px;
}

.img-main {
    width: 80%;
    height: 80%;
    object-fit: cover;
    border-radius: 12px;
    position: absolute;
    top: 0;
    right: 0;
    border: 1px solid rgba(214, 178, 94, 0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.img-overlap-1 {
    width: 45%;
    height: 45%;
    object-fit: cover;
    border-radius: 12px;
    position: absolute;
    bottom: 5%;
    left: 0;
    border: 1px solid rgba(214, 178, 94, 0.5);
    z-index: 2;
}

.img-overlap-2 {
    width: 35%;
    height: 35%;
    object-fit: cover;
    border-radius: 12px;
    position: absolute;
    bottom: 20%;
    left: 20%;
    border: 1px solid var(--turquoise);
    z-index: 3;
}

/* Astronomer's Walk */
.astronomer-walk {
    background: var(--bg-surface);
    border-top: 1px solid rgba(214, 178, 94, 0.2);
    border-bottom: 1px solid rgba(214, 178, 94, 0.2);
    padding: 3rem 0;
}

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

.pillar {
    text-align: center;
    flex: 1;
    position: relative;
}

.pillar:not(:last-child)::after {
    content: '↓';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--lapis-blue);
    font-size: 1.5rem;
}

.pillar svg {
    width: 40px;
    height: 40px;
    fill: var(--ancient-gold);
    margin-bottom: 1rem;
}

.pillar span {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-primary);
}

/* Royal Chamber (Game) */
.royal-chamber {
    padding: 6rem 0;
    text-align: center;
}

.chamber-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.game-container {
    max-width: 1020px;
    margin: 0 auto;
    background: var(--bg-surface-secondary);
    border: 2px solid var(--ancient-gold);
    border-radius: 30px;
    padding: 20px;
    box-shadow: 0 0 50px rgba(46, 111, 163, 0.2), inset 0 0 20px rgba(77, 167, 160, 0.1);
    position: relative;
}

.game-frame-wrapper {
    width: 100%;
    height: 600px;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
}

.game-frame-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.game-controls {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

/* Dynasty Collection */
.dynasty-collection {
    padding: 5rem 0;
}

.dynasty-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.dynasty-panel {
    text-align: center;
}

.dynasty-panel img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(214, 178, 94, 0.2);
}

.dynasty-panel h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.dynasty-panel p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.dynasty-panel .tiny-link {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--turquoise);
}

/* Celestial Timeline */
.celestial-timeline {
    padding: 5rem 0;
    background: var(--bg-surface);
}

.timeline-track {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 2rem 0;
}

.timeline-track::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--ancient-gold), transparent);
    transform: translateY(-50%);
    z-index: 1;
}

.timeline-node {
    background: var(--bg-surface-secondary);
    border: 2px solid var(--ancient-gold);
    border-radius: 50%;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 20px rgba(214, 178, 94, 0.2);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Knowledge Pavilion */
.knowledge-pavilion {
    padding: 6rem 0;
}

.knowledge-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.knowledge-img {
    border-radius: 16px;
    border: 1px solid var(--ancient-gold);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.knowledge-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.knowledge-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* Royal Archives */
.royal-archives {
    padding: 5rem 0;
    background: var(--bg-surface);
    border-top: 1px solid rgba(46, 111, 163, 0.3);
}

.archives-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
}

.support-info h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.support-email {
    display: block;
    font-size: 1.2rem;
    color: var(--turquoise);
    margin-bottom: 2rem;
    font-family: var(--font-heading);
}

.mini-faq details {
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(214, 178, 94, 0.2);
    padding-bottom: 1rem;
}

.mini-faq summary {
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-primary);
    outline: none;
}

.mini-faq p {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.contact-form {
    background: var(--bg-surface-secondary);
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid rgba(214, 178, 94, 0.2);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(11, 23, 33, 0.5);
    border: 1px solid rgba(214, 178, 94, 0.3);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: var(--font-body);
}

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

/* Footer */
.luxury-footer {
    background: #060d13;
    padding: 4rem 0 2rem 0;
    border-top: 1px solid var(--ancient-gold);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

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

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

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

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

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(214, 178, 94, 0.2);
}

.footer-emblem {
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem auto;
    fill: var(--ancient-gold);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.8rem;
    max-width: 800px;
    margin: 0 auto 0.5rem auto;
}

/* Cookie Popup */
.cookie-popup {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--bg-surface);
    border: 1px solid var(--ancient-gold);
    border-radius: 24px;
    padding: 1.5rem;
    width: 320px;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    display: none;
    flex-direction: column;
    gap: 1rem;
}

.cookie-popup h4 {
    margin: 0;
    font-size: 1.2rem;
}

.cookie-popup p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.cookie-actions {
    display: flex;
    gap: 1rem;
}

.cookie-actions button {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.85rem;
}

/* Internal Page Styles */
.internal-page-header {
    padding: 4rem 0 2rem 0;
    text-align: center;
    background: linear-gradient(to bottom, var(--bg-surface-secondary), var(--bg-main));
    border-bottom: 1px solid rgba(214, 178, 94, 0.2);
    margin-bottom: 3rem;
}

.internal-page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.internal-content {
    max-width: 800px;
    margin: 0 auto 5rem auto;
    background: var(--bg-surface);
    padding: 3rem;
    border-radius: 12px;
    border: 1px solid rgba(46, 111, 163, 0.3);
}

.internal-content h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--turquoise);
}

.internal-content p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.internal-content ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.internal-content li {
    margin-bottom: 0.5rem;
}

.return-home-container {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(214, 178, 94, 0.2);
}

/* Responsive */
@media (max-width: 992px) {
    .hero-gallery, .knowledge-grid, .archives-grid {
        grid-template-columns: 1fr;
    }
    .hero-visual {
        height: 400px;
    }
    .dynasty-grid {
        grid-template-columns: 1fr;
    }
    .timeline-track {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }
    .timeline-track::before {
        width: 2px;
        height: 100%;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        background: linear-gradient(180deg, transparent, var(--ancient-gold), transparent);
    }
    .walk-container {
        flex-direction: column;
        gap: 2rem;
    }
    .pillar:not(:last-child)::after {
        content: '↓';
        right: auto;
        bottom: -25px;
        top: auto;
        left: 50%;
        transform: translateX(-50%);
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .floating-nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        border-radius: 12px;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .game-frame-wrapper {
        height: 400px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}