:root {
    --primary-pink: #ea005e;
    --primary-orange: #ff6b3d;
    --text-dark: #333;
    --text-light: #fff;
    --border-radius-main: 20px;
    --border-radius-pill: 50px;
    --font-main: 'Montserrat', sans-serif;
    --bg-color: #fff;
    --content-max-width: 95%; /* 1600px max, or just use 95% to fill most of the screen */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 40px 20px;
}

/* Navbar */
.navbar {
    position: relative;
    height: 80px;
    border-radius: var(--border-radius-main);
    overflow: visible;
    display: flex;
    align-items: center;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(234, 0, 94, 0.15);
}

.navbar-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius-main);
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.nav-content {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0 25px;
}

.nav-left {
    margin-right: 50px;
    /* Space between logo and menu items */
}

.nav-left .logo {
    height: 35px;
    object-fit: contain;
}

.nav-center {
    display: flex;
    gap: 40px;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: opacity 0.2s;
}

.nav-link:not(.active) {
    opacity: 0.9;
}

.nav-link:hover {
    opacity: 1;
}

.nav-link.active {
    color: #ffcc00;
    /* Matching the yellowish orange for 'Home' in the design */
    font-weight: 700;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
    /* Push to the far right */
}

.search-pill {
    background: var(--text-light);
    border-radius: 25px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), justify-content 0.3s, padding 0.3s;
    position: relative;
}

.search-pill.expanded {
    width: 280px;
    justify-content: flex-start;
    padding-left: 15px;
    cursor: default;
}

.search-pill img {
    width: 18px;
    height: auto;
    flex-shrink: 0;
}

#global-search-input {
    width: 0;
    opacity: 0;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.9rem;
    color: #121212;
    margin-left: 0;
    transition: width 0.3s ease, opacity 0.2s ease, margin 0.3s ease;
}

.search-pill.expanded #global-search-input {
    width: calc(100% - 30px);
    opacity: 1;
    margin-left: 10px;
}

.search-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    width: 320px;

    background: white;
    border: 2px solid transparent;
    background-clip: padding-box, border-box;
    background-origin: padding-box, border-box;
    background-image: linear-gradient(white, white), var(--primary-gradient);
    border-radius: 12px;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.search-dropdown.show {
    display: flex;
}

.search-result-item {
    display: flex;
    padding: 12px;
    gap: 12px;
    cursor: pointer;
    border-bottom: 1px solid #eaeaea;
    transition: background 0.2s;
    text-decoration: none;
    color: var(--text-dark);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f8f9fa;
}

.search-result-thumb {
    width: 80px;
    height: 45px;
    object-fit: cover;
    border-radius: 6px;
    background: #000;
}

.search-result-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.search-result-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-type {
    font-size: 0.75rem;
    color: #ff1a8c;
    margin: 2px 0 0 0;
    font-weight: 600;
}

