.waveform-container {
    display: block;
    width: 100%;
    padding: 40px 30px 50px 30px;
    margin: 20px 0 20px 0;
    border: 1px solid #d7dadc;
    border-radius: 16px;
    position: relative;
    background-image: repeating-radial-gradient(circle at 85% 50%, #fcfcfb 0px, #fcfcfb 14.5px, rgba(240, 240, 240, 0.6) 14.5px, rgba(240, 240, 240, 0.6) 16px);

}

.audio-image-container {
    position: absolute;
    top: 50%; /* Adjust this value slightly if needed for perfect centering */
    left: 85%;
    transform: translate(-50%, -50%);
}

.audio-image-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.play-button {
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    cursor: pointer;
    outline: none;
    font-size: 24px;
    color: #fff;
    margin: 0; 
    padding: 0;
}

.audio-header {
    text-align: center;
}

.audio-title {
    font-size: 22px;
    font-weight: bold;
}

.audio-details-container-top {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 12px;
    color: #666;
}

.audio-content {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Move waveform to the left instead of center */
}

.waveform-wrapper {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    max-width: 75%; 
    margin-right: auto; 
}

#waveform {
    height: 50px;
    margin-bottom: 30px;
}

.waveform-container {
    position: relative; 
}

.skip-buttons-container {
    width:75%;
     display: flex;
    justify-content: space-between; 
    float:left;
    margin-bottom: 20px;

}

.audio-time-display {
    font-size: 11px;
}

.skip-button {
    width: 16px !important;
    height: 18px !important;
    cursor: pointer;
}

.forward-btn {
    background: url('../icons/forward.png') no-repeat center center;
}

.backward-btn {
    background: url('../icons/backward.png') no-repeat center center;
}

/* Loading Text */
.loading-text {
    display: flex; /* Ensure it's visible initially */
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #555;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 10; /* Ensure it appears above the waveform */
}

/* Spinner Animation */
.loading-text::before {
    content: '';
    border: 4px solid #f3f3f3;
    border-top: 4px solid #555;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin-left: 10px; /* Space between text and spinner */
}

/* Keyframes for Spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Optional: Hide the loading text when not needed */
.loading-text.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}


/* ===== Mobile Styles ===== */
@media (max-width: 600px) {
    .waveform-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 20px;
        /* Override the background to ensure the circles are centered */
        background-image: repeating-radial-gradient(circle at 50% 21%, #fcfcfb 0px, #fcfcfb 14.5px, rgba(240, 240, 240, 0.6) 14.5px, rgba(240, 240, 240, 0.6) 16px);
    }

    .audio-image-container {
        position: static;
        transform: none;
        margin-bottom: 20px;
        text-align: center;
    }

    .audio-image-circle {
        margin: 0 auto;
    }

    .waveform-wrapper {
        max-width: 100%; 
    }

    /* Keep the date and duration on the same line */
    .audio-details-container-top {
        flex-direction: row;
        gap: 20px;
        margin-top: 20px;
        margin-bottom: 20px;
    }

    .audio-content {
        width: 100%;
        margin-top: 20px;
        justify-content: center; 
    }

    .skip-buttons-container {
        width: 100%;
        justify-content: space-between;
        margin: 20px 0 0 0;
        float: none;
    }
}