/* RESET AND BASE */
* { 
    box-sizing: border-box; 
    user-select: none; 
    -webkit-tap-highlight-color: transparent; 
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    background-color: #000;
    color: #0f0; /* Default Matrix Green */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: background-color 0.1s, color 0.1s;
}

/* GIANT NUMBER (Responsive using vmin) */
#velocidad {
    /* 45vmin = 45% of the smallest viewport dimension */
    font-size: 45vmin; 
    font-weight: 900;
    line-height: 0.8;
    letter-spacing: -0.05em;
    text-align: center;
    z-index: 1;
}

#unidad {
    font-size: 8vmin;
    font-weight: bold;
    opacity: 0.7;
    margin-top: 1vh;
    text-transform: uppercase;
}

/* CONFIGURATION OVERLAY */
#capa-controles {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: opacity 0.3s;
}

/* Helper class to hide controls */
.oculto {
    opacity: 0;
    pointer-events: none;
}

/* INPUTS AND BUTTONS */
.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

label { 
    color: white; 
    font-size: 1.2rem; 
}

input {
    background: #222;
    border: 2px solid #0f0;
    color: #0f0;
    font-size: 1.5rem;
    width: 80px;
    padding: 10px;
    text-align: center;
    border-radius: 8px;
}

button {
    background: #0f0;
    color: black;
    font-size: 1.2rem;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0,255,0,0.4);
}

.instruction-text {
    color: #aaa; 
    font-size: 0.8rem; 
    margin-top: 20px;
}

/* DANGER MODE STYLES */
body.peligro {
    background-color: #f00; /* Pure Red Background */
    color: #fff; /* White Text */
}

body.peligro #velocidad {
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

/* Small limit indicator on main screen */
#info-limite {
    position: absolute;
    bottom: 5px;
    right: 10px;
    font-size: 3vmin;
    opacity: 0.5;
    color: inherit;
}
