body, html {
    margin: 0; padding: 0;
    overflow: hidden;
    width: 100vw; height: 100vh;
    font-family: 'Press Start 2P', monospace; /* Font Pixel Minecraft Style */
    user-select: none;
}

#game-container {
    width: 100%; height: 100%;
    position: absolute; top: 0; left: 0; z-index: 10;
}

/* --- TAMPILAN INTERFACE HUD --- */
#ui {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 100; pointer-events: none;
}

.top-left-ui {
    position: absolute; top: 20px; left: 20px;
    background: rgba(0, 0, 0, 0.65);
    border: 3px solid #f1c40f;
    padding: 15px; border-radius: 8px;
    color: white; font-size: 11px; line-height: 1.8;
}

/* --- KOTAK DIALOG INTERAKTIF --- */
#dialog-box {
    position: absolute; bottom: 40px; left: 50%;
    transform: translateX(-50%);
    width: 80%; max-width: 700px;
    background: rgba(24, 28, 36, 0.95);
    border: 4px solid #5cc447; border-radius: 12px;
    padding: 20px; color: white;
    pointer-events: auto; box-shadow: 0 8px 0px #2c3e50;
}

#dialog-speaker {
    color: #f1c40f; font-size: 13px; margin-bottom: 10px; text-shadow: 2px 2px #000;
}

#dialog-text {
    font-size: 11px; line-height: 1.6; margin-bottom: 18px; color: #ecf0f1;
}

#dialog-options {
    display: flex; flex-direction: column; gap: 10px;
}

.choice-button {
    background: #34495e; border: 2px solid #bdc3c7;
    padding: 12px; color: white; font-family: 'Press Start 2P', monospace;
    font-size: 10px; text-align: left; cursor: pointer; border-radius: 6px;
}
.choice-button:hover {
    background: #2ecc71; border-color: white; color: #000;
}

/* --- UTILITY CLASS CONFIG --- */
.hidden { display: none !important; }
.hidden-element { display: none !important; }

/* --- STYLE UNTUK RADIAL MENU UTAMA --- */
#start-menu {
    position: fixed; width: 100vw; height: 100vh;
    background: radial-gradient(circle, #2980b9 0%, #2c3e50 100%);
    display: flex; justify-content: center; align-items: center; z-index: 1000;
}

.menu-box {
    background: rgba(0, 0, 0, 0.85); padding: 30px;
    border: 4px solid #5cc447; border-radius: 12px;
    color: white; width: 380px; text-align: center;
}

.menu-box h2 { font-size: 16px; color: #5cc447; margin-bottom: 25px; }

.input-group label { font-size: 10px; display: block; margin-bottom: 8px; color: #bdc3c7; }
.input-group input {
    width: 85%; padding: 10px; font-family: 'Press Start 2P', monospace;
    font-size: 12px; margin-bottom: 20px; border-radius: 6px; text-align: center;
}

#btn-start {
    width: 100%; padding: 15px; background: #5cc447;
    font-family: 'Press Start 2P', monospace; font-size: 12px;
    color: white; border: none; border-radius: 6px; cursor: pointer;
}
#btn-start:hover { background: #2ecc71; }

#mobile-controls {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
}

/* --- Virtual Joystick Mobile + Touch Camera --- */
#joystick-base {
    position: absolute;
    left: 20px;
    bottom: 20px;

    width: 120px;
    height: 120px;

    border-radius: 50%;

    background: rgba(0,0,0,0.25);

    pointer-events: auto;
}

#joystick-stick {
    position: absolute;

    left: 35px;
    top: 35px;

    width: 50px;
    height: 50px;

    border-radius: 50%;

    background: rgba(255,255,255,0.7);
}

#camera-touch-area {
    position: absolute;

    right: 0;
    top: 0;

    width: 60%;
    height: 100%;

    pointer-events: auto;
}

/* =======================================================
   START MENU SKY THEME
======================================================= */

#start-menu{
    position:fixed;
    inset:0;

    display:flex;
    justify-content:center;
    align-items:center;

    overflow:hidden;

    background:
        linear-gradient(
            180deg,
            #55c3ff 0%,
            #8ad7ff 100%
        );

    z-index:999;
}

/* =======================================================
   CLOUDS
======================================================= */

.cloud{
    position:absolute;
    background:white;
    border-radius:100px;
    opacity:0.8;
    z-index:1;
}

.cloud::before,
.cloud::after{
    content:'';
    position:absolute;
    background:white;
    border-radius:50%;
}

.cloud::before{
    width:60%;
    height:120%;
    left:15%;
    top:-50%;
}

.cloud::after{
    width:40%;
    height:80%;
    right:15%;
    top:-30%;
}

.cloud1{
    width:180px;
    height:60px;

    top:15%;
    left:-250px;

    animation:
        moveCloud 40s linear infinite;
}

