/* ================================================
   WATCHERCASE — Netflix-Style CSS
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600&family=Lexend:wght@300;400;500;600&display=swap');

/* ------------------------------------------------
   CSS VARIABLES
------------------------------------------------ */
:root {
    --bg-dark: #0f0e0d;
    --bg-card: #181614;
    --bg-section: #111010;
    --accent: #ff7b54;
    --accent-hover: #ffb26b;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --font-heading: 'Fredoka', sans-serif;
    --font-body: 'Lexend', sans-serif;
    --header-height: 72px;
    --card-width: 160px;
    --card-gap: 12px;
    --slider-arrow-size: 40px;
}

/* ------------------------------------------------
   RESET & BASE
------------------------------------------------ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------
   HEADER
------------------------------------------------ */
.main-header {
    background-color: rgba(15, 14, 13, 0.97);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    border-bottom: 1px solid #221f1c;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    height: var(--header-height);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 0.5px;
    font-weight: 600;
    flex-shrink: 0;
    transition: color 0.3s;
}

.logo:hover { color: var(--accent-hover); }

.search-container {
    display: flex;
    align-items: center;
    background-color: #1c1a18;
    border-radius: 24px;
    padding: 4px 16px;
    flex: 1;
    max-width: 400px;
    border: 1px solid #2d2926;
    transition: border-color 0.3s, background-color 0.3s;
}

.search-container:focus-within {
    border-color: var(--accent);
    background-color: #24211f;
}

.search-container input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-main);
    padding: 8px 0;
    width: 100%;
    font-size: 0.95rem;
    font-family: var(--font-body);
}

.search-container input::placeholder { color: #555; }

.search-container button {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 1rem;
    padding-left: 10px;
    transition: color 0.3s;
    flex-shrink: 0;
}

.search-container button:hover { color: var(--accent); }

.menu-toggle {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.6rem;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
    transition: color 0.3s;
}

.menu-toggle:hover { color: var(--accent); }

/* ------------------------------------------------
   SIDE MENU DRAWER
------------------------------------------------ */
.side-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100%;
    background-color: #141211;
    box-shadow: -10px 0 30px rgba(0,0,0,0.7);
    z-index: 200;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
}

.side-menu.open { right: 0; }

.close-menu {
    align-self: flex-end;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2.8rem;
    cursor: pointer;
    line-height: 1;
    margin-bottom: 40px;
    transition: color 0.2s;
}

.close-menu:hover { color: var(--accent); }

.menu-links { list-style: none; }

.menu-links li { margin-bottom: 24px; }

.menu-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.25rem;
    font-family: var(--font-heading);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: color 0.3s, transform 0.2s;
}

.menu-links a:hover {
    color: var(--accent);
    transform: translateX(6px);
}

.menu-links a.donate-btn {
    color: var(--accent);
    border: 2px solid var(--accent);
    padding: 12px 24px;
    border-radius: 24px;
    justify-content: center;
    margin-top: 24px;
}

.menu-links a.donate-btn:hover {
    background-color: var(--accent);
    color: #0f0e0d;
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 150;
    display: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.overlay.show { display: block; }

/* ------------------------------------------------
   HERO SLIDER
------------------------------------------------ */
.hero-slider {
    margin-top: var(--header-height);
    height: 520px;
    position: relative;
    overflow: hidden;
}

.slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    display: flex;
    align-items: center;
    padding: 0 6%;
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    pointer-events: none;
}

.slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(15,14,13,0.98) 0%,
        rgba(15,14,13,0.75) 45%,
        rgba(15,14,13,0.1) 100%
    );
}

.slide::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 180px;
    background: linear-gradient(to top, var(--bg-dark), transparent);
}

.slide.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 560px;
}

.trending-tag {
    background-color: var(--accent);
    color: #0f0e0d;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-block;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    margin: 16px 0 12px;
    line-height: 1.1;
    letter-spacing: 0.3px;
}

.hero-content p {
    color: #b0a8a0;
    line-height: 1.6;
    margin-bottom: 28px;
    font-size: 0.98rem;
}

.watch-now-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--accent);
    color: #0f0e0d;
    padding: 13px 30px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 6px;
    font-size: 0.98rem;
    transition: transform 0.2s, background-color 0.3s;
}

.watch-now-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

/* ------------------------------------------------
   CATEGORIES WRAPPER
------------------------------------------------ */
.categories-wrapper {
    padding: 8px 0 60px;
}

/* ------------------------------------------------
   CATEGORY ROW (the Netflix horizontal section)
   This is the main reusable component built by JS.

   Structure:
   .category-row
     .category-header
       h2.category-title
     .slider-outer               ← clips overflow
       button.slider-arrow.left
       div.slider-track           ← scrollable
         .movie-card × N
       button.slider-arrow.right
------------------------------------------------ */
.category-row {
    padding: 28px 0 12px;
    position: relative;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px 14px;
    gap: 12px;
}