.user-pill {
    background: var(--text-light);
    border-radius: var(--border-radius-pill);
    height: 45px;
    display: flex;
    align-items: center;
    padding: 0 5px 0 20px;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.username {
    color: var(--primary-pink);
    font-weight: 700;
    font-size: 1.05rem;
}

.ro-id-container {
    position: relative;
    height: 35px;
    width: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ro-icon-base {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}

.ro-avatar {
    position: absolute;
    top: 2px;
    left: 2px;
    height: calc(100% - 4px);
    width: calc(100% - 4px);
    border-radius: 50%;
    z-index: 1;
    object-fit: cover;
}

/* Sections */
.section-title {
    color: var(--primary-pink);
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

/* Live Banner */
.live-banner {
    display: flex;
    height: 300px;
    border-radius: var(--border-radius-main);
    overflow: hidden;
    margin-bottom: 50px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.live-banner-left {
    flex: 0 0 35%;
    background-image: url('assets/GradientSfondo.png');
    background-size: cover;
    background-position: center left;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--text-light);
}

.live-tag {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 10px;
    text-transform: uppercase;
    opacity: 0.9;
}

.live-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.live-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-watch {
    background: var(--text-light);
    color: var(--primary-pink);
    border: none;
    border-radius: var(--border-radius-pill);
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-main);
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.btn-watch:hover {
    transform: scale(1.05);
}

.btn-bookmark {
    background: var(--text-light);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.btn-bookmark:hover {
    transform: scale(1.1);
}

.btn-bookmark img {
    width: 22px;
    height: auto;
}

.live-banner-right {
    flex: 2;
    position: relative;
    overflow: hidden;
    background-color: #000;
}

.live-banner-right iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.live-image-main {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.live-indicators {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.indicator {
    background: var(--text-light);
    color: var(--primary-pink);
    border-radius: var(--border-radius-pill);
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0 15px;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s;
}

.indicator:hover {
    transform: scale(1.05);
}

.indicator img {
    width: 16px;
    height: auto;
}

.indicator.mute {
    width: 35px;
    padding: 0;
    border-radius: 50%;
}

/* Categories */
.category {
    margin-bottom: 40px;
}

.category-title {
    color: var(--primary-pink);
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    /* Space for shadow */
}

.carousel::-webkit-scrollbar {
    height: 8px;
}

.carousel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.carousel::-webkit-scrollbar-thumb {
    background: var(--primary-pink);
    border-radius: 4px;
}

.carousel::-webkit-scrollbar-thumb:hover {
    background: #c2185b;
}

.poster {
    width: 220px;
    height: 320px;
    object-fit: cover;
    border-radius: var(--border-radius-main);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #222;
}

.poster:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Footer */
.footer {
    position: relative;
    padding: 0;
    overflow: hidden;
    margin-top: 50px;
    border-top-left-radius: var(--border-radius-main);
    border-top-right-radius: var(--border-radius-main);
}

.footer-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.footer-content {
    position: relative;
    z-index: 2;
    padding: 60px 40px 40px;
    max-width: var(--content-max-width);
    margin: 0 auto;
}

.social-banner {
    background: var(--text-light);
    border-radius: var(--border-radius-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 40px;
    margin-bottom: 50px;
    box-shadow: 0 15px 30px rgba(234, 0, 94, 0.2);
}

.social-text {
    color: var(--primary-pink);
    font-weight: 800;
    font-size: 1.5rem;
}

.social-icons {
    display: flex;
    gap: 20px;
}

.social-icon {
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: transform 0.2s;
}

.social-icon:hover {
    transform: scale(1.1);
}

.social-icons .social-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.footer-brand .footer-logo {
    height: 45px;
    margin-bottom: 10px;
}

.copyright {
    color: var(--text-light);
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.9;
}

.footer-links {
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    gap: 15px;
    align-items: center;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: opacity 0.2s;
}

.footer-links a:hover {
    opacity: 0.7;
}

.separator {
    opacity: 0.5;
}

/* Details Panel */
.details-panel {
    display: none;
    position: relative;
    height: 300px;
    border-radius: var(--border-radius-main);
    margin-top: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.details-pointer {
    position: absolute;
    top: -8px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #ff7b42 0%, #ea005e 100%);
    transform: rotate(45deg);
    border-radius: 3px;
    z-index: 0;
    transition: left 0.3s ease;
}

.details-panel-left {
    flex: 0 0 40%;
    background-image: url('assets/GradientSfondo.png');
    background-size: cover;
    background-position: center left;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--text-light);
    z-index: 1;
    border-top-left-radius: var(--border-radius-main);
    border-bottom-left-radius: var(--border-radius-main);
}

.details-tag {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 5px;
    text-transform: uppercase;
    opacity: 0.9;
}

.details-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 5px;
}

.details-subtitle {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 30px;
    opacity: 0.8;
}

.details-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-play {
    background: var(--text-light);
    color: var(--primary-pink);
    border: none;
    border-radius: var(--border-radius-pill);
    padding: 10px 25px;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-main);
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-play:hover {
    transform: scale(1.05);
}

.play-icon {
    width: 14px;
    height: auto;
}

.btn-circle {
    background: var(--text-light);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.btn-circle:hover {
    transform: scale(1.1);
}

.btn-circle img {
    width: 20px;
    height: auto;
}

.details-panel-right {
    flex: 1;
    position: relative;
    background-color: #000;
    z-index: 1;
    border-top-right-radius: var(--border-radius-main);
    border-bottom-right-radius: var(--border-radius-main);
    overflow: hidden;
}

.details-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--text-light);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 10;
    transition: transform 0.2s;
}

.btn-close:hover {
    transform: scale(1.1);
}

.btn-close img {
    width: 20px;
    height: auto;
}

/* =========================================
   NEW COMPONENTS (Events, News, Profile) 
   ========================================= */

/* Mini Player (Floating) */
.global-player.is-pip {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    height: 180px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.global-player.is-pip-top {
    height: 40px;
    background-image: url('assets/GradientSfondo.png');
    background-size: cover;
    background-position: center left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    color: var(--text-light);
}

.global-player.is-pip-info {
    display: flex;
    flex-direction: column;
}

.global-player.is-pip-tag {
    font-size: 0.7rem;
    font-weight: 800;
}

.global-player.is-pip-title {
    font-size: 0.6rem;
    opacity: 0.9;
}

.global-player.is-pip-actions {
    display: flex;
    gap: 10px;
}

.global-player.is-pip-btn {
    background: var(--text-light);
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.global-player.is-pip-btn img {
    width: 10px;
}

.global-player.is-pip-video {
    flex: 1;
    background-color: #000;
    position: relative;
}

.global-player.is-pip-video img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.global-player.is-pip-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
}

.global-player.is-pip-indicator {
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius-pill);
    padding: 4px 10px;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--primary-pink);
    display: flex;
    align-items: center;
    gap: 3px;
}

.global-player.is-pip-indicator img {
    width: 10px;
}

/* Date Picker (Events) */
.events-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.btn-calendar {
    background-color: var(--primary-pink);
    color: var(--text-light);
    border: none;
    border-radius: var(--border-radius-pill);
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: var(--font-main);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(234, 0, 94, 0.3);
}

.btn-calendar img {
    width: 16px;
    filter: brightness(0) invert(1);
}

.date-picker-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
}

.date-arrow {
    color: var(--primary-pink);
    font-size: 1.5rem;
    cursor: pointer;
    user-select: none;
    font-weight: bold;
}

.date-cards {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
}

.date-cards::-webkit-scrollbar {
    display: none;
}

.date-card {
    background-image: url('assets/GradientSfondo.png');
    background-size: 200% 100%;
    /* Make gradient wider */
    background-position: left center;
    color: var(--text-light);
    border-radius: 15px;
    width: 90px;
    height: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.date-card.active {
    transform: scale(1.05);
    border: 3px solid #ffcc00;
    /* Just an example active state highlight */
}

.date-card:hover {
    transform: translateY(-5px);
}

.date-day {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.date-num {
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1;
}

.date-month {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 2px;
}

.date-events {
    font-size: 0.65rem;
    font-weight: 500;
    opacity: 0.9;
    margin-top: 8px;
}

/* News Card */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.news-card {
    background-image: url('assets/GradientSfondo.png');
    background-size: cover;
    background-position: center;
    border-radius: var(--border-radius-main);
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
    color: var(--text-light);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-card-content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
}

.news-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.news-tag {
    background: var(--text-light);
    color: var(--primary-pink);
    font-size: 0.6rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: var(--border-radius-pill);
    text-transform: uppercase;
}

.news-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 2px;
}

.news-subtitle {
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0.9;
}

.news-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.news-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}

.news-toggle-btn {
    background: transparent;
    color: var(--primary-pink);
    border: none;
    font-size: 1.5rem;
    font-weight: 800;
    cursor: pointer;
    font-family: var(--font-main);
}

.news-toggle-btn.active {
    background-color: #2b308b;
    /* dark blue */
    color: white;
    padding: 5px 15px;
    border-radius: 8px;
}

/* Action Buttons */
.action-btn {
    background-color: var(--primary-pink);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(234, 0, 94, 0.3);
    transition: transform 0.2s;
}

.action-btn:hover {
    transform: scale(1.1);
}

.action-btn img {
    width: 20px;
    filter: brightness(0) invert(1);
}

/* Article Page */
.article-container {
    display: flex;
    gap: 40px;
    margin-top: 20px;
}

.article-left {
    flex: 1;
}

.article-right {
    flex: 1;
}

.article-main-title {
    color: var(--primary-pink);
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 10px;
}

.article-subtitle {
    color: var(--primary-pink);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 30px;
}

.article-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

.article-actions .btn-play {
    padding: 10px 30px;
    font-size: 1.1rem;
    background-color: var(--primary-pink);
    color: white;
    box-shadow: 0 5px 15px rgba(234, 0, 94, 0.3);
}

.article-actions .btn-play img {
    filter: brightness(0) invert(1);
}

.article-h2 {
    color: var(--primary-pink);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.article-p {
    color: var(--primary-pink);
    font-size: 1.1rem;
    line-height: 1.5;
}

.article-image {
    width: 100%;
    border-radius: var(--border-radius-main);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Profile Page */
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.profile-r {
    font-size: 8rem;
    font-weight: 900;
    color: var(--primary-pink);
    line-height: 1;
}

.profile-id {
    font-size: 5rem;
    font-weight: 900;
    color: var(--primary-pink);
    line-height: 1;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background: url('assets/GradientSfondo.png') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.profile-avatar img {
    width: 90%;
    height: 90%;
    object-fit: cover;
}

.saved-item {
    position: relative;
    display: inline-block;
}

.saved-bookmark {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.saved-bookmark img {
    width: 16px;
    filter: invert(24%) sepia(99%) saturate(5833%) hue-rotate(334deg) brightness(97%) contrast(106%);
    /* Make it pink */
}

/* Page Loader Overlay */
#loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease-out;
}

#loader-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

#loader-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   THEATER MODE (PLAYER PAGE)
   ========================================================================== */


.theater-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.theater-player-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #000;
    border-radius: var(--border-radius-main);
    overflow: hidden;
    /* Soft Ambilight effect to reduce eye strain */
    box-shadow: 0 0 80px 20px rgba(255, 60, 120, 0.15),
        0 0 120px 40px rgba(255, 200, 100, 0.1);
    transition: box-shadow 0.5s ease;
}

.theater-player-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
    /* Prevent clicking the iframe to show YT controls */
}

.theater-click-shield {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    /* Above video and cover, below controls */
    cursor: pointer;
}

.theater-loading-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    /* Pure black to hide YouTube UI completely */
    z-index: 4;
    /* Below shield, above iframe */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.theater-loading-cover.hide {
    opacity: 0;
}

.rotv-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 0, 102, 0.3);
    border-top: 4px solid var(--primary-pink);
    border-radius: 50%;
    animation: rotv-spin 1s linear infinite;
}

@keyframes rotv-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   END SCREEN
   ========================================================================== */
.theater-end-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    z-index: 15;
    /* Above video and shield, below controls (or we can hide controls when ended) */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.end-screen-content {
    width: 90%;
    height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 20px;
}

.end-screen-restart-btn {
    background: var(--primary-pink);
    color: #fff;
    border: none;
    border-radius: var(--border-radius-pill);
    padding: 12px 24px;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    margin-bottom: 20px;
}

.end-screen-restart-btn:hover {
    transform: scale(1.05);
    background: #ff1a75;
}

.end-screen-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    align-self: flex-start;
}

.end-screen-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    width: 100%;
    overflow-y: auto;
    padding-bottom: 20px;
}

