/* =========================================
   StreamBox — Main Stylesheet
   Netflix-style Dark Theme
   ========================================= */

/* ---- CSS Reset & Custom Properties ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222;
    --bg-overlay: rgba(0,0,0,0.7);
    --accent-primary: #e50914;
    --accent-primary-hover: #f40612;
    --accent-secondary: #f5c518;
    --accent-gradient: linear-gradient(135deg, #e50914, #b20710);
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #737373;
    --border-color: #2a2a2a;
    --border-light: #333;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.4);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 20px rgba(229,9,20,0.3);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --nav-height: 64px;
    --container-width: 1400px;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol { list-style: none; }
button {
    font-family: var(--font);
    cursor: pointer;
    border: none;
    outline: none;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ---- Container ---- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ---- Navigation ---- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, transparent 100%);
    transition: background 0.4s ease;
    display: flex;
    align-items: center;
}
.navbar.scrolled {
    background: rgba(10,10,10,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.nav-logo span {
    background: linear-gradient(135deg, #e50914, #f5c518);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.nav-logo img {
    height: 36px;
    width: auto;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}
.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 4px 0;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.3s;
    border-radius: 2px;
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}
.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}
.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Search Box */
.nav-search {
    position: relative;
    display: flex;
    align-items: center;
}
.nav-search input {
    width: 0;
    padding: 8px 0;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font);
    transition: width 0.4s ease, padding 0.4s ease, background 0.4s ease;
    border-radius: var(--radius-sm);
}
.nav-search.active input {
    width: 220px;
    padding: 8px 12px 8px 36px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}
.nav-search .search-icon {
    position: absolute;
    left: 10px;
    color: var(--text-muted);
    cursor: pointer;
    z-index: 2;
    font-size: 0.9rem;
}
.nav-search.active .search-icon {
    color: var(--text-secondary);
}

/* Mobile Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    z-index: 1002;
}
.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
    border-radius: 2px;
}
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: min(300px, 80vw);
    height: 100vh;
    background: var(--bg-secondary);
    z-index: 1001;
    padding: 80px 30px 30px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid var(--border-color);
}
.mobile-menu.active {
    right: 0;
}
.mobile-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}
.mobile-menu a:hover,
.mobile-menu a.active {
    color: var(--accent-primary);
}
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.4s;
}
.mobile-overlay.active {
    opacity: 1;
}

/* ---- Hero Banner ---- */
.hero {
    position: relative;
    width: 100%;
    height: 85vh;
    min-height: 500px;
    max-height: 800px;
    overflow: hidden;
}
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}
.hero-slide.active {
    opacity: 1;
}
.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.5);
}
.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        var(--bg-primary) 0%,
        rgba(10,10,10,0.7) 30%,
        transparent 60%
    ),
    linear-gradient(
        to right,
        rgba(10,10,10,0.9) 0%,
        transparent 50%
    );
}
.hero-content {
    position: absolute;
    bottom: 15%;
    left: 0;
    padding: 0 5%;
    max-width: 650px;
    z-index: 10;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}
.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.hero-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.hero-meta .rating {
    color: var(--accent-secondary);
    font-weight: 700;
}
.hero-meta .dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-muted);
}
.hero-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.hero-dots {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}
.hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: var(--transition);
}
.hero-dot.active {
    background: var(--accent-primary);
    width: 24px;
    border-radius: 4px;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-decoration: none;
}
.btn-primary {
    background: var(--accent-primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--accent-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}
.btn-secondary {
    background: rgba(255,255,255,0.15);
    color: #fff;
    backdrop-filter: blur(10px);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.25);
}
.btn-outline {
    background: transparent;
    color: #fff;
    border: 1px solid var(--border-light);
}
.btn-outline:hover {
    border-color: var(--text-primary);
    background: rgba(255,255,255,0.1);
}
.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}
.btn-lg {
    padding: 16px 36px;
    font-size: 1.1rem;
}
.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    font-size: 1.1rem;
}

/* ---- Section Rows (Netflix-style) ---- */
.section-row {
    padding: 20px 0;
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 20px;
}
.section-title {
    font-size: 1.4rem;
    font-weight: 700;
}
.section-title i {
    color: var(--accent-primary);
    margin-right: 8px;
}
.section-link {
    color: var(--accent-primary);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}
.section-link:hover {
    color: var(--accent-primary-hover);
    gap: 8px;
}

/* Horizontal Scroll Row */
.scroll-row-wrapper {
    position: relative;
}
.scroll-row {
    display: flex;
    gap: 12px;
    overflow-x: scroll;
    overflow-y: hidden;
    padding: 10px 20px 20px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    scroll-behavior: auto;
}
.scroll-row::-webkit-scrollbar { display: none; }
.scroll-row:active { cursor: grabbing; }

/* Scroll Arrow Buttons */
.scroll-row-wrapper {
    position: relative;
}
.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(20,20,20,0.9);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 2px 12px rgba(0,0,0,0.7);
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.scroll-arrow:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-50%) scale(1.12);
}
.scroll-arrow-left  { left: 8px; }
.scroll-arrow-right { right: 8px; }
.scroll-arrow.hidden { display: none; }