.category-title {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-title .cat-icon {
    font-size: 1.1rem;
    opacity: 0.8;
}

/* Outer container: clips the scrollable track */
.slider-outer {
    position: relative;
    /* Horizontal padding creates space for the arrow buttons */
    padding: 0 48px;
}

/* The scrollable track */
.slider-track {
    display: flex;
    gap: var(--card-gap);
    overflow-x: auto;
    overflow-y: visible;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* smooth momentum scrolling on iOS */
    scrollbar-width: none;             /* hide scrollbar Firefox */
    padding: 12px 4px 20px;            /* top padding for hover scale room */
    /* Allow cards to scale up on hover without clipping */
    overflow: visible;
    /* Re-enable x scroll despite overflow:visible for the track, 
       clipping is handled by the outer element */
}

/* Use a wrapper approach: clip on outer, scroll on track */
.slider-outer {
    overflow: hidden;
}

.slider-track {
    overflow-x: scroll;
    overflow-y: visible;
    clip-path: none; /* removed — let outer handle clipping */
}

.slider-track::-webkit-scrollbar { display: none; } /* hide scrollbar Chrome/Safari */

/* Arrow buttons */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: var(--slider-arrow-size);
    height: 80px;
    background: linear-gradient(to right, rgba(15,14,13,0.95), rgba(15,14,13,0.6));
    border: none;
    color: var(--text-main);
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
    border-radius: 4px;
}

.slider-arrow.left {
    left: 0;
    background: linear-gradient(to right, rgba(15,14,13,1), rgba(15,14,13,0));
    border-radius: 4px 0 0 4px;
}

.slider-arrow.right {
    right: 0;
    background: linear-gradient(to left, rgba(15,14,13,1), rgba(15,14,13,0));
    border-radius: 0 4px 4px 0;
}

.slider-arrow:hover {
    color: var(--accent);
}

.slider-arrow.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ------------------------------------------------
   MOVIE CARDS (shared between sliders and search)
------------------------------------------------ */
.movie-card {
    flex: 0 0 var(--card-width);
    width: var(--card-width);
    background: none;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.25s ease, z-index 0s;
    position: relative;
    z-index: 1;
}

.movie-card:hover {
    transform: scale(1.08);
    z-index: 5;
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.img-container {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 10px;
    background-color: #1c1a18;
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.movie-card:hover .img-container img {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.22s ease;
    border-radius: 6px;
}

.play-overlay i {
    font-size: 2.2rem;
    color: #fff;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.movie-card:hover .play-overlay { opacity: 1; }

.movie-info { padding: 0 2px; }

.movie-info h3 {
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.4;
    color: #d8d8d8;
    margin-bottom: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.movie-card:hover h3 { color: var(--accent); }

.movie-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: block;
}

/* ------------------------------------------------
   PLACEHOLDER CARDS (shown in empty categories)
------------------------------------------------ */
.placeholder-card .img-container {
    background: linear-gradient(135deg, #1e1c1a 0%, #252220 50%, #1a1917 100%);
}

.placeholder-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,123,84,0.06) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2.2s ease-in-out infinite;
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.placeholder-icon {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: rgba(255,255,255,0.12);
}

.placeholder-icon i { font-size: 2rem; }
.placeholder-icon span { font-size: 0.7rem; font-family: var(--font-body); letter-spacing: 1px; text-transform: uppercase; }

.placeholder-card .movie-info h3 {
    background: #252220;
    border-radius: 4px;
    color: transparent;
    height: 14px;
    animation: shimmer 2.2s ease-in-out infinite;
    background-size: 200% 100%;
    background-image: linear-gradient(90deg, #252220 0%, #302d2a 50%, #252220 100%);
}

.placeholder-card .movie-meta {
    background: #1e1c1a;
    border-radius: 4px;
    color: transparent;
    display: block;
    height: 11px;
    width: 60%;
    margin-top: 5px;
    animation: shimmer 2.2s ease-in-out infinite;
    background-size: 200% 100%;
    background-image: linear-gradient(90deg, #1e1c1a 0%, #282624 50%, #1e1c1a 100%);
}

/* ------------------------------------------------
   SEARCH RESULTS SECTION
------------------------------------------------ */
.search-results-section {
    padding-top: 20px;
}

.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 48px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin-bottom: 24px;
    font-weight: 500;
}

/* Search results use a grid, not a slider */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-width), 1fr));
    gap: 28px 14px;
}

/* In search results, cards should NOT be flex-shrink */
.movie-grid .movie-card {
    flex: none;
    width: 100%;
}

.no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
    opacity: 0.4;
}

.no-results p { font-size: 1rem; }

