/* ==================== RESET Y ESTILOS BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #000000;
    color: #ffffff;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #e50914;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #f40612;
}

/* ==================== NAVBAR ==================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.1) 100%);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    transition: background 0.3s;
    flex-wrap: wrap;
    gap: 10px;
}

.navbar .logo {
    font-size: 28px;
    font-weight: 700;
    color: #e50914;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: default;
}

.nav-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search-container input {
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid #555;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 14px;
    width: 220px;
    transition: 0.3s;
}

.search-container input:focus {
    outline: none;
    border-color: #e50914;
    width: 280px;
}

.search-container input::placeholder {
    color: #888;
}

.search-container button {
    background: #e50914;
    border: none;
    color: white;
    padding: 8px 18px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    font-size: 14px;
}

.search-container button:hover {
    background: #f40612;
    transform: scale(1.02);
}

.search-container .clear-btn {
    background: #555;
    display: none;
}

.search-container .clear-btn:hover {
    background: #777;
}

.search-container .clear-btn.visible {
    display: inline-block;
}

/* ==================== NAVBAR RESPONSIVE ==================== */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 8px;
        padding: 12px 16px;
        background: rgba(0,0,0,0.95);
    }

    .navbar .logo {
        font-size: 22px;
        text-align: center;
        width: 100%;
    }

    .nav-buttons {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }

    .search-container {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }

    .search-container input {
        width: 100%;
        flex: 1;
        font-size: 0.85rem;
        padding: 8px 14px;
        min-width: 0;
    }

    .search-container input:focus {
        width: 100%;
    }

    .search-container button {
        font-size: 0.8rem;
        padding: 8px 14px;
        flex: 1;
    }

    .search-container .clear-btn {
        flex: 0.5;
    }
}

@media (max-width: 480px) {
    .navbar .logo {
        font-size: 18px;
    }

    .search-container input {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .search-container button {
        font-size: 0.7rem;
        padding: 6px 12px;
    }
}

/* ==================== HERO / PORTADA ==================== */
.hero {
    margin-top: 70px;
    height: 80vh;
    min-height: 500px;
    display: flex;
    align-items: flex-end;
    padding: 0 60px 80px 60px;
    background-size: cover;
    background-position: top center;
    position: relative;
    transition: background 1s ease;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, #000000, transparent);
}

.hero-content {
    max-width: 50%;
    position: relative;
    z-index: 2;
    animation: fadeIn 0.5s ease;
}

.hero-content .badge {
    display: inline-block;
    background: #e50914;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.hero-content h1 {
    font-size: 3.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
}

.hero-content .meta {
    display: flex;
    gap: 20px;
    font-size: 0.95rem;
    color: #f8d63d;
    margin-bottom: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.hero-content .meta span {
    background: rgba(255,255,255,0.15);
    padding: 2px 12px;
    border-radius: 12px;
}

.hero-content .overview {
    font-size: 1rem;
    line-height: 1.5;
    color: #ccc;
    max-width: 550px;
    margin-bottom: 24px;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
}

.hero-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-watch {
    background: #e50914;
    border: none;
    color: white;
    padding: 12px 34px;
    border-radius: 40px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.4);
}

.btn-watch:hover {
    background: #f40612;
    transform: scale(1.04);
}

.btn-trailer {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 12px 34px;
    border-radius: 40px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.btn-trailer:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.04);
}

.hero-poster {
    position: absolute;
    right: 60px;
    bottom: 80px;
    z-index: 2;
    width: 250px;
    height: 375px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.8);
    animation: fadeIn 0.5s ease;
}

.hero-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== HERO RESPONSIVE ==================== */
@media (max-width: 768px) {
    .hero {
        margin-top: 110px;
        padding: 15px 16px 30px 16px;
        height: auto;
        min-height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        background-position: top center;
        background-size: cover;
        gap: 16px;
        position: relative;
    }

    .hero::after {
        display: none;
    }

    .hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);
        z-index: 0;
    }

    .hero-poster {
        position: relative;
        right: auto;
        bottom: auto;
        width: 200px;
        height: 300px;
        flex-shrink: 0;
        margin: 10px auto 0 auto;
        box-shadow: 0 8px 32px rgba(0,0,0,0.8);
        border-radius: 10px;
        order: 0;
        z-index: 1;
    }

    .hero-content {
        max-width: 100%;
        text-align: center;
        position: relative;
        z-index: 1;
        order: 1;
        padding: 0;
        width: 100%;
    }

    .hero-content .badge {
        display: none;
    }

    .hero-content h1 {
        font-size: 1.6rem;
        margin-bottom: 4px;
        text-shadow: 2px 2px 8px rgba(0,0,0,0.9);
        line-height: 1.2;
    }

    .hero-content .meta {
        display: flex;
        gap: 10px;
        font-size: 0.7rem;
        color: #ddd;
        margin-bottom: 8px;
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-content .meta span {
        background: rgba(255,255,255,0.1);
        padding: 2px 10px;
        border-radius: 12px;
        font-size: 0.65rem;
    }

    .hero-content .overview {
        font-size: 0.8rem;
        line-height: 1.5;
        color: #ccc;
        max-width: 100%;
        margin: 0 auto 12px auto;
        text-shadow: 1px 1px 4px rgba(0,0,0,0.9);
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
        padding: 0 4px;
    }

    .hero-buttons {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 4px;
    }

    .hero-buttons .btn-watch {
        padding: 10px 28px;
        font-size: 0.85rem;
        width: auto;
        min-width: 130px;
    }

    .hero-buttons .btn-trailer {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 12px 12px 20px 12px;
        gap: 12px;
        margin-top: 100px;
    }

    .hero-poster {
        width: 200px;
        height: 300px;
        margin-top: 6px;
    }

    .hero-content h1 {
        font-size: 1.3rem;
    }

    .hero-content .overview {
        font-size: 0.75rem;
        -webkit-line-clamp: 3;
        margin-bottom: 8px;
    }

    .hero-content .meta {
        font-size: 0.6rem;
        gap: 6px;
    }

    .hero-content .meta span {
        font-size: 0.55rem;
        padding: 1px 8px;
    }

    .hero-buttons .btn-watch {
        padding: 8px 20px;
        font-size: 0.75rem;
        min-width: 100px;
    }
}

/* ==================== SEARCH INDICATOR ==================== */
.search-indicator {
    display: none;
    padding: 10px 20px;
    background: rgba(229, 9, 20, 0.2);
    border-left: 4px solid #e50914;
    margin: 80px 40px 0 40px;
    border-radius: 4px;
    font-size: 0.95rem;
}

.search-indicator.visible {
    display: block;
}

.search-indicator strong {
    color: #fff;
}

.search-info {
    padding: 10px 15px;
    background: rgba(229, 9, 20, 0.15);
    border-left: 3px solid #e50914;
    border-radius: 4px;
    margin: 10px 0;
    color: #ccc;
    font-size: 0.9rem;
}

.search-info i {
    color: #e50914;
    margin-right: 8px;
}

/* ==================== RESULT CONTROLS ==================== */
.result-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255,255,255,0.1);
    border: 2px solid #555;
    color: #aaa;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.8rem;
    font-weight: 600;
}

.filter-btn:hover {
    background: rgba(229, 9, 20, 0.2);
    border-color: #e50914;
    color: #fff;
}

.filter-btn.active {
    background: #e50914;
    border-color: #e50914;
    color: #fff;
}

.genre-buttons {
    display: flex;
    margin-right: 8px;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 8px 2px;
    flex-wrap: nowrap;
    max-width: 100%;
    scroll-behavior: smooth;
}

