
:root {
    --gold: #c5a059;
    --gold-light: #e5c38c;
    --gold-dark: #997839;
    --brown-dark: #2c1e13;
    --brown-medium: #4e3522;
    --brown-light: #7c583b;
    --font-heading: 'Cinzel', serif;
    --font-body: 'Outfit', sans-serif;
}

html, body {
    overflow-x: hidden;
    max-width: 100%;
}

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

body {
    background: #f8e8d1;
    color: var(--brown-dark);
    font-family: var(--font-body);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

a { text-decoration: none; color: inherit; }

/* Navbar */
.navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    background: rgba(247, 238, 219, 0.95);
    border-bottom: 2px solid var(--gold);
    padding: 10px 80px;
}
.nav-container {
    display: flex; justify-content: space-between; align-items: center;
    max-width: 1400px; margin: 0 auto;
}
.nav-brand img { height: 77px; }
.nav-menu { display: flex; gap: 30px; }
.nav-menu a {
    font-family: var(--font-heading);
    font-weight: 700; font-size: 14px;
    color: var(--brown-dark);
    position: relative;
    padding-bottom: 5px;
}
.nav-menu a.active::after, .nav-menu a::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 0%; height: 2px;
    background: var(--gold); transition: width 0.3s;
}
.nav-menu a:hover::after, .nav-menu a.active::after { width: 100%; }

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}
.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: var(--gold);
    transition: all 0.3s ease-in-out;
}

.btn-playnow-nav {
    background: url('../img/sites/playnow.webp') no-repeat center / 100% 100%;
    width: 180px; height: 45px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-heading); font-weight: 800; font-size: 12px;
    color: #fff4cf; text-shadow: 1px 1px 2px #000;
    transition: transform 0.2s;
}
.btn-playnow-nav:hover { transform: scale(1.05); }

/* Hero */
.hero {
    position: relative;
    padding-top: 70px;
    min-height: 100vh;
    display: flex; align-items: center;
}
.hero-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: calc(100% - 90px);
    background: url('../img/sites/herobanner.webp') no-repeat center top / cover;
    z-index: 0;
}
.hero-content {
    position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: space-between;
    max-width: 1400px; margin: 0 auto; width: 100%; padding: 0 80px;
}
.hero-chars { flex: 1; display: flex; justify-content: center; align-items: flex-end; height: 85vh; }
.hero-chars img { max-height: 110%; object-fit: contain; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5)); transform-origin: bottom center; animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }

