/* Base Styles & Variables */
:root {
    --primary: #007AFF;
    --background: #F2F2F7;
    --foreground: #000000;
    --secondary: #8E8E93;
    --card-bg: rgba(255, 255, 255, 0.8);
    --sidebar-bg: #FFFFFF;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Layout */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background: var(--sidebar-bg);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: 240px;
    padding: 2rem 3rem;
    max-width: 1400px;
    position: relative;
}

/* Logo */
.logo-container {
    margin-bottom: 3rem;
    display: block;
}

.logo-image {
    width: 140px;
}

.mobile-logo {
    height: 32px;
}

/* Nav Menu */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--secondary);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    transition: all 0.2s;
}

.nav-link:hover {
    background: rgba(0, 122, 255, 0.05);
    color: var(--primary);
}

.nav-link.active {
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary);
    font-weight: 700;
}

/* Mobile Header & Nav */
.mobile-header {
    display: none;
    padding: 1rem 1.5rem;
    background: var(--sidebar-bg);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.75rem 1rem;
    z-index: 1000;
    justify-content: space-around;
}

.bottom-link {
    text-decoration: none;
    color: var(--secondary);
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.bottom-link.active {
    color: var(--primary);
    font-weight: 700;
}

/* Section Title */
.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.75rem;
}

/* Card */
.card {
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.card:hover {
    transform: translateY(-8px);
}

.card-visuals {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: #1a1a1a;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.poster-wrapper {
    position: relative;
    aspect-ratio: 2/3;
    width: 100%;
}

.poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.new-episode-badge {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff9e00;
    color: white;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(255, 158, 0, 0.1);
    white-space: nowrap;
    z-index: 2;
}

.user-score-badge {
    padding: 3px 6px;
    border-radius: 6px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.score-high {
    background: #34C759 !important;
}

.score-mid {
    background: #FFCC00 !important;
    color: #000 !important;
}

.score-low {
    background: #FF3B30 !important;
}

.score-tbd {
    background: #8e8e93 !important;
    min-width: 32px;
}

.score-suffix {
    font-size: 0.55rem;
    opacity: 0.8;
    margin-left: 1px;
    font-weight: 600;
}

.details-rating-container {
    display: flex;
    align-items: center;
    margin: 0;
}

.details-rating-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--secondary);
}

.card-info-bar {
    background: rgba(25, 17, 90, 0.7);
    /* Slightly more translucent Indigo Night */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 36px;
}

.bar-providers {
    display: flex;
    gap: 6px;
    margin-left: auto;
}


.provider-wrapper {
    position: relative;
    display: flex;
}

.provider-logo {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    /* Enhanced drop shadow */
    transition: transform 0.2s ease;
}

.provider-logo:hover {
    transform: scale(1.1);
}

.paid-indicator {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #34C759;
    color: white;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    border: 1px solid white;
}

.card-title {
    margin-top: 1rem;
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    font-size: 0.85rem;
    color: var(--secondary);
    margin-top: 2px;
}

/* Details Page */
.details-root {
    max-width: 1000px;
    margin: 0 auto;
}

.details-hero {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.hero-poster {
    width: 300px;
    aspect-ratio: 2/3;
    border-radius: 30px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
    object-fit: cover;
}

.hero-info {
    flex: 1;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    letter-spacing: -0.04em;
}

.hero-year-inline {
    font-size: 0.7em;
    /* Relative to title size */
    color: var(--secondary);
    font-weight: 600;
}

.share-action-small {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: var(--secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.share-action-small:hover {
    color: var(--primary);
    text-decoration: underline;
}

.share-action-small svg {
    width: 18px;
    height: 18px;
}

.cert-badge {
    background: rgba(255, 255, 255, 0.1);
    color: var(--secondary);
    padding: 0 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 24px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    line-height: 1;
}

.details-meta-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    color: var(--secondary);
    font-size: 0.9rem;
}

.details-genres {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.genre-pill {
    background: rgba(127, 23, 222, 0.1);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.hero-overview {
    font-size: 1.1rem;
    color: var(--secondary);
    margin-bottom: 2rem;
    max-width: 600px;
}

.trailer-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--foreground);
    color: white;
    padding: 1rem 2rem;
    border-radius: 100px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.trailer-btn:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.trailer-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 1000px;
    aspect-ratio: 16/9;
    background: #000;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
}

.modal-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-container {
    width: 100%;
    height: 100%;
}

.close-modal {
    position: absolute;
    top: -4rem;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 1rem;
}

.action-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--foreground);
    padding: 1rem 2rem;
    border-radius: 100px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s;
}