.end-screen-card {
    background: #222;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
    aspect-ratio: 16/9;
}

.end-screen-card:hover {
    transform: scale(1.05);
    z-index: 2;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.end-screen-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.end-screen-card-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 900px) {
    .end-screen-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .end-screen-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.theater-controls-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.9) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.theater-player-wrapper:hover .theater-controls-overlay {
    opacity: 1;
}

.theater-video-title {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    margin: 0;
}

.theater-bottom-bar {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.timeline-container {
    width: 100%;
    height: 10px;
    padding: 5px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.timeline-bar {
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    position: relative;
    transition: height 0.2s;
}

.timeline-container:hover .timeline-bar {
    height: 6px;
}

.timeline-progress {
    height: 100%;
    background-color: var(--primary-pink);
    width: 0%;
    border-radius: 2px;
    position: relative;
}

.timeline-progress::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 12px;
    height: 12px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.timeline-container:hover .timeline-progress::after {
    transform: translateY(-50%) scale(1);
}

.theater-buttons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.theater-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theater-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.theater-btn img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
    /* Make icons white */
}

.theater-time {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.theater-spacer {
    flex: 1;
}

/* Fullscreen mode fixes */
.theater-player-wrapper:fullscreen {
    border-radius: 0;
    max-width: 100%;
    height: 100vh;
}

.theater-seek-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 15px 30px;
    border-radius: var(--border-radius-pill);
    font-size: 1.5rem;
    font-weight: 800;
    pointer-events: none;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.3s;
}

.theater-seek-indicator.show {
    opacity: 1;
    transition: none;
    /* instant appear */
}

/* ==========================================================================
   GLOBAL PERSISTENT PLAYER
   ========================================================================== */
.global-player {
    z-index: 999;
    background: #000;
    overflow: hidden;
    border-radius: var(--border-radius);
    transform: translateZ(0);
    /* Fix for iframe clipping */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.global-player.is-banner {
    position: absolute;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.global-player.is-banner .global-player-top {
    display: none !important;
}

.global-player.is-pip {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    height: 180px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
}

.global-player.is-pip .global-player-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-color);
}

.global-player-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.global-player-tag {
    background: var(--primary-pink);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    white-space: nowrap;
}

.global-player-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.global-player-actions {
    display: flex;
    gap: 5px;
}

.global-player-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.global-player-btn:hover {
    opacity: 1;
}

.global-player-btn img {
    width: 24px;
    height: 24px;
}

[data-theme="dark"] .global-player-btn img {
    filter: brightness(0) invert(1);
}

.global-player-video {
    width: 100%;
    flex: 1;
    position: relative;
    background: #000;
    overflow: hidden;
    transform: translateZ(0);
    border-radius: var(--border-radius);
}

#global-youtube-player {
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius) !important;
}

