body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background-color: #f0f2f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}
.container {
    background: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 450px;
    margin-bottom: 20px;
}
h2 {
    text-align: center;
    margin-top: 0;
    color: #333;
}
input[type="number"],
input[type="text"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

button {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    background-color: #007bff;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #0056b3;
}

/* --- Latihan 1: Kalkulator --- */
.form-group {
    display: flex;
    gap: 10px;
}
.form-group input { flex: 1; }
.button-group {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}
.button-group button {
    flex: 1;
    margin: 0 5px;
    font-size: 18px;
    font-weight: bold;
}
#bagi { 
    background-color: #ffc107; 
}
#bagi:hover {
    background-color: #e0a800; 
}
h3 { 
    text-align: center; color: #444; 
}
#hasil { 
    color: #007bff; font-weight: bold; 
}


/* --- Latihan 2: Daftar Belanja --- */
form { 
    display: flex; margin-bottom: 15px; 
}
form input[type="text"] {
    flex: 1;
    margin-bottom: 0;
    margin-right: 10px;
}
ul { list-style: none; padding: 0; margin: 0; }
li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
    font-size: 16px;
    word-break: break-all;
}
li:last-child { 
    border-bottom: none; 
}
.delete-btn {
    background-color: #dc3545;
    font-size: 12px;
    padding: 6px 10px;
}
.delete-btn:hover { background-color: #c82333; }


/* --- LATIHAN 3: JAM DIGITAL --- */
.clock-container {
    text-align: center;
}

.clock-container h2 {
    color: #444;
}

#digital-clock {
    font-family: 'Orbitron', sans-serif;
    font-size: 3.5rem;
    margin-bottom: 10px;
}

#digital-date {
    font-size: 1.1rem;
    color: #444;
}


/* --- LATIHAN 4: QUIZ INTERAKTIF --- */
#question {
    font-size: 1.25rem;
    margin-bottom: 20px;
    color: #333;
}

#answer-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn {
    width: 100%;
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    text-align: left;
    transition: background-color 0.2s, border-color 0.2s;
}

.btn:hover:not(:disabled) {
    background-color: #e0e0e0;
}

.btn.correct {
    background-color: #28a745; /* Hijau */
    color: white;
    border-color: #28a745;
}

.btn.wrong {
    background-color: #dc3545; /* Merah */
    color: white;
    border-color: #dc3545;
}

/* Tombol 'Berikutnya' dan 'Mulai Lagi' */
#next-btn, #restart-btn {
    width: 100%;
    margin-top: 20px;
    font-weight: bold;
}

#next-btn {
    display: none; /* Sembunyikan tombol next secara default */
}

/* Utility class untuk menyembunyikan elemen */
.hidden {
    display: none;
}