/* ============================================================
   Redux — index.css  v3
   • Original button colours (watch.css palette)
   • Upcoming movies fits panel — no scroll
   • Mini cards: full-bleed poster tiles
   • Full header included
   • Responsive with clamp() throughout
   ============================================================ */

/* ── Variables ── */
:root {
  --bg: #121212;
  --panel: #121212;
  --panel-2: #121212;
  --card-bg: #1e1e1e;
  --border: #2c2c2c;
  --border-hard: #2c2c2c;
  --text: #e0e0e0;
  --text-secondary: #aaaaaa;
  --muted: #aaaaaa;
  --accent: #4a90e2;
  --accent-2: #4a90e2;
  --accent-hover: #3570b3;
  --good: #23c483;
  --danger: #ff5d73;
  --shadow: 0 0.25rem 0.75rem rgba(0,0,0,0.5);
  --radius: 0.75rem;
  --header-height: 3.5rem;
  --footer-height: 3.8rem;
  --gap: clamp(0.55rem, 1.1vw, 1rem);
}

/* ── Reset / base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    width: 100%;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', 'Roboto', Arial, sans-serif;
    font-size: clamp(13px, 1.4vw, 16px);
    line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }

/* ════════════════════════════════════════
   HEADER
   ════════════════════════════════════════ */
header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-height);
            background: var(--bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 clamp(0.75rem, 2vw, 1.25rem);
    z-index: 1000;
}

.logo-search {
    display: flex;
    align-items: center;
    gap: clamp(0.4rem, 0.8vw, 0.625rem);
    flex: 1;
    min-width: 0;
}

.logo {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 700;
    color: var(--text);
    flex-shrink: 0;
    user-select: none;
    -webkit-user-select: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo, .logo * { color: inherit; }

.search {
    flex: 1;
    min-width: 8rem;
    max-width: 43.75rem;
    position: relative;
}

#searchBox {
    width: 100%;
    padding: clamp(0.45rem, 0.8vw, 0.625rem) clamp(2.2rem, 3vw, 2.875rem)
             clamp(0.45rem, 0.8vw, 0.625rem) clamp(0.8rem, 1.2vw, 1.125rem);
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.04);
    color: var(--text);
    font-size: clamp(0.82rem, 1.1vw, 1rem);
    outline: none;
}

#searchBox::placeholder { color: #7f8ba0; }

.search-icon {
    position: absolute;
    right: clamp(0.8rem, 1.2vw, 1.125rem);
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    cursor: pointer;
    font-size: clamp(0.85rem, 1.1vw, 1rem);
}

/* ── Nav ── */
.nav-options {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 1vw, 1.25rem);
    flex-shrink: 0;
}

.nav-options a { text-decoration: none; }

.nav-options .nav-item {
    position: relative;
    padding: clamp(0.35rem, 0.6vw, 0.5rem) clamp(0.55rem, 0.9vw, 0.875rem);
    font-size: clamp(0.78rem, 1vw, 0.95rem);
    font-weight: 500;
    color: var(--muted);
    border-radius: 0.625rem;
    cursor: pointer;
    transition: color 0.22s, background 0.22s, transform 0.15s;
    white-space: nowrap;
}

.nav-options .nav-item:hover {
    color: var(--text);
    background: rgba(74,144,226,0.14);
    transform: translateY(-1px);
}

.nav-options .nav-item:active { transform: translateY(0); }

.nav-options .nav-item.active {
    color: #fff;
    background: rgba(74,144,226,0.26);
}

.nav-options .nav-item.active::after {
    content: "";
    position: absolute;
    left: 20%; right: 20%;
    bottom: -0.35rem;
    height: 3px;
    background: var(--accent);
    border-radius: 3px;
}

/* Sync nav button */




@keyframes syncpulse {
    0%   { box-shadow: 0 0 0 0   rgba(35,196,131,0.45); }
    70%  { box-shadow: 0 0 0 8px rgba(35,196,131,0); }
    100% { box-shadow: 0 0 0 0   rgba(35,196,131,0); }
}

/* ════════════════════════════════════════
   APP SHELL
   ════════════════════════════════════════ */
.app-shell {
    display: flex;
    flex-direction: column;
    padding-top: var(--header-height);
    min-height: calc(100svh - var(--footer-height));
}

