* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

body {
    background: #09090b;
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 0;
}

.arcade-container {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    padding: 20px;
    background: #0f0f12;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    border-left: 1px solid #27272a;
    border-right: 1px solid #27272a;
}

@media (min-width: 481px) {
    .arcade-container {
        min-height: auto;
        height: 90vh;
        border-radius: 20px;
        border: 2px solid #1e1b4b;
        box-shadow: 0 0 35px rgba(139, 92, 246, 0.25);
    }
}

.header {
    width: 100%;
    margin-bottom: 10px;
}

.header h2 {
    text-align: center;
    font-size: 20px;
    font-weight: 900;
    color: #a78bfa;
    text-shadow: 0 0 10px #8b5cf6;
    margin-bottom: 12px;
    letter-spacing: 1.5px;
}

.bot-level-container {
    background: #161624;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #2e2e47;
    margin-bottom: 10px;
}

.bot-status {
    font-size: 12px;
    font-weight: bold;
    color: #9ca3af;
    margin-bottom: 5px;
    text-align: center;
}

#botLevelText {
    font-weight: 900;
    letter-spacing: 1px;
}

.level-bar-wrapper {
    width: 100%;
    height: 12px;
    background: #0b0b12;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #374151;
}

.level-bar {
    width: 0%;
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease-in-out, background 0.3s;
}

.neon-easy { background: #10b981; box-shadow: 0 0 10px #10b981; color: #10b981; }
.neon-normal { background: #3b82f6; box-shadow: 0 0 10px #3b82f6; color: #3b82f6; }
.neon-hard { background: #f59e0b; box-shadow: 0 0 10px #f59e0b; color: #f59e0b; }
.neon-extreme { background: #ef4444; box-shadow: 0 0 12px #ef4444; color: #ef4444; animation: pulse 1s infinite alternate; }

@keyframes pulse {
    0% { opacity: 0.7; box-shadow: 0 0 5px #ef4444; }
    100% { opacity: 1; box-shadow: 0 0 15px #ef4444; }
}

.score-board {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 12px;
    color: #cbd5e1;
    background: #1e1b4b;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #312e81;
}

#turnText {
    color: #38bdf8;
    text-shadow: 0 0 5px rgba(56, 189, 248, 0.5);
}

.sound-btn {
    cursor: pointer;
    font-size: 16px;
}

/* CANVAS WRAPPER RESPONSIF (KUNCI KOTAK MUTLAK) */
.canvas-wrapper {
    position: relative;
    width: 100%;
    max-width: 360px;
    aspect-ratio: 1/1 !important;
    background: #020205;
    border-radius: 12px;
    overflow: hidden;
    margin: auto;
}

canvas {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1/1 !important;
    display: block;
    border: 3px solid #8b5cf6;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
    border-radius: 12px;
}

.info-panel {
    margin-top: 10px;
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
    line-height: 1.4;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
}

.overlay-content {
    text-align: center;
    padding: 20px;
}

.overlay-content h1 {
    color: #f43f5e;
    text-shadow: 0 0 15px #f43f5e;
    font-size: 28px;
    margin-bottom: 8px;
}

.overlay-content p {
    font-size: 14px;
    margin-bottom: 20px;
    color: #94a3b8;
}

#restartBtn {
    background: linear-gradient(45deg, #8b5cf6, #ec4899);
    border: none;
    padding: 10px 25px;
    color: white;
    font-weight: bold;
    font-size: 14px;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 0 15px #8b5cf6;
    transition: transform 0.1s;
}

#restartBtn:active {
    transform: scale(0.95);
}

.hidden {
    display: none !important;
}