.cloud1::before{
    width:80px;
    height:80px;

    left:20px;
    top:-35px;
}

.cloud1::after{
    width:100px;
    height:100px;

    right:20px;
    top:-45px;
}

.cloud2{
    width:250px;
    height:70px;

    top:35%;
    left:-350px;

    animation:
        moveCloud 55s linear infinite;
}

.cloud3{
    width:200px;
    height:60px;

    top:70%;
    left:-300px;

    animation:
        moveCloud 65s linear infinite;
}

@keyframes moveCloud{
    from{
        transform:translateX(0);
    }

    to{
        transform:translateX(calc(100vw + 500px));
    }
}

/* =======================================================
   MENU BOX
======================================================= */

.menu-box{

    width:520px;
    max-width:90vw;

    position:relative;
    z-index:10;

    background:
        linear-gradient(
            180deg,
            #01213d,
            #001220
        );

    border:4px solid #79d95d;

    border-radius:20px;

    padding:25px;

    text-align:center;

    box-shadow:
        0 10px 30px rgba(0,0,0,.3);
}

/* =======================================================
   LOGO
======================================================= */

.logo-pancasila{

    width:120px;
    height:auto;
    background:none;

    margin-top:-55px;
    margin-bottom:10px;

    filter:
        drop-shadow(0 4px 8px rgba(0,0,0,.4));
}

/* =======================================================
   TITLE
======================================================= */

.game-title{

    color:#ffd84f;

    font-size:24px;

    line-height:1.4;

    margin-bottom:25px;

    text-shadow:
        4px 4px 0 #8c5c00;
}

/* =======================================================
   INPUT
======================================================= */

.input-group{
    margin-bottom:20px;
}

.input-group label{

    display:block;

    margin-bottom:10px;

    color:white;
}

.input-group input,
.input-group select{

    width:100%;

    height:48px;

    padding:0 15px;

    border-radius:10px;

    font-family:'Press Start 2P', monospace;

    font-size:12px;

    text-align:center;

    box-sizing:border-box;
}

/* =======================================================
   BUTTON
======================================================= */

#btn-start{

    width:100%;

    height:60px;

    border:none;

    border-radius:14px;

    background:
        linear-gradient(
            180deg,
            #86e35c,
            #4caf50
        );

    color:white;

    font-size:18px;

    cursor:pointer;

    transition:.2s;
}

#btn-start:hover{

    transform:translateY(-3px);

    box-shadow:
        0 8px 20px rgba(0,0,0,.3);
}

.menu-credit{
    margin-top:18px;

    text-align:center;

    font-family:'Press Start 2P', monospace;

    font-size:8px;

    color:#7ed957;

    opacity:0.8;

    line-height:1.8;
}

/* =========================
   HALL OF FAME
========================= */

#hall-of-fame{
    margin: 15px 0 20px 0;
    padding: 12px 18px;

    background: rgba(255,255,255,0.06);
    border: 2px solid rgba(255,255,255,0.12);

    border-radius: 12px;

    text-align: center;

    box-shadow:
        inset 0 0 10px rgba(255,255,255,0.05),
        0 0 12px rgba(0,0,0,0.25);
}

#hall-of-fame h3{
    margin: 0 0 12px 0;

    color: #ffd54f;

    font-size: 16px;

    text-shadow:
        0 0 8px rgba(255,213,79,0.4);

    letter-spacing: 1px;
}

/* Baris ranking */

#top1,
#top2,
#top3{

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    margin: 5px 0;
    padding: 6px 10px;

    border-radius: 8px;

    font-size: 11px;

    background: rgba(255,255,255,0.05);

    transition: all 0.25s ease;
}

#top1:hover,
#top2:hover,
#top3:hover{

    transform: scale(1.03);

    background: rgba(255,255,255,0.10);
}

/* Juara 1 */

#top1{
    color: #ffd700;
    font-weight: bold;
}

/* Juara 2 */

#top2{
    color: #d6d6d6;
    font-weight: bold;
}

/* Juara 3 */

#top3{
    color: #d48c43;
    font-weight: bold;
}

#camera-controls {

    position: fixed;

    top: 75px;
    right: 20px;

    display: flex;

    flex-direction: row;

    background: rgba(52,73,94,0.9);

    padding: 5px;

    border-radius: 10px;

    gap: 5px;

    z-index: 9999;
}

#camera-controls button {

    width: 45px;
    height: 45px;

    border: none;

    border-radius: 8px;

    background: #34495e;

    color: white;

    font-size: 20px;

    font-weight: bold;

    cursor: pointer;
}

#btn-camera{

    position: fixed;

    top: 20px;
    right: 20px;

    z-index: 9999;

    background: #2980b9;

    color: white;

    border: none;

    border-radius: 8px;

    padding: 10px 15px;

    cursor: pointer;

    font-weight: bold;
}

.hidden-ui {
    display: none !important;
}