/* --- RESET & BASIC STYLES --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-user-select: none;
    user-select: none;
    font-family: 'Comic Sans MS', 'Fredoka', 'Chalkboard SE', sans-serif;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #212121;
}

/* App Container (Responsive Smartboard/Tablet/Mobile) */
.app-viewport {
    width: 100vw;
    height: 100vh;
    max-width: 1280px;
    max-height: 800px;
    margin: 0 auto;
    position: relative;
    background: linear-gradient(180deg, #E0F7FA 0%, #FFF9C4 100%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Background Canvas */
#fxCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99;
}

/* --- HEADER BAR --- */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    z-index: 10;
}

.icon-btn {
    width: 60px;
    height: 60px;
    font-size: 28px;
    background: #FFFFFF;
    border: 4px solid #4FC3F7;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 6px 0 #0288D1;
    transition: transform 0.1s;
}

.icon-btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #0288D1;
}

.star-badge {
    background: #FFF;
    border: 4px solid #FFCA28;
    padding: 8px 24px;
    border-radius: 40px;
    font-size: 28px;
    font-weight: bold;
    color: #F57F17;
    box-shadow: 0 6px 0 #FBC02D;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- SCREENS MANAGEMENT --- */
.screen {
    display: none;
    flex: 1;
    position: relative;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.screen.active {
    display: flex;
}

/* --- HOME SCREEN --- */
.home-content {
    text-align: center;
    z-index: 5;
}

.main-title {
    font-size: 3rem;
    color: #2E7D32;
    text-shadow: 3px 3px 0px #FFF, 6px 6px 0px #A5D6A7;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.beebee-container {
    width: 160px;
    height: 160px;
    margin: 10px auto;
}

.beebee-svg {
    width: 100%;
    height: 100%;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.btn-primary, .btn-secondary, .btn-danger, .btn-small {
    min-height: 80px;
    padding: 15px 40px;
    font-size: 1.8rem;
    font-weight: bold;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 0 rgba(0,0,0,0.2);
    transition: transform 0.1s, filter 0.2s;
}

.btn-primary {
    background: #66BB6A;
    color: white;
    border: 4px solid #4CAF50;
    box-shadow: 0 8px 0 #2E7D32;
}

.btn-secondary {
    background: #FFCA28;
    color: #3E2723;
    border: 4px solid #FFB300;
    box-shadow: 0 8px 0 #FF6F00;
}

.btn-danger {
    background: #EF5350;
    color: white;
    border: 4px solid #E53935;
    box-shadow: 0 6px 0 #C62828;
    font-size: 1.2rem;
    min-height: 50px;
}

.btn-small {
    background: #29B6F6;
    color: white;
    font-size: 1.2rem;
    min-height: 50px;
    border: none;
    box-shadow: 0 4px 0 #0288D1;
}

.btn-primary:active, .btn-secondary:active {
    transform: translateY(4px);
}

/* --- GAMEPLAY SCREEN --- */
.game-layout {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
}

.question-box {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #FFFFFF;
    padding: 15px 25px;
    border-radius: 30px;
    border: 4px solid #81C784;
    box-shadow: 0 8px 0 #A5D6A7;
    max-width: 90%;
}

.beebee-avatar {
    font-size: 50px;
}

.audio-btn {
    background: #FF7043;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 0 #D84315;
}

.speech-bubble {
    font-size: 1.5rem;
    color: #1B5E20;
    font-weight: bold;
}

.choices-container {
    display: flex;
    gap: 30px;
    width: 100%;
    justify-content: center;
    align-items: center;
}

/* Touch target minimum 120px++ */
.choice-card {
    width: 42vw;
    max-width: 320px;
    height: 250px;
    background: #FFFFFF;
    border: 6px solid #B2EBF2;
    border-radius: 35px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 0 #4DD0E1;
    transition: transform 0.2s, border-color 0.2s;
    padding: 10px;
}

.choice-card:active {
    transform: scale(0.96);
}

.card-svg-wrap {
    width: 120px;
    height: 120px;
}

.card-label {
    margin-top: 15px;
    font-size: 1.4rem;
    font-weight: bold;
    color: #37474F;
    text-align: center;
}

/* --- REWARDS SCREEN --- */
.rewards-grid {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.reward-card {
    width: 180px;
    height: 200px;
    background: white;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 0 #DDD;
    border: 4px solid #CCC;
}

.reward-card.unlocked {
    border-color: #FFD54F;
    box-shadow: 0 6px 0 #FFB300;
    background: #FFFDE7;
}

.reward-icon {
    font-size: 60px;
}

/* --- ANIMATIONS & MODAL --- */
.floating {
    animation: floatAnim 3s infinite ease-in-out;
}

@keyframes floatAnim {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.pulse {
    animation: pulseAnim 1.5s infinite;
}

@keyframes pulseAnim {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.modal-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: white;
    padding: 30px;
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 320px;
    text-align: center;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    align-items: center;
}

.btn-margin-top {
    margin-top: 20px;
}

/* Media Queries untuk Skrin Kecil */
@media (max-width: 600px) {
    .main-title { font-size: 2rem; }
    .choices-container { flex-direction: column; gap: 15px; }
    .choice-card { width: 80vw; height: 140px; flex-direction: row; gap: 15px; }
    .card-svg-wrap { width: 70px; height: 70px; }
    .speech-bubble { font-size: 1.1rem; }
}