.hero-text { flex: 1; text-align: center; display: flex; flex-direction: column; align-items: center; position: relative; z-index: 20; }
.hero-logo { max-width: 500px; margin-bottom: 20px; filter: drop-shadow(0 0 15px #f8e7cd) drop-shadow(0 0 30px #f8e7cd) drop-shadow(0 5px 15px rgba(0,0,0,0.5)); }
.hero-actions { display: flex; gap: 20px; align-items: center; justify-content: center; }
.btn-playnow-lg {
    background: url('../img/sites/playnow.webp') no-repeat center / 100% 100%;
    width: 260px; height: 65px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-heading); font-weight: 800; font-size: 16px;
    color: #fff4cf; text-shadow: 1px 1px 3px #000;
    transition: transform 0.2s;
}
.btn-playnow-lg:hover { transform: scale(1.05); }

.btn-trailer {
    background: rgba(247, 238, 219, 0.9);
    border: 2px solid var(--gold);
    color: var(--brown-dark);
    font-family: var(--font-heading); font-weight: 700; font-size: 14px;
    padding: 0 25px; height: 50px;
    display: flex; align-items: center; gap: 10px; border-radius: 4px;
    transition: background 0.2s;
}
.btn-trailer:hover { background: #fff; }
.play-icon { font-size: 18px; color: var(--gold); }

.btn-sm {
    background: linear-gradient(to bottom, var(--gold-light), var(--gold));
    border: 1px solid var(--brown-dark);
    color: var(--brown-dark);
    font-family: var(--font-heading); font-weight: 700; font-size: 13px;
    padding: 10px 20px; border-radius: 4px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.btn-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.4);
}

.mc-separator {
    position: relative;
    z-index: 10;
    margin-top: -280px;
    margin-bottom: -20px;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    pointer-events: none;
}
.mc-separator img {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    height: auto;
    display: block;
}

/* Features */
.features { padding: 0 80px 80px; max-width: 1400px; margin: 0 auto; position: relative; z-index: 3; }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature-box {
    background: url('../img/sites/box_fitur.webp') no-repeat center / 100% 100%;
    padding: 35px 20px 30px;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    min-height: 480px;
    transition: transform 0.3s;
}
.feature-box:hover { transform: translateY(-10px); }
.feature-icon {
    width: 50px; height: 50px; border-radius: 50%; background: var(--brown-dark);
    display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 15px;
    border: 2px solid var(--gold);
}
.feature-box h3 { font-size: 15px; margin-bottom: 20px; letter-spacing: 1px; color: var(--brown-dark); }
.feature-box p { font-size: 13px; color: var(--brown-medium); line-height: 1.5; margin-top: auto; font-weight: 500; }

.feature-image, .feature-ui-card {
    width: 100%; height: 160px; border: 2px solid rgba(197, 160, 89, 0.5); border-radius: 8px; margin-bottom: 20px; overflow: hidden;
}
.feature-image img { width: 100%; height: 100%; object-fit: cover; }

.feature-ui-card { background: url('../img/sites/uipanel-background.webp') repeat; background-color: #1a120b; padding: 10px; color: #fff; text-align: left; font-size: 11px; font-family: var(--font-body); display: flex; flex-direction: column; justify-content: center;}
.ui-header { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.ui-header img { width: 40px; height: 40px; border: 1px solid var(--gold); border-radius: 4px; object-fit: cover; }
.ui-header h4 { font-size: 12px; color: var(--gold-light); font-family: var(--font-body); margin-bottom: 2px; }
.ui-header span { font-size: 9px; color: #aaa; }
.ui-stats div { display: flex; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,0.1); padding: 3px 0; }
.ui-stats div strong { color: #fff; }

.ui-office { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 5px; }
.office-title { font-size: 12px; font-weight: bold; color: var(--gold-light); }
.office-time { background: var(--gold); color: #000; padding: 2px 6px; border-radius: 3px; font-size: 11px; font-weight: bold; text-align: center; }
.ui-progress .label { display: flex; justify-content: space-between; margin-bottom: 5px; color: #fff; }
.ui-progress .bar { height: 6px; background: #333; border-radius: 3px; overflow: hidden; }
.ui-progress .fill { height: 100%; background: #4caf50; }
.ui-progress .progress-ticks { display: flex; justify-content: space-between; font-size: 8px; color: #888; margin-top: 2px; }

.btn-sm { background: linear-gradient(180deg, #e5c38c, #c5a059); border: none; color: #000; padding: 4px 12px; border-radius: 4px; font-weight: bold; cursor: pointer; font-size: 10px; font-family: var(--font-heading); box-shadow: 0 2px 4px rgba(0,0,0,0.3);}
.btn-sm:hover { filter: brightness(1.1); }

/* Section Title */
.section-title { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 40px; }
.title-dec-left, .title-dec-right { width: 50px; height: 15px; background: url('../img/sites/sparate.webp') no-repeat center / contain; opacity: 0.8;}
.title-dec-left { transform: scaleX(-1); }
.section-title h2 { font-size: 26px; text-transform: uppercase; letter-spacing: 2px; text-shadow: 1px 1px 0 #fff;}

/* Carousel Section */
.carousel-section { padding: 80px 80px; max-width: 1400px; margin: 0 auto; text-align: center; position: relative;}
.carousel-section::before, .carousel-section::after {
    content: ''; position: absolute; left: 50%; transform: translateX(-50%); width: 80%; height: 1px; background: rgba(197, 160, 89, 0.3);
}
.carousel-section::before { top: 0; }
.carousel-section::after { bottom: 0; }

.carousel-container { display: flex; align-items: center; gap: 20px; justify-content: center;}
.carousel-arrow { width: 40px; height: 40px; border-radius: 50%; background: var(--brown-dark); color: var(--gold); border: 2px solid var(--gold); font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 8px rgba(0,0,0,0.3); transition: transform 0.2s; }
.carousel-arrow:hover { transform: scale(1.1); }
.carousel-items { display: flex; gap: 20px; overflow: hidden; width: 100%; max-width: 1000px;}
.carousel-img { width: 33.333%; height: auto; border: 3px solid var(--gold); border-radius: 10px; box-shadow: 0 10px 20px rgba(0,0,0,0.3); }

/* Why Play Section */
.why-play { padding: 80px 80px; max-width: 1400px; margin: 0 auto; }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center; }
.why-item .icon { font-size: 40px; margin-bottom: 15px; }
.why-item h3 { font-size: 16px; margin-bottom: 10px; }
.why-item p { font-size: 14px; color: var(--brown-medium); }

/* News Section */
.news { padding: 80px 80px; max-width: 1400px; margin: 0 auto; }
.news-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.btn-all-news { border: 1px solid var(--gold); padding: 8px 20px; font-family: var(--font-heading); font-weight: 700; font-size: 12px; border-radius: 20px; transition: background 0.3s; }
.btn-all-news:hover { background: var(--gold); color: #fff; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.news-card { background: rgba(255,255,255,0.7); border: 1px solid rgba(197, 160, 89, 0.3); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.news-card img { width: 100%; height: auto; object-fit: contain; }
.news-content { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.news-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.badge { padding: 3px 8px; font-size: 10px; font-weight: bold; color: #fff; border-radius: 4px; }
.badge.event { background: #d32f2f; }
.badge.update { background: #388e3c; }
.badge.berita { background: #1976d2; }
.date { font-size: 12px; color: #888; font-weight: bold; }
.news-content h3 { font-size: 18px; margin-bottom: 10px; }
.news-content p { font-size: 14px; color: #555; margin-bottom: 20px; flex: 1; }
.read-more { font-weight: bold; font-size: 14px; color: var(--brown-dark); }
.read-more:hover { color: var(--gold-dark); text-decoration: underline; }

/* Footer */
.footer { margin-top: 60px; }
.footer-cta {
    position: relative;
    background: url('../img/sites/footer-background.webp') no-repeat center center / 100% 100%;
    background-color: transparent;
    padding: 60px 80px; display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 40px; color: #fff;
    align-items: center; border: none;
    width: 80%; margin: 0 auto 40px auto;
    filter: drop-shadow(0 10px 25px rgba(0,0,0,0.5));
    text-shadow: 0 2px 4px rgba(0,0,0,0.9), 0 0 10px rgba(0,0,0,0.6);
}
.cta-left h4, .cta-right h4 { color: var(--gold-light); font-family: var(--font-heading); margin-bottom: 10px; font-size: 16px; }
.cta-left p, .cta-right p { font-size: 14px; color: #ccc; margin-bottom: 20px; }
.socials { display: flex; gap: 10px; margin-bottom: 20px; }
.socials a { width: 40px; height: 40px; background: rgba(255,255,255,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; transition: background 0.2s;}
.socials a:hover { background: var(--gold); }
.btn-gabung { border: 1px solid var(--gold); padding: 8px 20px; border-radius: 4px; font-family: var(--font-heading); font-size: 12px; font-weight: 700; color: #fff; display: inline-block; transition: background 0.2s;}
.btn-gabung:hover { background: var(--gold); color: #000; }
.cta-center { text-align: center; display: flex; flex-direction: column; align-items: center;}
.cta-center h3 { font-size: 24px; color: var(--gold-light); margin-bottom: 20px; font-family: var(--font-heading);}
.stores { display: flex; flex-direction: row; gap: 10px; align-items: center;}
.store-badge { background: #000; border: 1px solid #333; padding: 8px 15px; border-radius: 6px; font-size: 10px; display: flex; flex-direction: column; line-height: 1.2; width: 140px; cursor: pointer; transition: transform 0.2s;}
.store-badge:hover { transform: scale(1.05); }
.store-badge strong { font-size: 16px; }

.footer-bottom {
    background: url('../img/sites/sectiondark-background.webp') no-repeat center top / cover;
    background-color: #150f0a;
    padding: 320px 80px 80px 180px;
    display: flex;
    align-items: flex-start;
    gap: 60px;
    color: #ccc;
    min-height: 600px;
}
.footer-logo-col { max-width: 300px; }
.footer-logo-col img { max-height: 80px; margin-bottom: 20px; filter: drop-shadow(0 0 15px #f8e7cd) drop-shadow(0 0 30px #f8e7cd) drop-shadow(0 5px 15px rgba(0,0,0,0.5));}
.footer-logo-col p { font-size: 13px; line-height: 1.6; }
.footer-links { display: flex; gap: 50px; }
.link-group h4 { color: var(--gold-light); margin-bottom: 20px; font-size: 14px; font-family: var(--font-heading);}
.link-group a { display: block; margin-bottom: 10px; font-size: 13px; color: #aaa; transition: color 0.3s; }
.link-group a:hover { color: #fff; }


.copyright-area {
    background: #0d0906;
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 12px;
}

.footer-rating-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.footer-rating-img {
    height: 30px;
    width: auto;
    filter: sepia(0.3) brightness(0.9) drop-shadow(0 1px 4px rgba(0,0,0,0.5));
    opacity: 0.85;
    transition: opacity 0.2s;
}

.footer-rating-img:hover { opacity: 1; }

/* ── Tablet (769px – 1200px) ── */
@media (min-width: 769px) and (max-width: 1200px) {
    .features-grid, .why-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .carousel-items { flex-wrap: wrap; justify-content: center; }
    .carousel-img { width: 45%; }
    .hero-content { flex-direction: column-reverse; text-align: center; padding: 80px 40px 40px; }
    .hero-chars { height: auto; max-height: 320px; flex: none; margin-top: 20px; }
    .hero-chars img { max-height: 100%; }
    .hero-text { flex: none; width: 100%; }
    .mc-separator { margin-top: -80px; }
    .footer-cta { grid-template-columns: 1fr; text-align: center; width: 90%; }
    .cta-left, .cta-center, .cta-right { display: flex; flex-direction: column; align-items: center; }
    .stores { flex-direction: row; justify-content: center; }
    .footer-bottom { flex-direction: column; gap: 40px; text-align: center; align-items: center; padding: 60px 40px; }
    .footer-links { width: 100%; flex-wrap: wrap; gap: 30px; }
}

/* ── Mobile (≤ 768px) ── */
@media (max-width: 768px) {
    /* Prevent overflow */
    html, body, .info-page, .wiki-body, .page-body, .yupa-body, .hero, .wiki-hero, .page-hero, .features, .carousel-section, .why-play, .news, .footer { max-width: 100%; overflow-x: hidden; box-sizing: border-box; }

    /* Navbar: selalu di atas segalanya */
    .navbar { padding: 12px 20px; z-index: 1001; position: fixed; }
    .nav-brand img { height: 56px; }
    .btn-playnow-nav { display: none; }
    .hamburger {
        display: flex;
        position: relative;
        z-index: 1002;
        pointer-events: auto;
        cursor: pointer;
    }
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%; left: 0;
        width: 100%;
        background: rgba(247, 238, 219, 0.98);
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 5px 15px rgba(0,0,0,0.15);
        text-align: center;
        gap: 18px;
        z-index: 999;
    }
    .nav-menu.active { display: flex; }

    /* Hero: MC sebagai background, teks overlay di atas */
    .hero {
        position: relative;
        padding: 0;
        min-height: 100vh;
        display: flex;
        align-items: flex-start;
        overflow: hidden;
        width: 100%;
    }
    .hero-bg { height: calc(100% - 120px); }
    .hero-content {
        position: relative;
        z-index: 5;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        min-height: 100vh;
        padding: 100px 20px 40px;
        gap: 0;
        text-align: center;
        pointer-events: none; /* jangan blokir klik navbar */
    }

    /* Logo di atas */
    .hero-text {
        flex: none;
        width: 100%;
        align-items: center;
        position: relative;
        z-index: 10;
        display: flex;
        flex-direction: column;
        pointer-events: auto;
    }
    .hero-logo {
        max-width: 270px;
        margin-bottom: 0;
        filter: drop-shadow(0 0 20px #f8e7cd) drop-shadow(0 0 40px #f8e7cd) drop-shadow(0 0 60px rgba(248,231,205,0.8));
    }

    /* Tombol di tengah-bawah */
    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        margin-top: 45vh;
        position: relative;
        z-index: 10;
        pointer-events: auto;
    }
    .btn-playnow-lg { width: 280px; height: 70px; }

    /* MC karakter: absolute memenuhi hero, di balik teks */
    .hero-chars {
        position: absolute;
        bottom: -50px;
        left: 0;
        width: 100%;
        height: 85vh;
        max-height: 85vh;
        display: flex;
        justify-content: center;
        align-items: flex-end;
        z-index: 1;
    }
    .hero-chars img { height: 100%; width: auto; object-fit: contain; }

    /* mc_sparate: centered, tidak overflow, hapus class yang menghalangi gerak */
    .mc-separator {
        width: 100%;
        margin-top: -55px;
        margin-bottom: 10px;
        display: flex;
        justify-content: center;
    }
    .mc-separator img { width: 150%; flex-shrink: 0; object-fit: contain; margin-left: 0; }

    /* Sections */
    .features { padding: 20px 15px 40px; }
    .carousel-section, .why-play, .news { padding: 40px 15px; }
    .section-title h2 { font-size: 18px; letter-spacing: 1px; }
    .title-dec-left, .title-dec-right { width: 30px; }
    .features-grid, .why-grid, .news-grid { grid-template-columns: 1fr; gap: 20px; }
    .feature-box { min-height: auto; padding: 35px 15px 30px; }
    .feature-box img[src*="smallbanner"] { height: auto !important; object-fit: cover !important; margin-bottom: 15px !important; width: 75% !important; margin-top: 8px !important; }
    .feature-box img[src*="smallbanner01"] { margin-top: 13px !important; }
    .feature-box img[src*="embl-"] { height: 50px !important; margin-top: -11px !important; margin-bottom: 27px !important; }
    .feature-box img[src*="embl-01"] { margin-top: -12px !important; margin-bottom: 30px !important; }
    /* Jalur Kekuasaan h3 turun 1px */
    .feature-box:first-child h3 { margin-top: 1px; }
    
    .cta-banner-large { padding: 50px 15px !important; margin-bottom: 40px !important; }
    .cta-banner-large h2 { font-size: 22px !important; }
    .cta-banner-large .btn-playnow-lg { transform: scale(1) !important; width: 240px; height: 60px; }
    .carousel-items { flex-direction: column; align-items: center; }
    .carousel-img { width: 90%; }
    
    .news-card img { height: auto !important; width: 100% !important; object-fit: contain !important; aspect-ratio: auto !important; }

    /* Footer CTA */
    .footer-cta {
        width: 95%;
        padding: 40px 15px;
        background-size: cover;
        grid-template-columns: 1fr;
        text-align: center;
        gap: 35px;
        margin-top: 15px;
        position: relative;
        z-index: 10;
        border-radius: 12px;
    }
    .cta-left, .cta-center, .cta-right { display: flex; flex-direction: column; align-items: center; gap: 10px; }
    .cta-center h3 { font-size: 20px; line-height: 1.4; margin-bottom: 10px; }
    .cta-center .btn-playnow-lg { width: 220px; height: 55px; transform: scale(1); margin-top: 5px; }
    .stores { flex-direction: row; justify-content: center; gap: 10px; flex-wrap: wrap; }
    .footer { margin-top: 30px; }
    .footer-bottom {
        flex-direction: column;
        gap: 30px;
        text-align: center;
        align-items: center;
        padding: 60px 20px 40px;
        min-height: auto;
        background-size: cover;
        background-position: center top;
        /* Perbesar area dark background di mobile (tinggikan ke atas tapi konten tetap) */
        padding-top: 350px;
        margin-top: -290px;
        position: relative;
        z-index: 0;
    }
    /* Konten footer-bottom tetap di posisi bawah, hanya bg yang lebih tinggi */
    .footer-bottom > * { position: relative; z-index: 1; }
    .footer-links { flex-direction: column; gap: 20px; width: 100%; }
    .footer-logo-col { max-width: 100%; }
}