@media (max-width: 768px) {
    .genre-buttons {
        gap: 8px;
    }
}

.genre-buttons::-webkit-scrollbar {
    height: 4px;
}

.genre-buttons::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}

.genre-buttons::-webkit-scrollbar-thumb {
    background: #e50914;
    border-radius: 10px;
}

.genre-btn {
    background: transparent;
    border: 1.5px solid rgba(255,255,255,0.2);
    color: #aaa;
    padding: 4px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.genre-btn:hover {
    border-color: rgba(229, 9, 20, 0.5);
    color: #fff;
    background: rgba(229, 9, 20, 0.1);
}

.genre-btn.active {
    border-color: #e50914;
    color: #fff;
    background: rgba(229, 9, 20, 0.2);
}

/* ==================== RESULTS SECTION ==================== */
.results-section {
    padding: 20px 10px 40px 10px;
}

.result-block {
    margin-bottom: 40px;
}

.result-block h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.result-block h2 i {
    color: #e50914;
}

.scroll-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.grid-scroll {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 12px 4px 24px 4px;
    scroll-behavior: smooth;
    flex: 1;
}

.grid-scroll::-webkit-scrollbar {
    height: 6px;
}

.grid-scroll::-webkit-scrollbar-track {
    background: #222;
    border-radius: 10px;
}

.grid-scroll::-webkit-scrollbar-thumb {
    background: #e50914;
    border-radius: 10px;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: #888;
    font-size: 1.1rem;
    gap: 12px;
}

.loading-spinner i {
    color: #e50914;
    font-size: 1.5rem;
}

.no-results {
    color: #aaa;
    font-style: italic;
    padding: 20px 0;
}

/* ==================== CARDS REDISEÑADAS - CORREGIDAS ==================== */
.card {
    min-width: 200px;
    max-width: 200px;
    width: 100%;
    height: auto;
    background: #1a1a1a;
    border-radius: 9px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
    border: 1px solid #2a2a2a;
    display: flex;
    flex-direction: column;
    margin-right:10px;
}

@media (max-width: 768px) {
    .card {
        margin: 0px;
    }
}

.card:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 40px rgba(0,0,0,0.8);
    border-color: #ffccce48;
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #111;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Fondo con imagen oscurecida y blur */
.card-image-wrapper .card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(16px) brightness(0.75);
    transform: scale(1.15);
    z-index: 0;
    transition: filter 0.4s ease;
}

.card:hover .card-image-wrapper .card-bg {
    filter: blur(14px) brightness(0.9);
    transform: scale(1.2);
}

/* Imagen principal (poster) */
.card-image-wrapper .card-image {
    position: relative;
    width: 100%;
    height: 280px;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.card:hover .card-image-wrapper .card-image {
    transform: scale(1.02);
}

/* Información superpuesta en la parte inferior */
.card-image-wrapper .card-info {
    position: relative;
    z-index: 2;
    padding: 12px 14px 16px 14px;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 70%, transparent 100%);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 140px;
    width: 100%;
}

/* Título */
.card-image-wrapper .card-info .card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.9);
    line-height: 1.2;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.2em;
}

/* Rating con estrellas */
.card-image-wrapper .card-info .card-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    flex-shrink: 0;
}

.card-image-wrapper .card-info .card-rating .stars {
    display: flex;
    gap: 1px;
    color: #f5c518;
    font-size: 0.65rem;
}

.card-image-wrapper .card-info .card-rating .stars .star-empty {
    color: #555;
}

.card-image-wrapper .card-info .card-rating .rating-value {
    font-size: 0.65rem;
    color: #ccc;
    font-weight: 600;
}

/* Géneros */
.card-image-wrapper .card-info .card-genres {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 6px;
    min-height: 20px;
    flex-shrink: 0;
}

.card-image-wrapper .card-info .card-genres .genre-badge {
    background: rgba(229, 9, 20, 0.212);
    color: #fc0f0f;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.55rem;
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* Descripción - CORTA A 3 LÍNEAS CON ELIPSIS */
.card-image-wrapper .card-info .card-overview {
    font-size: 0.8rem;
    color: #bbb;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-height: 2.8em;
    max-height: 2.8em;
    width: 100%;
}

/* Fecha */
.card-image-wrapper .card-info .card-date {
    font-size: 0.8rem;
    color: #ffffff;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
    flex-shrink: 0;
}

.card-image-wrapper .card-info .card-date i {
    font-size: 0.7rem;
    opacity: 0.9;
}

/* Badges de fuente (Vimeus, VidSrc) */
.card-image-wrapper .card-info .source-badge {
    position: absolute;
    top: -6px;
    right: 6px;
    font-size: 0.5rem;
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: 600;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.1);
    z-index: 5;
}

.card-image-wrapper .card-info .source-badge.vimeus {
    color: #4caf50;
    border-color: rgba(76, 175, 80, 0.3);
}

.card-image-wrapper .card-info .source-badge.vidsrc {
    color: #f5a623;
    border-color: rgba(245, 166, 35, 0.3);
}

/* ==================== VERSIÓN SIN IMAGEN ==================== */
.card.no-image .card-body {
    padding: 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #1a1a1a;
}

.card.no-image .card-body h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: #fff;
}

.card.no-image .card-body .genre {
    font-size: 0.6rem;
    color: #aaa;
    background: #2a2a2a;
    display: inline-block;
    padding: 1px 8px;
    border-radius: 12px;
    margin: 4px 0 6px;
}

.card.no-image .card-body .date {
    font-size: 0.6rem;
    color: #888;
}

.card.no-image .card-body .card-overview {
    font-size: 0.65rem;
    color: #aaa;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 4px;
}

/* ==================== RESPONSIVE ==================== */

/* ==================== VIMEUS / VIDSRC BADGES ==================== */
.card-image-wrapper .card-info .vimeus-badge {
    font-size: 0.6rem;
    color: #4caf50;
    background: rgba(76, 175, 80, 0.2);
    display: inline-block;
    padding: 1px 10px;
    border-radius: 12px;
    margin-top: 4px;
    border: 1px solid rgba(76, 175, 80, 0.3);
    font-weight: 500;
}

.card-image-wrapper .card-info .vimeus-badge i {
    margin-right: 4px;
    font-size: 0.55rem;
}

.card-body .vimeus-badge {
    font-size: 0.6rem;
    color: #4caf50;
    background: rgba(76, 175, 80, 0.2);
    display: inline-block;
    padding: 1px 10px;
    border-radius: 12px;
    margin-top: 4px;
    border: 1px solid rgba(76, 175, 80, 0.3);
    font-weight: 500;
}

.card-body .vimeus-badge i {
    margin-right: 4px;
    font-size: 0.55rem;
}

.card-image-wrapper .card-info .vidsrc-badge {
    font-size: 0.6rem;
    color: #f5a623;
    background: rgba(245, 166, 35, 0.2);
    display: inline-block;
    padding: 1px 10px;
    border-radius: 12px;
    margin-top: 4px;
    border: 1px solid rgba(245, 166, 35, 0.3);
    font-weight: 500;
}

.card-image-wrapper .card-info .vidsrc-badge i {
    margin-right: 4px;
    font-size: 0.55rem;
}

.card-body .vidsrc-badge {
    font-size: 0.6rem;
    color: #f5a623;
    background: rgba(245, 166, 35, 0.2);
    display: inline-block;
    padding: 1px 10px;
    border-radius: 12px;
    margin-top: 4px;
    border: 1px solid rgba(245, 166, 35, 0.3);
    font-weight: 500;
}

.card-body .vidsrc-badge i {
    margin-right: 4px;
    font-size: 0.55rem;
}