.share-btn:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.2);
}

.share-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.share-modal-content {
    width: 90%;
    max-width: 360px;
    padding: 1.5rem;
    background: #1c1c1e;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    aspect-ratio: auto;
}

.share-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    width: 100%;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.8rem;
    width: 100%;
    aspect-ratio: 1.25;
    /* Ensures uniform height */
}

.share-option:hover {
    transform: translateY(-2px);
    filter: brightness(1.2);
}

.share-option svg {
    width: 26px;
    height: 26px;
}

@media (max-width: 480px) {
    .share-modal-content {
        width: 85%;
        max-width: 320px;
        padding: 1rem;
    }

    .share-grid {
        gap: 0.5rem;
    }

    .share-option {
        padding: 0.8rem;
        font-size: 0.75rem;
        aspect-ratio: 1.1;
        /* slightly less tall */
    }

    .share-option svg {
        width: 22px;
        height: 22px;
    }
}

/* Region Switcher Premium Styling */
.region-switcher-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2rem;
}

#region-switcher-container {
    position: relative;
    z-index: 100;
}

.region-switcher {
    position: relative;
    z-index: 1100;
}

.region-toggle {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 100px;
    padding: 0.6rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.region-switcher:hover .region-toggle {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 8px 12px -3px rgba(0, 0, 0, 0.08);
}

.region-switcher.open .region-toggle {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.1);
}

.region-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 18px;
    padding: 0.4rem;
    min-width: 140px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    display: none;
    transform-origin: top right;
    animation: dropdownPop 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes dropdownPop {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-5px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.region-switcher.open .region-dropdown {
    display: block;
}

.region-option {
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--secondary);
    transition: all 0.2s;
}

.region-option:hover {
    background: rgba(0, 122, 255, 0.06);
    color: var(--primary);
}

.region-option.active {
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary);
    font-weight: 650;
}

.region-chevron {
    font-size: 0.5rem;
    opacity: 0.4;
    transition: transform 0.3s;
}

.region-switcher.open .region-chevron {
    transform: rotate(180deg);
}

.attribution-footer {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.tmdb-logo {
    width: 80px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.attribution-text {
    font-size: 0.7rem;
    color: var(--secondary);
    line-height: 1.4;
}

.mobile-only {
    display: none;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 1.5rem;
        padding-bottom: 5rem;
    }

    .mobile-header {
        display: flex;
        justify-content: center;
        align-items: center;
        /* Ensure vertical centering */
    }

    /* Fix excessive whitespace in mobile header */
    .mobile-header .logo-container {
        margin-bottom: 0;
        display: flex;
        /* Fix display block */
    }

    .bottom-nav {
        display: flex;
    }

    .hero-title {
        font-size: 2rem;
    }

    .details-hero {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .hero-poster {
        width: 100%;
        max-width: 260px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    }

    .hero-poster-wrapper {
        width: auto !important;
        height: auto !important;
        display: flex;
        justify-content: center;
        margin: 0 auto;
    }

    .hero-info {
        text-align: center;
    }

    .hero-overview {
        font-size: 1rem;
    }

    .grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1.25rem;
    }

    .mobile-only {
        display: block;
    }

    #region-switcher-container {
        position: relative;
        z-index: 1200;
    }

    .services-controls {
        flex-direction: row;
        /* Ensure row order on mobile too */
        justify-content: flex-start;
        align-items: center;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .region-toggle {
        background: rgba(255, 255, 255, 0.7);
        padding: 0.5rem 1rem;
        gap: 0.4rem;
        font-size: 0.8rem;
    }

    .region-name {
        display: none;
        /* Hide abbreviation on mobile */
    }

    .region-dropdown {
        min-width: 120px;
        top: calc(100% + 1rem);
    }

    .attribution-footer {
        text-align: center;
    }
}

/* Pagination / Load More */
.load-more-container {
    display: flex;
    justify-content: center;
    margin: 3rem 0;
}

.load-more-btn {
    background: rgba(255, 255, 255, 0.7);
    color: var(--foreground);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0.6rem 2rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.load-more-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 8px 12px -3px rgba(0, 0, 0, 0.08);
}

.load-more-btn:active {
    transform: translateY(0);
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Global Refresh Button */
.refresh-container {
    display: flex;
    justify-content: center;
    padding: 4rem 0 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.refresh-btn {
    background: rgba(255, 255, 255, 0.7);
    color: var(--secondary);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0.5rem 1.5rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.6;
}

.refresh-btn:hover {
    opacity: 1;
    background: white;
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.refresh-btn svg {
    width: 14px;
    height: 14px;
}

/* Services Page & Filtering */
.services-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 2.5rem;
    gap: 1.5rem;
}

.services-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.filter-toggle-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.6rem 1.2rem;
    border-radius: 100px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.filter-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary);
}

/* Toggle Switch Styling */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.1);
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
}

