:root {
    /* Imperial Jade Palace Design System */
    --bg-main: #0F1210;
    --surface: rgba(255, 255, 255, 0.05);
    --glass: rgba(255, 255, 255, 0.08);
    --imperial-gold: #D4AF37;
    --jade-green: #2F855A;
    --crimson: #8B1E2D;
    --ebony: #1A1A1A;
    --ivory: #F5F3EC;
    --text-primary: #FAFAFA;
    --text-secondary: #D6D3D1;
    --text-muted: #A8A29E;
    
    --font-heading: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;
}

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

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 1px;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.4s ease, text-shadow 0.4s ease;
}

a:hover {
    color: var(--imperial-gold);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

ul {
    list-style: none;
}

/* Global Image Rules */
img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, #B8860B, var(--imperial-gold), #DAA520);
    color: var(--ebony);
    font-family: var(--font-heading);
    font-weight: 700;
    padding: 12px 32px;
    border-radius: 4px;
    border: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.4);
    color: var(--ebony);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-secondary {
    display: inline-block;
    background: var(--glass);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 500;
    padding: 10px 28px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.4s ease;
}

.btn-secondary:hover {
    background: rgba(47, 133, 90, 0.15);
    border-color: var(--jade-green);
    transform: translateY(-2px);
    color: var(--ivory);
}

/* Top Disclaimer Bar */
.top-bar {
    background-color: #050605;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-align: center;
    padding: 10px 20px;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-transform: uppercase;
    font-weight: 500;
    line-height: 1.5;
}

/* Imperial Gate (Nav) */
#imperial-gate {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 18, 16, 0.98);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding: 15px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--ivory);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 35px;
    align-items: center;
}

.nav-links a {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

.nav-links .btn-primary {
    padding: 10px 24px;
    font-size: 0.85rem;
}

.mobile-menu-btn {
    display: none;
    color: var(--ivory);
    font-size: 1.8rem;
    background: none;
    border: none;
    cursor: pointer;
}

/* Sticky Mobile Play Button */
.mobile-sticky-play {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    width: 90%;
    text-align: center;
}

/* -------------------------------------------
   HERO BANNER
------------------------------------------- */
#hero-banner {
    margin-top: 40px;
    margin-bottom: 8vh;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.hero-container {
    width: 100%;
    max-width: 1200px;
    /* Enforcing the 35-45% constraint and 420px maximum */
    height: 40vh; 
    min-height: 280px;
    max-height: 420px;
    position: relative;
}

.hero-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    border: 1px solid var(--imperial-gold);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: static;
}

/* Jade Courtyard (Game Area) */
#jade-courtyard {
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.game-container {
    width: 100%;
    max-width: 1020px;
    background: var(--ebony);
    border: 2px solid var(--ivory);
    border-radius: 22px;
    padding: 10px;
    position: relative;
}

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

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

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

/* East Pavilion */
#east-pavilion {
    padding: 120px 40px;
    background: var(--bg-main);
    border-top: 1px solid var(--surface);
    display: flex;
    justify-content: center;
}

.pavilion-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    width: 100%;
    flex-wrap: wrap;
}

.jade-monument {
    flex: 1;
    min-width: 220px;
    background: linear-gradient(to bottom, rgba(47, 133, 90, 0.15), rgba(15, 18, 16, 0.8));
    border: 1px solid rgba(47, 133, 90, 0.4);
    border-top: 4px solid var(--jade-green);
    border-radius: 4px;
    padding: 50px 30px;
    text-align: center;
    transition: transform 0.5s ease, background 0.5s ease;
}

.jade-monument:hover {
    transform: translateY(-10px);
    background: linear-gradient(to bottom, rgba(47, 133, 90, 0.25), rgba(15, 18, 16, 0.9));
}

.jade-monument h3 {
    color: var(--ivory);
    margin-bottom: 25px;
    font-size: 1.4rem;
    letter-spacing: 2px;
}

.jade-monument p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* Imperial Court */
#imperial-court {
    padding: 120px 20px;
    background: radial-gradient(circle at center, #151a17 0%, var(--bg-main) 100%);
    display: flex;
    justify-content: center;
}

