* { box-sizing: border-box; margin: 0; padding: 0; }

body, html { height: 100%; font-family: 'Montserrat', sans-serif; }

/* Fondo de flores violetas */
.app-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(rgba(177, 156, 217, 0.4), rgba(138, 43, 226, 0.6)), 
                url('https://images.unsplash.com/photo-1593922379361-9f201cd9911e?auto=format&fit=crop&w=800&q=80') center/cover;
}

/* Panel difuminado */
.glass-panel {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 40px;
    border-radius: 30px;
    text-align: center;
    width: 90%;
    max-width: 350px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.title {
    font-family: 'Great Vibes', cursive;
    color: #fff;
    font-size: 3.5rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    margin-bottom: 30px;
}

/* ===== TOCADISCOS ===== */
.turntable-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 40px auto;
}

/* Disco de Vinilo con efecto de surcos */
.vinyl-record {
    width: 100%;
    height: 100%;
    background: #111; 
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5), 
                inset 0 0 0 4px #222, 
                inset 0 0 0 12px #111, 
                inset 0 0 0 16px #222, 
                inset 0 0 0 28px #111,
                inset 0 0 0 32px #222;
    /* Gira constantemente pero inicia en pausa */
    animation: spin 3s linear infinite;
    animation-play-state: paused; 
}

/* Cuando se le añade la clase 'playing', el disco gira */
.vinyl-record.playing {
    animation-play-state: running;
}

/* Etiqueta del centro del disco */
.record-label {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #d3b8ff, #9b59b6);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 3px solid #111;
    color: white;
    font-size: 1.2rem;
    position: relative;
}

/* Agujero central */
.record-label::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
}

/* La Aguja (Tonearm) */
.tonearm {
    position: absolute;
    top: -15px;
    right: -10px;
    width: 90px;
    height: 100px;
    background: transparent;
    border-right: 8px solid #e0e0e0;
    border-bottom: 8px solid #e0e0e0;
    border-radius: 0 0 25px 0;
    transform-origin: top right;
    transform: rotate(-35deg); /* Posición de descanso fuera del disco */
    transition: transform 0.5s ease-in-out;
    z-index: 10;
}

/* Cabezal de la aguja */
.tonearm::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: -20px;
    width: 18px;
    height: 30px;
    background: #555;
    border-radius: 4px;
    transform: rotate(45deg);
}

/* Base redonda de la aguja (donde gira) */
.tonearm::before {
    content: '';
    position: absolute;
    top: -8px;
    right: -12px;
    width: 32px;
    height: 32px;
    background: #ccc;
    border-radius: 50%;
    box-shadow: 0 4px 6px rgba(0,0,0,0.4);
}

/* Posición de la aguja cuando está sonando */
.tonearm.playing {
    transform: rotate(10deg);
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* ===== BOTÓN CENTRAL ===== */
.controls { display: flex; justify-content: center; align-items: center; }

.btn {
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    transition: transform 0.2s, background 0.2s;
    display: flex; justify-content: center; align-items: center;
}

.btn:active { transform: scale(0.95); }

.btn-main {
    width: 90px; height: 90px; font-size: 2.2rem;
    background: linear-gradient(135deg, #d3b8ff, #9b59b6);
}