.global-player.is-pip #global-youtube-player {
    border-radius: 0 !important;
    border-bottom-left-radius: var(--border-radius) !important;
    border-bottom-right-radius: var(--border-radius) !important;
}

.global-player.is-pip .global-player-video {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

.global-player-controls {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.global-player:hover .global-player-controls {
    opacity: 1;
}

.global-player-indicator {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: var(--border-radius-pill);
    pointer-events: auto;
    transition: background 0.2s;
}

.global-player-indicator:hover {
    background: rgba(255, 255, 255, 0.3);
}

.global-player-indicator img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

/* ==========================================================================
   PROGRAM DETAILS PAGE
   ========================================================================== */

.program-page-main {
    padding: 0 40px;
    margin-top: 40px;
}

.program-container {
    display: flex;
    gap: 40px;
    align-items: stretch;
}

.program-left {
    flex: 1;
    max-width: 60%;
}

.program-title {
    font-size: 5rem;
    color: var(--primary-pink);
    margin: 0 0 20px 0;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
}

.program-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    align-items: center;
}

.prog-btn-play {
    background: var(--primary-pink);
    border-radius: 30px;
    padding: 12px 30px;
    border: none;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    transition: transform 0.2s;
}

.prog-btn-play:hover {
    transform: scale(1.05);
}

.prog-btn-circle {
    background: var(--primary-pink);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.prog-btn-circle:hover {
    transform: scale(1.1);
}

.prog-btn-circle img,
.prog-btn-play img {
    filter: brightness(0) invert(1);
    height: 24px;
}

.program-divider {
    border: none;
    border-top: 2px solid var(--primary-pink);
    margin-bottom: 30px;
}

.season-select-container {
    margin-bottom: 30px;
}

.season-select {
    background: var(--primary-pink);
    color: white;
    padding: 8px 30px 8px 20px;
    border-radius: 20px;
    border: none;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    font-size: 1rem;
    position: relative;
}

.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding-bottom: 50px;
}

/* Subcategory sections (used when a season has subcategories) */
.subcategory-section {
    margin-bottom: 40px;
}

.subcategory-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-pink);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    margin-top: 8px;
}