.page-shell {
    padding: 0 clamp(0.6rem, 1.8vw, 1.25rem);
}

/* ════════════════════════════════════════
   HERO LAYOUT
   ════════════════════════════════════════ */
.hero-layout {
    display: grid;
    grid-template-columns: 1.65fr 1fr;
    gap: var(--gap);
    padding: var(--gap) 0;
    /*height: clamp(20rem, 56vh, 44rem);*/
    align-items: stretch;
}

body.list-mode .hero-layout { display: none; }

/* ── Hero feature (left big panel) ── */
.hero-feature {
    position: relative;
    border-radius: clamp(14px, 1.8vw, 24px);
    overflow: hidden;
    background: linear-gradient(180deg, #101521, #0d1117);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    min-height: 0;
}

.hero-feature .swiper { height: 100%; }

.hero-slide {
    position: relative;
    overflow: hidden;
    background: #0f1118;
}

.hero-slide img.backdrop {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.56) saturate(1.05);
}

.hero-skeleton {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #111722 0%, #1b2230 100%);
    color: #66738a;
    font-size: 1.8rem;
    z-index: 3;
    pointer-events: none;
}

/* Hero overlay info */
.hero-info {
    position: absolute;
    left: clamp(0.6rem, 1.2vw, 1rem);
    right: clamp(0.6rem, 1.2vw, 1rem);
    bottom: clamp(0.6rem, 1.2vw, 1rem);
    z-index: 2;
    padding: clamp(0.6rem, 1.2vw, 1rem);
    border-radius: clamp(10px, 1.2vw, 18px);
    background: rgba(7,10,15,0.3);
    border: 1px solid rgba(255,255,255,0.08);
   /* backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);*/
}

.hero-info h2 {
    margin: 0;
    font-size: clamp(1.1rem, 2.6vw, 2.5rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    text-shadow: 0 6px 20px rgba(0,0,0,0.85);
}

.hero-info p {
    margin: clamp(0.25rem, 0.6vw, 0.6rem) 0 0;
    font-size: clamp(0.72rem, 1.1vw, 0.95rem);
    color: rgba(238,243,255,0.86);
    max-width: 46rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ════════════════════════════════════════
   BUTTONS — original watch.css colours
   ════════════════════════════════════════ */
.hero-buttons {
    display: flex;
    gap: clamp(0.35rem, 0.75vw, 0.75rem);
    flex-wrap: wrap;
    margin-top: clamp(0.45rem, 0.9vw, 1rem);
}

.hero-buttons .watch-btn,
.hero-buttons .icon-btn {
    padding: clamp(0.45rem, 0.8vw, 0.625rem) clamp(0.7rem, 1.2vw, 1.25rem);
    border-radius: 0.75rem;
    border: 2px solid;
    font-weight: bold;
    cursor: pointer;
    font-size: clamp(0.78rem, 1vw, 1rem);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 0.375rem 0.75rem rgba(0,0,0,0.3);
    background: transparent;
}

/* Watch / Stream — blue */
.hero-buttons .watch-btn {
    color: #1E90FF;
    border-color: #1E90FF;
}
.hero-buttons .watch-btn:hover,
.hero-buttons .watch-btn.active {
    background: #63B3FF;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.4);
}

/* Watch Later — red */
.hero-buttons .icon-btn.clock {
    color: #E53E3E;
    border-color: #E53E3E;
}
.hero-buttons .icon-btn.clock:hover {
    background: #F56565;
    color: #fff;
    transform: translateY(-3px);
}
.hero-buttons .icon-btn.clock.active {
    background: #E53E3E;
    color: #fff;
}



/* Favourite — gold */
.hero-buttons .icon-btn.favourite {
    color: #D69E2E;
    border-color: #D69E2E;
}
.hero-buttons .icon-btn.favourite:hover {
    background: #F6E05E;
    color: #000;
    transform: translateY(-3px);
}
.hero-buttons .icon-btn.favourite.active {
    background: #D6B23C;
    color: #000;
}

/* ── Hero side (right column) ── */
.hero-side {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    min-height: 0;
    overflow: hidden;
}

.hero-side-panel {
    flex: 1;
    min-height: 0;
    border-radius: clamp(14px, 1.8vw, 22px);
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: clamp(0.6rem, 1vw, 0.95rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ════════════════════════════════════════
   SIDE STATS GRID
   ════════════════════════════════════════ */
.side-stats {

    /* Left: coming soon  |  Right: two mini-card rows */

    gap: clamp(0.45rem, 0.8vw, 0.7rem);
    flex: 1;
    min-height: 0;
}

/* ── Coming Soon ── spans both rows, left column */
.top-chart {

    border-radius: clamp(9px, 1vw, 14px);
    padding: clamp(0.5rem, 0.85vw, 0.8rem);
    background: linear-gradient(135deg, rgba(74,144,226,0.14), rgba(124,92,255,0.1));
    border: 1px solid rgba(255,255,255,0.07);
    overflow: hidden;        /* no scroll */
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}




/* The inner list div injected by JS */
.top-chart > div {

    min-height: 0;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    gap: 0;
}

/* Each movie row */
.top-chart > div > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: clamp(0.6rem, 0.8vw, 0.76rem) !important;
    padding: 0.12rem 0 !important;
    margin: 0 !important;
    overflow: hidden;
    white-space: nowrap;
}

.top-chart > div > div > span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    padding-right: 0.4rem;
}

.top-chart > div > div > span:last-child {
    flex-shrink: 0;
    color: var(--muted);
    font-size: inherit;
}

/* ── Mini cards — right column, one per row ── */
.mini-card {

    border-radius: clamp(9px, 1vw, 14px);
    background: var(--panel-2);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    position: relative;
    overflow: hidden;
    min-height: 0;
}

.mini-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(0,0,0,0.52);
}

/* The .card injected by JS — fills the tile like a swiper-slide poster */
.mini-card .card {
    position: absolute;
    inset: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
    background: transparent;
    overflow: hidden;
    /* Remove swiper-slide scale transform if inherited */
    transform: none !important;
}

.mini-card .card img {
    width: 100%;
    height: 100%;
    object-fit: cover;

    transition: filter 0.25s, transform 0.25s;
}

.mini-card:hover .card img {
    filter: brightness(0.38);
    transform: scale(1.04);
}

/* Play icon */
.mini-card .card .play-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(1.6rem, 2.5vw, 2.6rem);
    color: #fff;
    opacity: 0;
    transition: opacity 0.22s;
    z-index: 3;
    text-shadow: 0 4px 12px rgba(0,0,0,0.7);
}

