/* ==========================================================================
   PELIS.CLICK / STREAMIT THEME - MINIMALIST TACTILE & POSTER-FIRST STYLES
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-pure-black: #08090d;
    --bg-surface: #0f1016;
    --bg-card: #13141d;
    --bg-card-hover: #191b26;
    --border-color: rgba(255, 255, 255, 0.07);
    --border-subtle: rgba(255, 255, 255, 0.04);
    --border-focus: rgba(255, 255, 255, 0.18);

    --primary-red: #e50914;
    --primary-red-hover: #f41520;
    --primary-red-dark: #b80710;

    --neon-blue: #0ea5e9;
    --neon-blue-hover: #38bdf8;

    --vip-gold: #f59e0b;
    --vip-gold-dark: #b45309;

    --text-white: #ffffff;
    --text-muted: #9496a8;
    --text-dim: #606275;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-pill: 9999px;

    /* Tactile Relief Plastic Shadows & Highlights */
    --tactile-relief-red: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 2px 3px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(0, 0, 0, 0.6);
    --tactile-relief-red-hover: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 3px 6px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(0, 0, 0, 0.7);
    --tactile-relief-dark: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 2px 3px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(0, 0, 0, 0.65);
    --tactile-relief-dark-hover: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 3px 6px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(0, 0, 0, 0.75);
    --tactile-relief-active: inset 0 2px 3px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(0, 0, 0, 0.3);

    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.45);
    --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.65);

    --transition: all 0.18s cubic-bezier(0.2, 0, 0, 1);
}

/* Base Reset & Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-pure-black) !important;
    color: var(--text-white);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: -0.02em;
}

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

a:hover {
    color: var(--primary-red);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #000;
}
::-webkit-scrollbar-thumb {
    background: #25252f;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-red);
}

/* Navbar */
.pelis-navbar {
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1030;
    padding: 12px 24px;
    transition: var(--transition);
}

.pelis-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
}

.pelis-brand span.click {
    color: var(--primary-red);
}

.pelis-brand .play-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #e50914, #ff4d58);
    border-radius: 50%;
    color: #fff;
    font-size: 11px;
    box-shadow: var(--primary-red-glow);
}

.btn-vip {
    background: linear-gradient(135deg, #ffbe1a, #f39c12);
    color: #000 !important;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    box-shadow: 0 0 10px rgba(255, 190, 26, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
    border: none;
}

.nav-link-custom {
    color: #b5b5c3 !important;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px !important;
    transition: var(--transition);
    position: relative;
}

.nav-link-custom:hover,
.nav-link-custom.active {
    color: #fff !important;
}

.nav-link-custom.active {
    color: var(--primary-red) !important;
    font-weight: 600;
}

.nav-link-custom.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 14px;
    right: 14px;
    height: 2px;
    background: var(--primary-red);
    border-radius: 2px;
}

