/* ============================================
   Flavor Stream — Professional UI/UX Design
   Dark Cinema Theme
   ============================================ */

/* === Foundation === */
* { box-sizing: border-box; }

body {
    font-size: 15px;
    line-height: 1.6;
    letter-spacing: 0.015em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

::selection {
    background: rgba(229, 9, 20, 0.4);
    color: #fff;
}

/* === Typography === */
h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 1.25rem !important; font-weight: 700 !important; color: #fff !important; letter-spacing: 0.01em; }
h3 { font-size: 1rem; font-weight: 600; }

/* === Scrollbar === */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* === Cards & Containers === */
.card {
    background: rgba(18, 18, 26, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 16px;
    transition: border-color 0.3s ease;
}
.card:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

@media (min-width: 640px) {
    .card { padding: 20px; }
}

/* === Section Heading === */
.section-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}
.section-heading i {
    font-size: 1rem;
}

/* === Navigation === */
.nav-link {
    padding: 6px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255,255,255,0.65);
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

/* === Hero Gradients === */
.hero-gradient {
    background: linear-gradient(to top, #0a0a0f 0%, transparent 60%);
}
.hero-gradient-left {
    background: linear-gradient(to right, #0a0a0f 0%, transparent 50%);
}

/* === Movie Card === */
.movie-card {
    border-radius: 12px;
}
.movie-card .poster-wrap {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: #12121a;
}

/* Dark overlay on hover */
.movie-card .poster-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.35s ease;
    z-index: 1;
}
.movie-card:hover .poster-overlay {
    background: rgba(0, 0, 0, 0.45);
}

/* Play icon animation */
.play-icon {
    transform: scale(0.5);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.6));
    z-index: 2;
}
.movie-card:hover .play-icon {
    transform: scale(1);
    opacity: 1;
}

/* === Badges === */
.rating-badge {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.quality-badge {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

.audio-badge {
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.35);
    white-space: nowrap;
}

.series-badge {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

.info-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.tag-pill {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 4px 14px;
    border-radius: 20px;
    transition: all 0.2s ease;
}
.tag-pill:hover {
    transform: translateY(-1px);
}

/* === Pagination === */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
}
.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}
.pagination a {
    background: rgba(26, 26, 46, 0.6);
    color: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.06);
}
.pagination a:hover {
    background: #e50914;
    color: #fff;
    border-color: #e50914;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3);
}
.pagination .current {
    background: #e50914;
    color: #fff;
    border: 1px solid #e50914;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.25);
}

/* === Sidebar === */
.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    color: rgba(255,255,255,0.6);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    padding-left: 16px;
}

/* === Video Player === */
.video-container {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
}
.video-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.jw-player-wrap {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

/* === Episode Button === */
.episode-btn {
    padding: 10px 12px;
    background: rgba(26, 26, 46, 0.4);
    color: rgba(255,255,255,0.6);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.08);
    text-align: center;
}
.episode-btn:hover {
    background: rgba(229, 9, 20, 0.12);
    color: #fff;
    border-color: rgba(229, 9, 20, 0.5);
    transform: translateY(-1px);
}
.episode-btn.active {
    background: linear-gradient(135deg, #e50914, #c2070f);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(229, 9, 20, 0.35);
    transform: translateY(-1px);
}

/* Season button */
.season-btn {
    padding: 8px 20px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.season-btn.active {
    background: linear-gradient(135deg, #e50914, #c2070f);
    color: #fff;
    box-shadow: 0 4px 16px rgba(229, 9, 20, 0.3);
}
.season-btn:not(.active) {
    background: rgba(26, 26, 46, 0.6);
    color: rgba(255,255,255,0.6);
    border-color: rgba(255,255,255,0.06);
}
.season-btn:not(.active):hover {
    background: rgba(26, 26, 46, 0.9);
    color: #fff;
}

/* === Share Buttons === */
.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* === Breadcrumb === */
.breadcrumb {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}
.breadcrumb a {
    color: rgba(255,255,255,0.4);
    transition: color 0.2s;
}
.breadcrumb a:hover {
    color: #e50914;
}
.breadcrumb .separator {
    font-size: 0.55rem;
    opacity: 0.5;
}

/* === Poster === */
.poster-aspect {
    aspect-ratio: 2/3;
    object-fit: cover;
}

/* === Scrollbar Hide === */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* === Mobile Filter Button === */
.mobile-filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    background: rgba(18, 18, 26, 0.6);
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.2s ease;
    cursor: pointer;
}
.mobile-filter-btn:hover,
.mobile-filter-btn:active {
    color: #fff;
    border-color: rgba(255,255,255,0.15);
    background: rgba(26, 26, 46, 0.8);
}
.mobile-filter-btn i {
    font-size: 1rem;
    color: #e50914;
}

/* === Mobile Bottom Sheet Drawer === */
.mobile-drawer {
    background: #12121a;
    border-top: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
    max-height: 80vh;
    -webkit-overflow-scrolling: touch;
}
.mobile-drawer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    color: rgba(255,255,255,0.65);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.04);
    transition: all 0.15s ease;
}
.mobile-drawer-link:hover,
.mobile-drawer-link:active {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-color: rgba(255,255,255,0.1);
}

/* === Utilities === */
.noselect {
    user-select: none;
    -webkit-user-select: none;
}

/* Smooth page transitions */
.fade-in {
    animation: fadeIn 0.4s ease forwards;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Glass effect for mobile menus */
.glass {
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Year tag in sidebar */
.year-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 5px 0;
    border-radius: 8px;
    color: rgba(255,255,255,0.55);
    background: rgba(26, 26, 46, 0.5);
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.2s ease;
}
.year-tag:hover {
    background: #e50914;
    color: #fff;
    border-color: #e50914;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(229, 9, 20, 0.25);
}

/* Copy link bar */
.copy-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(26, 26, 46, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}

/* Accent button */
.btn-accent {
    padding: 8px 16px;
    background: linear-gradient(135deg, #e50914, #c2070f);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}
.btn-accent:hover {
    box-shadow: 0 4px 16px rgba(229, 9, 20, 0.4);
    transform: translateY(-1px);
}
