body {
    background-color: #0f0f0f;
    color: #f5f5f5;
}

.podcast-category ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row !important;
    justify-content: center;
    gap: 30px;
    padding: 20px 0;
    margin: 0 auto;
    width: 90%;
}

@media (min-width: 901px) {
    .podcast-category ul {
        display: flex;
        flex-wrap: nowrap; /* Prevent wrapping */
        overflow-x: auto; /* Enable horizontal scrolling */
        overflow-y: hidden;
        scroll-snap-type: x mandatory; /* Smooth snap scrolling */
        -webkit-overflow-scrolling: touch; /* Smooth scroll on Mac/iOS */
        justify-content: flex-start;
        gap: 30px;
        padding: 20px 5%;
        width: auto;
    }

    .podcast-category ul::-webkit-scrollbar {
        height: 10px;
    }

    .podcast-category ul::-webkit-scrollbar-thumb {
        background: rgba(247, 94, 37, 0.6);
        border-radius: 10px;
    }

    .podcast-category ul::-webkit-scrollbar-thumb:hover {
        background: rgba(247, 94, 37, 0.9);
    }

    .podcast-category ul::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
    }

    .podcast-category li {
        scroll-snap-align: start;
        flex: 0 0 auto; /* Keep cards from stretching */
    }
}

@media (max-width: 700px) {
    .podcast-category ul {
        flex-direction: column;
        align-items: center;
    }
}

.category-head {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px auto;
    flex-wrap: wrap;
}

.sort-options select,
.search-bar input {
    padding: 10px 14px;
    font-size: 16px;
    border-radius: 10px;
    border: 1px solid #333;
    background: rgba(30, 30, 30, 0.9);
    color: #f5f5f5;
    transition: all 0.3s ease;
}

.sort-options select:focus,
.search-bar input:focus {
    border-color: #f75e25;
    box-shadow: 0 0 8px rgba(247, 94, 37, 0.5);
    outline: none;
}

.audio-card {
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    padding: 20px;
    width: 340px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.audio-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(247, 94, 37, 0.3);
}

.audio-card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}

.audio-card-date {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 10px;
}

.audio-card-player audio {
    width: 100%;
    border-radius: 8px;
    background-color: #111;
    color: #fff;
}

.like-btn, .bookmark-btn {
    background: none;
    border: none;
    color: #f75e25;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.like-btn:hover, .bookmark-btn:hover {
    transform: scale(1.2);
    color: #ff7b47;
}

.audio-card-tags {
    margin-top: 10px;
    color: #bbb;
    font-size: 14px;
}

/* === Plyr Dark Theme === */

/* Control bar background */
.plyr__controls {
    background: rgba(15, 15, 15, 0.8) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 8px 8px;
    color: #f5f5f5 !important;
    transition: all 0.3s ease-in-out;
}

/* Progress bar */
.plyr__progress {
    --plyr-range-fill-background: #f75e25 !important;
    --plyr-range-thumb-background: #f75e25 !important;
    --plyr-range-track-background: rgba(255, 255, 255, 0.2) !important;
}

/* Volume slider */
.plyr__volume {
    --plyr-range-fill-background: #f75e25 !important;
    --plyr-range-thumb-background: #f75e25 !important;
    --plyr-range-track-background: rgba(255, 255, 255, 0.2) !important;
}

/* Buttons (Play, Mute, etc.) */
.plyr__controls button {
    color: #f5f5f5 !important;
    opacity: 0.9;
    transition: color 0.3s ease, transform 0.2s ease;
}

.plyr__controls button:hover,
.plyr__controls button:focus {
    color: #f75e25 !important;
    transform: scale(1.1);
}

/* Time display */
.plyr__time {
    color: #ccc !important;
    font-weight: 500;
}

/* Progress tooltip */
.plyr__tooltip {
    background: rgba(25, 25, 25, 0.9) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    padding: 4px 8px;
}

/* Buffer bar */
.plyr__progress__buffer {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* Icons (Play, Pause, Volume, etc.) */
.plyr__controls svg {
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.6));
}

/* When player is focused (tab navigation) */
.plyr--focus .plyr__controls {
    box-shadow: 0 0 10px rgba(247, 94, 37, 0.3);
}

/* Loading spinner */
.plyr__spinner {
    border-top-color: #f75e25 !important;
}

/* Fullscreen overlay */
.plyr--fullscreen .plyr__controls {
    background: rgba(0, 0, 0, 0.9) !important;
}

/* === Responsive: Podcast Cards === */
@media (max-width: 900px) {
    .podcast-category ul {
        width: 95%;
        gap: 20px;
    }

    .audio-card {
        width: 100%;
        max-width: 400px;
        padding: 16px;
    }

    .audio-card-title {
        font-size: 1.2rem;
    }

    .audio-card-date {
        font-size: 0.85rem;
    }

    .audio-card-description {
        font-size: 0.9rem;
    }

    .audio-card-player audio {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .audio-card {
        width: 90%;
        padding: 14px;
    }

    .podcast-category ul {
        flex-direction: column;
        align-items: center;
    }

    .audio-card-title {
        font-size: 1.1rem;
        text-align: center;
    }

    .audio-card-date,
    .audio-card-tags {
        text-align: center;
    }

    .like-btn,
    .bookmark-btn {
        font-size: 16px;
    }
}


/* === Locked Category (login required) === */
.locked-category {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    margin: 40px auto;
    width: 100%;
    max-width: 400px;
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid rgba(247, 94, 37, 0.3);
    border-radius: 14px;
    box-shadow: 0 0 20px rgba(247, 94, 37, 0.1);
    transition: all 0.3s ease;
}

.locked-category:hover {
    background: rgba(40, 40, 40, 0.9);
    box-shadow: 0 0 25px rgba(247, 94, 37, 0.3);
}

.locked-category a {
    text-decoration: none;
    color: #f75e25;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.locked-category a:hover {
    color: #ff7b47;
    transform: scale(1.1);
}

.locked-category i {
    transition: transform 0.3s ease;
}

.locked-category a:hover i {
    transform: rotate(8deg);
}

/* Responsive: smaller lock box on mobile */
@media (max-width: 600px) {
    .locked-category {
        height: 150px;
        max-width: 300px;
        margin: 30px auto;
    }

    .locked-category a {
        font-size: 2rem;
    }
}
/* === Empty / loading state === */
.podcast-category .podcast-empty {
    flex: 1 1 100%;
    margin: 10px auto;
    padding: 30px 20px;
    max-width: 480px;
    text-align: center;
    color: #999;
    font-style: italic;
    background: rgba(30, 30, 30, 0.6);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}