.mini-card:hover .card .play-icon { opacity: 1; }

/* Title bar at bottom */
.mini-card .card .card-info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: clamp(1.4rem, 2.5vw, 2rem) clamp(0.45rem, 0.7vw, 0.6rem) clamp(0.3rem, 0.5vw, 0.45rem);
    background: linear-gradient(to top, rgba(0,0,0,0.92), transparent);
    z-index: 2;
}

.mini-card .card .card-info h3 {
    margin: 0;
    font-size: clamp(0.65rem, 0.84vw, 0.8rem);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* The label injected above the card by JS */
.mini-card > .label {
    position: absolute;
    top: 0; left: 0; right: 0;
    padding: clamp(0.3rem, 0.5vw, 0.45rem) clamp(0.45rem, 0.7vw, 0.6rem);
    background: linear-gradient(to bottom, rgba(0,0,0,0.75), transparent);
    z-index: 4;
    font-size: clamp(0.58rem, 0.72vw, 0.68rem);
    color: rgba(255,255,255,0.85);
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

/* ── Shared label style ── */
.label {
    display: block;
    font-size: clamp(0.6rem, 0.75vw, 0.7rem);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

/* ════════════════════════════════════════
   MAIN CONTENT / ROWS
   ════════════════════════════════════════ */
main {
    max-width: 100%;
    padding: clamp(0.7rem, 1.4vw, 1.4rem)
             clamp(0.6rem, 1.4vw, 1.25rem)
             clamp(1rem, 2vw, 2rem);
}

body.list-mode main { padding-top: 0.9rem; }

h2 {
    font-size: clamp(1.05rem, 1.7vw, 1.4rem);
    margin: 0 0 clamp(0.45rem, 0.8vw, 0.8rem) 0.6rem;
    position: relative;
}

h2::before {
    content: '';
    position: absolute;
    left: -0.6rem;
    top: 0.12rem;
    bottom: 0.12rem;
    width: 4px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    border-radius: 999px;
}

section { margin-bottom: clamp(0.9rem, 1.8vw, 1.7rem); }

/* ── Row swipers ── */
.row-container { position: relative; }

.row-swiper {
    padding: clamp(0.55rem, 1vw, 0.85rem) clamp(1.4rem, 2.2vw, 2.4rem);
    overflow: hidden;
    position: relative;
    background: linear-gradient(180deg, rgba(255,255,255,0.028), rgba(255,255,255,0.014));
    border: 1px solid rgba(255,255,255,0.045);
    border-radius: clamp(9px, 1.1vw, 14px);
    box-shadow: var(--shadow);
}

.row-swiper::before,
.row-swiper::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: clamp(1.2rem, 2vw, 2.8rem);
    z-index: 2;
    pointer-events: none;
}

.row-swiper::before { left: 0;  background: linear-gradient(to right, var(--bg), transparent); }
.row-swiper::after  { right: 0; background: linear-gradient(to left,  var(--bg), transparent); }

/* ── Cards ── */
.card {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: clamp(9px, 1.1vw, 16px);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.26s ease, box-shadow 0.26s ease;
    box-shadow: 0 9px 22px rgba(0,0,0,0.3);
    background: var(--panel);
    border: 1px solid rgba(255,255,255,0.05);
}

.card:hover {
    transform: translateY(-5px) scale(1.03);
    z-index: 10;
    box-shadow: 0 18px 38px rgba(0,0,0,0.55);
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.26s ease, filter 0.26s ease;
}

.card:hover img {
    transform: scale(1.05);
    filter: brightness(0.36);
}

.play-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(2.2rem, 3.5vw, 4rem);
    color: #fff;
    opacity: 0;
    transition: opacity 0.22s ease;
    text-shadow: 0 6px 18px rgba(0,0,0,0.6);
}

.card:hover .play-icon { opacity: 1; }

.card-info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: clamp(0.45rem, 0.8vw, 0.85rem) clamp(0.5rem, 0.9vw, 0.95rem);

}

