/* RESET & VARIABLES (Sama seperti service.css agar konsisten) */
:root {
    --accent: #B39A6A;
    --white: #ffffff;
    --text-dark: #1B2A39;
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;
}

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

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden; /* KUNCI: 1 Screen Only */
    background: #000;
    font-family: var(--font-body);
}

/* --- BACKGROUND LAYER --- */
.bg-layer {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
}

/* Video Wrapper (Iframe Fullscreen Trick) */
.video-wrapper, .image-wrapper {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out; /* Efek transisi halus */
    pointer-events: none;
}

.video-wrapper.active, .image-wrapper.active {
    opacity: 1;
}

/* Iframe Styling */
.video-wrapper iframe {
    position: absolute;
    top: 50%; left: 50%;
    width: 100vw; height: 56.25vw; /* 16:9 */
    min-height: 100vh; min-width: 177.77vh;
    transform: translate(-50%, -50%);
}

/* Image Styling */
.image-wrapper {
    background-size: cover;
    background-position: center;
}

/* Overlay Gelap */
.overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
}

/* --- MAIN CONTENT (CENTER) --- */
.lobby-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
}

/* Logo Area */
.lobby-logo {
    height: 80px; /* Sesuaikan ukuran logo */
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
}

.tagline {
    font-size: 0.9rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 60px;
    opacity: 0.8;
}

/* Navigation Menu */
.lobby-nav {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-item {
    font-family: var(--font-heading);
    font-size: 1.5rem; /* Ukuran menu besar */
    color: var(--white);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 50%;
    width: 0%; height: 1px;
    background: var(--accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-item:hover {
    color: var(--accent);
}

.nav-item:hover::after {
    width: 100%;
}

.separator {
    color: var(--accent);
    font-size: 1.2rem;
    opacity: 0.6;
}

/* --- CONTROLS (BOTTOM RIGHT) --- */
.bg-controls {
    position: absolute;
    bottom: 40px;
    right: 40px;
    z-index: 20;
    text-align: right;
    background: rgba(0, 0, 0, 0.034);
    padding: 20px;
    border-left: 2px solid var(--accent);
    backdrop-filter: blur(5px);
}

.control-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 15px;
    font-weight: 600;
}

.buttons-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 8px;
}

.mini-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    color: #888;
    margin-right: 10px;
}

.btn-ctrl {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: var(--white);
    padding: 5px 12px;
    font-family: var(--font-body);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-ctrl:hover, .btn-ctrl.active {
    background: var(--white);
    color: var(--text-dark);
    border-color: var(--white);
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .bg-controls {
        bottom: 0; right: 0; left: 0;
        text-align: center;
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--accent);
    }
    
    .buttons-row {
        justify-content: center;
        flex-wrap: wrap;
    }

    .lobby-nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .separator { display: none; }
    
    .nav-item { font-size: 1.2rem; }
}

.image-wrapper {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    position: fixed;
    overflow: hidden;
}

/* ===============================
   CINEMATIC PRELOADER STYLES
   =============================== */

#preloader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 9999; /* Paling atas */
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none; /* Agar klik tembus setelah selesai */
}

/* 1. SHUTTER PANELS (Tirai Hitam) */
.shutter {
    position: absolute;
    left: 0;
    width: 100%;
    height: 50%;
    background: #0f1012; /* Hitam pekat */
    z-index: 1;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1); /* Efek Pintu Lift */
}

.shutter-top {
    top: 0;
    transform-origin: top;
}

.shutter-bottom {
    bottom: 0;
    transform-origin: bottom;
}

/* 2. LOADER CONTENT (Tengah) */
.loader-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--white);
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* Logo Animasi */
.loader-logo-wrap img {
    height: 50px;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

/* Judul Animasi */
.loader-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    letter-spacing: 5px; /* Spasi lebar cinematic */
    margin-bottom: 5px;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.3s forwards; /* Delay dikit */
}

/* Subtitle Animasi */
.loader-subtitle {
    font-family: var(--font-body);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent);
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.6s forwards;
}

/* Persentase Angka */
.loader-progress {
    margin-top: 30px;
    font-family: var(--font-body);
    font-size: 3rem; /* Angka besar */
    font-weight: 700;
    color: rgba(255,255,255,0.1); /* Transparan */
    -webkit-text-stroke: 1px var(--white); /* Outline style */
    position: relative;
}

/* 3. ANIMATION KEYFRAMES */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 4. STATE: FINISHED (Saat Loading Selesai) */
body.loaded .shutter-top {
    transform: translateY(-100%); /* Geser ke atas habis */
}

body.loaded .shutter-bottom {
    transform: translateY(100%); /* Geser ke bawah habis */
}

body.loaded .loader-content {
    opacity: 0; /* Hilangkan teks */
    transition-delay: 0s;
}

/* Sedikit delay pada shutter agar teks hilang dulu baru tirai terbuka */
body.loaded .shutter {
    transition-delay: 0.3s; 
}

/* ===============================
   SYSTEM PRELOADER STYLES
   =============================== */