/* ==================== PAGINATION ==================== */
.pagination {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination button {
    background: #333;
    border: none;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 600;
}

.pagination button:hover {
    background: #e50914;
}

.pagination button.active {
    background: #e50914;
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination span {
    font-size: 0.9rem;
    color: #aaa;
}

.pagination .page-numbers {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.pagination .page-numbers button {
    min-width: 32px;
    padding: 4px 8px;
}

.pagination .page-input-group {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-left: 8px;
}

.pagination .page-input-group input {
    width: 50px;
    padding: 4px 6px;
    border-radius: 16px;
    border: 1px solid #555;
    background: rgba(0,0,0,0.5);
    color: white;
    text-align: center;
    font-size: 0.85rem;
}

.pagination .page-input-group input:focus {
    outline: none;
    border-color: #e50914;
}

.pagination .page-input-group .go-btn {
    padding: 4px 12px;
    font-size: 0.75rem;
    background: #e50914;
}

.pagination .page-input-group .go-btn:hover {
    background: #f40612;
}

/* ==================== RESPONSIVE CARDS ==================== */
/* @media (max-width: 768px) {
    .results-section {
        padding: 16px 16px 30px 16px;
    }

    .result-block {
        margin-bottom: 30px;
    }

    .result-block h2 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }

    .result-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .filter-buttons {
        justify-content: center;
    }

    .filter-btn {
        font-size: 0.7rem;
        padding: 4px 12px;
    }

    .genre-buttons {
        gap: 6px;
        padding: 4px 2px 6px 2px;
    }

    .genre-btn {
        font-size: 0.6rem;
        padding: 3px 10px;
    }

    .grid-scroll {
        gap: 14px;
        padding: 8px 4px 16px 4px;
    }

    .card {
        min-width: 150px;
        max-width: 150px;
    }

    .card-image-wrapper {
        height: 210px;
    }

    .card-body {
        padding: 10px 10px 14px;
    }

    .card-body h4 {
        font-size: 0.8rem;
    }

    .pagination {
        gap: 6px;
    }

    .pagination button {
        font-size: 0.75rem;
        padding: 4px 10px;
    }

    .pagination .page-numbers button {
        min-width: 28px;
        padding: 3px 6px;
        font-size: 0.75rem;
    }

    .pagination span {
        font-size: 0.75rem;
    }

    .pagination .page-input-group input {
        width: 40px;
        font-size: 0.7rem;
        padding: 3px 4px;
    }

    .pagination .page-input-group .go-btn {
        padding: 3px 10px;
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .card {
        min-width: 200px;
        max-width: 200px;
    }

    .card-image-wrapper {
        height: 280px;
    }

    .card-body h4 {
        font-size: 0.8rem;
    }

    .card-body .genre {
        font-size: 0.6rem;
        padding: 1px 8px;
    }

    .card-body .date {
        font-size: 0.6rem;
    }

    .result-block h2 {
        font-size: 1rem;
    }

    .filter-btn {
        font-size: 0.6rem;
        padding: 3px 10px;
    }

    .genre-btn {
        font-size: 0.55rem;
        padding: 2px 8px;
    }

    .search-indicator {
        font-size: 0.7rem;
        padding: 6px 12px;
        margin: 6px 12px 0 12px;
    }
} */

/* ==================== RADIO MAIN BUTTON ==================== */
.radio-main-btn {
    background: linear-gradient(135deg, #e50914, #b20710);
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 400;
    font-size: 1rem;
    display: inline-flex;
    align-items: left;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(229, 9, 20, 0.4);
}

.radio-main-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(229, 9, 20, 0.6);
}

.radio-main-btn i {
    font-size: 1.1rem;
}

/* ==================== RADIO MODAL ==================== */
.radio-modal {
    max-width: 80% !important;
    max-height: 80vh !important;
    width: 80% !important;
}

.radio-modal .modal-body {
    padding: 20px 24px !important;
    max-height: 80vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ==================== RADIO HEADER ==================== */
.radio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    background: #1a1a1a;
    z-index: 5;
    padding-top: 5px;
}

.radio-header h2 {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.radio-search-container {
    display: flex;
    gap: 8px;
    flex: 1;
    max-width: 450px;
    flex-wrap: wrap;
    min-width: 0;
}

.radio-search-container input {
    flex: 1;
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid #555;
    background: rgba(0,0,0,0.5);
    color: white;
    font-size: 0.85rem;
    min-width: 80px;
    max-width: 100%;
}

.radio-search-container input:focus {
    outline: none;
    border-color: #e50914;
}

.radio-search-container input::placeholder {
    color: #888;
}

.radio-search-container button {
    background: #e50914;
    border: none;
    color: white;
    padding: 8px 18px;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.radio-search-container button:hover {
    background: #f40612;
    transform: scale(1.02);
}

.favorites-btn {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #f5a623;
    padding: 8px 14px;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.favorites-btn:hover {
    background: rgba(255, 215, 0, 0.3);
    border-color: #f5a623;
    transform: scale(1.05);
}

.favorites-btn.active {
    background: rgba(255, 215, 0, 0.4);
    border-color: #f5a623;
}

/* ==================== RADIO GRID ==================== */
.radio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
    margin-top: 5px;
    padding-bottom: 10px;
}

.radio-station-card {
    background: #1a1a1a;
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: 0.3s;
    border: 2px solid #333;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    overflow: hidden;
}

.radio-station-card:hover {
    background: #222;
    border-color: #555;
}

.radio-station-card.active {
    border-color: #e50914 !important;
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.4), inset 0 0 20px rgba(229, 9, 20, 0.1) !important;
    background: rgba(229, 9, 20, 0.1) !important;
}

.radio-station-card.active .station-info h4 {
    color: #f5a623 !important;
    text-shadow: 0 0 20px rgba(245, 166, 35, 0.5), 0 0 40px rgba(245, 166, 35, 0.2) !important;
}

.radio-station-card.active .station-info .station-country {
    color: #f5a623 !important;
    opacity: 0.8;
}

.radio-station-card img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    background: #222;
    flex-shrink: 0;
}

.radio-station-card .station-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.radio-station-card .station-info h4 {
    font-size: 0.85rem;
    font-weight: 600;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
    max-height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.radio-station-card .station-info .station-country {
    font-size: 0.7rem;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.radio-station-card .station-info .station-tags {
    font-size: 0.6rem;
    color: #666;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.radio-station-card .station-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.radio-station-card .favorite-btn {
    background: transparent;
    border: none;
    color: #555;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1rem;
    padding: 4px 6px;
    flex-shrink: 0;
}

.radio-station-card .favorite-btn:hover {
    color: #f5a623;
    transform: scale(1.2);
}

.radio-station-card .favorite-btn.active {
    color: #f5a623;
}

.radio-station-card .play-btn {
    background: #e50914;
    border: none;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.radio-station-card .play-btn:hover {
    background: #f40612;
    transform: scale(1.05);
}

.radio-station-card .play-btn.playing {
    background: #4caf50 !important;
    color: white !important;
    animation: glowGreen 1.5s ease-in-out infinite;
}

@keyframes glowGreen {
    0%, 100% { box-shadow: 0 0 5px rgba(76, 175, 80, 0.3); }
    50% { box-shadow: 0 0 20px rgba(76, 175, 80, 0.6); }
}

/* ==================== RADIO PLAYER ==================== */
.radio-player {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 14px 18px;
    border: 1px solid #333;
    display: block !important;
    position: sticky;
    top: 0;
    z-index: 5;
    margin: 0 -5px;
}

.radio-player-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.radio-player-info img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
    background: #222;
    border: 2px solid #333;
}

.station-icon-fallback {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border: 2px solid #333;
}

.radio-station-info h3 {
    font-size: 1rem;
    margin-bottom: 2px;
    word-wrap: break-word;
}

.radio-station-info p {
    color: #888;
    font-size: 0.8rem;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: #888;
    margin-top: 3px;
}

.connection-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    transition: background 0.3s;
}

.connection-status .status-dot.connecting {
    background: #f5a623;
    animation: pulse 1s ease-in-out infinite;
}

.connection-status .status-dot.connected {
    background: #4caf50;
}

.connection-status .status-dot.error {
    background: #e50914;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.metadata-info {
    padding: 6px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid #333;
}

.metadata-info #currentSong {
    color: #ccc;
    font-size: 0.8rem;
    font-weight: 500;
    word-wrap: break-word;
}

.metadata-info #currentProgram {
    color: #888;
    font-size: 0.7rem;
    margin-top: 2px;
    word-wrap: break-word;
}

/* ==================== RADIO CONTROLS ==================== */
.radio-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.radio-controls button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.radio-play-btn {
    background: #e50914;
    color: white;
}

.radio-play-btn:hover {
    background: #f40612;
    transform: scale(1.05);
}

.radio-play-btn.playing {
    background: #4caf50;
}

.radio-play-btn.playing:hover {
    background: #45a049;
}

.radio-stop-btn {
    background: #555;
    color: white;
}

.radio-stop-btn:hover {
    background: #777;
    transform: scale(1.05);
}

.mute-btn {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.85rem;
    padding: 4px 6px;
    width: auto !important;
    border-radius: 30px !important;
    flex-shrink: 0;
}

.mute-btn:hover {
    color: #fff;
}

.radio-volume {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 150px;
    min-width: 80px;
}

.radio-volume input[type="range"] {
    -webkit-appearance: none;
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: #555;
    outline: none;
    min-width: 40px;
}

.radio-volume input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #e50914;
    cursor: pointer;
}

.radio-volume input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #e50914;
    cursor: pointer;
    border: none;
}

