:root {
    --bg: #F8F3EA;
    --surface: #FFFFFF;
    --sapphire: #1F4E79;
    --indigo: #283A5E;
    --sand: #E9D7B5;
    --gold: #D6A437;
    --bronze: #B8743A;
    --emerald: #3C7A5A;
    --ivory: #FFFDF8;
    --silver: #D9DEE7;
    --text-primary: #2F2A28;
    --text-muted: #756C65;
    --grad-accent: linear-gradient(135deg, #1F4E79, #D6A437);
    --grad-secondary: linear-gradient(135deg, #3C7A5A, #E9D7B5);
    --font-heading: 'Georgia', serif;
    --font-body: 'Optima', 'Segoe UI', system-ui, sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: normal;
    color: var(--sapphire);
    margin-bottom: 0.5rem;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

/* Header */
.royal-header {
    background: var(--surface);
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--gold);
    box-shadow: 0 2px 10px rgba(31, 78, 121, 0.1);
}

.crescent-emblem {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--sapphire);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.crescent-emblem::before {
    content: '🌙';
    font-size: 1.2rem;
}

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

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

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

.btn {
    background: var(--grad-accent);
    color: var(--surface);
    padding: 8px 24px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: bold;
    transition: opacity 0.25s ease, transform 0.25s ease;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    color: var(--surface);
}

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

.btn-outline:hover {
    background: var(--gold);
    color: var(--surface);
}

/* Sections Shared */
.section {
    padding: 3rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--indigo);
}

/* Moon Gate Courtyard */
.moon-gate {
    display: flex;
    align-items: center;
    gap: 3rem;
    padding-top: 4rem;
    padding-bottom: 2rem;
}

.moon-gate-content {
    flex: 1;
}

.moon-gate-content h1 {
    font-size: 2.8rem;
    color: var(--indigo);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.moon-gate-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.gate-buttons {
    display: flex;
    gap: 1rem;
}

.moon-gate-img {
    flex: 1;
    max-width: 600px;
}

.moon-gate-img img {
    border: 4px solid var(--surface);
    box-shadow: 0 10px 30px rgba(31, 78, 121, 0.15);
}

/* Sultan's Grand Pavilion */
.pavilion {
    text-align: center;
    padding: 2rem 5%;
}

.game-wrapper {
    max-width: 1020px;
    margin: 0 auto;
    background: var(--surface);
    border: 2px solid var(--gold);
    border-radius: 26px;
    padding: 20px;
    position: relative;
    box-shadow: 0 15px 40px rgba(40, 58, 94, 0.1);
}

.gem-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--sapphire);
    border-radius: 50%;
    border: 2px solid var(--gold);
}

.gem-tl { top: -10px; left: -10px; }
.gem-tr { top: -10px; right: -10px; }
.gem-bl { bottom: -10px; left: -10px; }
.gem-br { bottom: -10px; right: -10px; }

.game-container {
    width: 100%;
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--indigo);
    margin-bottom: 15px;
}

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

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

/* Lantern Walk */
.lantern-walk {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 2rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.lantern-pillar {
    background: var(--ivory);
    border: 1px solid var(--sand);
    border-radius: 12px;
    padding: 2rem 1rem;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.lantern-pillar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--grad-secondary);
}

.lantern-pillar:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(214, 164, 55, 0.2);
    background: var(--surface);
}

.lantern-pillar h3 {
    color: var(--emerald);
    font-size: 1.2rem;
    margin: 0;
}

/* Royal Treasury Gallery */
.treasury-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.alcove {
    background: var(--surface);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--silver);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.alcove h3 {
    color: var(--bronze);
    margin-bottom: 1rem;
}