/* ------------------------------------------------
   FOOTER
------------------------------------------------ */
.site-footer {
    background-color: #0a0a0a;
    color: #bcbcbc;
    padding: 60px 40px 30px;
    font-family: var(--font-body);
    font-size: 14px;
    border-top: 1px solid #1a1a1a;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
}

.footer-column {
    flex: 1;
    min-width: 180px;
}

.brand-col { flex: 1.5; }

.footer-logo {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 14px;
    font-family: var(--font-heading);
}

.footer-logo span { color: var(--accent); }

.footer-tagline {
    line-height: 1.6;
    color: #8c8c8c;
    max-width: 260px;
}

.footer-column h3 {
    color: #fff;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 18px;
    font-weight: 600;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li { margin-bottom: 11px; }

.footer-column ul li a {
    color: #8c8c8c;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-column ul li a:hover { color: #fff; }

.footer-socials {
    display: flex;
    gap: 14px;
    margin-top: 14px;
}

.footer-socials a {
    color: #8c8c8c;
    font-size: 17px;
    transition: transform 0.2s, color 0.2s;
}

.footer-socials a:hover {
    color: #fff;
    transform: translateY(-2px);
}

.footer-divider {
    border: 0;
    height: 1px;
    background: #222;
    margin: 40px auto 20px;
    max-width: 1200px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    color: #555;
    font-size: 13px;
}

/* ------------------------------------------------
   COOKIE BANNER
------------------------------------------------ */
#cookie-consent-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    width: 90%;
    max-width: 850px;
    background-color: #16161a;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
    border-radius: 8px;
    z-index: 99999;
    padding: 16px 24px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s;
    opacity: 1;
}

#cookie-consent-banner.cookie-banner-hidden {
    transform: translateX(-50%) translateY(150%);
    opacity: 0;
    pointer-events: none;
}

.cookie-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.cookie-banner-text p {
    color: #e5e7eb;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

.cookie-policy-link {
    color: #00ffff;
    text-decoration: none;
    font-weight: 500;
}

.cookie-policy-link:hover { text-decoration: underline; }

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-btn {
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.cookie-btn-primary {
    background: #fff;
    color: #0c0c0c;
}

.cookie-btn-primary:hover { background: #e5e7eb; }

.cookie-btn-secondary {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
}

.cookie-btn-secondary:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.4);
}

/* ------------------------------------------------
   RESPONSIVE — TABLET
------------------------------------------------ */
@media (max-width: 900px) {
    :root {
        --card-width: 140px;
    }

    .hero-slider { height: 420px; }

    .hero-content h1 { font-size: 2.4rem; }

    .category-header,
    .slider-outer,
    .content-wrapper {
        padding-left: 32px;
        padding-right: 32px;
    }

    .slider-arrow {
        width: 32px;
    }
}

/* ------------------------------------------------
   RESPONSIVE — MOBILE
------------------------------------------------ */
@media (max-width: 600px) {
    :root {
        --card-width: 130px;
        --card-gap: 10px;
        --slider-arrow-size: 28px;
    }

    .header-container { padding: 0 16px; }

    .logo { font-size: 1.5rem; }

    .search-container {
        padding: 3px 12px;
    }

    .search-container input { font-size: 0.85rem; }

    .hero-slider { height: 320px; }

    .hero-content h1 { font-size: 1.8rem; }

    .hero-content p { display: none; }

    .watch-now-btn { padding: 10px 22px; font-size: 0.9rem; }

    .category-header,
    .content-wrapper {
        padding-left: 16px;
        padding-right: 16px;
    }

    .slider-outer { padding-left: 16px; padding-right: 16px; }

    .category-title { font-size: 1.15rem; }

    /* Hide arrows on mobile — use touch swipe instead */
    .slider-arrow { display: none; }

    /* Cookie banner */
    #cookie-consent-banner { bottom: 12px; padding: 16px; }

    .cookie-banner-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .cookie-banner-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .footer-container { flex-direction: column; gap: 28px; }

    .site-footer { padding: 40px 20px 20px; }

    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 20px 10px;
    }
}
.more-btn {
    padding: 14px 32px;
    background: transparent;
    color: #fff;
    border: 2px solid #ff6b35;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all .3s ease;
}

.more-btn:hover {
    background: #ff6b35;
    color: #fff;
    box-shadow: 0 0 20px rgba(255,107,53,.5);
}
.btn-center {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.more-btn {
    padding: 14px 32px;
    background: transparent;
    color: #fff;
    border: 2px solid #ff6b35;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all .3s ease;
}

.more-btn:hover {
    background: #ff6b35;
    color: #fff;
    box-shadow: 0 0 20px rgba(255,107,53,.5);
}
.parent {
  display: flex;
  justify-content: center;
}