.radio-volume i {
    color: #888;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* ==================== RADIO RESPONSIVE ==================== */
@media (max-width: 768px) {
    .radio-modal {
        max-width: 95% !important;
        max-height: 70vh !important;
        width: 95% !important;
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        border-radius: 12px !important;
    }

    .radio-modal .modal-body {
        padding: 12px 16px !important;
        max-height: 70vh;
        overflow-y: auto;
    }

    .radio-modal .modal-close {
        top: 8px !important;
        right: 8px !important;
        width: 32px !important;
        height: 32px !important;
        font-size: 0.9rem !important;
        z-index: 20 !important;
        background: rgba(0,0,0,0.9) !important;
        border: 2px solid rgba(255,255,255,0.3) !important;
    }

    .radio-modal .modal-close:hover {
        background: #e50914 !important;
        border-color: #e50914 !important;
    }

    .radio-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        padding-right: 36px !important;
        position: sticky !important;
        top: 0 !important;
        background: #1a1a1a !important;
        z-index: 5 !important;
        padding-top: 5px !important;
        padding-bottom: 10px !important;
    }

    .radio-header h2 {
        font-size: 1.1rem !important;
    }

    .radio-search-container {
        max-width: 100% !important;
        flex-wrap: wrap !important;
    }

    .radio-search-container input {
        min-width: 60px !important;
        font-size: 0.75rem !important;
        padding: 6px 12px !important;
        flex: 1 1 100px !important;
    }

    .radio-search-container button {
        font-size: 0.7rem !important;
        padding: 6px 12px !important;
    }

    .radio-grid {
        grid-template-columns: 1fr !important;
        padding-bottom: 10px;
    }

    .radio-station-card {
        padding: 10px 12px !important;
        flex-wrap: nowrap !important;
    }

    .radio-station-card img {
        width: 36px !important;
        height: 36px !important;
        flex-shrink: 0 !important;
    }

    .radio-station-card .station-info {
        min-width: 0 !important;
        flex: 1 !important;
    }

    .radio-station-card .station-info h4 {
        font-size: 0.75rem !important;
        -webkit-line-clamp: 2 !important;
        word-break: break-word !important;
    }

    .radio-station-card .station-info .station-country {
        font-size: 0.6rem !important;
    }

    .radio-station-card .station-actions {
        flex-shrink: 0 !important;
        gap: 4px !important;
    }

    .radio-station-card .station-actions .play-btn {
        font-size: 0.6rem !important;
        padding: 3px 10px !important;
    }

    .radio-station-card .station-actions .favorite-btn {
        font-size: 0.85rem !important;
        padding: 2px 4px !important;
    }

    .radio-player {
        padding: 10px 14px !important;
        margin: 0 -5px !important;
        border-radius: 10px !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 6 !important;
        background: #1a1a1a !important;
    }

    .radio-player-info {
        gap: 10px !important;
    }

    .radio-player-info img {
        width: 36px !important;
        height: 36px !important;
        flex-shrink: 0 !important;
    }

    .radio-station-info h3 {
        font-size: 0.85rem !important;
        word-break: break-word !important;
    }

    .radio-station-info p {
        font-size: 0.7rem !important;
    }

    .radio-controls {
        gap: 8px !important;
        flex-wrap: wrap !important;
    }

    .radio-controls button {
        width: 30px !important;
        height: 30px !important;
        font-size: 0.8rem !important;
    }

    .radio-volume {
        max-width: 120px !important;
        min-width: 60px !important;
    }

    .radio-volume input[type="range"] {
        min-width: 30px !important;
    }

    .metadata-info #currentSong {
        font-size: 0.75rem !important;
    }
}

@media (max-width: 480px) {
    .radio-modal .modal-body {
        padding: 10px 12px !important;
    }

    .radio-header h2 {
        font-size: 0.95rem !important;
    }

    .radio-search-container input {
        font-size: 0.65rem !important;
        padding: 5px 10px !important;
        min-width: 50px !important;
        flex: 1 1 70px !important;
    }

    .radio-search-container button {
        font-size: 0.6rem !important;
        padding: 5px 10px !important;
    }

    .favorites-btn {
        font-size: 0.6rem !important;
        padding: 5px 10px !important;
    }

    .radio-grid {
        padding-bottom: 5px;
    }

    .radio-station-card {
        padding: 8px 10px !important;
        gap: 8px !important;
    }

    .radio-station-card img {
        width: 30px !important;
        height: 30px !important;
    }

    .radio-station-card .station-info h4 {
        font-size: 0.65rem !important;
    }

    .radio-station-card .station-actions .play-btn {
        font-size: 0.55rem !important;
        padding: 2px 8px !important;
    }

    .radio-station-card .station-actions .favorite-btn {
        font-size: 0.75rem !important;
    }

    .radio-player {
        padding: 8px 10px !important;
        margin: 0 -3px !important;
    }

    .radio-player-info img {
        width: 30px !important;
        height: 30px !important;
    }

    .radio-station-info h3 {
        font-size: 0.75rem !important;
    }

    .radio-controls button {
        width: 26px !important;
        height: 26px !important;
        font-size: 0.7rem !important;
    }

    .radio-volume {
        max-width: 80px !important;
        min-width: 50px !important;
    }

    .radio-volume input[type="range"] {
        min-width: 20px !important;
    }
}

/* ==================== YOUTUBE ==================== */
.youtube-search-container {
    display: flex;
    gap: 8px;
    align-items: center;
    flex: 1;
    max-width: 400px;
}

.youtube-search-container input {
    flex: 1;
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid #555;
    background: rgba(0,0,0,0.5);
    color: white;
    font-size: 0.85rem;
    min-width: 120px;
}