.episodes-carousel {
    display: flex;
    flex-direction: row;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.episodes-carousel::-webkit-scrollbar {
    height: 6px;
}

.episodes-carousel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.episodes-carousel::-webkit-scrollbar-thumb {
    background: var(--primary-pink);
    border-radius: 4px;
}

.episodes-carousel .episode-card {
    flex: 0 0 240px;
    min-width: 200px;
    max-width: 240px;
    scroll-snap-align: start;
}

@media (max-width: 600px) {
    .episodes-carousel .episode-card {
        flex: 0 0 75vw;
        max-width: 75vw;
    }
}


.episode-card {
    border-radius: 12px;
    overflow: hidden;
    background: var(--primary-pink);
    color: white;
    cursor: pointer;
    transition: transform 0.2s;
}

.episode-card:hover {
    transform: scale(1.02);
}

.episode-thumbnail-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
}

.episode-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.episode-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.2s;
}

.episode-card:hover .episode-play-overlay {
    opacity: 1;
}

.episode-play-overlay img {
    width: 40px;
    height: 40px;
    filter: brightness(0) invert(1);
}

.episode-info {
    padding: 15px;
}

.episode-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0 0 5px 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.episode-description {
    font-size: 0.85rem;
    opacity: 0.9;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.program-right {
    flex: 1;
    max-width: 40%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.program-banner {
    width: 100%;
    object-fit: cover;
    border-radius: 20px;
    max-height: 800px;
}

@media (max-width: 1024px) {
    .program-container {
        flex-direction: column;
    }

    .program-left,
    .program-right {
        max-width: 100%;
    }

    .program-title {
        font-size: 3rem;
    }
}

.program-container {
    display: flex;
    gap: 40px;
    align-items: stretch;
}

.program-left {
    flex: 1;
    max-width: 60%;
}

.program-title {
    font-size: 5rem;
    color: var(--primary-pink);
    margin: 0 0 20px 0;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
}

.program-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    align-items: center;
}

.prog-btn-play {
    background: var(--primary-pink);
    border-radius: 30px;
    padding: 12px 30px;
    border: none;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    transition: transform 0.2s;
}

.prog-btn-play:hover {
    transform: scale(1.05);
}

.prog-btn-circle {
    background: var(--primary-pink);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.prog-btn-circle:hover {
    transform: scale(1.1);
}

.prog-btn-circle img,
.prog-btn-play img {
    filter: brightness(0) invert(1);
    height: 24px;
}

.program-divider {
    border: none;
    border-top: 2px solid var(--primary-pink);
    margin-bottom: 30px;
}

.season-select-container {
    margin-bottom: 30px;
}

.season-select {
    background: var(--primary-pink);
    color: white;
    padding: 8px 30px 8px 20px;
    border-radius: 20px;
    border: none;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    font-size: 1rem;
    position: relative;
}

.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding-bottom: 50px;
}

.episode-card {
    border-radius: 12px;
    overflow: hidden;
    background: var(--primary-pink);
    color: white;
    cursor: pointer;
    transition: transform 0.2s;
}

.episode-card:hover {
    transform: scale(1.02);
}

.episode-thumbnail-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
}