.alcove p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.alcove-link {
    color: var(--sapphire);
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.alcove-link:hover {
    color: var(--gold);
}

.treasury-image-wrapper {
    text-align: center;
    margin-bottom: 2rem;
}
.treasury-image-wrapper img {
    margin: 0 auto;
    max-width: 600px;
    border-radius: 12px;
    border: 2px solid var(--sand);
}

/* Starlight Observatory */
.observatory-layout {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.observatory-img {
    flex: 1;
    max-width: 600px;
}

.observatory-img img {
    border-radius: 50% 50% 12px 12px;
    border: 3px solid var(--sapphire);
}

.observatory-panels {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.obs-panel {
    background: var(--ivory);
    padding: 1.5rem;
    border-left: 4px solid var(--sapphire);
    border-radius: 0 12px 12px 0;
}

.obs-panel h4 {
    color: var(--indigo);
    margin-bottom: 0.5rem;
}

.obs-panel p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Royal Hospitality Hall */
.hospitality {
    text-align: center;
    background: var(--grad-secondary);
    padding: 3rem 5%;
    border-radius: 20px;
    margin: 2rem auto;
    max-width: 1000px;
    color: var(--text-primary);
}

.hospitality h2 {
    color: var(--indigo);
}

.support-email {
    display: inline-block;
    background: var(--surface);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    color: var(--sapphire);
    margin: 1.5rem 0;
    border: 1px solid var(--gold);
}

/* Forms */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border: 1px solid var(--sand);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--indigo);
    font-weight: 500;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--silver);
    border-radius: 6px;
    font-family: var(--font-body);
    background: var(--bg);
}

.form-group textarea {
    resize: vertical;
    height: 120px;
}

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

/* Footer */
.imperial-footer {
    background: var(--indigo);
    color: var(--silver);
    padding: 4rem 5% 1rem;
    margin-top: 3rem;
}

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

.footer-panel h4 {
    color: var(--gold);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.footer-panel p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--silver);
    opacity: 0.8;
}

.footer-panel ul li {
    margin-bottom: 0.5rem;
}

.footer-panel ul a {
    color: var(--ivory);
    font-size: 0.9rem;
}

.footer-panel ul a:hover {
    color: var(--gold);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid rgba(214, 164, 55, 0.3);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-emblem {
    color: var(--gold);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.footer-disclaimer {
    font-size: 0.8rem;
    color: rgba(217, 222, 231, 0.6);
    max-width: 800px;
    margin: 0 auto;
}

/* Subpage Layout */
.page-header {
    background: var(--grad-accent);
    color: var(--surface);
    padding: 4rem 5%;
    text-align: center;
}
.page-header h1 {
    color: var(--surface);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-content {
    background: var(--surface);
    max-width: 800px;
    margin: -2rem auto 3rem;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid var(--sand);
    position: relative;
}

.page-content h2 {
    margin-top: 2rem;
    color: var(--sapphire);
}

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

.return-home {
    display: inline-block;
    margin-top: 2rem;
    color: var(--emerald);
    font-weight: bold;
    border-bottom: 2px solid var(--emerald);
}

.return-home:hover {
    color: var(--gold);
    border-color: var(--gold);
}

/* Cookie Popup */
.cookie-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(40, 58, 94, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.cookie-scroll {
    background: var(--ivory);
    border: 3px solid var(--gold);
    border-radius: 12px;
    padding: 2.5rem;
    max-width: 500px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.cookie-scroll::before {
    content: '🏮';
    font-size: 2rem;
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ivory);
    padding: 0 10px;
}

.cookie-scroll h3 {
    color: var(--sapphire);
    margin-bottom: 1rem;
    margin-top: 0.5rem;
}

.cookie-scroll p {
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

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

/* Responsive */
@media (max-width: 992px) {
    .moon-gate { flex-direction: column; text-align: center; }
    .gate-buttons { justify-content: center; }
    .treasury-grid { grid-template-columns: repeat(2, 1fr); }
    .observatory-layout { flex-direction: column; }
    .lantern-walk { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .nav-links { display: none; }
    .lantern-walk { grid-template-columns: 1fr; }
    .treasury-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .game-container { height: 350px; }
    .page-content { padding: 1.5rem; margin-top: 0; border-radius: 0; }
}