/* Configuración Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

body {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: radial-gradient(circle, #2c3e50 0%, #000000 100%);
    color: white;
    overflow: hidden;
}

/* Títulos */
h1 { font-weight: 800; font-size: 40px; text-transform: uppercase; letter-spacing: 5px; margin-bottom: 5px; }
p { margin-bottom: 30px; opacity: 0.7; font-weight: 300; }

/* Estación de Batería */
.drum-station {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 1000px;
}

.row {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    width: 100%;
    gap: 20px;
}

/* Estilo General de los Tambores/Platos */
.name {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 6px solid #333;
    cursor: pointer;
    transition: all 0.08s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    background: #444;
    user-select: none;
    width: 100px;
    height: 100px;
}

.name h2 { font-size: 24px; margin: 0; }
.name h3 { font-size: 10px; text-transform: uppercase; margin-top: 2px; }

/* --- POSICIONAMIENTO REAL --- */

/* 1. Platos (Arriba) */
.plates .plate {
    background: radial-gradient(circle, #ffd700, #b8860b) !important;
    border: 4px solid #856d05 !important;
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
}

/* 2. Toms (Centro) */
.toms .name {
    background: radial-gradient(circle, #2980b9, #1a5276);
    width: 110px;
    height: 110px;
}

/* 3. El Corazón (Base) */
.heart { gap: 30px; }

/* El Bombo (Céntrico y Grande) */
.kick {
    width: 200px !important;
    height: 200px !important;
    background: radial-gradient(circle, #444, #111) !important;
    border: 10px solid #222 !important;
    z-index: 2;
}

/* La Caja (A la izquierda, blanca/metal) */
.heart .name[id="74"] {
    background: radial-gradient(circle, #ffffff, #bdc3c7) !important;
    color: #333;
    width: 130px;
    height: 130px;
}

/* --- ANIMACIONES --- */

.animate {
    transform: scale(0.92) translateY(8px) !important;
    box-shadow: 0 0 40px rgba(255,255,255,0.6) !important;
    filter: brightness(1.3);
}

/* Vibración de la Caja (Snare) */
@keyframes snare-shake {
    0% { transform: translate(1px, 1px); }
    50% { transform: translate(-2px, -1px); }
    100% { transform: translate(0); }
}

.snare-vibration {
    animation: snare-shake 0.1s infinite;
    border-color: #f1c40f !important;
}
/* Pantalla de Inicio */
#start-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease;
}

.welcome-content {
    text-align: center;
}

.welcome-content h1 {
    font-size: 80px;
    font-family: 'Urbanist', sans-serif;
    color: #fff;
    margin-bottom: 0;
}

.welcome-content h1 span {
    color: #deff9a; /* Color Neón profesional */
    margin-left: 10px;
}

.welcome-content p {
    color: #daffde;
    letter-spacing: 4px;
    margin-bottom: 40px;
    opacity: 0.8;
}

#btn-start {
    padding: 20px 50px;
    font-size: 18px;
    font-weight: 800;
    background: #deff9a;
    color: #000;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(222, 255, 154, 0.4);
}

#btn-start:hover {
    transform: scale(1.1);
    box-shadow: 0 0 40px rgba(222, 255, 154, 0.6);
}

/* Ocultar el juego al inicio */
.hidden {
    display: none !important;
}

/* Clase para animar la salida de la pantalla de inicio */
.fade-out {
    opacity: 0;
    pointer-events: none;
}
/* --- RESPONSIVE DESIGN (Móviles y Tablets) --- */
@media (max-width: 768px) {
    /* Ajustes de la pantalla de inicio */
    .welcome-content h1 {
        font-size: 50px;
    }
    .welcome-content p {
        font-size: 14px;
    }
    
    /* Reducir márgenes y espacios de la batería */
    .drum-station {
        gap: 5px;
    }
    .row {
        gap: 10px;
    }
    .heart {
        gap: 10px;
        flex-wrap: wrap; /* Permite que los elementos pasen a la siguiente línea si no caben */
    }

    /* Reducir el tamaño base de los tambores */
    .name {
        width: 70px;
        height: 70px;
        border-width: 4px;
    }
    .name h2 { font-size: 18px; }
    .name h3 { font-size: 8px; }

    /* Reducir tamaños específicos */
    .plates .plate {
        width: 80px;
        height: 80px;
    }
    .toms .name {
        width: 75px;
        height: 75px;
    }
    .kick {
        width: 110px !important;
        height: 110px !important;
        border-width: 6px !important;
    }
    .heart .name[id="74"] { /* Caja / Snare */
        width: 85px;
        height: 85px;
    }
}

/* Ajuste extra para pantallas de móviles muy pequeños */
@media (max-width: 400px) {
    .row { gap: 5px; }
    .name { width: 60px; height: 60px; }
    .plates .plate { width: 70px; height: 70px; }
    .kick { width: 90px !important; height: 90px !important; }
}
/* --- CONTROLES DE GRABACIÓN --- */
.record-controls {
    display: flex;
    gap: 15px;
    margin-top: 40px;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.control-btn {
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 800;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #333;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.control-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

#btn-record { background: #e74c3c; }
#btn-play { background: #2ecc71; color: #000; }
#btn-clear { background: #f39c12; color: #000; }

.control-btn:not(:disabled):hover {
    transform: translateY(-3px);
}

/* Animación cuando está grabando */
.is-recording {
    background: #c0392b !important;
    animation: pulse-red 1s infinite;
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(231, 76, 60, 0); }
    100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

/* Ajuste responsive para los botones de grabación */
@media (max-width: 768px) {
    .record-controls { margin-top: 20px; gap: 10px; }
    .control-btn { padding: 10px 15px; font-size: 12px; }
}
.select-wrapper {
    position: relative;
    background: #333;
    border-radius: 30px;
    padding: 0 15px;
    border: 2px solid #444;
}

#recordings-list {
    background: transparent;
    color: white;
    border: none;
    padding: 12px 10px;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    min-width: 150px;
}

#recordings-list option {
    background: #222;
    color: white;
}