/* Custom CSS para KaraokeApp */

/* Scroll personalizado */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Animações personalizadas */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Classes de animação */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

/* Estilo para inputs de range */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-track {
    background: rgba(255, 255, 255, 0.2);
    height: 6px;
    border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background: #ec4899;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(236, 72, 153, 0.3);
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.5);
}

/* Estilo para o player de vídeo */
#main-video {
    border-radius: 8px;
}

/* Overlay de karaokê */
#karaoke-overlay {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Letras destacadas */
.current-lyric {
    color: #fbbf24 !important;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
    transition: all 0.3s ease;
}

.lyric-line {
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.lyric-line:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: #ec4899;
}

.lyric-line.active {
    background: rgba(236, 72, 153, 0.2);
    border-left-color: #ec4899;
    color: #fbbf24;
}

/* Estados de transcrição */
.transcription-recording {
    background: linear-gradient(45deg, #ef4444, #dc2626);
    animation: pulse 1s infinite;
}

.transcription-processing {
    background: linear-gradient(45deg, #f59e0b, #d97706);
}

.transcription-complete {
    background: linear-gradient(45deg, #10b981, #059669);
}

/* Cards de músicas salvas */
.song-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.song-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(236, 72, 153, 0.5);
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.2);
}

/* Botões com efeitos especiais */
.btn-glow {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-glow:hover {
    box-shadow: 0 4px 20px rgba(236, 72, 153, 0.4);
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s;
}

.btn-glow:hover::before {
    left: 100%;
}

/* Responsividade melhorada */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    #karaoke-overlay {
        bottom: 60px;
        left: 8px;
        right: 8px;
        padding: 12px;
    }
    
    #current-lyric {
        font-size: 1rem;
    }
    
    .song-card {
        padding: 12px;
    }
}

/* Estados do player */
.player-loading {
    opacity: 0.7;
    pointer-events: none;
}

.player-error {
    border: 2px solid #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Indicadores visuais */
.recording-indicator {
    position: relative;
}

.recording-indicator::after {
    content: '';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 12px;
    height: 12px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse 1s infinite;
}

/* Tooltips simples */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

/* Loading spinner customizado */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ec4899;
    animation: spin 1s ease-in-out infinite;
}

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

/* Instruções do YouTube */
.youtube-instructions {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.youtube-instructions a {
    text-decoration: none;
}

.youtube-instructions a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Progress bar para transcrição */
.transcription-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.transcription-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ec4899, #8b5cf6);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

/* Efeito de ondas sonoras */
.sound-waves {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.sound-wave {
    width: 3px;
    height: 20px;
    background: #ec4899;
    border-radius: 2px;
    animation: soundWave 1s ease-in-out infinite;
}

.sound-wave:nth-child(2) { animation-delay: 0.1s; }
.sound-wave:nth-child(3) { animation-delay: 0.2s; }
.sound-wave:nth-child(4) { animation-delay: 0.3s; }
.sound-wave:nth-child(5) { animation-delay: 0.4s; }

@keyframes soundWave {
    0%, 100% { height: 20px; }
    50% { height: 5px; }
}