/* ---- Search Suggest Dropdown ---- */
.search-suggest-box {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 340px;
    background: #1c1c1c;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    overflow: hidden;
}
.search-suggest-box.active { display: block; }

.suggest-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.suggest-item:last-of-type { border-bottom: none; }
.suggest-item:hover { background: rgba(255,255,255,0.06); }

.suggest-thumb {
    width: 40px;
    height: 54px;
    flex-shrink: 0;
    border-radius: 5px;
    overflow: hidden;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
}
.suggest-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.suggest-icon { color: var(--accent-primary); font-size: 1.1rem; }

.suggest-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.suggest-title {
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.suggest-title mark {
    background: transparent;
    color: var(--accent-primary);
    font-weight: 700;
}
.suggest-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggest-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
    letter-spacing: 0.04em;
}
.suggest-badge.live { background: rgba(229,9,20,0.15); color: var(--accent-primary); }
.suggest-badge.movie { background: rgba(255,255,255,0.07); color: var(--text-muted); }

.suggest-footer {
    display: block;
    padding: 10px 14px;
    font-size: 0.8rem;
    color: var(--accent-primary);
    background: rgba(229,9,20,0.05);
    border-top: 1px solid var(--border-color);
    text-decoration: none;
    transition: background 0.15s;
}
.suggest-footer:hover { background: rgba(229,9,20,0.12); }
.suggest-footer i { margin-right: 6px; }
.suggest-footer strong { color: var(--text-primary); }

/* ---- Movie Card ---- */
.movie-card {
    flex: 0 0 200px;
    scroll-snap-align: start;
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-card);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s;
    cursor: pointer;
}
.movie-card:hover {
    transform: scale(1.08);
    box-shadow: var(--shadow-lg);
    z-index: 20;
}
.movie-card-poster {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
}
.movie-card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}
.movie-card:hover .movie-card-poster img {
    transform: scale(1.1);
}
.movie-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
}
.movie-card:hover .movie-card-overlay {
    opacity: 1;
}
.movie-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(229,9,20,0.5);
}
.movie-card:hover .movie-card-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.movie-card-rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    color: var(--accent-secondary);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}
.movie-card-info {
    padding: 12px;
}
.movie-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.movie-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.movie-card-featured {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent-primary);
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---- Movie Grid (All Movies Page) ---- */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 20px;
}
.movie-grid .movie-card {
    flex: none;
    width: 100%;
}

/* ---- Channel Card ---- */
.channel-card {
    flex: 0 0 180px;
    scroll-snap-align: start;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    cursor: pointer;
}
.channel-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.channel-card-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
    background: #222;
    padding: 4px;
    border: 2px solid var(--border-color);
    transition: border-color 0.3s;
}
.channel-card:hover .channel-card-logo {
    border-color: var(--accent-primary);
}
.channel-card-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.channel-card-category {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.channel-card .live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    margin-right: 4px;
    animation: pulse-live 2s infinite;
}

@keyframes pulse-live {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}

/* Channel Grid */
.channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px;
    padding: 20px;
}
.channel-grid .channel-card {
    flex: none;
    width: 100%;
}

/* ---- Video Player ---- */
.player-wrapper {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--nav-height));
    background: #000;
    margin-top: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: center;
}
.player-wrapper .video-js {
    width: 100% !important;
    height: 100% !important;
}

/* ---- Movie Details (Single Movie) ---- */
.movie-details {
    padding: 30px 0;
}
.movie-details-inner {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    padding: 0 20px;
}
.movie-poster-large {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.movie-poster-large img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
}
.movie-info h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
}
.movie-info .meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.movie-info .meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
}
.movie-info .description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 16px 0;
}
.movie-info .actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}
.movie-genre-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.genre-tag {
    padding: 4px 12px;
    background: rgba(229,9,20,0.15);
    color: var(--accent-primary);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(229,9,20,0.3);
}

/* ---- Filter Bar ---- */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    flex-wrap: wrap;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: var(--nav-height);
    z-index: 50;
}
.filter-btn {
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.filter-btn:hover,
.filter-btn.active {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}
.filter-search {
    flex: 1;
    min-width: 200px;
    position: relative;
}
.filter-search input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font);
    transition: border-color 0.3s;
}
.filter-search input:focus {
    outline: none;
    border-color: var(--accent-primary);
}
.filter-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
.sort-select {
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: var(--font);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23b3b3b3' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
.sort-select:focus { outline: none; border-color: var(--accent-primary); }

/* ---- Search Page ---- */
.search-hero {
    padding: calc(var(--nav-height) + 40px) 20px 30px;
    text-align: center;
    background: var(--bg-secondary);
}
.search-hero h1 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}
.search-input-large {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}
.search-input-large input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 1.1rem;
    font-family: var(--font);
    transition: border-color 0.3s;
}
.search-input-large input:focus {
    outline: none;
    border-color: var(--accent-primary);
}
.search-input-large i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: var(--text-muted);
}
.search-results-info {
    padding: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ---- Pagination ---- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 30px 20px;
}
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}
.page-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--text-muted);
}
.page-btn.active {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}
.page-dots {
    color: var(--text-muted);
    padding: 0 4px;
}