.youtube-search-container input:focus {
    outline: none;
    border-color: #ff0000;
}

.youtube-search-container input::placeholder {
    color: #888;
}

.youtube-search-container button {
    background: #ff0000;
    border: none;
    color: white;
    padding: 8px 18px;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.youtube-search-container button:hover {
    background: #cc0000;
    transform: scale(1.02);
}

/* YouTube Cards */
.youtube-card {
    min-width: 280px;
    max-width: 280px;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    flex-shrink: 0;
    cursor: pointer;
    c
}

.youtube-card:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 24px rgba(0,0,0,0.8);
}

.youtube-card .thumbnail-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #111;
    overflow: hidden;
}

.youtube-card .thumbnail-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.youtube-card .thumbnail-wrapper .duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.youtube-card .thumbnail-wrapper .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 3rem;
    opacity: 0.8;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    transition: opacity 0.3s;
}

.youtube-card:hover .thumbnail-wrapper .play-icon {
    opacity: 1;
}

.youtube-card .youtube-info {
    padding: 12px 14px 16px;
}

.youtube-card .youtube-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.youtube-card .youtube-info .channel {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 4px;
}

.youtube-card .youtube-info .channel i {
    margin-right: 4px;
}

/* ==================== MODAL YOUTUBE ==================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal-overlay .modal-content {
    background: #1a1a1a;
    border-radius: 12px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 40px rgba(0,0,0,1);
}

.modal-overlay .modal-close {
    position: absolute;
    top: 00px;
    right: -5px;
    z-index: 10;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.048);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    display: none;
}

.modal-overlay .modal-close:hover {
    background: #e50914;
    border-color: #e50914;
    transform: scale(1.1);
    transform: opacity(1);
}

.modal-overlay .modal-body {
    padding: 0;
}

.modal-overlay .video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
}

.modal-overlay .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.modal-overlay .video-info {
    padding: 20px 24px;
    background: #1a1a1a;
}

.modal-overlay .video-info h3 {
    font-size: 1.2rem;
    margin-bottom: 6px;
    color: #fff;
}

.modal-overlay .video-info p {
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.5;
}

.modal-overlay .video-info .channel-name {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.modal-overlay .video-info .channel-name i {
    color: #ff0000;
    margin-right: 6px;
}

.modal-watch{
    width: 100%;
    height: 100%;
}

.modal-watch .modal-iframe{
    width: 100%;
    height: 100%;
}
/* ==================== SPORTS ==================== */
.sports-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.sports-header-left h2 {
    margin-bottom: 0 !important;
}

.sports-filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sports-filter-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid #444;
    color: #aaa;
    padding: 5px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.75rem;
    font-weight: 500;
}

.sports-filter-btn:hover {
    background: rgba(76, 175, 80, 0.15);
    border-color: #4caf50;
    color: #fff;
}

.sports-filter-btn.active {
    background: rgba(76, 175, 80, 0.2);
    border-color: #4caf50;
    color: #4caf50;
}

.sports-filter-btn.live-btn {
    border-color: #e50914;
    color: #e50914;
}

.sports-filter-btn.live-btn:hover {
    background: rgba(229, 9, 20, 0.15);
    border-color: #e50914;
    color: #e50914;
}

.sports-filter-btn.live-btn.active {
    background: rgba(229, 9, 20, 0.2);
    border-color: #e50914;
    color: #e50914;
}

.sports-refresh {
    display: flex;
    gap: 8px;
}

.sports-refresh button {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4caf50;
    padding: 6px 14px;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sports-refresh button:hover {
    background: rgba(76, 175, 80, 0.25);
    border-color: #4caf50;
    transform: scale(1.05);
}

.sports-refresh button:active {
    transform: scale(0.95);
}

/* ==================== SPORTS CARD ==================== */
.sports-card {
    min-width: 320px;
    max-width: 320px;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    flex-shrink: 0;
    cursor: pointer;
    border: 1px solid #333;
    margin-right: 6px;
}

.sports-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.15);
    border-color: #4caf50;
}

.sports-card .sports-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #111;
}

.sports-card .sports-info {
    padding: 12px 14px 16px;
}

.sports-card .sports-info .sports-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.sports-card .sports-info .sports-datetime {
    font-size: 0.7rem;
    color: #888;
    margin-bottom: 4px;
}

.sports-card .sports-info .sports-countdown {
    font-size: 0.8rem;
    font-weight: 600;
    color: #4caf50;
}

.sports-card .sports-info .sports-countdown.live {
    color: #4caf50;
    /* animation: pulse 1.5s ease-in-out infinite; */
}

.sports-card .sports-info .sports-countdown.ended {
    color: #888;
}

/* ==================== SPORTS MODAL ==================== */
.sports-modal {
    max-width: 1000px !important;
    width: 95% !important;
    max-height: 95vh !important;
}

.sports-modal .modal-body {
    padding: 20px 24px !important;
    max-height: 95vh;
    overflow-y: auto;
}

.sports-modal .modal-body::-webkit-scrollbar {
    width: 6px;
}

.sports-modal .modal-body::-webkit-scrollbar-track {
    background: #222;
    border-radius: 10px;
}

.sports-modal .modal-body::-webkit-scrollbar-thumb {
    background: #4caf50;
    border-radius: 10px;
}

.sports-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #333;
    flex-wrap: wrap;
    gap: 10px;
}

.sports-modal-header-left {
    flex: 1;
}

.sports-modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.sports-modal-datetime {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 2px;
}

.sports-modal-countdown {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4caf50;
}

.sports-modal-countdown.live {
    color: #4caf50;
    animation: pulse 1.5s ease-in-out infinite;
}

.sports-modal-countdown.ended {
    color: #888;
}

.sports-modal-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e50914;
    color: white;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s, background 0.2s;
}

.sports-modal-close:hover {
    transform: scale(1.1);
    background: #f40612;
}

.sports-stream-selector {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 14px;
    background: #0a0a0a;
    border-radius: 8px;
}

.sports-stream-selector label {
    color: #aaa;
    font-size: 0.85rem;
    font-weight: 600;
}

.sports-stream-selector select {
    flex: 1;
    min-width: 200px;
    padding: 8px 14px;
    background: #2a2a2a;
    color: white;
    border: 1px solid #444;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
}

.sports-stream-selector select:hover {
    border-color: #4caf50;
}

.sports-stream-selector select option {
    background: #1a1a1a;
    color: white;
}

.sports-iframe-container {
    flex: 1;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    min-height: 530px;
}

.sports-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    min-height: 530px;
}

.sports-no-streams {
    color: #ff4444;
    text-align: center;
    padding: 40px;
    font-size: 1rem;
}

.sports-loading {
    color: #4caf50;
    text-align: center;
    padding: 20px;
}

