/* BPM Detector Styles */

/* BPM Display */
.bpm-display-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding: 30px;
    background: linear-gradient(135deg, rgba(5, 44, 101, 0.05) 0%, rgba(5, 44, 101, 0.1) 100%);
    border-radius: 12px;
    border: 2px solid rgba(5, 44, 101, 0.2);
}

[data-bs-theme="dark"] .bpm-display-container {
    background: linear-gradient(135deg, rgba(5, 44, 101, 0.15) 0%, rgba(5, 44, 101, 0.25) 100%);
    border-color: rgba(5, 44, 101, 0.4);
}

.bpm-main {
    text-align: center;
}

.bpm-value {
    font-size: 4.5rem;
    font-weight: 700;
    color: var(--bs-primary-text-emphasis);
    line-height: 1;
    font-family: 'Arial', sans-serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.bpm-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: #6c757d;
    margin-top: 8px;
    letter-spacing: 2px;
}

/* Beat Indicator */
.bpm-beat-indicator {
    position: relative;
    width: 80px;
    height: 80px;
}

.beat-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #e9ecef;
    border: 3px solid var(--bs-primary-text-emphasis);
    transition: all 0.1s ease;
}

[data-bs-theme="dark"] .beat-circle {
    background-color: #495057;
}

.beat-circle.pulse {
    background-color: var(--bs-primary-text-emphasis);
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(5, 44, 101, 0.5);
}

/* Alternative BPMs */
.alternative-bpms {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.alternative-bpm-badge {
    padding: 8px 16px;
    background-color: rgba(5, 44, 101, 0.1);
    border: 1px solid rgba(5, 44, 101, 0.3);
    border-radius: 20px;
    font-weight: 600;
    color: var(--bs-primary-text-emphasis);
    cursor: pointer;
    transition: all 0.3s ease;
}

.alternative-bpm-badge:hover {
    background-color: rgba(5, 44, 101, 0.2);
    transform: translateY(-2px);
}

[data-bs-theme="dark"] .alternative-bpm-badge {
    background-color: rgba(5, 44, 101, 0.2);
    border-color: rgba(5, 44, 101, 0.5);
}

[data-bs-theme="dark"] .alternative-bpm-badge:hover {
    background-color: rgba(5, 44, 101, 0.3);
}

/* Beat Grid */
.beat-grid {
    display: flex;
    gap: 8px;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    overflow-x: auto;
    min-height: 60px;
}

[data-bs-theme="dark"] .beat-grid {
    background-color: rgba(255, 255, 255, 0.02);
}

.beat-marker {
    width: 12px;
    min-width: 12px;
    height: 40px;
    background-color: var(--bs-primary-text-emphasis);
    border-radius: 6px;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.beat-marker.strong {
    height: 50px;
    opacity: 1;
    background-color: #dc3545;
}

.beat-marker.active {
    opacity: 1;
    transform: scaleY(1.2);
    box-shadow: 0 0 10px rgba(5, 44, 101, 0.5);
}

/* Tap Button */
.tap-button {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--bs-primary-text-emphasis) 0%, #0a58ca 100%);
    border: none;
    box-shadow: 0 8px 20px rgba(5, 44, 101, 0.3);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tap-button:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(5, 44, 101, 0.4);
}

.tap-button:active,
.tap-button.tapping {
    transform: scale(0.95);
    box-shadow: 0 4px 10px rgba(5, 44, 101, 0.3);
}

/* Audio Preview */
.audio-preview-wrapper {
    background-color: rgba(0, 0, 0, 0.02);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] .audio-preview-wrapper {
    background-color: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.1);
}

.audio-preview {
    width: 100%;
    outline: none;
}

/* Progress Bar */
#progressContainer {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Results Animation */
#resultsContainer {
    animation: slideUp 0.5s ease;
}

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

/* Responsive */
@media (max-width: 768px) {
    .bpm-display-container {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    .bpm-value {
        font-size: 3.5rem;
    }

    .tap-button {
        width: 160px;
        height: 160px;
        font-size: 1rem;
    }

    .beat-marker {
        width: 8px;
        min-width: 8px;
        height: 30px;
    }

    .beat-marker.strong {
        height: 40px;
    }

}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.8;
    }
}

.beat-circle.pulse {
    animation: pulse 0.15s ease;
}
