/* --- TEMA DARK GLOBAL --- */
body {
    font-family: Arial, sans-serif;
    background-image: url('assets/background.png'); 
    background-size: cover;
    background-position: center center;
    background-attachment: fixed; 
    
    color: #e0e0e0; 
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.container {
    background: rgba(30, 30, 30, 0.85); 
    max-width: 500px;
    width: 90%;
    min-height: 60vh;
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(10, 0, 51, 0.5);
    text-align: center;
    border: 1px solid #333;
}

/* --- TATA LETAK JUDUL DAN LOGO --- */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    width: 100%;
}

.title-block {
    display: flex;
    flex-direction: column;
    text-align: center;
    flex-grow: 1;
    margin-bottom: 1px;
}

.title-line-one {
    color: #A9A9A9; 
    font-size: 1.2em;
    font-weight: normal;
    margin-bottom: -5px;
}

.title-line-two {
    color: #4CAF50; 
    font-size: 2.2em; 
    margin: 0;
}

.logo-side1, .logo-side2 {
    width: 80px; 
    height: 50px;
    object-fit: contain;
    margin: 0 10px; 
}


/* --- TAMPILAN ANGKA 5 SLOT --- */
#lottery-display-container {
    display: flex;
    justify-content: space-between; 
    gap: 5px; 
    
    font-size: 8em; 
    font-weight: bold;
    padding: 10px; 
    
    background-color: transparent; 
    border: none;
    
    height: 1.35em;
    overflow: hidden;
    letter-spacing: normal;
}

.digit-slot {
    width: 18%; 
    text-align: center;
    padding: 10px 0; 
    
    background-color: rgba(44, 44, 44, 0.9); 
    border: 2px solid #666; 
    border-radius: 12px;
    transition: color 0.5s; 
    margin-top: 2px;
    margin-bottom: 2px;
}

.color-shuffling {
    color: #AAAAAA; 
}

.color-final {
    color: #FFD700; 
}

/* --- Tombol Utama (MULAI/STOP) --- */
.controls button {
    padding: 10px 20px;
    font-size: 1em;
    margin: 5px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#btn-mulai {
    background-color: #4CAF50;
    color: white;
    height: 50px;
    width: 120px;
}

#btn-stop {
    background-color: #F44336;
    color: white;
    height: 50px;
    width: 120px;
}

/* Styling untuk menyembunyikan tombol STOP di mode otomatis */
.hide-stop #btn-stop {
    display: none;
}
.hide-stop #btn-mulai {
    width: calc(100% - 30px) !important; 
}

button:disabled {
    background-color: #555;
    cursor: not-allowed;
    color: #aaa;
}

.hidden {
    display: none !important;
}

#pemenang-sebelumnya-container h2 {
    color: #4CAF50;
    margin-top: 20px;
}

#daftar-pemenang-sebelumnya {
    list-style: none;
    padding: 0;
}

#daftar-pemenang-sebelumnya li {
    background: #2c2c2c;
    color: #e0e0e0;
    padding: 8px;
    margin-bottom: 5px;
    border-left: 5px solid #2196F3; 
    text-align: left;
    border-radius: 4px;
}

.controls-bottom {
    text-align: center; 
    margin-top: 20px;
    padding-bottom: 10px;
}

/* --- MODAL GLOBAL & RESULT --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: #333;
    margin: 10% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 450px; 
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    text-align: center;
}

/* ⚠️ ATUR UKURAN FONT NIK */
.winner-nik {
    /* Saat ini 2.5em. Ganti ke nilai yang lebih besar, misal 4em */
    font-size: 6em; 
    font-weight: bold;
    color: #FFD700;
    margin-top: 5px;
    margin-bottom: 10px;
}

/* ⚠️ ATUR UKURAN FONT NAMA */
.winner-name {
    /* Saat ini 1.5em. Ganti ke nilai yang lebih besar, misal 2em */
    font-size: 2em;
    color: #e0e0e0;
    text-transform: uppercase;
    font-weight: 500;
    margin-top: 5px;
    margin-bottom: 10px;
}

/* --- Styling Tombol Aksi di Modal Setting (KUNCI PERBAIKAN) --- */

/* Tombol Reset/Danger */
.btn-danger {
    background-color: #F44336; 
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    margin-top: 15px;
    cursor: pointer;
    font-size: 1em; /* Pastikan font-size sama */
}

/* Tombol Simpan/Success */
.btn-success {
    background-color: #4CAF50; 
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 10px;
    font-size: 1em;
}

/* Tombol Batal/Secondary */
.btn-secondary {
    background-color: #6c757d; 
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
}

/* Styling Tombol Setting di Container */
#btn-settings-open {
    background-color: #3f51b5; 
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

#btn-settings-open:hover {
    background-color: #303f9f;
}

/* Styling Input Setting */
.setting-group {
    text-align: left;
    margin-bottom: 15px;
}

.setting-group label {
    display: block;
    margin-bottom: 5px;
    color: #e0e0e0;
}

.setting-group input[type="number"], 
.setting-group input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #555;
    background-color: #2c2c2c;
    color: white;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Styling Tombol KEMBALI di Modal Result */
#btn-modal-kembali {
    background-color: #2196F3; 
    color: white;
    padding: 10px 25px;
    font-size: 1.1em;
    border-radius: 5px;
    border: none;
    margin-top: 20px; 
    cursor: pointer;
}

/* --- Styling Toggle Switch --- */
.setting-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #4CAF50;
}

input:focus + .slider {
    box-shadow: 0 0 1px #4CAF50;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}


/* ======================================================= */
/* MEDIA QUERIES UNTUK TAMPILAN PONSEL (Maksimum 600px) */
/* ======================================================= */
@media (max-width: 600px) {
    
    .container {
        width: 85%;
        max-width: 80%;
        padding: 15px; 
        min-height: auto;
    }

    .title-line-two {
        font-size: 1.8em;
    }
    .title-line-one {
        font-size: 1em;
    }

    #lottery-display-container {
        font-size: 3em; 
        gap: 3px; 
    }

    .logo-side1, .logo-side2 {
        width: 35px;
        height: 35px;
        margin: 0 5px;
    }

    .controls button {
        padding: 8px 15px;
        font-size: 0.9em;
    }
}