.card-info h3 {
    margin: 0;
    font-size: clamp(0.68rem, 0.9vw, 0.98rem);
    line-height: 1.2;
}

/* ── Skeletons ── */
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

.skeleton-card {
    position: relative;
    width: 100%; height: 100%;
    border-radius: clamp(9px, 1.1vw, 16px);
    overflow: hidden;
    background: var(--panel);
    box-shadow: 0 9px 22px rgba(0,0,0,0.26);
    border: 1px solid rgba(255,255,255,0.05);
}

.skeleton-poster {
    width: 100%; height: 100%;
    background: linear-gradient(90deg, #232b38 25%, #303b4c 50%, #232b38 75%);
    background-size: 200% 100%;
    animation: shimmer 1.8s infinite linear;
}

.skeleton-title {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2.8rem;
    padding: 0.8rem;
    background: linear-gradient(to top, rgba(0,0,0,0.92), transparent);
}

.skeleton-title::after {
    content: '';
    display: block;
    width: 80%;
    height: 0.85rem;
    background: #455168;
    border-radius: 0.3rem;
    background-size: 200% 100%;
    animation: shimmer 1.8s infinite linear;
}

/* ── Resume badge ── */
.resume-badge {
    position: absolute;
    top: 7px; left: 7px;
    background: rgba(74,144,226,0.9);
    color: #fff;
    padding: 3px 7px;
    border-radius: 8px;
    font-size: clamp(0.58rem, 0.72vw, 0.68rem);
    font-weight: 600;
    z-index: 5;
}

/* ════════════════════════════════════════
   MODAL
   ════════════════════════════════════════ */
.modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.94);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: clamp(0.5rem, 2vw, 1rem);
}

.modal-content {
    position: relative;
    width: min(95vw, 88rem);
    height: min(84vh, 52rem);
    border-radius: clamp(14px, 1.8vw, 24px);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,0.08);
    background: #000;
}

.modal-backdrop {
    width: 100%; height: 100%;
    object-fit: cover;
    /*filter: brightness(0.42) saturate(1.05);*/
}

