:root {
    --primary-bg: #f0f8ff;
    --secondary-bg: #ffffff;
    --accent-color: #4a90e2;
    --green-light: #e8f5e9;
    --blue-light: #e3f2fd;
    --text-dark: #333;
    --border-color: #ddd;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #e0e0e0;
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
}

.phone-container {
    width: 380px;
    height: 800px;
    background-color: var(--primary-bg);
    border: 12px solid #111;
    border-radius: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#game-screen {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* HUD */
.hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--secondary-bg);
    border-bottom: 1px solid var(--border-color);
}

.player-info { display: flex; align-items: center; font-weight: 600; }
.avatar-icon { width: 40px; height: 40px; border-radius: 50%; margin-right: 10px; }
.score-container { font-weight: 600; font-size: 1.1em; color: var(--accent-color); }

/* Game Board */
.game-board {
    position: relative;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 40px 10px;
    margin: 20px 0;
}

.stage-connector {
    position: absolute;
    width: 90%;
    height: 4px;
    background-color: var(--border-color);
    top: 50%;
    left: 5%;
    transform: translateY(-50%);
    z-index: 1;
}

.stage {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--secondary-bg);
    border: 2px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.7em;
    font-weight: 600;
    text-align: center;
    z-index: 2;
    transition: background-color 0.3s, border-color 0.3s;
}
.stage.active {
    background-color: var(--accent-color);
    border-color: #2a6db5;
    color: white;
}
.stage#stage-5.jannah { background-color: #66bb6a; }
.stage#stage-5.nar { background-color: #ef5350; }


.player-avatar {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: #ff5252;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
    z-index: 3;
    transition: left 0.5s ease-in-out;
    top: 50%;
    transform: translateY(-50%);
}

.turn-info {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    font-size: 1.1em;
}

/* Controls */
.controls {
    padding: 20px;
    background-color: var(--secondary-bg);
    border-top: 1px solid var(--border-color);
}

#dice-button {
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    font-weight: 600;
    color: white;
    background-color: var(--accent-color);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}
#dice-button:hover { background-color: #3a7bc2; }
#dice-button:disabled { background-color: #aaa; cursor: not-allowed; }

/* Modals */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: none; /* Diubah oleh JS */
    justify-content: center;
    align-items: center;
    z-index: 10;
}
.modal-overlay.visible { display: flex; }

.modal-content {
    background-color: var(--secondary-bg);
    padding: 25px;
    border-radius: 15px;
    width: 85%;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.modal-content h3, .modal-content h2 { margin-top: 0; }
.modal-content p { margin: 15px 0; }

#card-options { display: flex; flex-direction: column; gap: 10px; }

.option-button, #restart-button {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: background-color 0.2s;
}
.option-button:hover { background-color: #e9e9e9; }
#restart-button { background-color: #66bb6a; color: white; border: none; }