/* css/gameWhack.css */
/*
 * Stylesheet khusus untuk game "Pukul Si Tikus" (Whack-a-Mole).
 * Didesain dengan estetika premium, transisi transisi halus, dan visual yang hidup.
 */

.game-whack-page {
    display: none;
    position: absolute;
    top: 90px;
    left: 0;
    width: 100%;
    height: calc(100% - 90px);
    background-color: #f7fafc;
    box-sizing: border-box;
    padding: 20px 40px;
    overflow: hidden;
}

.game-whack-page.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.whack-game-container {
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: space-between;
}

/* Header Area */
.whack-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 0;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

.whack-stat-box {
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.06);
    padding: 12px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    min-width: 120px;
}

.whack-stat-lbl {
    font-size: 12px;
    font-weight: 700;
    color: #a0aec0;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
}

.whack-stat-val {
    font-size: 28px;
    font-weight: 800;
    color: var(--ariston-red);
}

.whack-title-wrapper {
    height: 70px;
    display: flex;
    align-items: center;
}

.whack-game-title-img {
    height: 100%;
    object-fit: contain;
}

/* Grid Board Game 3x3 */
.whack-grid-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
    max-width: 780px;
    background: #e2e8f0;
    padding: 24px;
    border-radius: 24px;
    box-shadow: inset 0 4px 12px rgba(0,0,0,0.08), 0 10px 25px rgba(0,0,0,0.05);
    margin: 20px 0;
}

/* Lubang Tikus */
.whack-hole {
    aspect-ratio: 1.25;
    background: radial-gradient(ellipse at bottom, #2d3748 30%, #1a202c 90%);
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 10px 20px rgba(0,0,0,0.6), 0 4px 8px rgba(255,255,255,0.4);
    border: 4px solid #4a5568;
    box-sizing: border-box;
}

/* Karakter Tikus */
.whack-mole-character {
    width: 80px;
    height: 90px;
    position: absolute;
    bottom: -90px;
    left: calc(50% - 40px);
    transition: bottom 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.15);
    z-index: 10;
}

.whack-mole-svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Aksesoris Tikus Pekerja (Safety Helmet) */
.whack-mole-character.worker::before {
    content: '';
    position: absolute;
    top: 4px;
    left: calc(50% - 22px);
    width: 44px;
    height: 22px;
    background: #fbbf24;
    border-radius: 20px 20px 0 0;
    border: 2px solid #d97706;
    z-index: 15;
    box-shadow: inset 0 3px 5px rgba(255,255,255,0.6), 0 2px 4px rgba(0,0,0,0.15);
}
.whack-mole-character.worker::after {
    content: '';
    position: absolute;
    top: 22px;
    left: calc(50% - 28px);
    width: 56px;
    height: 4px;
    background: #d97706;
    border-radius: 2px;
    z-index: 16;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Aksesoris Tikus Koki (Chef Hat) */
.whack-mole-character.chef::before {
    content: '';
    position: absolute;
    top: -16px;
    left: calc(50% - 20px);
    width: 40px;
    height: 25px;
    background: #ffffff;
    border-radius: 12px 12px 6px 6px;
    border: 2px solid #cbd5e0;
    box-shadow: -10px -4px 0 -2px #ffffff, 10px -4px 0 -2px #ffffff,
                -10px -4px 0 0px #cbd5e0, 10px -4px 0 0px #cbd5e0,
                0 -6px 0 0px #ffffff, 0 -6px 0 2px #cbd5e0,
                inset 0 -3px 5px rgba(0,0,0,0.05);
    z-index: 15;
}
.whack-mole-character.chef::after {
    content: '';
    position: absolute;
    top: 9px;
    left: calc(50% - 15px);
    width: 30px;
    height: 6px;
    background: #ffffff;
    border: 2px solid #cbd5e0;
    border-radius: 3px;
    z-index: 16;
}

/* Aksesoris Tikus Raja (Crown) */
.whack-mole-character.king::before {
    content: '👑';
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 26px;
    z-index: 15;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    animation: crownFloat 2s ease-in-out infinite;
}
@keyframes crownFloat {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-4px) rotate(2deg); }
}