.modal-info {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 2;
    padding: clamp(0.85rem, 1.6vw, 1.4rem);
background: radial-gradient(
  ellipse at left center,
  rgba(7, 10, 15, 0.96) 0%,
  rgba(7, 10, 15, 0.72) 35%,
  rgba(7, 10, 15, 0.25) 65%,
  transparent 100%
);

}

.modal-info h2 {
    font-size: clamp(1.3rem, 2.8vw, 3rem);
    margin: 0;
    text-shadow: 0 6px 20px rgba(0,0,0,0.85);
}

.modal-info p {
    font-size: clamp(0.82rem, 1.15vw, 1.05rem);
    margin: clamp(0.25rem, 0.5vw, 0.55rem) 0;
    opacity: 0.92;
}

.modal-info .meta { margin-top: 0.35rem; font-weight: 700; }

.modal-info .hero-buttons {
    display: inline-flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    width: auto;
    margin-top: clamp(0.45rem, 0.9vw, 1rem);
}

.modal-close {
    position: absolute;
    top: clamp(0.7rem, 1.4vw, 1.25rem);
    right: clamp(0.9rem, 1.8vw, 1.875rem);
    font-size: clamp(1.8rem, 2.8vw, 2.5rem);
    color: #fff;
    cursor: pointer;
    z-index: 3;
    line-height: 1;
    text-shadow: 0 6px 14px rgba(0,0,0,0.6);
}


/* ════════════════════════════════════════
   DATE STICKY HEADER (history)
   ════════════════════════════════════════ */
.date-sticky-header {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    border-bottom: 1px solid var(--border);
    padding: clamp(0.55rem, 0.9vw, 1rem) 0 clamp(0.45rem, 0.75vw, 0.75rem);
    margin: clamp(1rem, 1.8vw, 2.25rem) 0 clamp(0.45rem, 0.75vw, 1rem);
    font-size: clamp(1rem, 1.4vw, 1.38rem);
    font-weight: 600;
    color: var(--text);
    z-index: 10;
}

#history-scroll-container { scroll-behavior: smooth; }

/* ════════════════════════════════════════
   BREAKPOINTS
   ════════════════════════════════════════ */

/* ── ≤1100px: tablet landscape — stack hero vertically, side panel goes wide ── */
@media (max-width: 1100px) {
    .hero-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .hero-feature { height: clamp(17rem, 44vw, 30rem); }

    .hero-side {
        flex-direction: row;
        overflow: visible;
    }

    .hero-side-panel { flex: 1; overflow: hidden; }

    /* 3-column horizontal on wide tablet */
    .side-stats {
        grid-template-columns: 1.2fr 1fr 1fr;
        grid-template-rows: 1fr;
    }

    .top-chart {
        grid-column: 1;
        grid-row: 1;
    }

    .mini-card { min-height: 8rem; }
}

/* ── ≤768px: tablet portrait ── */
@media (max-width: 768px) {
    .hero-layout { gap: 0.7rem; }
    .hero-feature { height: clamp(15rem, 42vw, 26rem); }
    .hero-side { flex-direction: column; }

    .side-stats {
        grid-template-columns: 1.15fr 1fr;
        grid-template-rows: 1fr 1fr;
    }

    .top-chart {
        grid-column: 1;
        grid-row: 1 / -1;
    }

    .mini-card { min-height: 7rem; }
}