/* ==================== SPORTS RESPONSIVE ==================== */
@media (max-width: 768px) {
    .sports-header-left {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: 100%;
    }

    .sports-filter-buttons {
        justify-content: center;
    }

    .sports-filter-btn {
        font-size: 0.65rem;
        padding: 4px 10px;
    }

    .sports-card {
        min-width: 260px;
        max-width: 260px;
    }

    .sports-card .sports-image {
        height: 130px;
    }

    .sports-modal {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        height: 100vh !important;
        margin: 0 !important;
    }

    .sports-modal .modal-body {
        max-height: 100vh !important;
        padding: 16px !important;
    }

    .sports-modal-title {
        font-size: 1rem;
    }

    .sports-stream-selector {
        flex-direction: column;
        align-items: stretch;
    }

    .sports-stream-selector select {
        min-width: unset;
    }

    .sports-iframe-container {
        min-height: 500px;
    }

    .sports-iframe-container iframe {
        min-height: 500px;
    }

    .sports-modal-close {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .sports-card {
        min-width: 200px;
        max-width: 200px;
    }

    .sports-card .sports-image {
        height: 100px;
    }

    .sports-card .sports-info .sports-title {
        font-size: 0.75rem;
    }

    .sports-card .sports-info .sports-datetime {
        font-size: 0.6rem;
    }

    .sports-card .sports-info .sports-countdown {
        font-size: 0.65rem;
    }

    .sports-filter-btn {
        font-size: 0.55rem;
        padding: 3px 8px;
    }

    .sports-iframe-container {
        min-height: 500px;
    }

    .sports-iframe-container iframe {
        min-height: 500px;
    }
}

/* ==================== RESPONSIVE YOUTUBE ==================== */
@media (max-width: 768px) {
    .youtube-card {
        min-width: 220px;
        max-width: 220px;
    }

    .youtube-search-container {
        max-width: 100%;
        width: 100%;
    }

    .youtube-search-container input {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .youtube-search-container button {
        font-size: 0.75rem;
        padding: 6px 14px;
    }

    .modal-overlay .modal-content {
        width: 100%;
        max-width: 90%;
        max-height: 90vh;
        border-radius: 0;
        height: 90vh;
    }

    .modal-overlay .modal-close {
        display: block;
        top: 8px;
        right: 8px;
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .modal-overlay .video-container {
        padding-bottom: 56.25%;
        height: auto;
        min-height: 200px;
    }

    .modal-overlay .video-info {
        padding: 16px 18px;
        max-height: 40vh;
        overflow-y: auto;
    }

    .modal-overlay .video-info h3 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .youtube-card {
        min-width: 180px;
        max-width: 180px;
    }

    .youtube-card .youtube-info h4 {
        font-size: 0.75rem;
    }

    .youtube-card .youtube-info .channel {
        font-size: 0.65rem;
    }

    .modal-overlay .video-info h3 {
        font-size: 0.9rem;
    }

    .modal-overlay .video-info p {
        font-size: 0.8rem;
    }
}

/* ==================== TV EN VIVO ==================== */
.tv-search-container {
    display: flex;
    gap: 8px;
    align-items: center;
    flex: 1;
    max-width: 400px;
}

.tv-search-container input {
    flex: 1;
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid #555;
    background: rgba(0,0,0,0.5);
    color: white;
    font-size: 0.85rem;
    min-width: 120px;
}

.tv-search-container input:focus {
    outline: none;
    border-color: #e50914;
}

.tv-search-container input::placeholder {
    color: #888;
}

.tv-search-container button {
    background: #e50914;
    border: none;
    color: white;
    padding: 8px 18px;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tv-search-container button:hover {
    background: #f40612;
    transform: scale(1.02);
}

/* TV Cards */
.tv-card {
    min-width: 150px;
    max-width: 150px;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    flex-shrink: 0;
    cursor: pointer;
    border: 1px solid #333;
}

.tv-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0,0,0,0.8);
    border-color: #e50914;
}

.tv-card .tv-logo-wrapper {
    width: auto;
    height: 140px;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

.tv-card .tv-logo-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.tv-card .tv-info {
    padding: 12px 14px 16px;
    text-align: center;
}

.tv-card .tv-info h4 {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tv-card .tv-info .tv-group {
    font-size: 0.65rem;
    color: #888;
    margin-top: 4px;
}

/* TV Modal */
.tv-modal {
    max-width: 900px !important;
    width: 95% !important;
    max-height: 90vh !important;
}

.tv-modal .modal-body {
    padding: 20px 24px !important;
    max-height: 90vh;
    overflow-y: auto;
}

.tv-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #333;
    flex-wrap: wrap;
    gap: 10px;
}

.tv-modal-header-left {
    flex: 1;
}

.tv-modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.tv-modal-group {
    font-size: 0.85rem;
    color: #888;
}

.tv-player-container {
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
}

.tv-player-container video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.tv-player-container video::-webkit-media-controls {
    background: rgba(0,0,0,0.0);
}

/* ==================== TV MODAL ==================== */
.tv-modal {
    max-width: 900px !important;
    width: 95% !important;
    max-height: 90vh !important;
}

.tv-modal .modal-body {
    padding: 20px 24px !important;
    max-height: 90vh;
    overflow-y: auto;
}

.tv-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #333;
    flex-wrap: wrap;
    gap: 10px;
}

.tv-modal-header-left {
    flex: 1;
}

.tv-modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.tv-modal-group {
    font-size: 0.85rem;
    color: #888;
}

.tv-player-type {
    font-size: 0.75rem;
    color: #4caf50;
    margin-top: 4px;
}

.tv-player-container {
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16/9;
    min-height: 300px;
}

.tv-player-container iframe,
.tv-player-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}

.tv-player-container video::-webkit-media-controls {
    background: rgba(0,0,0,0.7);
}

.tv-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #888;
    z-index: 1;
}

.tv-loading i {
    font-size: 2.5rem;
    color: #e50914;
}

.tv-loading span {
    font-size: 0.9rem;
}

.tv-player-container .no-streams {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ff4444;
    text-align: center;
    font-size: 1.1rem;
    z-index: 5;
}