.imperial-monument {
    width: 100%;
    max-width: 800px;
    background: rgba(26, 26, 26, 0.9);
    border: 1px solid rgba(245, 243, 236, 0.1);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.monument-header {
    background: var(--jade-green);
    padding: 30px;
    text-align: center;
    border-radius: 8px 8px 0 0;
    border-bottom: 2px solid var(--imperial-gold);
}

.monument-header h2 {
    color: var(--ivory);
    font-size: 2rem;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.monument-content {
    padding: 20px 40px 40px;
    display: flex;
    flex-direction: column;
}

.record-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.record-row:last-child {
    border-bottom: none;
}

.record-label {
    color: var(--text-muted);
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

.record-value {
    color: var(--ivory);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    text-align: right;
}

.record-value.highlight {
    color: var(--imperial-gold);
}

/* -------------------------------------------
   PREMIUM SPLIT CONTENT (IMAGE & TEXT)
------------------------------------------- */
.premium-split {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    max-width: 1200px;
    /* Extensive vertical margin ensures only one image is visible at a time */
    margin: 15vh auto; 
    padding: 0 40px;
}

.premium-split.reverse {
    flex-direction: row-reverse;
}

.premium-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 700px; /* Firmly cap the image container width */
}

/* Ensuring fixed dimension scaling up to the 700x420 bounds */
.premium-image-container img {
    width: 100%;
    max-width: 700px;
    height: auto;
    aspect-ratio: 700 / 420;
    max-height: 420px;
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid var(--imperial-gold);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    position: static; /* Complement content, don't float edge-to-edge */
}

.premium-text-container {
    flex: 1;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.premium-text-container h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--jade-green);
    margin-bottom: 25px;
    line-height: 1.2;
}

.premium-text-container p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Mastercraft Promise Specific overrides */
.mastercraft-bg {
    background: #111111;
    border-top: 1px solid var(--surface);
    border-bottom: 1px solid var(--surface);
}

.mastercraft-title {
    color: var(--imperial-gold) !important;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.mastercraft-text {
    color: var(--ivory) !important;
}

/* West Pavilion panel layout override */
.split-panels-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wooden-panel {
    background: linear-gradient(145deg, #3d1b11, #1a0a05);
    border: 2px solid #5a2818;
    text-align: center;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: transform 0.4s ease, border-color 0.4s ease;
    flex: 1;
    position: relative;
    overflow: hidden;
    padding: 30px 25px;
    width: 100%;
}

.wooden-panel:hover {
    transform: translateY(-8px);
    border-color: var(--imperial-gold);
}

.panel-content {
    position: relative;
    z-index: 1;
}

.wooden-panel h3 {
    color: var(--ivory);
    margin-bottom: 25px;
    font-size: 1.5rem;
}

/* Moon Garden */
#moon-garden {
    background: var(--bg-main);
}

.garden-two {
    padding: 150px 40px;
    text-align: center;
    background: var(--ebony);
    border-top: 1px solid var(--surface);
    border-bottom: 1px solid var(--surface);
}

.garden-two h2 {
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.4;
    color: var(--ivory);
    max-width: 1200px;
    margin: 0 auto;
    font-weight: 400;
    letter-spacing: 2px;
}

/* Royal Chamber */
#royal-chamber {
    padding: 120px 40px;
    background: var(--bg-main);
}

.chamber-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.chamber-section {
    background: var(--ebony);
    padding: 40px;
    border-radius: 4px;
    border: 1px solid var(--surface);
}

.chamber-section h3 {
    color: var(--imperial-gold);
    font-size: 1.6rem;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--surface);
    padding-bottom: 15px;
}

.palace-services p {
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.label-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px !important;
}

.email-text {
    display: block;
    color: var(--ivory) !important;
    font-family: monospace;
    font-size: 1.1rem;
    padding: 12px 15px;
    background: var(--bg-main);
    border: 1px solid var(--surface);
    border-radius: 4px;
    margin-bottom: 25px !important;
}

.common-questions ul li {
    margin-bottom: 20px;
    color: var(--text-secondary);
    padding-left: 25px;
    position: relative;
    line-height: 1.5;
}

.common-questions ul li::before {
    content: '◈';
    position: absolute;
    left: 0;
    color: var(--jade-green);
    font-size: 1.2rem;
    top: -2px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input, .contact-form textarea {
    background: var(--bg-main);
    border: 1px solid var(--surface);
    padding: 15px;
    color: var(--ivory);
    font-family: var(--font-body);
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--jade-green);
}

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

.contact-form button {
    width: 100%;
}

/* Footer */
#imperial-footer {
    padding: 100px 40px 40px;
    text-align: center;
    border-top: 1px solid var(--imperial-gold);
    position: relative;
    background: var(--bg-main);
}

.footer-content {
    position: relative;
    z-index: 1;
    background: var(--ebony);
    padding: 40px;
    border-radius: 8px;
    max-width: 1000px;
    margin: 0 auto;
    border: 1px solid var(--surface);
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.legal-notice {
    color: var(--text-muted);
    font-size: 0.85rem;
    max-width: 700px;
    margin: 0 auto 30px;
    line-height: 1.8;
}

.age-badge {
    display: inline-block;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    line-height: 32px;
    font-weight: 600;
    margin-bottom: 25px;
    color: var(--text-muted);
}

.copyright {
    color: rgba(255,255,255,0.2);
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* General Content Pages (Legal) */
.content-page {
    padding: 100px 20px 100px;
    max-width: 850px;
    margin: 0 auto;
    background: var(--bg-main);
}

.content-page h1 {
    color: var(--imperial-gold);
    margin-bottom: 50px;
    text-align: center;
    font-size: 3rem;
    text-transform: uppercase;
}

.content-page h2 {
    color: var(--jade-green);
    margin-top: 50px;
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.content-page p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

.content-page ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.content-page ul li {
    color: var(--text-secondary);
    margin-bottom: 10px;
    list-style-type: square;
}

.content-page ul li span {
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .premium-split, .premium-split.reverse {
        flex-direction: column;
        gap: 40px;
        margin: 10vh auto;
        padding: 0 20px;
    }
    
    .premium-text-container {
        text-align: center;
        align-items: center;
        max-width: 100%;
    }
    
    .premium-image-container {
        max-width: 100%;
    }
    
    .chamber-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(15, 18, 16, 0.98);
        flex-direction: column;
        padding: 30px 0;
        border-bottom: 1px solid var(--imperial-gold);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links .btn-primary {
        display: none; /* Hide primary in nav on mobile, use sticky */
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .mobile-sticky-play {
        display: block;
    }
    
    #imperial-gate {
        padding: 15px 20px;
    }
    
    #hero-banner {
        margin-top: 20px;
    }
    
    #jade-courtyard {
        padding-top: 60px;
        min-height: auto;
    }
    
    .iframe-wrapper {
        height: 400px;
    }
    
    .monument-header h2 {
        font-size: 1.5rem;
    }
    
    .record-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .record-value {
        text-align: left;
    }
}