/* ── ≤480px: mobile ── */
@media (max-width: 480px) {
    .page-shell { padding: 0 0.5rem; }

    header {
        flex-wrap: wrap;
        height: auto;
        background: var(--bg);
        padding: 0.5rem 0.6rem;
    }

    .logo-search { width: 100%; margin-bottom: 0.4rem; }
    .search { max-width: 100%; }

    .nav-options {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.2rem;
        justify-content: flex-start;
        gap: 0.4rem;
    }

    .app-shell { padding-top: calc(var(--header-height) + 2.6rem); }

    .hero-layout { padding: 0.5rem 0; gap: 0.5rem; }
    .hero-feature { height: clamp(13rem, 50vw, 21rem); }

    .hero-info h2 {
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .hero-info p { display: none; }

    .hero-buttons .watch-btn,
    .hero-buttons .icon-btn { flex: 1 1 auto; }

    /* Mobile: coming soon full width top, mini cards side by side below */
    .side-stats {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
    }

    .top-chart {
        grid-column: 1 / -1;
        grid-row: 1;
        max-height: 8rem;
    }

    .mini-card {
        grid-column: auto;
        grid-row: 2;
        min-height: 6rem;
    }

    main { padding: 0.65rem 0.5rem 1.4rem; }
    h2 { margin-left: 0.7rem; }

    .modal-content { width: 98vw; height: 76vh; }
    .modal-info h2 { font-size: 1.2rem; }
}

/* ── ≤360px: very small phones ── */
@media (max-width: 360px) {
    .nav-options .nav-item,


    .hero-buttons .icon-btn span:not(.fa):not([class*="fa-"]) { display: none; }
    h2 { font-size: 1rem; }
    .card-info h3 { font-size: 0.7rem; }
}
/* SIDE STATS: column layout */
.side-stats {
    display: flex;
    flex-direction: column;
    gap: clamp(0.6rem, 1vw, 0.9rem);
    flex: 1;
    min-height: 0;
}

/* Coming Soon block stays full width; keep your existing .top-chart visual styles */

/* Bottom row with 2 mini blocks under Coming Soon */
.bottom-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.45rem, 0.8vw, 0.7rem);
}

/* Remove grid placement from mini-card; keep visual styles */
.mini-card {
    /* DELETE grid-column: 2; from here */
    border-radius: clamp(9px, 1vw, 14px);
    background: var(--panel-2);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    position: relative;
    overflow: hidden;
    min-height: 0;
}
/* Bottom row: flex gap */
.bottom-row {
    display: flex;
    gap: clamp(0.45rem, 0.8vw, 0.7rem);
}

/* Mini-card: flex column with image section */
.mini-card {
    flex: 1;  /* equal width */
    display: flex;
    flex-direction: column;
    border-radius: clamp(9px, 1vw, 14px);
    background: var(--panel-2);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    overflow: hidden;
    min-height: 0;
}

/* Label at top */
.mini-card > .label {
    flex-shrink: 0;
    padding: clamp(0.4rem, 0.6vw, 0.55rem) clamp(0.6rem, 0.9vw, 0.8rem);

    font-size: clamp(0.65rem, 0.8vw, 0.75rem);
    color: rgba(255,255,255,0.85);
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

/* Card: image + info section */
.mini-card .card {
    flex: 1;
    position: relative;
    aspect-ratio: 2/3;  /* keeps poster shape */
    min-height: clamp(120px, 18vw, 160px);
}

/* Image fills card */
.mini-card .card > div {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.mini-card .card img {
    width: 100%;
    height: 100%;
    object-fit: cover;

    transition: filter 0.25s, transform 0.25s;
}

/* Hover effects */
.mini-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(0,0,0,0.52);
}

.mini-card:hover .card img {
    filter: brightness(0.38);
    transform: scale(1.04);
}

.mini-card .play-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(1.6rem, 2.5vw, 2.6rem);
    color: #fff;
    opacity: 0;
    transition: opacity 0.22s;
    z-index: 3;
    text-shadow: 0 4px 12px rgba(0,0,0,0.7);
}

.mini-card:hover .play-icon {
    opacity: 1;
}

/* Title overlay at bottom */
.mini-card .card-info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: clamp(1rem, 1.8vw, 1.5rem) clamp(0.6rem, 1vw, 0.8rem) clamp(0.4rem, 0.7vw, 0.6rem);
    background: linear-gradient(to top, rgba(31, 31, 31, 0.68), transparent);
    z-index: 2;
}

.mini-card .card-info h3 {
    margin: 0;
    font-size: clamp(0.7rem, 0.95vw, 0.85rem);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.top-chart {
    /* your existing gradient/background etc. */
    display: flex;
    flex-direction: column;
    gap: clamp(0.2rem, 0.4vw, 0.3rem);
    min-height: clamp(12px, 14vw, 14rem); /* NEW: set min height to fit ~5 items */
}

/* Label & title: shrink to save space */




/* List container: flex-grow, NO SCROLL, better spacing */
.top-chart > div {

    min-height: 0;
    overflow: hidden !important;  /* no scroll */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;  /* top align */
    gap: clamp(0.15rem, 0.25vw, 0.2rem);  /* tighter rows */
    padding-right: clamp(0.4rem, 0.6vw, 0.6rem);  /* breathing room */
}

/* Each movie row: smaller, responsive text */
.top-chart > div > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: clamp(0.7rem, 0.85vw, 0.8rem) !important;  /* smaller base */
    padding: clamp(0.1rem, 0.2vw, 0.15rem) 0 !important;
    margin: 0 !important;
    overflow: hidden;
}

