/* Overlay styles moved to media-overlay.css for better organization */
@import url('media-overlay.css');

/* ==========================================================================
    CSS VARIABLES & GLOBAL STYLES
    ========================================================================== */
:root {
    /* Color Palette */
    --accent-color: #f5c518;
    --text-light: #f0f0f0;

    /* Shadows */
    --shadow-light: var(--color-primary-bg, rgba(var(--accent-primary-rgb), 0.08));
    --shadow-medium: rgba(var(--accent-primary-rgb), 0.15);

    /* Overlay Colors */
    --overlay-light: rgba(0, 0, 0, 0.75);
    --overlay-dark: rgba(0, 0, 0, 0.9);
    --overlay-medium: rgba(0, 0, 0, 0.8);

    /* Platform Brand Colors */
    --color-rotten-tomatoes: #f93a1e;

    /* Hover States */
    /* Removed secondary-dark */
    --color-primary-dark: #1e4540;
    --color-primary-light: #4a7c7a;

    /* Transitions - use local variable to avoid clashing with global --transition-fast token */
    --media-transition-fast: 0.15s ease;
    --transition-medium: 0.2s ease;
    --transition-slow: 0.3s ease;

    /* Card - using shared variables from body.css */
    --card-max-width: 200px;
    --card-height: 300px;
    --card-radius: var(--radius-lg);

    /* Spacing */
    --space-lg: 1.5rem;
    --space-xl: 2rem;

    /* Z-index layers */
    --z-overlay: 10;
}

/* Featured Latest Episode Section */
.featured-latest-section {
    grid-column: 1 / -1;
    margin-bottom: var(--space-xl);
    padding: var(--space-xl);
    background: linear-gradient(135deg, var(--overlay-medium) 0%, var(--overlay-light) 100%);
    border-radius: var(--card-radius);
    border: 1px solid var(--color-primary-bg, rgba(44, 95, 90, 0.2));
}

@media (prefers-color-scheme: dark) {
    .featured-latest-section {
        background: linear-gradient(135deg, rgba(44, 95, 90, 0.15) 0%, rgba(44, 95, 90, 0.08) 100%);
        border-color: rgba(135, 197, 190, 0.2);
    }
}

.featured-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
    margin-bottom: var(--space-lg);
    opacity: 0.9;
}

.latest-episode-card {
    display: flex;
    gap: var(--space-xl);
    align-items: flex-start;
}

@media (max-width: 768px) {
    .latest-episode-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

.latest-episode-cover {
    flex-shrink: 0;
}

.latest-episode-cover img {
    border-radius: var(--card-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 120px;
    height: 120px;
    object-fit: cover;
}

@media (max-width: 768px) {
    .latest-episode-cover img {
        width: 100px;
        height: 100px;
    }
}

.latest-episode-info {
    flex: 1;
    min-width: 0;
}

.latest-episode-title {
    font-family: var(--font-heading, 'Crimson Pro', Georgia, serif);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.latest-episode-title a {
    color: inherit;
    text-decoration: none;
}

.latest-episode-title a:hover {
    color: var(--accent-color);
}

.latest-episode-desc {
    color: var(--text-light);
    opacity: 0.8;
    margin-bottom: var(--space-lg);
    line-height: 1.5;
    font-size: 1rem;
}

.latest-platform-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.action-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--media-transition-fast);
    border: 1px solid transparent;
}

.action-link i {
    font-size: 1rem;
}

.action-link:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        transition: all var(--media-transition-fast);
    }

/* Spotify */
.spotify-link {
    background-color: #1DB954;
    color: white;
}

.spotify-link:hover {
    background-color: #1ed760;
}

/* Apple */
.apple-link {
    background-color: #FA2D48;
    color: white;
}

.apple-link:hover {
    background-color: #ff3b55;
}

/* YouTube */
.youtube-link {
    background-color: #FF0000;
    color: white;
}

.youtube-link:hover {
    background-color: #ff3333;
}

/* Amazon */
.amazon-link {
    background-color: #00A8E1;
    color: white;
}

.amazon-link:hover {
    background-color: #00b8f0;
}