/* Tactile Relief Plastic Buttons */
.btn-pelis-red {
    background: linear-gradient(180deg, #ed1c24 0%, #d80b15 100%);
    color: #ffffff !important;
    font-weight: 600;
    font-size: 13.5px;
    letter-spacing: 0.2px;
    border-radius: var(--radius-sm);
    padding: 8px 18px;
    border: 1px solid rgba(0, 0, 0, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--tactile-relief-red);
    transition: var(--transition);
    cursor: pointer;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
    -webkit-tap-highlight-color: transparent;
}

.btn-pelis-red:hover {
    background: linear-gradient(180deg, #f7252d 0%, #e2101a 100%);
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: var(--tactile-relief-red-hover);
}

.btn-pelis-red:active {
    transform: translateY(1px);
    box-shadow: var(--tactile-relief-active);
}

.btn-pelis-outline {
    background: linear-gradient(180deg, #1b1c26 0%, #13141d 100%);
    color: #e2e4ec !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 500;
    font-size: 13px;
    border-radius: var(--radius-sm);
    padding: 7px 16px;
    box-shadow: var(--tactile-relief-dark);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.btn-pelis-outline:hover {
    background: linear-gradient(180deg, #222430 0%, #171823 100%);
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
    box-shadow: var(--tactile-relief-dark-hover);
}

.btn-pelis-outline:active {
    transform: translateY(1px);
    box-shadow: var(--tactile-relief-active);
}

.btn-pelis-blue {
    background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
    color: #fff !important;
    font-weight: 600;
    font-size: 13px;
    border: 1px solid rgba(0, 0, 0, 0.35);
    border-radius: var(--radius-sm);
    padding: 7px 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 2px 3px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(0, 0, 0, 0.6);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-pelis-blue:hover {
    background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 100%);
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 3px 6px rgba(0, 0, 0, 0.5);
    color: #fff !important;
}
.btn-pelis-blue:active {
    transform: translateY(1px);
    box-shadow: var(--tactile-relief-active);
}

/* Hero Section & Interactive Cinematic Slider */
.hero-banner {
    position: relative;
    width: 100%;
    min-height: 560px;
    height: 68vh;
    max-height: 650px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    margin-bottom: 30px;
    overflow: hidden;
    transition: background-image 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (max-width: 991px) {
    .hero-banner {
        min-height: 520px;
        height: auto;
        max-height: none;
        padding-top: 15px;
        padding-bottom: 25px;
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.96) 20%, rgba(0,0,0,0.75) 55%, rgba(0,0,0,0.3) 100%),
                linear-gradient(to top, #000000 0%, transparent 40%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
    padding: 30px 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.hero-badge-live {
    background: var(--primary-red);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 3px;
    display: inline-block;
    box-shadow: var(--primary-red-glow);
    margin-bottom: 12px;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--text-muted);
}

.hero-meta .rating-tag {
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
    color: #fff;
}

.hero-meta .imdb-badge {
    background: #f5c518;
    color: #000;
    font-weight: 800;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
}

.hero-stars {
    color: #ffbe1a;
    font-size: 12px;
}

.hero-title {
    font-size: 46px;
    line-height: 1.15;
    font-weight: 800;
    margin-bottom: 14px;
    text-shadow: 0 4px 14px rgba(0, 0, 0, 0.9);
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 32px;
    }
}

.hero-desc {
    color: #ccc;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-tags {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 22px;
}
.hero-tags span {
    color: #ff4d58;
}

/* Hero Carousel Right (matching home.png) */
.hero-right-thumbs {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
    margin-left: auto;
}

.thumb-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(15, 15, 20, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}

.thumb-card:hover {
    border-color: rgba(229, 9, 20, 0.6);
    background: rgba(25, 25, 35, 0.85);
    transform: translateX(-4px);
}

.thumb-card.active {
    border-color: var(--primary-red);
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.4), inset 0 0 10px rgba(229, 9, 20, 0.2);
    background: rgba(30, 20, 25, 0.9);
    transform: translateX(-6px);
}

.thumb-card img {
    width: 50px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.thumb-card .thumb-info {
    flex-grow: 1;
    overflow: hidden;
}

.thumb-card .thumb-info h6 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}

.thumb-card.active .thumb-info h6 {
    color: #ff3b30;
}

.thumb-card .thumb-info small {
    color: #8e8e9f;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Hero Slider Dots (for mobile & desktop) */
.hero-slider-dots {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
}

.hero-dot {
    width: 24px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-dot.active {
    background: var(--primary-red);
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.8);
    width: 40px;
}

/* Sections */
.section-wrapper {
    margin-bottom: 45px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-view-all {
    color: var(--primary-red);
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

.section-view-all:hover {
    color: #fff;
    text-decoration: underline;
}

/* Genre Cards (matching home.png) */
.genre-card {
    position: relative;
    height: 120px;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.genre-card .genre-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    transition: var(--transition);
}

.genre-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-red);
    box-shadow: var(--primary-red-glow);
}

.genre-card:hover .genre-overlay {
    background: rgba(229, 9, 20, 0.5);
}

/* Top 10 Section (matching home.png) */
.top10-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #0d0d12;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.top10-card img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.top10-card .top10-number {
    position: absolute;
    bottom: -15px;
    right: 5px;
    font-family: var(--font-heading);
    font-size: 90px;
    font-weight: 900;
    line-height: 1;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.9), 0 0 40px rgba(0, 0, 0, 0.9);
    pointer-events: none;
    -webkit-text-stroke: 2px #222;
}

.top10-card:hover {
    transform: scale(1.04);
    border-color: var(--primary-red);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), var(--primary-red-glow);
    z-index: 5;
}

.top10-card:hover .top10-number {
    color: var(--primary-red);
    -webkit-text-stroke: 2px #fff;
}

/* Movie Poster Grid (5 Columns matching Peliculs.png & home.png) */
.movies-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

@media (max-width: 1200px) {
    .movies-grid-5 {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 992px) {
    .movies-grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 576px) {
    .movies-grid-5 {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

.movie-poster-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #111116;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.movie-poster-card img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.movie-poster-card .card-hover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.8) 50%, rgba(0, 0, 0, 0.4) 100%);
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
    transition: var(--transition);
}

.movie-poster-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-red);
    box-shadow: var(--primary-red-glow);
}

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

.card-hover-overlay .movie-hover-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #fff;
}

.card-hover-overlay .movie-hover-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-hover-overlay .btn-hover-play {
    background: var(--primary-red);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    border: none;
    text-align: center;
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.card-hover-overlay .btn-hover-play:hover {
    background: var(--primary-red-hover);
    box-shadow: var(--primary-red-glow);
}

.card-hover-overlay .btn-hover-fav {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 11px;
    border: none;
    border-radius: var(--radius-sm);
    padding: 5px 8px;
    text-align: center;
    margin-top: 4px;
}

/* Spotlight Section (matching lower part of home.png) */
.spotlight-banner {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border-color);
    margin: 40px 0;
}

.spotlight-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.95) 20%, rgba(0,0,0,0.7) 60%, rgba(0,0,0,0.3) 100%);
}