.episode-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.episode-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.2s;
}

.episode-card:hover .episode-play-overlay {
    opacity: 1;
}

.episode-play-overlay img {
    width: 40px;
    height: 40px;
    filter: brightness(0) invert(1);
}

.episode-info {
    padding: 15px;
}

.episode-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0 0 5px 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.episode-description {
    font-size: 0.85rem;
    opacity: 0.9;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.program-right {
    flex: 1;
    max-width: 40%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.program-banner {
    width: 100%;
    object-fit: cover;
    border-radius: 20px;
    max-height: 800px;
}

@media (max-width: 1024px) {
    .program-container {
        flex-direction: column;
    }

    .program-left,
    .program-right {
        max-width: 100%;
    }

    .program-title {
        font-size: 3rem;
    }
}

/* ==========================================================================
   PLAYLIST SIDEBAR (PLAYER PAGE)
   ========================================================================== */
.sidebar-wrapper {
    width: 350px;
    position: relative;
}

.player-sidebar {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: #111;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.playlist-header {
    padding: 20px;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
}

.playlist-header-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: #fff;
}

.playlist-header-subtitle {
    font-size: 0.9rem;
    color: #aaa;
    margin: 0;
}

.playlist-items {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.playlist-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 10px;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.playlist-item.active {
    background: rgba(255, 255, 255, 0.15);
}

.playlist-item-thumbnail-container {
    position: relative;
    width: 120px;
    height: 68px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.playlist-item-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.playlist-item-playing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.playlist-item-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.playlist-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.playlist-item-desc {
    font-size: 0.8rem;
    color: #aaa;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Adjust theater container for sidebar */
.theater-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: stretch;
}

@media (max-width: 900px) {
    .theater-container {
        flex-direction: column;
        height: auto;
    }

    .theater-player-wrapper {
        height: 50vh;
        width: 100%;
    }

    .sidebar-wrapper {
        width: 100%;
        height: 50vh;
        margin-top: 15px;
    }
}

/* Login Overlay */
.login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(18, 18, 18, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.login-modal {
    background: #1a1a1a;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #444;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.login-logo {
    width: 150px;
    margin-bottom: 10px;
}

.login-modal h2 {
    margin: 0;
    font-size: 24px;
    color: white;
}

.login-input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #444;
    background: #222;
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    outline: none;
}

.login-input:focus {
    border-color: #6a00ff;
}

.login-btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: #6a00ff;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.login-btn:hover {
    background: #5500cc;
}

.login-error {
    color: #ff4444;
    margin: 0;
    font-size: 14px;
    text-align: center;
}

/* Gradient Info Card */
.theater-info-card {
    background-image: url('assets/GradientSfondo.png');
    background-size: cover;
    background-position: center;
    border-radius: 16px;
    padding: 30px;
    color: white;
    margin-top: 20px;
    box-shadow: 0 10px 30px rgba(255, 26, 140, 0.3);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

.info-program-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    opacity: 0.9;
}

.info-video-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.1;
}

.info-description-container {
    width: 100%;
}

.info-video-desc {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
    opacity: 0.9;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: pre-wrap;
    word-break: break-word;
}

.info-video-desc.expanded {
    -webkit-line-clamp: unset;
    display: block;
}

.info-show-more {
    background: white;
    color: #ff1a8c;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: transform 0.2s;
}

.info-show-more:hover {
    transform: scale(1.05);
}

.info-show-more img {
    filter: invert(30%) sepia(87%) saturate(5831%) hue-rotate(320deg) brightness(98%) contrast(106%);
    transition: transform 0.3s ease;
}

.info-show-more.expanded img {
    transform: rotate(180deg);
}

/* ============================================================
   TOP 10 TRENDING SECTION
   ============================================================ */
.trending-section {
    margin-bottom: 48px;
}

.trending-carousel-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.trending-scroll-btn {
    position: absolute;
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.trending-scroll-btn:hover {
    background: rgba(234, 0, 94, 0.8);
    border-color: var(--primary-pink);
    transform: scale(1.1);
}

.trending-scroll-btn img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.trending-scroll-btn.left {
    left: -10px;
}

.trending-scroll-btn.left img {
    transform: rotate(90deg);
}

.trending-scroll-btn.right {
    right: -10px;
}

.trending-scroll-btn.right img {
    transform: rotate(-90deg);
}

@media (max-width: 768px) {
    .trending-scroll-btn {
        display: none;
    }
}

.trending-track-wrapper {
    position: relative;
    width: 100%;
    /* Apply fade out at the left and right edges */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.trending-track {
    display: flex;
    flex-direction: row;
    gap: 0;
    overflow-x: auto;
    padding: 16px 0 24px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
}

.trending-track::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Each item = big rank number + poster card */
.trending-item {
    display: flex;
    align-items: flex-end;
    flex-shrink: 0;
    scroll-snap-align: start;
    /* negative margin lets the rank number overlap the previous poster */
    margin-right: -28px;
}

.trending-item:first-child {
    margin-left: 0;
}

/* The giant rank number */
.trending-rank {
    font-family: var(--font-main);
    font-size: 9rem;
    font-weight: 900;
    line-height: 1;
    /* Outlined / transparent fill like RaiPlay */
    color: transparent;
    -webkit-text-stroke: 3px rgba(234, 0, 94, 0.55);
    text-stroke: 3px rgba(234, 0, 94, 0.55);
    /* subtle drop shadow */
    filter: drop-shadow(0 2px 8px rgba(234, 0, 94, 0.25));
    user-select: none;
    pointer-events: none;
    position: relative;
    z-index: 1;
    /* shift it slightly down so it aligns with poster bottom */
    transform: translateY(8px);
    /* shrink a bit for double-digit numbers */
    flex-shrink: 0;
    min-width: 80px;
    text-align: right;
}

/* Poster wrapper (handles hover overlay) */
.trending-poster-wrap {
    position: relative;
    width: 140px;
    flex-shrink: 0;
    z-index: 2;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.trending-poster-wrap:hover {
    transform: scale(1.05) translateY(-4px);
    box-shadow: 0 16px 40px rgba(234, 0, 94, 0.3);
}

.trending-poster {
    display: block;
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
}

/* Hover overlay with info button */
.trending-poster-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 14px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.trending-poster-wrap:hover .trending-poster-overlay {
    opacity: 1;
}

.trending-info-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}

.trending-info-btn:hover {
    background: rgba(234, 0, 94, 0.7);
    border-color: var(--primary-pink);
}

.trending-info-btn img {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);
}

@media (max-width: 600px) {
    .trending-rank {
        font-size: 6rem;
        min-width: 56px;
    }
    .trending-poster-wrap {
        width: 110px;
    }
    .trending-item {
        margin-right: -20px;
    }
}


/* NEW PROGRAM PAGE STYLES */
.new-program-banner-container {
    position: relative;
    border-radius: var(--border-radius-main);
    overflow: hidden;
    width: 100%;
    height: 350px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.new-program-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.new-program-banner-overlay {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 40px;
    height: 100%;
    background: rgba(254, 11, 112, 0.5); /* #FE0B70 50% overlay */
}

.new-program-title {
    font-size: 3.5rem;
    color: white;
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
    max-width: 60%;
    text-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.new-program-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.action-row-1 {
    display: flex;
    gap: 15px;
}

.action-row-2 {
    display: flex;
    width: 100%;
}

.new-prog-btn-circle {
    background: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.new-prog-btn-circle:hover {
    transform: scale(1.1);
}

.new-prog-btn-play {
    background: white;
    color: #FE0B70;
    border-radius: 30px;
    padding: 12px 0;
    border: none;
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: transform 0.2s;
    width: 100%;
}

.new-prog-btn-play:hover {
    transform: scale(1.05);
}

.new-prog-btn-circle img, .new-prog-btn-play img {
    height: 20px;
    /* Filter to match #FE0B70 precisely */
    filter: invert(27%) sepia(99%) saturate(4975%) hue-rotate(326deg) brightness(97%) contrast(110%);
}

@media (max-width: 900px) {
    .new-program-banner-overlay {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-end;
        gap: 20px;
    }
    .new-program-title {
        font-size: 2.5rem;
        max-width: 100%;
    }
}


.subcategory-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.subcategory-tab-btn {
    background: #FE0B70;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    transition: transform 0.2s, opacity 0.2s;
    opacity: 0.8;
}
.subcategory-tab-btn.active {
    opacity: 1;
    transform: scale(1.05);
}
.subcategory-tab-btn:hover {
    opacity: 1;
}


.season-select { background: #FE0B70; }
.episode-card { background: #FE0B70; }