@media (max-width: 480px) {
    .action-link {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
    
    .latest-episode-title {
        font-size: 1.25rem;
    }
}

/* Media Card Elements */
.media-cover-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: visible;
    flex: 1;
    min-height: 0;
    border-radius: var(--card-radius);

    .media-cover {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        display: block;
        transition: transform var(--transition-slow);
        will-change: transform;
        transform: translateZ(0);
        backface-visibility: hidden;
        border-radius: var(--card-radius);
    }

    .media-cover.loaded {
        animation: fadeIn 0.3s ease-in;
    }

    .media-cover.image-error {
        opacity: 0.8;
        background: linear-gradient(135deg, var(--accent-primary) 0%, var(--logo-teal-dark) 100%);
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    /* Playlist covers - make them smaller to fit in card */
    .playlist-cover {
        object-fit: contain;
        background-color: var(--bg-secondary);
        border-radius: 0.25rem;
    }

    /* Podcast/album covers: contain with padding to show full logo */
    [data-media-type="podcast"] & .media-cover,
    [data-media-type="album"] & .media-cover {
        object-fit: contain;
        background-color: var(--bg-secondary);
        padding: 15%;
    }

    /* Song covers: YouTube thumbnails, treat like video */
    [data-media-type="song"] & .media-cover {
        object-fit: cover;
    }

    /* Video covers: fill the card */
    [data-media-type="video"] & .media-cover {
        object-fit: cover;
    }

    .media-placeholder {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, var(--color-primary, var(--logo-teal)), var(--color-primary-light, #4a7c7a));
        color: white;
        font-size: 2em;

        i {
            font-size: 2em;
            color: white;
        }
    }

    .doc-riter-custom-cover {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, var(--color-primary, var(--logo-teal)), #1a3c39);
        color: white;
        text-align: center;
        padding: 1.5rem;
        position: relative;
        width: 100%;
        height: 100%;
        border-radius: var(--card-radius);
    }

    .doc-riter-custom-icon {
        position: absolute;
        top: 0.7rem;
        right: 0.7rem;
        width: 32px;
        height: 32px;
        border-radius: 6px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
        flex-shrink: 0;
    }

    .doc-riter-custom-date {
        font-family: var(--font-display, inherit);
        font-size: 1.35rem;
        font-weight: 700;
        line-height: 1.25;
        color: #ffffff;
        text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    }

    /* Playlist custom cover: title as cover image */
    .playlist-custom-cover {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: linear-gradient(145deg, #1a3c39 0%, var(--color-primary, #2c5f5a) 50%, #0f2421 100%);
        color: white;
        text-align: center;
        padding: 1rem 1rem 1rem 1rem;
        position: relative;
        width: 100%;
        height: 100%;
        border-radius: var(--card-radius);
        overflow: hidden;
    }

    .playlist-custom-cover::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse at 30% 70%, rgba(255,255,255,0.04) 0%, transparent 60%);
        pointer-events: none;
    }

    .playlist-custom-title {
        font-family: var(--font-display, inherit);
        font-size: 1.4rem;
        font-weight: 800;
        line-height: 1.15;
        color: #ffffff;
        text-shadow: 0 2px 6px rgba(0,0,0,0.6);
        letter-spacing: 0;
        padding: 0 0.25rem;
        word-break: break-word;
        hyphens: auto;
        z-index: 1;
    }

    .playlist-platform-logos {
        position: absolute;
        top: 0.55rem;
        right: 0.55rem;
        display: flex;
        flex-direction: column;
        gap: 0.3rem;
        z-index: 2;
    }

    .playlist-platform-icon {
        width: 22px;
        height: 22px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.85rem;
        color: rgba(255,255,255,0.85);
        background: rgba(255,255,255,0.12);
        border-radius: 5px;
        text-decoration: none !important;
        transition: background 0.15s ease, color 0.15s ease;
        flex-shrink: 0;
    }

    .playlist-platform-icon:hover {
        background: rgba(255,255,255,0.25);
        color: #ffffff;
    }

    .playlist-platform-icon.yt-icon {
        color: #ff4444;
    }

    .playlist-platform-icon.sp-icon {
        color: #1ed760;
    }

    .media-type {
        position: absolute;
        top: 0.7em;
        left: 0.7em;
        color: white;
        font-size: 1.2em;
        z-index: var(--z-overlay);
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8),
            0 0 5px rgba(0, 0, 0, 0.5);
        transition: all var(--transition-medium);
    }

    [data-media-type="movie"] &,
    [data-media-type="podcast"] &,
    [data-media-type="book"] & {
        .media-type {
            color: white;
        }
    }
    
    .reading-now-badge,
    .media-featured {
        position: absolute;
        top: 0.5rem;
        left: 50%;
        transform: translateX(-50%);
        z-index: 5;
        background: var(--accent-primary);
        color: var(--color-white);
        padding: 0.3rem 0.8rem;
        border-radius: var(--control-radius);
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        box-shadow: 0 4px 12px rgba(0,0,0,0.4);
        border: 1px solid rgba(255,255,255,0.2);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        pointer-events: none;
        white-space: nowrap;
    }

    .media-featured {
        background: var(--accent-secondary);
        color: var(--color-white);
    }
}