/* ---- Footer ---- */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 40px 0 20px;
    margin-top: 60px;
}
.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
    padding: 0 20px;
    max-width: var(--container-width);
    margin: 0 auto;
}
.footer-brand h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}
.footer-brand h3 span {
    background: linear-gradient(135deg, #e50914, #f5c518);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.footer-brand p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 16px;
}
.apk-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #1a1a1a;
    border: 2px solid #3ddc84;
    border-radius: 10px;
    padding: 10px 18px;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    margin-top: 4px;
}
.apk-download-btn:hover {
    background: #3ddc84;
    color: #000;
    transform: translateY(-2px);
}
.apk-download-btn .fa-android {
    font-size: 2rem;
    color: #3ddc84;
    transition: color 0.2s;
}
.apk-download-btn:hover .fa-android {
    color: #000;
}
.apk-download-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.apk-download-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}
.apk-download-btn:hover .apk-download-sub {
    color: #000;
}
.apk-download-main {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.footer-col h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-secondary);
}
.footer-col a {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 4px 0;
}
.footer-col a:hover {
    color: var(--accent-primary);
}
.footer-bottom {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.8rem;
}
.footer-isp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 0.8rem;
}
.footer-visitor-ip {
    margin-top: 10px;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.footer-visitor-ip i {
    color: #22c55e;
    margin-right: 5px;
}
.footer-visitor-ip strong {
    color: var(--text-secondary);
    font-family: monospace;
    letter-spacing: 0.03em;
}
.footer-isp img {
    height: 24px;
    width: auto;
}

/* ---- Alert / Flash Message ---- */
.alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    margin: 10px 20px;
    font-size: 0.9rem;
    animation: slideDown 0.4s ease;
}
@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.alert-success {
    background: rgba(34,197,94,0.15);
    border: 1px solid rgba(34,197,94,0.3);
    color: #4ade80;
}
.alert-error {
    background: rgba(229,9,20,0.15);
    border: 1px solid rgba(229,9,20,0.3);
    color: #ff6b6b;
}
.alert-warning {
    background: rgba(245,197,24,0.15);
    border: 1px solid rgba(245,197,24,0.3);
    color: #f5c518;
}
.alert-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 0 0 10px;
}

/* ---- Toast Notification ---- */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    padding: 14px 20px;
    background: var(--bg-card);
    border-left: 4px solid var(--accent-primary);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    animation: toastIn 0.4s ease;
    min-width: 280px;
    backdrop-filter: blur(10px);
}
@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ---- Share Buttons ---- */
.share-btns {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
}
.share-btn:hover {
    transform: scale(1.1);
}
.share-btn.facebook:hover { background: #1877f2; color: #fff; border: none; }
.share-btn.whatsapp:hover { background: #25d366; color: #fff; border: none; }
.share-btn.twitter:hover { background: #1da1f2; color: #fff; border: none; }
.share-btn.copy:hover { background: var(--accent-primary); color: #fff; border: none; }

/* ---- Loading Skeleton ---- */
.skeleton {
    background: linear-gradient(90deg, #1a1a1a 25%, #222 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}
.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}
.empty-state h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
}
.empty-state p {
    font-size: 0.9rem;
}

/* ---- Page Header (inner pages) ---- */
.page-header {
    padding: calc(var(--nav-height) + 30px) 20px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}
.page-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
}
.page-header p {
    color: var(--text-muted);
    margin-top: 4px;
    font-size: 0.9rem;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .movie-card { flex: 0 0 170px; }
    .channel-card { flex: 0 0 160px; }
    .movie-details-inner { grid-template-columns: 200px 1fr; gap: 20px; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .mobile-menu { display: block; }

    .hero { height: 70vh; min-height: 400px; }
    .hero-title { font-size: 2rem; }
    .hero-desc { font-size: 0.9rem; -webkit-line-clamp: 2; }

    .movie-card { flex: 0 0 150px; }
    .channel-card { flex: 0 0 140px; }

    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    .channel-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    .movie-details-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .movie-poster-large {
        max-width: 250px;
        margin: 0 auto;
    }
    .movie-info .meta-row { justify-content: center; }
    .movie-info .actions { justify-content: center; }
    .movie-genre-tags { justify-content: center; }
    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .filter-bar {
        padding: 12px 16px;
        gap: 8px;
        overflow-x: auto;
        flex-wrap: nowrap;
    }
}

@media (max-width: 480px) {
    .hero { height: 60vh; min-height: 350px; }
    .hero-title { font-size: 1.6rem; }
    .hero-content { bottom: 20%; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; }

    .movie-card { flex: 0 0 130px; }
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
        padding: 10px;
    }
    .section-title { font-size: 1.15rem; }
    .btn-lg { padding: 12px 24px; font-size: 1rem; }

    .nav-search.active input { width: 160px; }
}

@media (min-width: 1440px) {
    .movie-card { flex: 0 0 220px; }
    .hero-title { font-size: 3.5rem; }
}