/* ==================== TV RESPONSIVE ==================== */
@media (max-width: 768px) {
    .tv-search-container {
        max-width: 100%;
        width: 100%;
    }

    .tv-search-container input {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .tv-search-container button {
        font-size: 0.75rem;
        padding: 6px 14px;
    }

    .tv-card {
        min-width: 160px;
        max-width: 160px;
    }

    .tv-card .tv-logo-wrapper {
        height: 110px;
        padding: 15px;
    }

    .tv-card .tv-info h4 {
        font-size: 0.75rem;
    }

    .tv-modal {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        height: 100vh !important;
        margin: 0 !important;
    }

    .tv-modal .modal-body {
        max-height: 100vh !important;
        padding: 16px !important;
    }

    .tv-modal-title {
        font-size: 1rem;
    }

    .tv-player-container {
        aspect-ratio: 16/9;
        min-height: 200px;
    }

    .tv-player-type {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .tv-card {
        min-width: 140px;
        max-width: 140px;
    }

    .tv-card .tv-logo-wrapper {
        height: 90px;
        padding: 10px;
    }

    .tv-card .tv-info h4 {
        font-size: 0.65rem;
    }

    .tv-card .tv-info .tv-group {
        font-size: 0.55rem;
    }

    .tv-player-container {
        min-height: 160px;
    }

    .tv-loading i {
        font-size: 2rem;
    }

    .tv-loading span {
        font-size: 0.75rem;
    }
}

.modalTv{
    width: 100%;
    height: 100%;
}

.btn-back {
    position: absolute;
    top: 22px;
    right: 35px;
    z-index: 10;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.btn-back:hover {
    background: #e50914;
    border-color: #e50914;
    transform: scale(1.1);
}

.totalIframe{
    width:100%;
    height: 100%;
    position: absolute;
    top: 0;
    left:0;
    z-index; 1;
}

/* ==================== YOUTUBE CONTROLS ==================== */
.youtube-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.youtube-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.load-rec-btn {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4caf50;
    padding: 6px 14px;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.load-rec-btn:hover {
    background: rgba(76, 175, 80, 0.3);
    border-color: #4caf50;
    transform: scale(1.05);
}

.load-rec-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.manage-rec-btn {
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.2);
    color: #f5a623;
    padding: 6px 14px;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap;
}

.manage-rec-btn:hover {
    background: rgba(255, 215, 0, 0.25);
    border-color: #f5a623;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .youtube-controls {
        flex-direction: column;
        width: 100%;
    }

    .youtube-actions {
        width: 100%;
        justify-content: center;
    }

    .load-rec-btn,
    .manage-rec-btn {
        font-size: 0.7rem;
        padding: 5px 12px;
    }
}

@media (max-width: 480px) {
    .load-rec-btn,
    .manage-rec-btn {
        font-size: 0.6rem;
        padding: 4px 10px;
    }
}

/* ==================== SEARCH TYPE SELECTOR ==================== */
.search-type-selector {
    position: relative;
    display: inline-block;
}

.search-type-selector select {
    padding: 8px 14px;
    border-radius: 30px 0 0 30px;
    border: 1px solid #555;
    background: rgba(0,0,0,0.8);
    color: #ccc;
    font-size: 0.8rem;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    min-width: 100px;
    border-right: none;
    transition: 0.3s;
}

.search-type-selector select:hover {
    border-color: #e50914;
}

.search-type-selector select:focus {
    border-color: #e50914;
}

.search-type-selector select option {
    background: #1a1a1a;
    color: #fff;
}

/* Ajustar el input de búsqueda */
.search-container input {
    padding: 8px 16px;
    border-radius: 0 30px 30px 0;
    border: 1px solid #555;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 14px;
    width: 220px;
    transition: 0.3s;
    border-left: none;
}

.search-container input:focus {
    outline: none;
    border-color: #e50914;
    width: 280px;
}

.search-container input::placeholder {
    color: #888;
}

/* Ajustes responsive */
@media (max-width: 768px) {
    .search-type-selector select {
        font-size: 0.7rem;
        padding: 6px 10px;
        min-width: 80px;
        border-radius: 30px 0 0 30px;
    }

    .search-container input {
        font-size: 0.8rem;
        padding: 6px 12px;
        border-radius: 0 30px 30px 0;
    }

    .search-container button {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
}

/* @media (max-width: 480px) {
    .search-type-selector select {
        font-size: 0.6rem;
        padding: 4px 8px;
        min-width: 60px;
    }

    .search-container input {
        font-size: 0.7rem;
        padding: 4px 10px;
    }

    .search-container button {
        font-size: 0.65rem;
        padding: 4px 10px;
    }
} */

.texto-limitado {
    overflow: hidden;
    max-height: 85px; /* Ajustar según la altura de línea, aprox 300px */
    transition: max-height 0.3s ease;
}

.texto-limitado.expandido {
    max-height: 300px; /* Valor suficientemente alto para mostrar todo */
}

/* ==================== SPORTS LIVE GAMES ==================== */
.sports-live-games {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #333;
    display: none;
}

.sports-live-games.visible {
    display: block;
}

.sports-live-games h4 {
    font-size: 0.9rem;
    margin-bottom: 12px;
    color: #4caf50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sports-live-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.sports-live-grid::-webkit-scrollbar {
    width: 4px;
}

.sports-live-grid::-webkit-scrollbar-track {
    background: #222;
    border-radius: 10px;
}

.sports-live-grid::-webkit-scrollbar-thumb {
    background: #4caf50;
    border-radius: 10px;
}

.sports-live-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #1a1a1a;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    border: 1px solid #333;
}

.sports-live-item:hover {
    background: #222;
    border-color: #4caf50;
    transform: scale(1.01);
}

.sports-live-item.active {
    border-color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.1);
}

.sports-live-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: #222;
}

.sports-live-item .live-info {
    flex: 1;
    min-width: 0;
}

.sports-live-item .live-info .live-title {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sports-live-item .live-info .live-teams {
    font-size: 0.7rem;
    color: #888;
}

.sports-live-item .live-status {
    font-size: 0.65rem;
    color: #4caf50;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.sports-live-item .live-status .pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

/* ===== SPORTS MODAL RESPONSIVE ===== */
@media (max-width: 768px) {
    .sports-modal {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        height: 100vh !important;
        margin: 0 !important;
    }

    .sports-modal .modal-body {
        max-height: 100vh !important;
        padding: 12px 0px !important;
        display: flex;
        flex-direction: column;
        height: 100vh;
    }

    .sports-modal-header {
        flex-shrink: 0;
        padding: 8px;
        padding-bottom: 10px;
        margin-bottom: 10px;
    }

    .sports-stream-selector {
        flex-shrink: 0;
        margin-bottom: 10px;
        padding: 8px 12px;
    }

    .sports-iframe-container {
        flex: 0 0 auto;
        padding: 0px;
        min-height: 400px;
        max-height: 43vh;
        border-radius: 8px;
        position: sticky;
        top: 0;
        z-index: 10;
        background: #000;
    }

    .sports-iframe-container iframe {
        min-height: 400px;
        max-height: 43vh;
    }

    .sports-live-games {
        flex: 1;
        overflow-y: auto;
        margin-top: 10px;
        padding-top: 10px;
        min-height: 0;
    }

    .sports-live-games h4 {
        font-size: 0.8rem;
        margin-bottom: 8px;
        position: sticky;
        top: 0;
        background: #1a1a1a;
        padding: 4px 0;
        z-index: 5;
    }

    .sports-live-grid {
        max-height: none;
        gap: 6px;
    }

    .sports-live-item {
        padding: 8px 10px;
        gap: 8px;
    }

    .sports-live-item img {
        width: 32px;
        height: 32px;
    }

    .sports-live-item .live-info .live-title {
        font-size: 0.75rem;
    }

    .sports-live-item .live-info .live-teams {
        font-size: 0.6rem;
    }

    .sports-live-item .live-status {
        font-size: 0.55rem;
    }

    .sports-modal-title {
        font-size: 0.95rem;
    }

    .sports-modal-datetime {
        font-size: 0.75rem;
    }

    .sports-modal-countdown {
        font-size: 0.75rem;
    }

    .sports-modal-close {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .sports-iframe-container {
        min-height: 200px;
        max-height: 30vh;
    }

    .sports-iframe-container iframe {
        min-height: 200px;
    }

    .sports-live-item {
        padding: 6px 8px;
        gap: 6px;
    }

    .sports-live-item img {
        width: 28px;
        height: 28px;
    }

    .sports-live-item .live-info .live-title {
        font-size: 0.65rem;
    }

    .sports-modal-title {
        font-size: 0.85rem;
    }
}

/* ==================== SECCIONES FAVORITOS Y CONTINUAR ==================== */
.section-count {
    font-size: 0.85rem;
    color: #888;
    font-weight: 400;
}

.continue-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.clear-history-btn {
    background: rgba(229, 9, 20, 0.15);
    border: 1px solid rgba(229, 9, 20, 0.3);
    color: #e50914;
    padding: 4px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.clear-history-btn:hover {
    background: rgba(229, 9, 20, 0.25);
    border-color: #e50914;
    transform: scale(1.05);
}

/* Tarjetas pequeñas para Favoritos y Continuar viendo */
.grid-scroll.small-cards .card {
    min-width: 140px;
    max-width: 140px;
    height: auto;
    border-radius: 10px;
}

.grid-scroll.small-cards .card-image-wrapper {
    height: auto;
}

.grid-scroll.small-cards .card-image-wrapper .card-image {
    height: 200px;
}

.grid-scroll.small-cards .card-image-wrapper .card-info {
    min-height: 80px;
    padding: 8px 10px 12px 10px;
}

.grid-scroll.small-cards .card-image-wrapper .card-info .card-title {
    font-size: 0.75rem;
    -webkit-line-clamp: 2;
    min-height: 2em;
}

.grid-scroll.small-cards .card-image-wrapper .card-info .card-rating,
.grid-scroll.small-cards .card-image-wrapper .card-info .card-genres,
.grid-scroll.small-cards .card-image-wrapper .card-info .card-overview,
.grid-scroll.small-cards .card-image-wrapper .card-info .card-date,
.grid-scroll.small-cards .card-image-wrapper .card-info .source-badge {
    display: none;
}

.grid-scroll.small-cards .card:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .grid-scroll.small-cards .card {
        min-width: 110px;
        max-width: 110px;
    }

    .grid-scroll.small-cards .card-image-wrapper .card-image {
        height: 160px;
    }

    .grid-scroll.small-cards .card-image-wrapper .card-info {
        min-height: 60px;
        padding: 6px 8px 10px 8px;
    }

    .grid-scroll.small-cards .card-image-wrapper .card-info .card-title {
        font-size: 0.65rem;
    }

    .continue-actions {
        gap: 10px;
    }

    .clear-history-btn {
        font-size: 0.65rem;
        padding: 3px 10px;
    }
}

@media (max-width: 480px) {
    .grid-scroll.small-cards .card {
        min-width: 90px;
        max-width: 90px;
    }

    .grid-scroll.small-cards .card-image-wrapper .card-image {
        height: 130px;
    }

    .grid-scroll.small-cards .card-image-wrapper .card-info {
        min-height: 50px;
        padding: 4px 6px 8px 6px;
    }

    .grid-scroll.small-cards .card-image-wrapper .card-info .card-title {
        font-size: 0.55rem;
        -webkit-line-clamp: 2;
        min-height: 1.4em;
    }

    .section-count {
        font-size: 0.7rem;
    }

    .clear-history-btn {
        font-size: 0.55rem;
        padding: 2px 8px;
    }
}

/* ==================== RADIO ==================== */
.radio-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.radio-search-container {
    display: flex;
    gap: 8px;
    align-items: center;
    flex: 1;
    max-width: 450px;
}

.radio-search-container input {
    flex: 1;
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid #555;
    background: rgba(0,0,0,0.5);
    color: white;
    font-size: 0.85rem;
    min-width: 120px;
}

.radio-search-container input:focus {
    outline: none;
    border-color: #e50914;
}

.radio-search-container input::placeholder {
    color: #888;
}

.radio-search-container button {
    background: #e50914;
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.radio-search-container button:hover {
    background: #f40612;
    transform: scale(1.02);
}

.radio-fav-btn {
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.2);
    color: #f5a623;
    padding: 8px 14px;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.radio-fav-btn:hover {
    background: rgba(255, 215, 0, 0.25);
    border-color: #f5a623;
    transform: scale(1.05);
}

.radio-fav-btn.active {
    background: rgba(255, 215, 0, 0.3);
    border-color: #f5a623;
}

/* ===== RADIO CARDS ===== */
.radio-card {
    min-width: 140px;
    max-width: 140px;
    background: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    flex-shrink: 0;
    cursor: pointer;
    border: 2px solid #333;
}

.radio-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0,0,0,0.8);
    border-color: #e50914;
}

.radio-card.active {
    border-color: #e50914;
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.3);
}

.radio-card .radio-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: #111;
}