.spotlight-content {
    position: relative;
    z-index: 2;
    padding: 40px;
    max-width: 650px;
}

/* TV Channels Grid & Cards (matching TV-en-vivo.png) */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

@media (max-width: 1200px) {
    .channels-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 768px) {
    .channels-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 480px) {
    .channels-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.channel-box-card {
    background: #0f1318;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    aspect-ratio: 16/10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.channel-box-card img {
    max-width: 80%;
    max-height: 55px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
    transition: var(--transition);
}

.channel-box-card .channel-name-fallback {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    word-break: break-word;
}

.channel-box-card:hover {
    transform: translateY(-4px);
    border-color: var(--neon-blue);
    box-shadow: var(--neon-blue-glow);
    background: #141c24;
}

.channel-box-card:hover img {
    transform: scale(1.08);
}

.channel-box-card .live-pill {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary-red);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

/* Category Circle Cards (matching TV-en-vivo.png) */
.category-circle-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .category-circle-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.category-icon-card {
    background: #0c0d12;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.category-icon-card .icon-wrap {
    font-size: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.category-icon-card span {
    font-size: 13px;
    font-weight: 600;
    color: #e0e0e0;
}

.category-icon-card:hover, .category-icon-card.active {
    border-color: var(--primary-red);
    background: #14141d;
    box-shadow: 0 4px 16px rgba(229, 9, 20, 0.3);
}

.category-icon-card:hover span {
    color: #fff;
}

/* Filter Sidebar (matching Peliculs.png) */
.filter-sidebar {
    background: #09090c;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
}

.filter-sidebar h5 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-group {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 18px;
    margin-bottom: 18px;
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: #8c8c9e;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #ccc;
    padding: 4px 0;
    cursor: pointer;
    transition: var(--transition);
}

.filter-item:hover {
    color: #fff;
}

.filter-checkbox, .filter-radio {
    accent-color: var(--primary-red);
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.tag-badge {
    background: #181822;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #bbb;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    display: inline-block;
    margin: 3px 2px;
    cursor: pointer;
    transition: var(--transition);
}

.tag-badge:hover, .tag-badge.active {
    background: var(--primary-red);
    color: #fff;
    border-color: var(--primary-red);
}

/* Video Player Modal & Container */
.player-container {
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
}

.player-video {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    display: block;
}

.player-header {
    background: #0a0a0e;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.player-cast-btn {
    background: transparent;
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    font-size: 13px;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.player-cast-btn:hover {
    background: var(--neon-blue);
    color: #000;
    box-shadow: var(--neon-blue-glow);
}

/* Footer (matching home.png & TV-en-vivo.png) */
.pelis-footer {
    background: #040406;
    border-top: 1px solid var(--border-color);
    padding: 50px 0 30px;
    margin-top: 60px;
}

.footer-contact-title {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 4px;
}

.footer-contact-val {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}

.app-badge-btn {
    background: #111116;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    transition: var(--transition);
}

.app-badge-btn:hover {
    background: #1c1c24;
    border-color: #fff;
    color: #fff;
}

.scroll-top-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: var(--primary-red);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--primary-red-glow);
    border: none;
    cursor: pointer;
    z-index: 999;
    transition: var(--transition);
}

.scroll-top-btn:hover {
    transform: translateY(-4px);
    background: var(--primary-red-hover);
}

.accessibility-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 40px;
    height: 40px;
    background: #1a56db;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    z-index: 999;
}

/* ==========================================================================
   MOBILE APP BOTTOM NAVIGATION BAR (PWA NATIVE STYLE)
   ========================================================================== */
.mobile-app-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 62px;
    background: rgba(10, 10, 14, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1040;
    padding: 0 2px;
    box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.85);
}

