/**
 * assets/css/game_hse.css
 * Styling Game HSE Simulator (Latar #FFFFFF, Kontrol #1E4183, Padding <= 5px, Max 200 Baris)
 */
body { font-family: 'Segoe UI', sans-serif; background: #FFFFFF; color: #1E4183; margin: 0; padding: 5px; }
.wrapper { max-width: 900px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr; gap: 5px; }
.game-card, .leaderboard-card { background: #FFFFFF; padding: 5px; border-radius: 6px; border: 1px solid #CBD5E1; box-shadow: 0 2px 4px rgba(0,0,0,0.05); position: relative; }
.alert-status { background: #dcfce7; color: #166534; padding: 5px; border-radius: 4px; text-align: center; margin-bottom: 5px; font-weight: bold; font-size: 12px; }
.form-desc { font-size: 12px; text-align: center; color: #1E4183; margin: 4px 0 8px 0; }
.form-error-msg { background: #fee2e2; color: #991b1b; padding: 4px 5px; border-radius: 4px; font-size: 11px; margin-bottom: 5px; text-align: center; font-weight: bold; }
.form-group { margin-bottom: 5px; text-align: left; }
.form-group label { display: block; font-size: 12px; font-weight: bold; margin-bottom: 2px; color: #1E4183; }
.form-group input, .form-group select { width: 100%; padding: 4px 5px; border: 1px solid #CBD5E1; border-radius: 4px; box-sizing: border-box; color: #1E4183; }
.btn-mulai { background: #1E4183; color: #FFFFFF; padding: 5px; width: 100%; border: none; border-radius: 4px; font-size: 13px; cursor: pointer; font-weight: bold; margin-top: 5px; }
.btn-kembali { display: block; text-align: center; background: #F1F5F9; color: #1E4183; padding: 5px; width: 100%; border: 1px solid #CBD5E1; border-radius: 4px; font-size: 12px; text-decoration: none; font-weight: bold; margin-top: 5px; box-sizing: border-box; transition: all 0.2s ease; }
.btn-kembali:hover { background: #E2E8F0; }
.header { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: bold; margin-bottom: 5px; color: #1E4183; border-bottom: 1px solid #CBD5E1; padding-bottom: 4px; }
.header-left, .header-right { display: flex; align-items: center; gap: 5px; }
.waktu-badge { color: #B91C1C; font-weight: bold; min-width: 28px; }
.timer-bar-wrap { width: 85px; height: 8px; background: #E2E8F0; border-radius: 4px; overflow: hidden; border: 1px solid #CBD5E1; }
#timer-bar { height: 100%; width: 100%; background: #10B981; transition: width 0.3s linear, background-color 0.3s; }
#timer-bar.warning { background: #F59E0B; }
#timer-bar.danger { background: #EF4444; animation: pulseDanger 0.6s infinite alternate; }
@keyframes pulseDanger { from { opacity: 1; } to { opacity: 0.4; } }
.btn-audio { background: transparent; border: 1px solid #CBD5E1; border-radius: 4px; cursor: pointer; font-size: 13px; padding: 2px 4px; color: #1E4183; line-height: 1; }
.btn-audio:hover { background: #F1F5F9; }
.level-title-bar { font-size: 13px; font-weight: bold; margin-bottom: 5px; color: #1E4183; }
.arena { width: 100%; height: 480px; background-color: #CBD5E1; background-size: cover; background-position: center bottom; background-repeat: no-repeat; border-radius: 6px; position: relative; margin-bottom: 5px; transition: 0.2s; overflow: hidden; border: 2px solid #1E4183; }
.karakter { width: 260px; height: 450px; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); display: flex; align-items: center; justify-content: center; z-index: 10; color: transparent; background-size: contain; background-repeat: no-repeat; background-position: center bottom; }
.gudang-title { font-weight: bold; margin-bottom: 4px; font-size: 12px; color: #1E4183; }
.gudang-barang { display: flex; justify-content: center; gap: 5px; background: #F8FAFC; padding: 5px; border-radius: 6px; border: 1px solid #E2E8F0; flex-wrap: wrap; }
.barang { width: 75px; min-height: 84px; background: #FFFFFF; border: 1px solid #CBD5E1; border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 3px 2px; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,0.08); transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; box-sizing: border-box; user-select: none; }
.barang:hover { transform: translateY(-3px); border-color: #1E4183; box-shadow: 0 4px 8px rgba(30,65,131,0.2); }
.barang:active { transform: scale(0.92); }
.barang-icon { width: 50px; height: 50px; background-size: contain; background-repeat: no-repeat; background-position: center; pointer-events: none; }
.barang-label { font-size: 9px; font-weight: bold; color: #1E4183; text-align: center; line-height: 1.1; margin-top: 2px; max-width: 70px; word-wrap: break-word; pointer-events: none; }
.floating-score { position: absolute; font-size: 18px; font-weight: 900; z-index: 40; pointer-events: none; animation: floatScore 0.8s ease-out forwards; text-shadow: 0 1px 3px rgba(0,0,0,0.4); }
@keyframes floatScore { 0% { opacity: 1; transform: translateY(0) scale(1); } 100% { opacity: 0; transform: translateY(-40px) scale(1.3); } }
.game-toast { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); background: #1E4183; color: #FFFFFF; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: bold; z-index: 45; border: 1px solid #FFFFFF; box-shadow: 0 4px 12px rgba(0,0,0,0.3); text-align: center; max-width: 90%; animation: toastPop 0.3s ease-out; }
@keyframes toastPop { 0% { transform: translate(-50%, -15px); opacity: 0; } 100% { transform: translate(-50%, 0); opacity: 1; } }
.game-modal { position: absolute; inset: 0; background: rgba(30,65,131,0.85); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 50; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box { background: #FFFFFF; border-radius: 8px; border: 2px solid #1E4183; padding: 5px; width: 85%; max-width: 290px; text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.modal-stars { font-size: 26px; margin-bottom: 3px; }
.modal-judul { font-size: 14px; font-weight: 900; color: #1E4183; margin-bottom: 3px; }
.modal-info { font-size: 12px; color: #1E4183; margin-bottom: 6px; }
.modal-gelar { font-size: 13px; font-weight: bold; color: #1E4183; background: #F1F5F9; border-radius: 4px; padding: 3px 5px; margin: 4px 0 6px 0; border: 1px dashed #1E4183; }
.btn-modal { background: #1E4183; color: #FFFFFF; border: none; border-radius: 4px; padding: 5px; width: 100%; font-size: 12px; font-weight: bold; cursor: pointer; margin-bottom: 3px; }
.btn-modal:hover { opacity: 0.9; }
.btn-modal-sec { background: #F1F5F9; color: #1E4183; border: 1px solid #CBD5E1; border-radius: 4px; padding: 4px; width: 100%; font-size: 11px; font-weight: bold; cursor: pointer; }
.leaderboard-header { color: #1E4183; font-weight: bold; font-size: 13px; border-bottom: 1px solid #CBD5E1; padding-bottom: 4px; margin-bottom: 5px; }
.rank-row { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid #F1F5F9; font-size: 12px; color: #1E4183; }
.rank-badge { background: #1E4183; color: #FFFFFF; padding: 2px 5px; border-radius: 3px; font-weight: bold; font-size: 10px; }
@keyframes shake { 0% { transform: translateX(0); } 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-8px); } 100% { transform: translateX(0); } }
@keyframes flashRed { 0% { border-color: #1E4183; } 50% { border-color: #B91C1C; } 100% { border-color: #1E4183; } }
.shake-effect { animation: shake 0.4s ease-in-out, flashRed 0.4s ease-in-out; }
@media (max-width: 768px) {
    .wrapper { grid-template-columns: 1fr; }
    .arena { height: 350px; }
    .karakter { width: 100%; height: 320px; }
    .barang { width: 65px; min-height: 74px; }
    .barang-icon { width: 42px; height: 42px; }
    .barang-label { font-size: 8px; max-width: 60px; }
}