/* Title/status span */
.top-chart > div > div > span:first-child {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: clamp(0.3rem, 0.5vw, 0.6rem);
}

.top-chart > div > div > span:last-child {
    flex-shrink: 0;
    color: var(--muted);
    font-size: clamp(0.65rem, 0.8vw, 0.75rem);  /* date slightly smaller */
    white-space: nowrap;
}

/* Status tags even smaller */
.top-chart span[style*="font-size:0.75rem"] {
    font-size: clamp(0.6rem, 0.75vw, 0.7rem) !important;
}




/* Optional: small gap between label + title */
.top-chart > .label + h4 {
    margin-top: clamp(0.1rem, 0.2vw, 0.15rem);
}
.top-chart {
    /* DELETE: min-height: clamp(220px, 32vw, 320px); */
    
    flex: 1;  /* NEW: grow to fill parent flex container */
    display: flex;
    flex-direction: column;
    gap: clamp(0.15rem, 0.25vw, 0.2rem);  /* tighter gap */
}
/* OVERRIDE: Kill all gaps/margins in .top-chart - HIGHEST SPECIFICITY */
.top-chart.coming-soon {
    gap: clamp(0.1rem, 0.15vw, 0.12rem) !important;  /* tiny consistent gap */
}

.top-chart.coming-soon > .label,
.top-chart.coming-soon h4 {
    margin: 0 !important;  /* zero margins */
    flex-shrink: 0;
}

.top-chart.coming-soon h4 {
    font-size: clamp(0.82rem, 1.05vw, 0.95rem) !important;
}

/* Fix inline list div margin */
.top-chart.coming-soon > div[style*="margin-top: 0.6rem"] {
    margin-top: clamp(0.15rem, 0.25vw, 0.2rem) !important;  /* tiny */
    font-size: clamp(0.75rem, 0.9vw, 0.85rem) !important;
}
/* ====================== LIVE TV - COMPACT + MULTI COLUMN ====================== */
#liveTVContent {
    max-width: 1400px;           /* Wider container */
    margin: 0 auto;
    padding: 0 20px;
}

.live-network-group {
    margin-bottom: 50px;
}

.live-network-header {
    padding: 12px 0 16px 0;
    font-weight: 600;
    font-size: clamp(1.05rem, 1.3vw, 1.2rem);
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid var(--accent);
}

.live-network-header img {
    height: 32px;
    width: auto;
    border-radius: 6px;
}

/* Grid for channels - allows multiple per row */
.live-channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px 20px;
}

/* Individual channel card */
.live-channel-card {
    background: rgba(30, 30, 30, 0.75);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    min-height: 108px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 14px;
}

.live-channel-card:hover {
    background: rgba(45, 45, 45, 0.9);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.6);
}

/* Logo on the left */
.live-channel-logo {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 8px;
    background: #1a1a1a;
    padding: 4px;
    align-self: center;
}

/* Info on the right */
.live-channel-info {
    flex: 1;
    min-width: 0;
}

.live-channel-info .channel-name {
    font-weight: 500;
    font-size: 1.05rem;
    margin-bottom: 6px;
    line-height: 1.3;
}

.live-channel-info .program-title {
    font-size: 0.93rem;
    color: #ddd;
    line-height: 1.35;
}

.live-channel-info .program-time {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.live-dot {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 10px;
    height: 10px;
    background: #23c483;
    border-radius: 50%;
    animation: livepulse 2s infinite;
}
/* Region Buttons */
.region-btn {
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.region-btn:hover {
    background: rgba(74,144,226,0.15);
    border-color: var(--accent);
}

.region-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    font-weight: 500;
}
.page-shell {
    padding: 0 clamp(0.6rem, 1.8vw, 1.25rem);
    min-height: calc(77svh - var(--header-height));
}
.page-shell:has(~ main #liveTVSection[style*="display: block"]) {
    min-height: 0;
}