/**
 * Free Underground Tekno - Digital Wall Player
 * Stile Underground/Psych-Glitch
 */

/* === RESET E STILE GENERALE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000;
    font-family: 'Courier New', monospace;
    color: #fff;
}

/* === CANVAS VISUALIZER === */
#audio-visualizer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    /* TEMPORANEAMENTE z-index positivo per debug */
    z-index: 1;
    background-color: #000;
    display: block;
}

/* === PLAYER CONTAINER === */
#player-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

#play-pause-btn {
    pointer-events: auto;
}

/* === PULSANTE PLAY/PAUSE === */
#play-pause-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.8);
    border: 2px solid #00FF00;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #00FF00;
    font-size: 32px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#play-pause-btn:hover {
    border-color: #FF00FF;
    color: #FF00FF;
    transform: scale(1.05);
}

/* Effetto pulsante quando sta suonando */
#play-pause-btn.playing {
    animation: pulse-glow 1.5s ease-in-out infinite;
    border-color: #00FF00;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 10px #00FF00, 0 0 20px #00FF00, 0 0 30px #00FF00;
    }
    50% {
        box-shadow: 0 0 20px #00FF00, 0 0 40px #00FF00, 0 0 60px #00FF00;
    }
}

#play-pause-btn i {
    transition: opacity 0.2s ease;
}

/* === INFO OVERLAY === */
#info-overlay {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 90;
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid #00FF00;
    padding: 15px 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    max-width: 400px;
}

#info-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

#info-overlay h3 {
    font-size: 14px;
    color: #00FF00;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#info-overlay p {
    font-size: 12px;
    color: #fff;
    line-height: 1.5;
    margin: 5px 0;
}

/* === VISUALIZER STYLE INDICATOR === */
#style-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 90;
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid #FF00FF;
    padding: 10px 15px;
    font-size: 11px;
    color: #FF00FF;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#style-indicator.show {
    opacity: 1;
}

/* === VOLUME INDICATOR === */
#volume-indicator {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 90;
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid #00FF00;
    padding: 10px 15px;
    font-size: 11px;
    color: #00FF00;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#volume-indicator.show {
    opacity: 1;
}

/* === INSTRUCTIONS OVERLAY === */
#instructions {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 80;
    background-color: rgba(0, 0, 0, 0.9);
    border: 2px solid #00FF00;
    padding: 30px;
    max-width: 500px;
    text-align: center;
    opacity: 1;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

#instructions.hidden {
    opacity: 0;
}

#instructions h2 {
    font-size: 18px;
    color: #00FF00;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

#instructions ul {
    list-style: none;
    text-align: left;
    font-size: 13px;
    line-height: 2;
}

#instructions ul li {
    margin: 10px 0;
    color: #fff;
}

#instructions ul li strong {
    color: #FF00FF;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    #play-pause-btn {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    #info-overlay {
        bottom: 10px;
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    #instructions {
        padding: 20px;
        max-width: 90%;
    }
}

/* === LOADING SPINNER === */
#loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 200;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 255, 0, 0.3);
    border-top: 3px solid #00FF00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
    pointer-events: none;
}

#loading-spinner.visible {
    opacity: 1;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