/* Card - enhanced shadow and transition */
.media-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    padding: 0;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                border-color 0.3s ease;
    box-shadow: var(--shadow-card);
}

.media-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-card-hover);
}

/* ==========================================================================
    MEDIA FILTER BAR (Base styles in body.css)
    ========================================================================== */


/* ==========================================================================
    MEDIA FILTERS & SEARCH
    ========================================================================== */

/* Filter Container */
.media-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    width: min(100% - 2rem, 1000px);
    margin: 1rem auto;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.media-filters:hover {
    box-shadow: var(--shadow-card-hover);
}

.media-filters label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1 1 200px;
    max-width: 300px;
}

/* Filter Select Dropdown */
.media-filters select {
    font-size: 1rem;
    padding: 0.8rem 1rem;
    border-radius: var(--control-radius);
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%20fill%3D%22%23a0a9b8%22%3E%3Cpath%20d%3D%22M6%209L1%204h10z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
}

.media-filters select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), 0.15);
    background-color: var(--color-white);
}

.media-filters select:hover {
    border-color: var(--accent-primary);
}



/* Results Count */
.results-count {
    text-align: center;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin: 1rem auto 0;
    padding: 0.5rem;
    background: rgba(var(--accent-primary-rgb), 0.05);
    border-radius: var(--control-radius);
    max-width: 1000px;
    width: calc(100% - 2rem);
}

/* ==========================================================================
   MEDIA CARDS LAYOUT
   ========================================================================== */

/* Cards Container */
.media-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin: 2rem auto;
    max-width: 1200px;
}

/* Desktop Styles (769px and above) */
@media (min-width: 769px) {
    .media-card {
        width: 200px;
        height: auto;
        aspect-ratio: 7/10;
        /* Maintain proper aspect ratio for desktop */
    }
}

/* ==========================================================================
   INTERACTIVE ELEMENTS
   ========================================================================== */

/* Click Actions */
.click-to-watch,
.click-to-listen {
    font-size: 0.8em;
    color: var(--logo-orange);
    font-weight: 500;
    margin-top: 0.5em;
    padding: 0.3em 0.6em;
    background: rgba(212, 130, 42, 0.2);
    border-radius: var(--control-radius);
    border: 1px solid rgba(212, 130, 42, 0.4);
}

/* ==========================================================================
   MEDIA LINKS & PLATFORMS
   ========================================================================== */

/* Song and Podcast Links Container */
.song-links,
.podcast-links,
.media-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
    margin: 0.5rem 0;
    padding: 0.5rem 0;
    width: 100%;
    order: 5;
}

.podcast-links::-webkit-scrollbar {
    display: none;
}

/* Individual Platform Links */
.song-link,
.podcast-link {
    font-size: 1.5em;
    opacity: 0.9;
    transition: all var(--transition-medium);
    text-decoration: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.song-link:hover,
.podcast-link:hover {
    opacity: 1;
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    z-index: 1;
}

/* Platform-Specific Styling */
.spotify-link,
.apple-link,
.youtube-link,
.soundcloud-link,
.amazon-link,
.google-link,
.rss-link,
.x-link,
.media-link {
    color: white;
}

.youtube-link,
.spotify-link,
.apple-link,
.soundcloud-link,
.amazon-link,
.google-link,
.rss-link,
.x-link,
.media-link {
    font-size: 1em;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none !important;
    opacity: 0.9;
    transition: all var(--transition-medium);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    border: none;
    background: rgba(255, 255, 255, 0.1);
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    border-radius: 0.35rem;
}

.youtube-link i,
.spotify-link i,
.apple-link i,
.soundcloud-link i,
.amazon-link i,
.google-link i,
.rss-link i,
.x-link i,
.media-link i {
    font-size: 1em;
    width: 1em;
    height: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.youtube-link:hover,
.youtube-link:focus,
.spotify-link:hover,
.spotify-link:focus,
.apple-link:hover,
.apple-link:focus,
.soundcloud-link:hover,
.soundcloud-link:focus,
.amazon-link:hover,
.amazon-link:focus,
.google-link:hover,
.google-link:focus,
.rss-link:hover,
.rss-link:focus,
.x-link:hover,
.x-link:focus,
.media-link:hover,
.media-link:focus {
    opacity: 1;
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-decoration: none !important;
    z-index: 1;
}

/* ==========================================================================
   LOADING & ERROR STATES
   ========================================================================== */

/* Loading State */
.loading-state,
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-primary);
    min-height: 200px;
}