/* Aksesoris Tikus Detektif (Fedora & Kacamata Hitam) */
.whack-mole-character.detective::before {
    content: '';
    position: absolute;
    top: -2px;
    left: calc(50% - 24px);
    width: 48px;
    height: 14px;
    background: #4a5568;
    border-radius: 6px 6px 0 0;
    border-bottom: 3px solid #e53e3e;
    z-index: 15;
    box-shadow: 0 -3px 0 0 #2d3748;
}
.whack-mole-character.detective::after {
    content: '';
    position: absolute;
    top: 25px;
    left: calc(50% - 22px);
    width: 44px;
    height: 12px;
    background: linear-gradient(to bottom, #1a202c, #2d3748);
    border-radius: 6px;
    z-index: 16;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    border: 1px solid #4a5568;
}

/* Tikus Emas (Poin Ganda + Berkilau) */
.whack-mole-character.gold {
    filter: drop-shadow(0 0 12px #ecc94b) brightness(1.2) sepia(1) hue-rotate(15deg) saturate(5) !important;
}
.whack-mole-character.gold::before {
    content: '✨';
    position: absolute;
    top: -10px;
    left: 5px;
    font-size: 16px;
    animation: spark 1s ease-in-out infinite alternate;
}
@keyframes spark {
    0% { opacity: 0.3; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1.2); }
}

/* Transisi Kecepatan Muncul & Masuk Tikus */
.whack-hole.speed-fast .whack-mole-character {
    transition: bottom 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.15);
}
.whack-hole.speed-medium .whack-mole-character {
    transition: bottom 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.15);
}
.whack-hole.speed-slow .whack-mole-character {
    transition: bottom 0.4s ease-in-out;
}

/* Tumpukan Tanah di depan lubang */
.whack-hole-dirt {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to top, #744210 20%, transparent 100%);
    z-index: 12;
    pointer-events: none;
    border-radius: 0 0 50% 50%;
}

/* Tikus naik ke atas */
.whack-hole.up .whack-mole-character {
    bottom: 0px;
}

/* Fokus remote control spasial (TV) */
.whack-hole.focused {
    border-color: var(--ariston-red);
    box-shadow: inset 0 10px 20px rgba(0,0,0,0.6), 0 0 20px rgba(227, 28, 45, 0.6);
}

/* Efek visual ketika dipukul */
.whack-hole.whacked {
    animation: holeShake 0.15s ease-in-out;
}

.whack-hole.whacked.up .whack-mole-character {
    filter: brightness(0.6) sepia(1) hue-rotate(-50deg);
}

@keyframes holeShake {
    0% { transform: translateY(0); }
    25% { transform: translateY(-4px) rotate(1deg); }
    50% { transform: translateY(4px) rotate(-1deg); }
    75% { transform: translateY(-2px); }
    100% { transform: translateY(0); }
}

/* Footer & Aksi */
.whack-footer-actions {
    width: 100%;
    display: flex;
    justify-content: center;
    padding-bottom: 15px;
}

/* Modal Overlay Pop-up */
.whack-overlay-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    z-index: 999;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.whack-overlay-modal.active {
    display: flex;
}

.whack-modal-content {
    background-color: #ffffff;
    border-radius: 24px;
    padding: 50px 60px;
    max-width: 650px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    transform: scale(0.9);
    animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes modalPop {
    to { transform: scale(1); }
}

.whack-modal-title {
    font-size: 38px;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 16px;
}

.whack-modal-desc {
    font-size: 18px;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 30px;
}

.whack-score-summary {
    background-color: #fff5f5;
    border: 2px dashed rgba(227, 28, 45, 0.3);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 35px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.whack-summary-lbl {
    font-size: 14px;
    font-weight: 700;
    color: #718096;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.whack-summary-val {
    font-size: 48px;
    font-weight: 900;
    color: var(--ariston-red);
}

.whack-modal-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.whack-modal-buttons button {
    min-width: 180px;
}

/* Layar Awal/Lobi Game Whac-a-Mole Premium */
.whack-lobby-view {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.whack-lobby-content {
    max-width: 900px;
    width: 100%;
    background: #ffffff;
    border-radius: 24px;
    padding: 50px 60px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.whack-lobby-title-img {
    height: 90px;
    margin-bottom: 24px;
    object-fit: contain;
}

.whack-lobby-desc {
    font-size: 18px;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 35px;
    max-width: 650px;
}

.whack-lobby-info-cards {
    display: flex;
    gap: 20px;
    width: 100%;
    margin-bottom: 45px;
    justify-content: space-between;
}

.whack-info-card {
    flex: 1;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.whack-info-card:hover, .whack-info-card.focused {
    border-color: var(--ariston-red);
    background: #fff5f5;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(227, 28, 45, 0.08);
}

.info-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #718096;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.info-card-detail {
    font-size: 24px;
    font-weight: 800;
    color: var(--ariston-red);
    margin-bottom: 8px;
}

.info-card-desc {
    font-size: 13px;
    color: #a0aec0;
    line-height: 1.4;
}

.whack-lobby-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.whack-lobby-buttons button {
    min-width: 200px;
}

