/* ===== Dark Theme (Listing Pages - JustWatch style) ===== */
.theme-dark {
    background-color: #0b0e13;
    color: #ffffff;
    min-height: 100vh;
}

.header-dark {
    background-color: #0b0e13;
    border-bottom: 1px solid #1a1f2e;
    padding: 0.75rem 0;
}

.header-dark .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
}

.header-dark .navbar-toggler-icon {
    filter: invert(1);
}

.logo-just {
    color: #f5c518;
    font-weight: 700;
    font-size: 1.4rem;
}

.logo-watch {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.4rem;
}

.main-nav .nav-link {
    color: #9ca3af;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    transition: color 0.2s;
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active {
    color: #ffffff;
}

.search-wrapper {
    min-width: 280px;
    max-width: 400px;
    width: 100%;
}

.search-form {
    position: relative;
}

.search-input {
    background-color: #1a1f2e !important;
    border: 1px solid #2a3142 !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    padding: 0.6rem 1rem 0.6rem 2.5rem !important;
    font-size: 0.9rem;
}

.search-input::placeholder {
    color: #6b7280;
}

.search-input:focus {
    box-shadow: 0 0 0 2px rgba(245, 197, 24, 0.25) !important;
    border-color: #f5c518 !important;
}

.search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    z-index: 2;
    pointer-events: none;
}

.search-results {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #1a1f2e;
    border: 1px solid #2a3142;
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1050;
    padding: 0.5rem 0;
}

.search-results.show {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    color: #ffffff;
    text-decoration: none;
    transition: background 0.15s;
}

.search-result-item:hover {
    background: #2a3142;
    color: #ffffff;
}

.search-result-poster {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.search-result-poster-placeholder {
    width: 40px;
    height: 60px;
    background: #2a3142;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    flex-shrink: 0;
}

.search-no-results {
    padding: 0.75rem 1rem;
    color: #9ca3af;
    font-size: 0.9rem;
}

.listing-page {
    padding-bottom: 3rem;
}

.listing-toolbar {
    border-bottom: 1px solid #1a1f2e;
}

.toolbar-icon {
    color: #9ca3af;
    font-size: 1.1rem;
}

.toolbar-label {
    color: #ffffff;
    font-weight: 500;
}

.result-count {
    color: #9ca3af;
    font-size: 0.85rem;
}

.movie-card {
    display: block;
    color: inherit;
}

.movie-card:hover .movie-poster {
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.movie-poster-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.movie-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    background: #1a1f2e;
}

.movie-poster-placeholder {
    aspect-ratio: 2/3;
    background: #1a1f2e;
    color: #4b5563;
    font-size: 2rem;
    border-radius: 8px;
}

.movie-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
}

.movie-title {
    color: #d1d5db;
    font-size: 0.8rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-card:hover .movie-title {
    color: #ffffff;
}

/* ===== Light Theme (Detail Page - PRMOVIES style) ===== */
.theme-light {
    background-color: #e8e8e8;
    color: #333333;
    min-height: 100vh;
}

.header-light {
    background-color: #ffffff;
    border-bottom: 1px solid #ddd;
    padding: 0.5rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.header-light .navbar-toggler {
    border-color: rgba(0, 0, 0, 0.2);
}

.logo-pr,
.logo-movies {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
    font-size: 1.6rem;
    color: #222;
}

.logo-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #28a745;
    border-radius: 50%;
    color: #fff;
    font-size: 0.85rem;
    vertical-align: middle;
    margin: 0 2px;
}

.logo-tagline {
    font-size: 0.65rem;
    color: #888;
    font-style: italic;
    margin-top: -2px;
}

.header-light .main-nav .nav-link {
    color: #555;
    font-size: 0.9rem;
}

.header-light .main-nav .nav-link:hover,
.header-light .main-nav .nav-link.active {
    color: #28a745;
}

.header-light .search-input {
    background-color: #fff !important;
    border: 1px solid #ccc !important;
    color: #333 !important;
    border-radius: 4px !important;
}

.header-light .search-input:focus {
    box-shadow: none !important;
    border-color: #28a745 !important;
}

.header-light .search-icon {
    color: #28a745;
}

.header-light .search-results {
    background: #fff;
    border-color: #ddd;
}

.header-light .search-result-item {
    color: #333;
}

.header-light .search-result-item:hover {
    background: #f5f5f5;
    color: #333;
}

.detail-page {
    position: relative;
    padding-bottom: 3rem;
}

.breadcrumb-nav {
    background: #f0f0f0;
    padding: 0.5rem 0;
    margin-bottom: 0;
}

.breadcrumb-nav .breadcrumb {
    font-size: 0.8rem;
}

.breadcrumb-nav a {
    color: #28a745;
    text-decoration: none;
}

.breadcrumb-nav a:hover {
    text-decoration: underline;
}

.breadcrumb-nav .breadcrumb-item.active {
    color: #666;
}

.backdrop-section {
    overflow: hidden;
    max-height: 420px;
}

.backdrop-img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
}

.backdrop-placeholder {
    height: 420px;
    background: linear-gradient(135deg, #333 0%, #555 100%);
}

.backdrop-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90px;
    height: 90px;
    background: rgba(40, 167, 69, 0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2.8rem;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    z-index: 2;
    padding-left: 6px;
}

.play-btn:hover {
    background: rgba(40, 167, 69, 1);
    transform: translate(-50%, -50%) scale(1.08);
    color: #fff;
}

.movie-info-box {
    background: #ffffff;
    border: 1px solid #ddd;
    padding: 1.5rem;
    margin-top: -1px;
}

.detail-poster {
    width: 100%;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.detail-poster-placeholder {
    aspect-ratio: 2/3;
    background: #eee;
    color: #aaa;
    font-size: 2.5rem;
    border: 1px solid #ddd;
}

.detail-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 0.75rem;
}

.detail-overview {
    color: #777;
    font-style: italic;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.detail-meta p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #444;
}

.detail-meta strong {
    color: #222;
}

.meta-link {
    color: #28a745;
}

.meta-release {
    color: #28a745;
}

.badge-quality {
    display: inline-block;
    background: #222;
    color: #fff;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 2px;
}

.badge-imdb {
    display: inline-block;
    background: #f5c518;
    color: #000;
    padding: 2px 8px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 2px;
}

.social-sidebar {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    flex-direction: column;
    gap: 4px;
    z-index: 100;
}

.social-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    text-decoration: none;
}

.social-icon.fb { background: #3b5998; }
.social-icon.email { background: #888; }
.social-icon.whatsapp { background: #25d366; }
.social-icon.telegram { background: #0088cc; }
.social-icon.share { background: #8bc34a; }

/* ===== Responsive ===== */
@media (max-width: 991px) {
    .search-wrapper {
        margin-top: 1rem;
        max-width: 100%;
    }

    .main-nav {
        margin: 0.5rem 0;
    }

    .backdrop-img,
    .backdrop-placeholder {
        height: 260px;
    }

    .play-btn {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
}

@media (max-width: 575px) {
    .logo-just,
    .logo-watch,
    .logo-pr,
    .logo-movies {
        font-size: 1.2rem;
    }
}
