/* Estilos específicos para visualizações e análise */

/* Espectrograma */
.frequency-graph {
    width: 100%;
    height: 100%;
    position: relative;
}

.frequency-bands {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: flex-end;
}

.frequency-band {
    flex: 1;
    margin: 0 2px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    position: relative;
}

.band-bar {
    width: 100%;
    background: linear-gradient(to top, #4a8dc6, #7eb6f7);
    transition: height 0.1s ease;
}

.band-bar.reference {
    background: rgba(255, 255, 255, 0.3);
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 0;
}

.band-label {
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    z-index: 5;
}

/* Forma de onda */
.waveform-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.waveform-canvas {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
}

/* Imagem estéreo */
.stereo-image {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.stereo-field {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle, rgba(74, 141, 198, 0.1) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.stereo-dot {
    width: 8px;
    height: 8px;
    background-color: #4a8dc6;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.stereo-field::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.2);
}

.stereo-field::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.2);
}

.stereo-label {
    position: absolute;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.stereo-label.center {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.stereo-label.left {
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
}

.stereo-label.right {
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
}

.stereo-width-indicator {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    color: white;
}


/* Animação de análise */
@keyframes analyze-pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.analyzing {
    animation: analyze-pulse 1.5s infinite;
}

/* Legendas */
.visualization-legend {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 3px 0;
}

.legend-color {
    width: 12px;
    height: 12px;
    margin-right: 8px;
    border-radius: 2px;
}

.legend-color.user {
    background-color: var(--primary-light);
}

.legend-color.reference {
    background-color: rgba(255, 255, 255, 0.5);
}

/* Botões de controle */
.visualization-controls {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
}

.control-btn {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    margin-right: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s ease;
}

.control-btn:hover {
    background-color: var(--primary-dark);
}

.control-btn.active {
    background-color: var(--primary-color);
}

/* Informações de frequência */
.frequency-info {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

/* Gráfico de dinâmica */
.dynamics-graph {
    width: 100%;
    height: 100%;
    position: relative;
}

.dynamics-meter {
    position: absolute;
    width: 30px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    bottom: 30px;
    top: 30px;
}

.dynamics-meter.rms {
    left: 25%;
    transform: translateX(-50%);
}

.dynamics-meter.peak {
    left: 50%;
    transform: translateX(-50%);
}

.dynamics-meter.crest {
    left: 75%;
    transform: translateX(-50%);
}

.meter-fill {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: linear-gradient(to top, #2a6496, #4a8dc6);
    border-radius: 3px;
    transition: height 0.3s ease;
}

.meter-reference {
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.5);
    z-index: 2;
}

.meter-label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 12px;
    color: var(--text-color);
}

.meter-value {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 12px;
    color: var(--primary-light);
}

/* Animações de transição */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-in {
    animation: slideIn 0.5s ease forwards;
}

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

/* Tooltips */
.tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.tooltip.visible {
    opacity: 1;
}

/* Estilos para o contêiner de visualização temporal */
#temporal-visualization {
    width: 100%;
    height: 300px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

/* Timeline para visualização temporal */
.timeline-container {
    height: 60px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 10px;
    position: relative;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.timeline-canvas {
    width: 100%;
    height: 60px;
}

.seekbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    border-radius: 4px 4px 0 0;
}

.seek-progress {
    height: 100%;
    width: 0%;
    background: var(--primary-color);
    border-radius: 4px 0 0 0;
}

.timestamp {
    position: absolute;
    top: 25px;
    left: 10px;
    color: var(--text-color);
    font-size: 12px;
}

/* Estilos para as seções detectadas */
.section-marker {
    position: absolute;
    height: 20px;
    bottom: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    font-size: 10px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 4px;
}

/* Cores para diferentes tipos de seções */
.section-intro, .section-outro {
    background-color: rgba(74, 141, 198, 0.3);
}

.section-verse {
    background-color: rgba(106, 153, 78, 0.3);
}

.section-chorus {
    background-color: rgba(239, 71, 111, 0.3);
}

.section-bridge {
    background-color: rgba(255, 209, 102, 0.3);
}

/* Botão de toggle para visualização temporal */
.temporal-toggle {
    margin-left: 10px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.temporal-toggle:hover {
    background-color: var(--secondary-dark);
}

/* Marker de tempo atual */
.time-marker {
    position: absolute;
    width: 2px;
    background-color: var(--secondary-color);
    top: 0;
    bottom: 0;
    pointer-events: none;
}

/* Controles de reprodução */
.playback-controls {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.control-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.control-btn:hover {
    background-color: var(--primary-dark);
}

/* Seletor de seção */
.section-selector {
    margin-top: 10px;
    padding: 5px;
    border-radius: 4px;
    background-color: var(--dark-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

/* Legenda do visualizador */
.visualization-legend {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 3px 0;
}

.legend-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 5px;
    border-radius: 2px;
}

/* Container dos controles */
.controls-container {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding: 5px 0;
}

.ai-enhanced {
    position: relative;
    background-color: #8a2be2 !important; /* Roxo para indicar IA */
}

.ai-enhanced::after {
    content: "IA";
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4081;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
}

.feedback-item[data-source="openai"] {
    border-left-color: #8a2be2;
}

.feedback-item[data-source="openai"]::after {
    content: "IA";
    background: #8a2be2;
    color: white;
    border-radius: 10px;
    padding: 1px 5px;
    font-size: 9px;
    margin-left: 8px;
    display: inline-block;
    vertical-align: top;
}