.mobile-bar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #88889c;
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    flex: 1;
    height: 100%;
    transition: color 0.2s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    position: relative;
}

.mobile-bar-btn i {
    font-size: 17px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.mobile-bar-btn:active {
    transform: scale(0.92);
}

.mobile-bar-btn.active {
    color: #ffffff;
}

.mobile-bar-btn.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: var(--primary-red);
    box-shadow: 0 0 10px var(--primary-red);
    border-radius: 2px;
}

.mobile-bar-btn.active i {
    color: var(--primary-red);
    filter: drop-shadow(0 0 6px rgba(229, 9, 20, 0.8));
    transform: translateY(-1px);
}

.mobile-bar-btn.active span {
    font-weight: 700;
    color: #ffffff;
}

.live-dot-wrap {
    position: relative;
    display: inline-block;
}

.live-pulse-dot {
    position: absolute;
    top: -2px;
    right: -4px;
    width: 6px;
    height: 6px;
    background-color: var(--primary-red);
    border-radius: 50%;
    animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(229, 9, 20, 0.7); }
    70% { transform: scale(1.2); box-shadow: 0 0 0 6px rgba(229, 9, 20, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(229, 9, 20, 0); }
}

@media (max-width: 991px) {
    body {
        padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
    }
    .mobile-app-bottom-bar {
        padding-bottom: env(safe-area-inset-bottom, 0px);
        height: calc(62px + env(safe-area-inset-bottom, 0px));
    }
    .scroll-top-btn {
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
        right: 14px;
        width: 36px;
        height: 36px;
    }
    .accessibility-btn {
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
        left: 14px;
        width: 36px;
        height: 36px;
    }
}

/* ==========================================================================
   MOBILE FULLSCREEN SEARCH OVERLAY
   ========================================================================== */
.mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 5, 8, 0.98);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 2100;
    display: none;
    flex-direction: column;
    padding: 16px;
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
}
.mobile-search-overlay.active {
    display: flex;
}
.mobile-search-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.mobile-search-input {
    flex: 1;
    background: #111116;
    border: 1px solid var(--border-glow-red);
    border-radius: 50px;
    color: #fff;
    padding: 12px 20px;
    font-size: 16px;
    outline: none;
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.2);
}
.mobile-search-close {
    background: #1b1b22;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
}
.mobile-search-results {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   CINEMA MODE & MOBILE CARD ERGONOMICS
   ========================================================================== */
body.cinema-mode-active {
    background: #000000 !important;
}
body.cinema-mode-active .pelis-navbar,
body.cinema-mode-active .pelis-footer,
body.cinema-mode-active .mobile-app-bottom-bar,
body.cinema-mode-active .section-header,
body.cinema-mode-active .section-wrapper:not(#playerSection) {
    opacity: 0.12;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
body.cinema-mode-active #playerSection {
    position: relative;
    z-index: 1050;
}
body.cinema-mode-active .player-container {
    box-shadow: 0 0 60px rgba(0,0,0,1), 0 0 30px rgba(229,9,20,0.5);
}

@media (max-width: 768px) {
    .movie-poster-card {
        border-radius: 8px;
        position: relative;
    }
    .movie-poster-card .card-hover-overlay {
        opacity: 1 !important;
        background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.5) 35%, transparent 65%) !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-end !important;
        padding: 8px !important;
    }
    .movie-poster-card .card-hover-overlay .btn-hover-play,
    .movie-poster-card .card-hover-overlay .btn-hover-fav,
    .movie-poster-card .card-hover-overlay small {
        display: none !important;
    }
    .movie-hover-title {
        font-size: 11px !important;
        font-weight: 700 !important;
        margin-bottom: 2px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .movie-hover-meta {
        font-size: 10px !important;
        gap: 6px !important;
    }
}

/* Mobile Hero Nav Arrows */
.hero-mobile-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(10, 10, 14, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}
.hero-mobile-nav.prev {
    left: 10px;
}
.hero-mobile-nav.next {
    right: 10px;
}
.hero-mobile-nav:active {
    background: var(--primary-red);
    transform: translateY(-50%) scale(0.9);
}