.loading-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--logo-teal);
}

/* Error State */
.error-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--logo-orange);
}

.error-state p {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

/* Retry Button */
.retry-button {
    background: var(--logo-teal);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.4rem;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background var(--transition-medium);
}

.retry-button:hover {
    background: var(--color-primary-dark, #1e4540);
}

/* ==========================================================================
RESPONSIVE DESIGN - TABLET & MOBILE
========================================================================== */

/* Tablet Styles (768px and below) */
@media (max-width: 768px) {
    .media-card {
        max-width: 100%;
        width: 140px;
        /* Height adjusted proportionally for aspect ratios */
        height: auto;
        aspect-ratio: 7/10;
        /* Approximate for movie posters, JS will override */
    }

    .media-cover-container {
        height: 100%;
        min-height: 0;
    }

    .media-cards {
        gap: 1rem;
        margin: 1rem auto;
        padding: 1rem;
    }

    .media-filters {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0.75rem;
        width: calc(100% - 2rem);
        justify-content: flex-start;
        padding: 0.75rem 1rem;
        /* Hide scrollbar but keep functionality */
        -ms-overflow-style: none;
    }

    .media-filters::-webkit-scrollbar {
        display: none;
    }

    .media-filters label {
        font-size: 0;
        flex: 0 0 auto;
        min-width: 0;
    }

    .media-filters label::before {
        content: attr(data-short);
        font-size: 0.8rem;
        font-weight: 600;
        color: var(--text-muted);
        white-space: nowrap;
    }

    .media-filters select {
        font-size: 0.85rem;
        padding: 0.5rem 2rem 0.5rem 0.75rem;
        min-width: 100px;
    }
}

/* Small Mobile Styles (480px and below) - inherits from 768px */
@media (max-width: 480px) {
    .media-card {
        width: 110px;
        height: auto;
        aspect-ratio: 11/16;
    }

    .media-cards {
        gap: 0.75rem;
        margin: 0.75rem auto;
        padding: 0.75rem;
    }

    .media-filters {
        padding: 0.5rem 0.75rem;
        gap: 0.4rem;
    }

    .media-filters label::before {
        font-size: 0.7rem;
    }

    .media-filters select {
        font-size: 0.75rem;
        padding: 0.4rem 1.5rem 0.4rem 0.5rem;
        min-width: 75px;
    }

    .media-title {
        font-size: 1rem;
    }

    .media-overlay-desc {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .media-description {
        font-size: 0.85rem;
        line-height: 1.4;
    }
}

/* Extra Small Mobile Styles (414px and below) - iPhone 12/13 mini, etc. */
@media (max-width: 414px) {
    .media-card {
        width: 140px;
        height: auto;
        aspect-ratio: 7/10;
    }

    .media-cards {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 1.25rem;
        margin: 1rem auto;
        padding: 1rem;
        justify-content: center;
        width: calc(100% - 1.5rem);
    }

    .media-filters {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0.6rem 0.75rem;
        gap: 0.5rem;
        width: calc(100% - 1rem);
        justify-content: flex-start;
    }

    .media-filters::-webkit-scrollbar {
        display: none;
    }

    .media-filters label {
        font-size: 0;
        flex: 0 0 auto;
    }

    .media-filters label::before {
        content: attr(data-short);
        font-size: 0.75rem;
        font-weight: 600;
        color: var(--text-muted);
        white-space: nowrap;
    }

    .media-filters select {
        font-size: 0.8rem;
        padding: 0.45rem 1.75rem 0.45rem 0.6rem;
        min-width: 85px;
    }

    .media-title {
        font-size: 0.8rem;
        line-height: 1.1;
    }

    .media-overlay-desc {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .media-description {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .media-author {
        font-size: 0.65rem;
    }

    .media-date-bottom {
        font-size: 0.6rem;
        padding: 0.15rem 0;
    }

    .rating-logos,
    .movie-actions-container {
        gap: 0.2rem;
        padding: 0.2rem 0;
    }

    .rating-logo,
    .trailer-button-inline {
        padding: 0.15rem 0.3rem;
        font-size: 0.6em;
    }

    .song-link,
    .podcast-link,
    .media-link {
        width: 25px;
        height: 25px;
        font-size: 1em;
    }
}






/* ==========================================================================
MEDIA LINKS ORDER
========================================================================== */

.song-links,
.podcast-links,
.media-links {
    order: 5;
}

/* ==========================================================================
    HYPERLINK UNDERLINE REMOVAL
    ========================================================================== */

/* Remove underlines on all hyperlinks in media overlays */
.media-overlay a,
.media-overlay a:hover,
.media-overlay a:focus,
.media-overlay a:active,
.media-overlay a:visited {
    text-decoration: none !important;
}

/* Remove underlines on all media links */
.song-link,
.podcast-link,
.media-link,
.youtube-link,
.spotify-link,
.apple-link,
.soundcloud-link,
.amazon-link,
.google-link,
.rss-link,
.x-link {
    text-decoration: none !important;
}

.song-link:hover,
.podcast-link:hover,
.media-link:hover,
.youtube-link:hover,
.spotify-link:hover,
.apple-link:hover,
.soundcloud-link:hover,
.amazon-link:hover,
.google-link:hover,
.rss-link:hover,
.x-link:hover {
    text-decoration: none !important;
}

/* Remove underlines on rating logos */
.rating-logo,
.rating-logo:hover,
.rating-logo:focus,
.rating-logo:active {
    text-decoration: none !important;
}

/* ==========================================================================
    DARK MODE OVERRIDES
    ========================================================================== */

@media (prefers-color-scheme: dark) {
    .media-filters {
        background: var(--bg-secondary);
        border-color: var(--border-color);
    }

    .media-filters label {
        color: var(--text-secondary);
    }

    .media-filters :is(select, input[type="text"]) {
        background: var(--bg-primary);
        color: var(--text-primary);
        border-color: var(--border-color);
    }

    .media-filters :is(select, input[type="text"]):focus {
        border-color: var(--accent-primary);
        box-shadow: 0 0 0 2px rgba(135, 197, 190, 0.2);
    }



    .results-count {
        color: var(--text-secondary);
        background: rgba(135, 197, 190, 0.05);
    }
}

/* Ensure media overlay icons stay white in dark mode */
[data-theme="dark"] .media-overlay .youtube-link,
[data-theme="dark"] .media-overlay .spotify-link,
[data-theme="dark"] .media-overlay .apple-link,
[data-theme="dark"] .media-overlay .soundcloud-link,
[data-theme="dark"] .media-overlay .amazon-link,
[data-theme="dark"] .media-overlay .google-link,
[data-theme="dark"] .media-overlay .rss-link,
[data-theme="dark"] .media-overlay .x-link,
[data-theme="dark"] .media-overlay .media-link,
[data-theme="dark"] .media-overlay .song-link,
[data-theme="dark"] .media-overlay .podcast-link {
    color: white !important;
}

[data-theme="dark"] .media-overlay .youtube-link i,
[data-theme="dark"] .media-overlay .spotify-link i,
[data-theme="dark"] .media-overlay .apple-link i,
[data-theme="dark"] .media-overlay .soundcloud-link i,
[data-theme="dark"] .media-overlay .amazon-link i,
[data-theme="dark"] .media-overlay .google-link i,
[data-theme="dark"] .media-overlay .rss-link i,
[data-theme="dark"] .media-overlay .x-link i,
[data-theme="dark"] .media-overlay .media-link i,
[data-theme="dark"] .media-overlay .song-link i,
[data-theme="dark"] .media-overlay .podcast-link i {
    color: white !important;
}

/* Record spinning animation for music post images */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}