.radio-card .radio-info {
    padding: 8px 10px 12px;
    text-align: center;
}

.radio-card .radio-info .radio-name {
    font-size: 0.75rem;
    font-weight: 600;
    white-space: normal;
    line-clamp: 4;
    display: -webkit-box;
  -webkit-line-clamp: 4;
    overflow: hidden;
    text-overflow: ellipsis;
}

.radio-card .radio-info .radio-country {
    font-size: 0.6rem;
    color: #888;
}

.radio-card .radio-fav-indicator {
    position: absolute;
    top: 6px;
    right: 6px;
    color: #f5a623;
    font-size: 0.8rem;
    background: rgba(0,0,0,0.7);
    padding: 2px 6px;
    border-radius: 12px;
    display: none;
}

.radio-card .radio-fav-indicator.active {
    display: block;
}

/* ===== RADIO PLAYER SECTION ===== */
.radio-player-section {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 16px;
    border: 1px solid #333;
    display: none;
}

.radio-player-section.active {
    display: block;
}

.radio-player-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.radio-player-info img {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    background: #222;
    border: 2px solid #333;
}

.radio-player-details {
    flex: 1;
    min-width: 150px;
}

.radio-player-name {
    font-size: 1rem;
    font-weight: 600;
}

.radio-player-country {
    font-size: 0.8rem;
    color: #888;
}

.radio-player-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: #888;
    margin-top: 2px;
}

.radio-player-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    transition: background 0.3s;
}

.radio-player-status .status-dot.connecting {
    background: #f5a623;
    animation: pulse-dot 1s ease-in-out infinite;
}

.radio-player-status .status-dot.connected {
    background: #4caf50;
}

.radio-player-status .status-dot.error {
    background: #e50914;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

.radio-player-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.radio-player-controls button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radio-play-btn {
    background: #e50914;
    color: white;
}

.radio-play-btn:hover {
    background: #f40612;
    transform: scale(1.05);
}

.radio-play-btn.playing {
    background: #4caf50;
}

.radio-play-btn.playing:hover {
    background: #45a049;
}

.radio-stop-btn {
    background: #555;
    color: white;
}

.radio-stop-btn:hover {
    background: #777;
    transform: scale(1.05);
}

.radio-volume {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 140px;
}

.radio-volume input[type="range"] {
    -webkit-appearance: none;
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: #555;
    outline: none;
}

.radio-volume input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #e50914;
    cursor: pointer;
}

.radio-volume input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #e50914;
    cursor: pointer;
    border: none;
}

.radio-current-song {
    color: #aaa;
    font-size: 0.85rem;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #333;
    text-align: center;
}

/* ===== VU METER ===== */
#radioVuMeter {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 20px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #333;
}

#radioVuMeter .vu-bar {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: #333;
    transition: height 0.1s ease, background 0.1s ease;
    min-height: 2px;
    max-height: 28px;
}

/* ===== RADIO RESPONSIVE ===== */
@media (max-width: 768px) {
    .radio-search-container {
        max-width: 100%;
        width: 100%;
    }

    .radio-search-container input {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .radio-search-container button {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .radio-fav-btn {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .radio-card {
        min-width: 110px;
        max-width: 110px;
    }

    .radio-card .radio-image {
        height: 110px;
    }

    .radio-card .radio-info .radio-name {
        font-size: 0.65rem;
    }

    .radio-card .radio-info .radio-country {
        font-size: 0.55rem;
    }

    .radio-player-info {
        flex-direction: column;
        text-align: center;
    }

    .radio-player-controls {
        justify-content: center;
        width: 100%;
    }

    .radio-volume {
        max-width: 100px;
    }

    .radio-player-name {
        font-size: 0.9rem;
    }

    #radioVuMeter {
        height: 16px;
    }

    #radioVuMeter .vu-bar {
        height: 3px;
        max-height: 20px;
    }
}

@media (max-width: 480px) {
    .radio-card {
        min-width: 90px;
        max-width: 90px;
    }

    .radio-card .radio-image {
        height: 90px;
    }

    .radio-card .radio-info .radio-name {
        font-size: 0.55rem;
    }

    .radio-card .radio-info .radio-country {
        font-size: 0.5rem;
    }

    .radio-player-info img {
        width: 44px;
        height: 44px;
    }

    .radio-player-name {
        font-size: 0.8rem;
    }

    .radio-player-controls button {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    .radio-volume {
        max-width: 80px;
    }

    .radio-current-song {
        font-size: 0.75rem;
    }

    #radioVuMeter {
        height: 12px;
    }

    #radioVuMeter .vu-bar {
        height: 2px;
        max-height: 14px;
    }
}