/* PWA App Install Banner */
.pwa-install-banner {
    position: fixed;
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    right: 12px;
    background: rgba(18, 18, 24, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glow-red);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    z-index: 1030;
    box-shadow: 0 10px 30px rgba(0,0,0,0.9), 0 0 15px rgba(229,9,20,0.3);
    animation: slideUpToast 0.4s ease-out;
}
@keyframes slideUpToast {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.pwa-install-banner img {
    width: 38px;
    height: 38px;
    border-radius: 8px;
}
.pwa-btn-install {
    background: var(--primary-red);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    border: none;
    box-shadow: var(--primary-red-glow);
}
.pwa-btn-close {
    background: transparent;
    border: none;
    color: #8e8e9f;
    font-size: 14px;
    padding: 4px;
}

/* Touch active ripples & ergonomics */
@media (hover: none) and (pointer: coarse) {
    .movie-poster-card:active,
    .btn-pelis-red:active,
    .mobile-bar-btn:active,
    .thumb-card:active,
    .btn-hover-play:active,
    .genre-card:active,
    .top10-card:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}

/* ==========================================================================
   TOUCH SLIDER / CAROUSEL PARA ÚLTIMAS PELÍCULAS & EPISODIOS
   ========================================================================== */
.release-slider-wrapper {
    position: relative;
    margin-bottom: 40px;
    padding: 0 4px;
}

.release-slider-container {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none; /* Firefox */
    touch-action: pan-x pan-y !important;
    padding: 6px 4px 16px 4px;
    overscroll-behavior-x: contain;
}

.release-slider-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.release-slider-track {
    display: flex;
    gap: 14px;
}

.release-slide-item {
    flex: 0 0 270px;
    scroll-snap-align: start;
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 768px) {
    .release-slide-item {
        flex: 0 0 235px;
    }
}

@media (max-width: 480px) {
    .release-slide-item {
        flex: 0 0 215px;
    }
}

.release-slide-item:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: var(--shadow-card-hover);
}

.release-slide-item:active {
    transform: scale(0.98);
}

.release-slide-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #181822;
}

.release-slide-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.release-slide-item:hover .release-slide-media img {
    transform: scale(1.06);
}

.release-slide-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.release-slide-item:hover .release-slide-play-overlay {
    opacity: 1;
}