#preloader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: #050505; /* Hitam pekat */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

.loader-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Spinner Emas Minimalis */
.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1); /* Lingkaran redup */
    border-top: 3px solid var(--accent); /* Aksen Emas berputar */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Teks Status System */
.status-text {
    font-family: 'Courier New', Courier, monospace; /* Font coding/system */
    font-size: 0.85rem;
    color: #888;
    letter-spacing: 1px;
    text-transform: uppercase;
    min-width: 250px; /* Agar posisi tidak goyang saat teks ganti */
}

/* Animasi Putaran Spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Class saat loading selesai */
body.loaded #preloader {
    opacity: 0;
    visibility: hidden;
}



/* ===============================
   MOBILE & RESPONSIVE STYLES
   =============================== */

/* 1. Tablet & Mobile (Layar di bawah 1024px) */
@media screen and (max-width: 1024px) {
    .lobby-content {
        justify-content: center;
        padding-bottom: 140px; /* Memberi ruang agar tidak tertutup kontrol bawah */
    }

    .lobby-logo {
        height: 60px; /* Logo sedikit mengecil */
    }

    .tagline {
        font-size: 0.8rem;
        letter-spacing: 2px;
        margin-bottom: 40px;
        padding: 0 20px;
    }

    /* Navigasi menjadi vertikal yang rapi */
    .lobby-nav {
        flex-direction: column;
        gap: 15px;
    }

    .separator {
        display: none; /* Hilangkan garis miring di HP */
    }

    .nav-item {
        font-size: 1.2rem;
        padding: 5px 0;
        width: 100%;
        display: block;
    }
    
    /* Garis bawah nav muncul dari tengah */
    .nav-item::after {
        background: var(--accent);
        opacity: 0.5;
    }
}

/* 2. Mobile Phone (Layar di bawah 768px) */
@media screen and (max-width: 768px) {
    /* Panel Kontrol Bawah (Bottom Sheet) */
    .bg-controls {
        width: 100%;
        bottom: 0;
        right: 0;
        left: 0;
        padding: 25px 15px 15px; /* Padding atas lebih besar untuk label segmen */
        border-left: none;
        /* Border atas emas tipis dan glow halus */
        border-top: 1px solid rgba(179, 154, 106, 0.5);
        box-shadow: 0 -5px 20px rgba(179, 154, 106, 0.2); 
        background: rgba(10, 10, 10, 0.95); /* Sangat gelap dan blur */
        backdrop-filter: blur(15px);
        display: flex;
        flex-direction: column;
        gap: 15px; /* Jarak antar segmen */
    }

    /* Sembunyikan label teks lama */
    .control-label, .mini-label {
        display: none;
    }

    .control-group {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* --- GAYA SEGMEN BARU --- */
    .buttons-row {
        position: relative; /* Penting untuk label absolut */
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 0;
        /* Latar belakang segmen transparan */
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        padding: 15px 10px 10px; /* Ruang untuk tombol di dalam segmen */
        border-radius: 16px; /* Sudut membulat */
    }

    /* Label Segmen (Chip Emas di pojok kiri atas) */
    .buttons-row::before {
        position: absolute;
        top: -10px;
        left: 15px;
        background: var(--accent); /* Warna Emas */
        color: var(--text-dark);
        font-size: 0.6rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
        padding: 3px 10px;
        border-radius: 10px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    }

    /* Isi teks label berdasarkan kelas HTML yang baru kita tambah */
    .video-group::before { content: "Video"; }
    .photo-group::before { content: "Photo"; }


    /* Tombol di Mobile */
    .btn-ctrl {
        padding: 8px 14px;
        font-size: 0.7rem;
        border-radius: 50px; /* Bentuk kapsul/pil */
        background: rgba(255,255,255,0.08);
        border: 1px solid transparent;
        flex-grow: 1; /* Tombol mengisi ruang kosong */
        max-width: 45%; /* Agar rapi 2 kolom jika layar sempit */
    }

    .btn-ctrl.active {
        background: var(--accent);
        color: var(--text-dark);
        box-shadow: 0 0 10px rgba(179, 154, 106, 0.4); /* Glow pada tombol aktif */
    }
}

/* 3. Landscape Mode di HP (Layar Pendek) */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .lobby-content {
        flex-direction: row; /* Logo kiri, Menu kanan */
        justify-content: space-around;
        padding-bottom: 0;
        padding-top: 0;
    }

    .logo-area {
        text-align: left;
        margin-bottom: 0;
    }

    .lobby-logo { height: 40px; margin-bottom: 10px; }
    .tagline { display: none; } /* Sembunyikan tagline biar muat */

    .lobby-nav {
        flex-direction: row; /* Kembali horizontal */
        flex-wrap: wrap;
        gap: 15px;
        font-size: 0.9rem;
    }
    
    .nav-item { font-size: 1rem; }

    .bg-controls {
        display: none; /* Sembunyikan kontrol di landscape mode agar layar bersih */
    }
}