* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; user-select: none; }

body {
    margin: 0; height: 100vh; background: #000; color: #fff;
    font-family: -apple-system, system-ui, sans-serif;
    display: flex; flex-direction: column; overflow: hidden;
}

.player { 
    flex: 2; display: flex; justify-content: center; align-items: center; 
    transition: background 0.15s ease-out; 
}
.blue { background: #0f172a; transform: rotate(180deg); }
.red { background: #2d0a0a; }

/* Animación de los números */
.score { 
    font-size: 11rem; font-weight: 900; min-width: 140px; text-align: center; 
    transition: transform 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
}

.pop { transform: scale(1.25); text-shadow: 0 0 30px #fff; }

/* Destellos de fondo */
.hit-red { background: #ff3333 !important; }
.hit-blue { background: #33aaff !important; }

.btn { 
    width: 85px; height: 85px; border-radius: 50%; border: 3px solid #fff;
    background: rgba(255,255,255,0.1); color: #fff; font-size: 3rem; cursor: pointer;
}

.tools { 
    flex: 0.8; background: #111; display: flex; z-index: 10;
    justify-content: space-around; align-items: center; border-block: 2px solid #333;
}

.tool-btn { background: none; border: none; font-size: 3rem; cursor: pointer; }
.reset-btn { background: #333; color: #ff4d4d; border: none; padding: 12px 24px; border-radius: 10px; font-weight: bold; }

/* Overlay de Dado/Moneda */
.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); display: none;
    flex-direction: column; justify-content: center; align-items: center; z-index: 9999;
}
.visual-box { font-size: 13rem; }
.result-text { font-size: 3rem; font-weight: bold; margin-top: 20px; color: #00d4ff; }

.animating { animation: spin 0.5s infinite linear; }
@keyframes spin {
    from { transform: rotate(0deg) scale(1); }
    to { transform: rotate(360deg) scale(1.2); }
}