.play-circle-btn {
    width: 46px;
    height: 46px;
    background: var(--primary-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: var(--primary-red-glow);
    font-size: 16px;
    padding-left: 3px;
}

.release-slide-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.badge-new-ep {
    background: linear-gradient(135deg, #00d2ff, #0055ff);
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

.badge-new-movie {
    background: linear-gradient(135deg, #e50914, #ff3b30);
    color: #fff;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.5);
}

.badge-new-anime {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.release-slide-body {
    padding: 12px 14px 14px;
    background: #0f0f15;
}

.release-slide-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.release-slide-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: #8e8e9f;
}

.slider-ctrl-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(15, 15, 20, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.slider-ctrl-btn:hover {
    background: var(--primary-red);
    border-color: var(--primary-red);
    box-shadow: var(--primary-red-glow);
    transform: translateY(-50%) scale(1.1);
}

.slider-ctrl-btn.prev {
    left: -12px;
}

.slider-ctrl-btn.next {
    right: -12px;
}

@media (max-width: 991px) {
    .slider-ctrl-btn {
        display: none !important; /* Hide arrows on mobile touch screens for a cleaner app feel */
    }
}

/* Mobile Player Header & Actions Layout Fixes */
@media (max-width: 768px) {
    .player-header {
        padding: 8px 12px;
        min-height: 48px;
    }
    .player-header strong {
        max-width: 140px;
        display: inline-block;
        font-size: 13px;
    }
    .player-cast-btn {
        padding: 6px 12px;
        font-size: 12px;
        white-space: nowrap;
    }
    #playerWrap iframe {
        touch-action: manipulation;
    }
}

/* ==========================================================================
   SOCIAL SHARE CARD & MINI BUTTONS (Optimized for Mobile Streaming UX)
   ========================================================================== */
.movie-share-summary-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-share-summary-card:hover {
    border-color: rgba(229, 9, 20, 0.4);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), 0 0 15px rgba(229, 9, 20, 0.2);
}

.social-share-mini-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    text-decoration: none;
    font-size: 15px;
    border: none;
    outline: none;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.2s ease, opacity 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.social-share-mini-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.15);
}

.social-share-mini-btn:active {
    transform: scale(0.92);
}

.social-share-mini-btn.btn-wa {
    background: #25D366;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

.social-share-mini-btn.btn-fb {
    background: #1877F2;
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.35);
}

.social-share-mini-btn.btn-x {
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.social-share-mini-btn.btn-tg {
    background: #0088cc;
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.35);
}

.social-share-mini-btn.btn-native {
    background: linear-gradient(135deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    box-shadow: 0 4px 12px rgba(220, 39, 67, 0.4);
}

/* ==========================================================================
   MOBILE SWIPE & SNAP SCROLLING IMPROVEMENTS (PageSpeed & Touch Ergonomics)
   ========================================================================== */
@media (max-width: 768px) {
    /* Touch Carousel for Recommended Grid on Mobile */
    .movies-grid-5 {
        display: flex !important;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 12px;
        padding-bottom: 12px;
        touch-action: pan-x pan-y;
    }
    .movies-grid-5::-webkit-scrollbar {
        display: none;
    }
    .movies-grid-5 .movie-poster-card {
        flex: 0 0 145px;
        scroll-snap-align: start;
        margin-bottom: 0;
    }

    /* Seasons Navigator Chips Touch Swipe */
    .seasons-chips-scroll {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 8px;
        padding: 4px 0;
    }
    .seasons-chips-scroll::-webkit-scrollbar {
        display: none;
    }

    /* Episodes Horizontal Touch Swipe Tray on Mobile (Netflix / HBO Style) */
    .episodes-mobile-tray {
        display: flex !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x proximity !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none;
        gap: 10px;
        padding-bottom: 14px;
        padding-top: 4px;
        touch-action: pan-x pan-y !important;
        overscroll-behavior-x: contain;
    }
    .episodes-mobile-tray::-webkit-scrollbar {
        display: none;
    }
    .episodes-mobile-tray > .col {
        flex: 0 0 220px !important;
        min-width: 220px;
        scroll-snap-align: start;
    }

    /* Player Container Fullscreen Safe Area */
    .player-container:fullscreen,
    .player-container:-webkit-full-screen {
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        background: #000 !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }
}

/* ==========================================================================
   TACTILE RELIEF & MINIMALIST COMPONENT SYSTEM
   ========================================================================== */

/* Dark Tactile Relief Buttons (Plastic Bevel Effect) */
.btn-tactile-dark {
    background: linear-gradient(180deg, #1b1c26 0%, #12131b 100%) !important;
    color: #d1d3e2 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: var(--tactile-relief-dark) !important;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.btn-tactile-dark:hover {
    background: linear-gradient(180deg, #222430 0%, #171822 100%) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    transform: translateY(-1px);
    box-shadow: var(--tactile-relief-dark-hover) !important;
}

.btn-tactile-dark:active {
    transform: translateY(1px);
    box-shadow: var(--tactile-relief-active) !important;
}

/* Server Selector Tactile Buttons */
.server-select-btn {
    border-radius: var(--radius-sm) !important;
    font-size: 13px !important;
    padding: 6px 14px !important;
    cursor: pointer;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.server-select-btn.active,
.server-select-btn.btn-danger {
    background: linear-gradient(180deg, #ed1c24 0%, #d80b15 100%) !important;
    border: 1px solid rgba(0, 0, 0, 0.4) !important;
    color: #fff !important;
    box-shadow: var(--tactile-relief-red) !important;
    font-weight: 600 !important;
}

.server-select-btn.btn-outline-secondary,
.server-select-btn:not(.active):not(.btn-danger) {
    background: linear-gradient(180deg, #1b1c26 0%, #12131b 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #9da0b5 !important;
    box-shadow: var(--tactile-relief-dark) !important;
}

.server-select-btn:hover {
    transform: translateY(-1px);
}

.server-select-btn:active {
    transform: translateY(1px);
    box-shadow: var(--tactile-relief-active) !important;
}

/* Season Navigator Tabs */
.season-tab-btn {
    border-radius: var(--radius-sm) !important;
    padding: 6px 16px !important;
    font-size: 13px !important;
    cursor: pointer;
    transition: var(--transition);
}

.season-tab-btn.active {
    background: linear-gradient(180deg, #ed1c24 0%, #d80b15 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.4) !important;
    box-shadow: var(--tactile-relief-red) !important;
}

.season-tab-btn:not(.active) {
    background: linear-gradient(180deg, #1b1c26 0%, #12131b 100%) !important;
    color: #8c8ea3 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: var(--tactile-relief-dark) !important;
}

.season-tab-btn:hover:not(.active) {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
}


