/* Range slider styling */

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: #2a3a8a;
    border-radius: 4px;
    outline: none;
    transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background: #3498db;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: #3498db;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

input[type="range"]:hover::-webkit-slider-thumb {
    transform: scale(1.1);
    background: #2980b9;
}

input[type="range"]:hover::-moz-range-thumb {
    transform: scale(1.1);
    background: #2980b9;
}


/* Morse code character styling */

.morse-dot {
    color: #2ecc71;
    font-weight: bold;
    font-size: 1.3em;
    animation: pulseDot 0.6s ease;
    text-shadow: 0 0 5px rgba(46, 204, 113, 0.5);
}

.morse-dash {
    color: #f39c12;
    font-weight: bold;
    font-size: 1.3em;
    animation: pulseDash 0.8s ease;
    text-shadow: 0 0 5px rgba(243, 156, 18, 0.5);
}

@keyframes pulseDot {
    0% {
        opacity: 0.5;
        transform: scale(0.8);
    }
    70% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulseDash {
    0% {
        opacity: 0.5;
        transform: scale(0.9);
    }
    70% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}


/* Progress bar animation */

#analysisProgressBar {
    transition: width 0.5s ease;
    background: linear-gradient(90deg, #3498db, #2ecc71);
}


/* Button animations */

button {
    transition: all 0.3s ease !important;
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}


/* Mobile responsive styles */

@media (max-width: 768px) {
    .audio-morse-converter>div {
        padding: 15px !important;
    }
    #audioUploadArea {
        padding: 20px 15px !important;
    }
    .audio-morse-converter>div:nth-child(3)>div:first-child {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    button {
        font-size: 13px !important;
        padding: 10px 8px !important;
    }
    .fa-music {
        font-size: 36px !important;
    }
    #waveformContainer {
        height: 120px !important;
    }
    #morseTextDisplay {
        font-size: 16px !important;
        padding: 12px !important;
    }
    .morse-dot,
    .morse-dash {
        font-size: 1.2em !important;
    }
}

@media (max-width: 480px) {
    .audio-morse-converter {
        padding: 10px !important;
    }
    .audio-morse-converter>div:nth-child(3)>div:first-child {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
    #audioUploadArea h4 {
        font-size: 14px !important;
    }
    #audioUploadArea p {
        font-size: 12px !important;
    }
    button {
        font-size: 12px !important;
        padding: 10px 6px !important;
        flex-direction: column;
        gap: 4px !important;
    }
    button i {
        font-size: 14px !important;
    }
    h3 {
        font-size: 16px !important;
    }
    h4 {
        font-size: 14px !important;
    }
    .stat-number {
        font-size: 20px !important;
    }
    #waveformContainer {
        height: 100px !important;
    }
    #morseTextDisplay {
        font-size: 14px !important;
        padding: 10px !important;
    }
    #decodedTextContent {
        font-size: 14px !important;
    }
}


/* Smooth animations */

.fa-spinner {
    margin-right: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


/* Enhanced waveform container */

#waveformContainer {
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5);
    border: 2px solid #2a3a8a;
    border-radius: 6px;
    overflow: hidden;
}


/* Status message animations */

#audioStatusText {
    transition: all 0.3s ease;
    display: inline-block;
}


/* Loading animation */

.loading-dots:after {
    content: '';
    animation: dots 1.5s infinite;
    display: inline-block;
    width: 20px;
    text-align: left;
}

@keyframes dots {
    0%,
    20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60% {
        content: '...';
    }
    80%,
    100% {
        content: '';
    }
}


/* Fade in animation for results */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#audioResultsSection {
    animation: fadeIn 0.5s ease;
}


/* Highlight for important elements */

.highlight-box {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(46, 204, 113, 0.1));
    border-left: 4px solid #3498db;
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 4px;
}


/* Tooltip style for suggestions */

#decodedSuggestions {
    background: rgba(13, 23, 73, 0.8);
    border-radius: 4px;
    padding: 10px;
    margin-top: 10px;
    border-left: 3px solid #f39c12;
    animation: fadeIn 0.5s ease;
}

#decodedSuggestions i {
    color: #f39c12;
    margin-right: 8px;
}


/* Custom scrollbar */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0d1749;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}