.service-card:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.service-card-logo-wrapper {
    position: relative;
    width: 70px;
    height: 70px;
}

.service-card-logo {
    width: 100%;
    height: 100%;
    border-radius: 14px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

/* Checkbox Indicator */
.service-indicator {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.service-indicator::after {
    content: "✓";
    color: white;
    font-size: 14px;
    font-weight: 900;
    display: none;
}

.service-card.selected .service-indicator {
    background: var(--primary);
    border-color: var(--primary);
}

.service-card.selected .service-indicator::after {
    display: block;
}

.service-card-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.service-card-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--secondary);
}

.service-type-badge {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(0, 122, 255, 0.08);
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.service-card.selected {
    background: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.service-card.selected .service-card-name {
    color: var(--primary);
}

.storage-footer {
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
}

.storage-disclaimer {
    font-size: 0.75rem;
    color: var(--secondary);
    line-height: 1.5;
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

.btn-clear {
    background: transparent;
    color: #ff4d4d;
    border: 1px solid rgba(255, 77, 77, 0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-clear:hover {
    background: rgba(255, 77, 77, 0.05);
    border-color: #ff4d4d;
}

/* Search Styles */
.search-header {
    margin-bottom: 3rem;
    max-width: 600px;
}

.search-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

#search-input {
    width: 100%;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    padding: 1rem 3.5rem 1rem 1.5rem;
    font-size: 1.1rem;
    font-family: inherit;
    font-weight: 500;
    color: var(--foreground);
    outline: none;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

#search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.15);
}

.search-btn-icon {
    position: absolute;
    right: 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.search-btn-icon:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.search-btn-icon svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 480px) {
    .search-header {
        max-width: 100%;
        margin-bottom: 2rem;
    }

    .search-input-wrapper {
        width: 100%;
    }

    #search-input {
        padding: 0.875rem 3rem 0.875rem 1.25rem;
        font-size: 1rem;
    }

    .search-btn-icon {
        width: 2.25rem;
        height: 2.25rem;
        right: 0.5rem;
    }
}

.search-tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.3rem;
    border-radius: 12px;
    width: fit-content;
}

.search-tab {
    background: transparent;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 9px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.search-tab:hover {
    color: var(--foreground);
}

.search-tab.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 6rem 2rem;
    color: var(--secondary);
    background: rgba(255, 255, 255, 0.5);
    border: 2px dashed rgba(0, 0, 0, 0.05);
    border-radius: 24px;
}

.search-placeholder p {
    font-size: 1.1rem;
    max-width: 400px;
    margin: 0 auto;
}

.search-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 4rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 122, 255, 0.1);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.theatrical-badge {
    background: rgba(142, 142, 147, 0.1);
    border: 1px solid rgba(142, 142, 147, 0.2);
    color: var(--secondary);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

/* Poster Fallback Placeholders */
.poster-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: white;
    border-radius: 12px;
}

.poster-placeholder-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.poster-placeholder-title {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* For the details hero specifically */
.hero-poster-placeholder {
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.details-status-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(142, 142, 147, 0.1);
    border: 1px solid rgba(142, 142, 147, 0.2);
    color: var(--secondary);
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 1rem;
    }

    .service-card-logo-wrapper {
        width: 50px;
        height: 50px;
    }
}