/* CSS ini HANYA berlaku untuk game Pembasmi Bug */

/* Layar Awal (Spesifik) */
#start-screen h1 {
    color: var(--accent-color);
    margin-top: 0;
}
#name-input {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    padding: 10px 15px;
    width: 80%;
    border-radius: 8px;
    border: 2px solid var(--grid-border);
    background-color: #444;
    color: var(--text-color);
    margin-top: 10px;
}
#submit-button {
     background-color: var(--score-color);
}


/* Layar Peraturan */
#rules-screen {
    text-align: left;
}
#rules-screen h2 {
    text-align: center;
    color: var(--accent-color);
}
.rule {
    display: flex;
    align-items: center;
    background-color: #333;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
}
.rule-icon {
    font-size: 2.5rem;
    margin-right: 20px;
    line-height: 1;
}
.rule-text {
    font-size: 1.1rem;
}
.virus-text {
    color: var(--virus-color);
    font-weight: 700;
}
/* Warna Ikon Powerup di Peraturan */
.bug { color: var(--bug-color); }
.virus { color: var(--virus-color); }
.star { color: var(--star-color); animation: pulse 0.8s infinite alternate; }
.clock { color: var(--clock-color); }


/* Layar Game */
#hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
}

/* ▼▼ STYLE TOMBOL NYERAH (MARGIN DIPERBARUI) ▼▼ */
.button-danger {
    background-color: var(--bug-color); /* Pakai warna merah bug/virus */
    color: var(--text-color);
    font-size: 1rem; /* Buat lebih kecil dari tombol utama */
    font-weight: 700;
    padding: 10px 20px;
    display: block; /* Agar bisa di-margin auto */
    margin: 20px auto 0 auto; /* (Top 20px, L/R auto, Bottom 0) <-- DIPERBARUI */
    border: 2px solid #000; /* Border hitam tipis */
    opacity: 0.8;
    transition: all 0.3s ease;
}
.button-danger:hover {
    opacity: 1;
    box-shadow: 0 0 10px var(--bug-color);
    transform: scale(1.05);
}
/* ▲▲ STYLE BARU ▲▲ */


#time { color: var(--accent-color); }
#score { color: var(--score-color); }

/* Timer Bintang 2x Skor */
#star-power-timer {
    color: var(--star-color);
    font-size: 1.2rem;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.5s;
}
#star-power-timer.star-active {
    opacity: 1;
    animation: pulse 0.5s infinite alternate;
}

/* Animasi Timer Panik */
.timer-panic {
    color: var(--bug-color) !important;
    animation: pulse 0.5s infinite alternate;
}

#game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.hole {
    height: 100px;
    background-color: #333;
    border-radius: 10px;
    border: 3px solid var(--grid-border);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4rem;
    cursor: pointer;
    transition: all 0.1s;
}
.hole:active { transform: scale(0.9); }

/* Styling Ikon di Game */
.bug {
    color: var(--bug-color);
    border-color: var(--bug-color) !important;
    animation: pop 0.1s ease-out;
}
.virus {
    color: var(--virus-color);
    border-color: var(--virus-color) !important;
    animation: pop 0.1s ease-out;
}
.star {
    color: var(--star-color);
    border-color: var(--star-color) !important;
    animation: pop 0.1s ease-out, pulse 0.8s infinite alternate;
}
.clock {
    color: var(--clock-color);
    border-color: var(--clock-color) !important;
    animation: pop 0.1s ease-out;
}

@keyframes pop {
    from { transform: scale(0.5); }
    to { transform: scale(1); }
}
@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

/* Layar Akhir (Skor) */
#final-score {
    font-size: 2.5rem;
    color: var(--score-color);
}

#end-screen .promo-text {
    font-size: 1.1rem;
    margin-top: 10px;
}
#end-screen .promo-text a {
    text-decoration: none;
    color: var(--accent-color);
    font-weight: 700;
}
#end-screen .promo-text a:hover {
    text-decoration: underline;
}

/* Styling untuk Pop-up Skor */
.score-popup {
    position: absolute;
    font-size: 1.5rem;
    font-weight: 700;
    pointer-events: none;
    animation: fadeUp 1s ease-out forwards;
}
.plus { color: var(--plus-color); }
.minus {
    color: var(--minus-color);
    animation: fadeUpShake 1s ease-out forwards;
}
@keyframes fadeUp {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-50px); }
}
@keyframes fadeUpShake {
    0% { transform: translate(0, 0); opacity: 1; }
    25% { transform: translate(-5px, -10px); }
    50% { transform: translate(5px, -20px); }
    75% { transform: translate(-5px, -30px); }
    100% { transform: translate(0, -50px); opacity: 0; }
}

/* ▼▼▼ KODE CSS EVENT SELECTOR DI BAWAH INI DIHAPUS SEMUA ▼▼▼ */
/* (Kode ini seharusnya hanya ada di file style.css global) */