
:root {
    --bg: #0a0d14;
    --panel: #141821;
    --accent: #dc2626;
    --accent-green: #16a34a;
    --accent-gold: #f59e0b;
    --accent-soft: rgba(220, 38, 38, 0.15);
    --text: #f0f6fc;
    --muted: #8b949e;
    --danger: #f85149;
    --success: #3fb950;
    --border: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 18px 45px rgba(0, 0, 0, 0.5);
    --snow-color: rgba(255, 255, 255, 0.9);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Poppins", Arial, sans-serif;
    /* Optimizado: reducir gradientes complejos para mejor rendimiento */
    background: linear-gradient(135deg, #0a0d14 0%, #141821 50%, #0a0d14 100%);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    position: relative;
    overflow-x: hidden;
    /* Optimización: usar composición de capas para mejor rendimiento */
    will-change: scroll-position;
}

body.admin-page {
    /* Optimizado: simplificar gradientes */
    background: linear-gradient(135deg, #0a0d14 0%, #141821 100%);
}


.admin-layout {
    display: flex;
    flex-direction: column;
    gap: clamp(20px, 4vw, 36px);
    padding: clamp(16px, 4vw, 48px);
}

.admin-panel {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(18px, 4vw, 36px);
}

.tester-card,
.form-card {
    position: relative;
    overflow: hidden;
}

.tester-card::after,
.form-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at top right, rgba(220, 38, 38, 0.25), transparent 65%);
    opacity: 0.35;
    pointer-events: none;
}

.tester-card > *,
.form-card > * {
    position: relative;
}

.tester-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 12px;
}

.admin-section h2,
.listing-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
}

.admin-section h2 i,
.listing-header h2 i {
    color: var(--accent);
    font-size: 0.9em;
}

.login-shell h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
}

.login-shell h1 i {
    color: var(--accent);
    font-size: 1.1em;
}

.tester-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tester-header h2 i {
    color: var(--accent);
    font-size: 0.9em;
}

.tester-hint {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-listing {
    display: block;
}

.listing-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.listing-header p {
    color: var(--muted);
    font-size: 13px;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Native Banner Container */
.native-banner-container {
    width: 100% !important;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    background: transparent;
    display: flex !important;
    justify-content: center;
    align-items: center;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: auto !important;
}

.native-banner-container #container-00e6a6415ae868862469c3a7112bb81b {
    width: 100% !important;
    min-height: 100px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: auto !important;
}

/* Responsive para banner nativo */
@media (max-width: 768px) {
    .native-banner-container {
        padding: 10px 15px;
    }
}

header {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(22, 163, 74, 0.15), transparent 70%), var(--panel);
    border-bottom: 2px solid rgba(220, 38, 38, 0.25);
    padding: 20px clamp(16px, 3vw, 36px);
    position: sticky;
    top: 0;
    z-index: 100;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.header-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.snow-ground {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.1) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 1;
    pointer-events: none;
}

.snow-ground::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 0;
    width: 100%;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.1) 10px,
        rgba(255, 255, 255, 0.1) 12px
    );
    opacity: 0.6;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: clamp(24px, 4vw, 32px);
    letter-spacing: 0.05em;
    color: var(--text);
    overflow: visible;
    position: relative;
    z-index: 2;
    padding-bottom: 2px;
}

.logo-icon {
    color: var(--snow-color);
    font-size: 0.7em;
    animation: snowflakeFloat 3s ease-in-out infinite;
}

.logo-icon:first-child {
    animation-delay: 0s;
}

.logo-icon:last-child {
    animation-delay: 1.5s;
}

.logo-letter {
    display: inline-block;
    opacity: 0;
    transform: translateX(calc(100vw - 50px)) translateY(0) rotate(0deg) scale(0.8);
    animation: letterWalkInSnow 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    position: relative;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    z-index: 2;
}

.logo-letter::before {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 5px;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.2) 40%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    animation: snowFootprint 1.5s ease-out forwards;
}

.logo-letter::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: -40px;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(255, 255, 255, 0.2) 10%,
        rgba(255, 255, 255, 0.4) 30%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0.4) 70%,
        rgba(255, 255, 255, 0.2) 90%,
        transparent 100%);
    border-radius: 50%;
    opacity: 0;
    animation: snowDragTrail 1.5s ease-out forwards;
    transform: scaleX(0);
}

.logo-t {
    animation-delay: 0.1s;
}

.logo-t::before {
    animation-delay: 0.1s;
}

.logo-t::after {
    animation-delay: 0.1s;
}

.logo-v {
    animation-delay: 0.3s;
}

.logo-v::before {
    animation-delay: 0.3s;
}

.logo-v::after {
    animation-delay: 0.3s;
}

.logo-d {
    animation-delay: 0.5s;
}

.logo-d::before {
    animation-delay: 0.5s;
}

.logo-d::after {
    animation-delay: 0.5s;
}

.logo-a {
    animation-delay: 0.7s;
}

.logo-a::before {
    animation-delay: 0.7s;
}

.logo-a::after {
    animation-delay: 0.7s;
}

.logo-y {
    animation-delay: 0.9s;
}

.logo-y::before {
    animation-delay: 0.9s;
}

.logo-y::after {
    animation-delay: 0.9s;
}

.logo-plus {
    animation-delay: 1.1s;
}

.logo-plus::before {
    animation-delay: 1.1s;
}

.logo-plus::after {
    animation-delay: 1.1s;
}

.logo-red {
    color: var(--accent);
    font-weight: 700;
}

.logo-gold {
    color: var(--accent-gold);
    font-weight: 700;
}

@keyframes letterWalkInSnow {
    /* Optimizado: reducir keyframes y eliminar filter blur (muy costoso) */
    0% {
        opacity: 0;
        transform: translateX(calc(100vw - 50px)) translateY(0) scale(0.8);
    }
    50% {
        opacity: 0.7;
        transform: translateX(calc(30vw - 50px)) translateY(0) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateX(0) translateY(0) scale(1);
    }
}

@keyframes snowFootprint {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0);
    }
    40% {
        opacity: 0.8;
        transform: translateX(-50%) scale(1.2);
    }
    70% {
        opacity: 0.6;
        transform: translateX(-50%) scale(1);
    }
    100% {
        opacity: 0.3;
        transform: translateX(-50%) scale(0.9);
    }
}

@keyframes snowDragTrail {
    0% {
        opacity: 0;
        transform: scaleX(0) translateX(0);
    }
    20% {
        opacity: 0.5;
        transform: scaleX(0.4) translateX(-30px);
    }
    50% {
        opacity: 0.7;
        transform: scaleX(0.7) translateX(-20px);
    }
    80% {
        opacity: 0.6;
        transform: scaleX(0.9) translateX(-10px);
    }
    100% {
        opacity: 0.3;
        transform: scaleX(1) translateX(0);
    }
}

@keyframes snowflakeFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-8px) rotate(180deg);
        opacity: 1;
    }
}

nav {
    display: flex;
    gap: 12px;
}

nav a {
    padding: 10px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 500;
}

nav a:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-1px);
}

.main-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: clamp(16px, 3vw, 32px);
    padding: clamp(16px, 2vw, 24px);
    flex: 1;
    min-height: 0;
    align-items: stretch;
}

/* Banner Ad 728x90 - PC: Debajo del header */
.between-cards-ad-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 16px clamp(16px, 2vw, 24px) 0;
    background: transparent;
}

.between-cards-ad-container #44d63c5ce60c37d6928e9320c6aa39db {
    width: 728px !important;
    height: 90px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 auto;
    max-width: 100%;
}

/* Responsive para anuncio 728x90 en PC */
@media (max-width: 768px) {
    .between-cards-ad-container #44d63c5ce60c37d6928e9320c6aa39db {
        width: 100% !important;
        max-width: 728px !important;
        height: 90px !important;
    }
}

/* En PC: Ocultar anuncio móvil */
@media (min-width: 1081px) {
    .mobile-between-cards-ad {
        display: none !important;
    }
}

/* En móvil: Ocultar el anuncio del header */
@media (max-width: 1080px) {
    .between-cards-ad-container {
        display: none;
    }
}

.player-card,
.sidebar-card {
    background: var(--panel);
    border-radius: 22px;
    border: 2px solid var(--border);
    padding: clamp(16px, 3vw, 24px);
    box-shadow: var(--shadow-lg);
    position: relative;
    /* Optimizado: usar transform en lugar de múltiples propiedades */
    transition: transform 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    min-height: 0;
    /* Optimización: composición de capas */
    will-change: transform;
}

.player-card {
    overflow: hidden;
    height: auto;
    min-height: 650px;
    max-height: none;
    padding-bottom: clamp(16px, 3vw, 24px);
}

.sidebar-card {
    overflow: hidden;
    height: 100%;
    min-height: 650px;
    max-height: calc(100vh - 160px);
    display: flex;
    flex-direction: column;
}

/* Banner Ad 320x50 en móvil - Entre las tarjetas */
.mobile-between-cards-ad {
    display: none; /* Oculto por defecto (solo en PC) */
    padding: 20px clamp(16px, 2vw, 24px);
    justify-content: center;
    align-items: center;
    width: 100%;
    background: transparent;
}

.mobile-between-cards-ad #13ba5618e4523b1e1ae2dd790e3b066d-mobile {
    width: 320px !important;
    height: 50px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 auto;
}

/* Responsive para anuncio 320x50 en móvil */
@media (max-width: 480px) {
    .mobile-between-cards-ad #13ba5618e4523b1e1ae2dd790e3b066d-mobile {
        width: 100% !important;
        max-width: 320px !important;
        height: 50px !important;
    }
}

/* En móvil: Mostrar anuncio entre las tarjetas */
@media (max-width: 1080px) {
    .mobile-between-cards-ad {
        display: flex;
    }
}

/* Header Ad Container - Banner 320x50 */
.header-ad-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.header-ad-container #13ba5618e4523b1e1ae2dd790e3b066d {
    width: 320px !important;
    height: 50px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Responsive para header ad */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    
    .header-ad-container {
        width: 100%;
        justify-content: center;
    }
    
    .header-ad-container #13ba5618e4523b1e1ae2dd790e3b066d {
        width: 100% !important;
        max-width: 320px !important;
        height: 50px !important;
    }
}

@media (max-width: 480px) {
    .header-ad-container #13ba5618e4523b1e1ae2dd790e3b066d {
        width: 100% !important;
        max-width: 100% !important;
        height: 50px !important;
    }
}

.player-card::before,
.sidebar-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    /* Optimizado: simplificar gradiente */
    background: radial-gradient(circle, rgba(220, 38, 38, 0.08) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    /* Optimización: no animar pseudo-elementos pesados */
    will-change: opacity;
}

.player-card:hover::before,
.sidebar-card:hover::before {
    opacity: 1;
}

.player-card:hover,
.sidebar-card:hover {
    transform: translateY(-4px);
    border-color: rgba(220, 38, 38, 0.3);
}

.player-card h2,
.sidebar-card h2 {
    font-size: 18px;
    margin-bottom: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-top: 0;
}

.player-card .badge {
    margin-bottom: 10px;
    margin-top: 0;
    display: inline-block;
    width: auto;
    max-width: fit-content;
}

.player-card h2 i,
.sidebar-card h2 i {
    color: var(--accent);
    font-size: 0.9em;
}

.player-shell {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    flex: 0 0 auto;
    min-height: 0;
}

.video-shell {
    background: linear-gradient(135deg, rgba(10, 13, 20, 0.9), rgba(20, 24, 33, 0.9));
    border-radius: 18px;
    border: 2px solid rgba(220, 38, 38, 0.2);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
    z-index: 10;
    isolation: isolate;
    flex-shrink: 0;
    width: 100%;
    /* Optimización: GPU acceleration para video */
    transform: translateZ(0);
    will-change: contents;
}

.video-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    /* Optimizado: simplificar gradiente */
    background: radial-gradient(circle at 30% 30%, rgba(220, 38, 38, 0.1), transparent 50%);
    opacity: 0.4;
    pointer-events: none;
    z-index: 1;
}

.video-shell video {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0e14, #141920);
    position: relative;
    z-index: 2;
}

.video-shell:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-shell:-moz-full-screen {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-shell:-ms-fullscreen {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-shell:fullscreen {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-shell:fullscreen video {
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
}


.player-loading {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(5, 4, 11, 0.92), rgba(220, 38, 38, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 18px;
    z-index: 3;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
}

.player-loading.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.player-loading .spinner {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.18);
    border-top-color: rgba(220, 38, 38, 0.9);
    border-right-color: rgba(22, 163, 74, 0.7);
    animation: spin 0.9s linear infinite;
}

.player-loading span {
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
}

.player-card:not(.tester-card) video {
    width: 100%;
    height: 100%;
}


.channel-meta {
    margin-top: 14px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
    margin-bottom: 0;
    padding-bottom: 0;
    min-height: fit-content;
}

.channel-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin-bottom: 4px;
}

.channel-header-row h3 {
    margin: 0;
    flex: 1;
    min-width: 0;
}

/* Botón de reporte en channel-meta */
.channel-report-btn-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    border: none;
    background: rgba(220, 38, 38, 0.9);
    color: white;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
}

.channel-report-btn-meta:hover {
    background: rgba(220, 38, 38, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.6);
}

.channel-report-btn-meta:active {
    transform: translateY(0);
}

.channel-report-btn-meta i {
    font-size: 14px;
}

.channel-report-btn-meta.reported {
    background: rgba(22, 163, 74, 0.9);
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.4);
}

.channel-report-btn-meta.reported:hover {
    background: rgba(22, 163, 74, 1);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.6);
}

.channel-meta img {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.2s ease;
}

.channel-meta:hover img {
    transform: scale(1.05);
}

.channel-meta div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
    width: 100%;
}

.channel-meta h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    margin-top: 0;
}

.channel-meta p {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 0;
    margin-top: 0;
    line-height: 1.4;
}

.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    position: relative;
    flex-shrink: 0;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 14px;
    z-index: 1;
    pointer-events: none;
}

.search-bar input {
    flex: 1;
    padding: 12px 16px 12px 42px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 14px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.06);
}

.search-bar input:focus + .search-icon,
.search-bar input:focus ~ .search-icon {
    color: var(--accent);
}

.search-bar button {
    padding: 12px 18px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--accent), #b91c1c);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-bar button i {
    font-size: 0.9em;
}

.search-bar button:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #b91c1c, var(--accent));
}

.search-bar button:active {
    transform: translateY(0);
}


.country-accordion {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 14px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
    margin-right: -6px;
    padding-bottom: 4px;
    width: 100%;
    box-sizing: border-box;
}

/* Scrollbar personalizado para el accordion de países */
.country-accordion::-webkit-scrollbar {
    width: 6px;
}

.country-accordion::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.country-accordion::-webkit-scrollbar-thumb {
    background: rgba(220, 38, 38, 0.4);
    border-radius: 10px;
}

.country-accordion::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 38, 38, 0.6);
}

.country-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    transition: border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

.country-section:hover {
    border-color: rgba(220, 38, 38, 0.25);
}

.country-section.is-open {
    border-color: rgba(220, 38, 38, 0.35);
}

.country-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 16px 18px;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
    flex-shrink: 0;
    box-sizing: border-box;
    min-height: 52px;
    gap: 12px;
    text-align: left;
}

.country-toggle > span:first-of-type {
    flex: 1;
    text-align: left;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-left: 0;
}

.country-toggle::before {
    content: "\f7aa";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    font-size: 0.8em;
    color: var(--accent-green);
    pointer-events: none;
    z-index: 1;
}

.country-section.is-open .country-toggle::before {
    opacity: 0.6;
    transform: translateY(-50%) rotate(15deg);
}

.country-toggle:hover::before {
    opacity: 0.4;
}

.country-toggle:hover {
    background: rgba(255, 255, 255, 0.03);
}

.country-toggle .count {
    background: rgba(245, 158, 11, 0.15);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    color: var(--accent-gold);
    border: 1px solid rgba(245, 158, 11, 0.25);
    font-weight: 600;
    flex-shrink: 0;
    white-space: nowrap;
    min-width: fit-content;
    margin-left: auto;
}

.country-toggle svg {
    width: 18px;
    height: 18px;
    min-width: 18px;
    max-width: 18px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    margin-left: 8px;
}

.country-section.is-open .country-toggle svg {
    transform: rotate(180deg);
}

.country-channels {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
}

.country-section.is-open .country-channels {
    padding: 12px 18px;
    /* Altura máxima para mostrar aproximadamente 5 canales */
    /* Cada canal: ~70px (48px imagen + padding 12px + gap 10px) */
    /* 5 canales × 70px = 350px + padding superior/inferior 24px = ~374px */
    max-height: 374px;
    overflow-y: auto;
    overflow-x: hidden;
    flex-shrink: 0;
}

/* Scrollbar personalizado para los canales */
.country-channels::-webkit-scrollbar {
    width: 6px;
}

.country-channels::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.country-channels::-webkit-scrollbar-thumb {
    background: rgba(220, 38, 38, 0.4);
    border-radius: 10px;
}

.country-channels::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 38, 38, 0.6);
}

.channel-pill {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    border: 1px solid transparent;
    padding: 12px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    /* Optimizado: solo transicionar propiedades que no causan reflow */
    transition: border-color 0.2s ease, background-color 0.2s ease;
    position: relative;
    width: 100%;
    min-width: 0;
    /* Optimización: composición de capas */
    transform: translateZ(0);
}

.channel-pill::before {
    display: none;
}

.channel-pill:hover {
    border-color: rgba(220, 38, 38, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.channel-pill:hover::before {
    display: none;
}

.channel-pill.is-active {
    border-color: rgba(220, 38, 38, 0.7);
    background: rgba(220, 38, 38, 0.2);
}

.channel-pill.is-active::before {
    display: none;
}

.channel-pill img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    /* Optimización: GPU acceleration para imágenes */
    transform: translateZ(0);
    will-change: opacity;
}

/* Botones de reporte removidos de pills - ahora solo en channel-meta */

/* Notificación flotante de estado del stream */
.stream-status-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, rgba(20, 24, 33, 0.98), rgba(10, 13, 20, 0.98));
    border: 2px solid rgba(220, 38, 38, 0.3);
    border-radius: 16px;
    padding: 16px 20px;
    min-width: 280px;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.stream-status-notification.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.stream-status-notification .notification-content {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.stream-status-notification .notification-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.stream-status-notification .notification-icon i {
    font-size: 24px;
}

.stream-status-notification.online .notification-icon {
    color: var(--accent-green);
}

.stream-status-notification.offline .notification-icon {
    color: var(--accent);
}

.stream-status-notification .notification-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stream-status-notification .notification-text strong {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.stream-status-notification .notification-text p {
    font-size: 13px;
    color: var(--muted);
    margin: 0;
    line-height: 1.4;
}

.stream-status-notification .notification-text small {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stream-status-notification .notification-text small i {
    font-size: 10px;
}

/* Variante para canal en línea */
.stream-status-notification.online {
    border-color: rgba(22, 163, 74, 0.4);
    background: linear-gradient(135deg, rgba(20, 24, 33, 0.98), rgba(10, 13, 20, 0.98));
}

.stream-status-notification.online .notification-text strong {
    color: var(--accent-green);
}

/* Variante para canal caído */
.stream-status-notification.offline {
    border-color: rgba(220, 38, 38, 0.4);
}

.stream-status-notification.offline .notification-text strong {
    color: var(--accent);
}

.channel-pill-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    overflow: hidden;
    justify-content: center;
}

.channel-pill h4 {
    margin: 0;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Badge de categoría en lugar de tags amarillos */
.channel-pill .category-badge {
    background: rgba(22, 163, 74, 0.15);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    color: var(--accent-green);
    border: 1px solid rgba(22, 163, 74, 0.25);
    font-weight: 600;
    white-space: nowrap;
    align-self: flex-start;
    margin-top: 4px;
    flex-shrink: 0;
    width: fit-content;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.2;
}

/* Ocultar tags en los pills (solo se muestran en la descripción) */
.channel-pill .tags {
    display: none !important;
}

.channel-pill .tags span {
    display: none !important;
}

.empty-state {
    padding: 24px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

/* Spinner ligero para carga de canales */
.channels-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 16px;
}

.channels-loading.hidden {
    display: none;
}

.spinner-light {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(220, 38, 38, 0.8);
    animation: spin 0.8s linear infinite;
    will-change: transform;
}

.channels-loading p {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}

/* Placeholder para imágenes de canales mientras cargan */
.channel-pill img {
    background: rgba(255, 255, 255, 0.05);
    transition: opacity 0.3s ease;
}

.channel-pill img[loading="lazy"] {
    opacity: 0.7;
}

.channel-pill img.loaded {
    opacity: 1;
}

.channel-card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.channel-card-meta .badge {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-size: 11px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    background: rgba(220, 38, 38, 0.2);
    color: var(--accent);
    padding: 5px 10px;
    border-radius: 999px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-weight: 600;
    border: 0.5px solid rgba(220, 38, 38, 0.25);
    flex-shrink: 0;
    width: fit-content;
    white-space: nowrap;
    max-width: 100%;
    box-shadow: none;
}

.live-dot {
    color: var(--accent);
    font-size: 8px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--muted);
}

.status span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
}

footer {
    padding: 32px 16px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    position: relative;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.footer-content i {
    color: var(--accent-gold);
    font-size: 1.2em;
    animation: giftFloat 2s ease-in-out infinite;
}

.footer-content i:last-child {
    animation-delay: 1s;
}

@keyframes giftFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-5px) rotate(10deg);
    }
}

.snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    color: var(--snow-color);
    font-size: 1em;
    animation: snowfall linear infinite;
    opacity: 0.8;
    pointer-events: none;
    z-index: 1;
    /* Optimización: will-change solo cuando sea necesario */
    will-change: transform, opacity;
    /* Optimización: usar GPU acceleration */
    transform: translateZ(0);
    backface-visibility: hidden;
}

.snowflake.behind-video {
    z-index: 0;
}

@media (max-width: 768px) {
    .snowflake {
        font-size: 0.8em;
        opacity: 0.6;
    }
}

@keyframes snowfall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: clamp(16px, 3vw, 28px);
    align-items: start;
}

.admin-section {
    background: var(--panel);
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: clamp(18px, 3vw, 28px);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.admin-section h3 {
    font-size: 18px;
    font-weight: 600;
}

form.channel-form {
    display: grid;
    gap: 14px;
}

form.channel-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
}

form.channel-form input,
form.channel-form textarea {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

form.channel-form input:focus,
form.channel-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.06);
}

form.channel-form textarea {
    min-height: 96px;
    resize: vertical;
}

.field-url {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-url .url-field {
    display: flex;
    align-items: center;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.field-url .url-prefix {
    padding: 12px 14px;
    font-size: 13px;
    color: var(--muted);
    border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.field-url input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 14px;
    color: var(--text);
    font-size: 14px;
}

.field-url input:focus {
    outline: none;
}

form.channel-form button {
    justify-self: flex-start;
}

.button-primary {
    padding: 12px 18px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, var(--accent), #b91c1c);
    color: var(--text);
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.button-primary:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #b91c1c, var(--accent));
}

.button-primary:active {
    transform: translateY(0);
}

.button-ghost {
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.button-ghost:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(220, 38, 38, 0.1);
}

.channel-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 6px;
}

/* Secciones de país en admin (igual que index.php) */
.country-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    transition: border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

.country-section:hover {
    border-color: rgba(220, 38, 38, 0.25);
}

.country-section.is-open {
    border-color: rgba(220, 38, 38, 0.35);
}

/* Sección especial para canales caídos */
.country-section.offline-section {
    border-color: rgba(220, 38, 38, 0.5);
    background: rgba(220, 38, 38, 0.05);
}

.country-section.offline-section:hover {
    border-color: rgba(220, 38, 38, 0.6);
}

.country-section.offline-section.is-open {
    border-color: rgba(220, 38, 38, 0.7);
    background: rgba(220, 38, 38, 0.08);
}

.country-section.offline-section .country-toggle {
    color: var(--accent);
}

.country-section.offline-section .country-toggle span:first-of-type {
    color: var(--accent);
    font-weight: 600;
}

.country-section.offline-section .country-toggle span:first-of-type i {
    margin-right: 8px;
    font-size: 14px;
}

.country-section.offline-section .count {
    background: rgba(220, 38, 38, 0.25);
    color: var(--accent);
    border-color: rgba(220, 38, 38, 0.4);
}

/* Info de categoría/país en canales caídos */
.channel-category-info {
    font-size: 12px;
    color: var(--muted);
    font-weight: normal;
    font-style: italic;
}

/* Responsive para admin - móviles */
@media (max-width: 768px) {
    .channel-row {
        grid-template-columns: 48px 1fr;
        gap: 10px;
        padding: 10px;
    }
    
    .channel-row img {
        width: 48px;
        height: 48px;
    }
    
    .channel-row-actions {
        grid-column: 1 / -1;
        display: flex;
        gap: 8px;
        margin-top: 8px;
        flex-wrap: wrap;
    }
    
    .channel-row-actions button {
        flex: 1;
        min-width: 80px;
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .channel-row-actions button.clear-report {
        flex: 1 1 100%;
    }
    
    .titleWrapper {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .channel-category-info {
        font-size: 11px;
        width: 100%;
        margin-top: 2px;
    }
    
    .offline-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .country-toggle {
        padding: 12px 14px;
        font-size: 14px;
        min-height: 48px;
    }
    
    .country-toggle .count {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .country-section.offline-section .country-toggle span:first-of-type {
        font-size: 14px;
    }
    
    .country-section.offline-section .country-toggle span:first-of-type i {
        font-size: 12px;
        margin-right: 6px;
    }
}

.country-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 16px 18px;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
    flex-shrink: 0;
    box-sizing: border-box;
    min-height: 52px;
    gap: 12px;
    text-align: left;
}

.country-toggle > span:first-of-type {
    flex: 1;
    text-align: left;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-left: 0;
}

.country-toggle:hover {
    background: rgba(255, 255, 255, 0.03);
}

.country-toggle .count {
    background: rgba(245, 158, 11, 0.15);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    color: var(--accent-gold);
    border: 1px solid rgba(245, 158, 11, 0.25);
    font-weight: 600;
    flex-shrink: 0;
    white-space: nowrap;
    min-width: fit-content;
    margin-left: auto;
}

.country-toggle svg {
    width: 18px;
    height: 18px;
    min-width: 18px;
    max-width: 18px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    margin-left: 8px;
}

.country-section.is-open .country-toggle svg {
    transform: rotate(180deg);
}

.country-channels {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
}

.country-section.is-open .country-channels {
    padding: 12px 18px;
    max-height: 2000px;
    overflow-y: auto;
    overflow-x: hidden;
    flex-shrink: 0;
}

/* Scrollbar para canales en países */
.country-channels::-webkit-scrollbar {
    width: 6px;
}

.country-channels::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.country-channels::-webkit-scrollbar-thumb {
    background: rgba(220, 38, 38, 0.4);
    border-radius: 10px;
}

.country-channels::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 38, 38, 0.6);
}

.channel-row {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.channel-row:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.05);
}

.channel-row.active {
    border-color: var(--accent);
    background: var(--accent-soft);
    position: relative;
}

.channel-row.reported-offline {
    border-left: 4px solid var(--accent);
    background: rgba(220, 38, 38, 0.08);
}

.channel-row.reported-offline:hover {
    background: rgba(220, 38, 38, 0.12);
}

.offline-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(220, 38, 38, 0.2);
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    border: 1px solid rgba(220, 38, 38, 0.3);
    flex-shrink: 0;
}

.offline-badge i {
    font-size: 10px;
}

.channel-row.active::before {
    content: "\f06b";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: -20px;
    font-size: 0.9em;
    opacity: 0.7;
    color: var(--accent-gold);
    animation: giftFloat 2s ease-in-out infinite;
}

.channel-row img {
    width: 64px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.channel-row:hover img {
    transform: scale(1.05);
}

.channel-row h4 {
    font-size: 15px;
}

.channel-row span {
    font-size: 12px;
    color: var(--muted);
}

.channel-row-actions {
    display: flex;
    gap: 8px;
}

.channel-row-actions button {
    padding: 8px 12px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.channel-row-actions button.edit {
    background: rgba(220, 38, 38, 0.2);
    color: var(--accent);
}

.channel-row-actions button.delete {
    background: rgba(242, 95, 92, 0.2);
    color: var(--danger);
}

.channel-row-actions button.clear-report {
    background: rgba(22, 163, 74, 0.2);
    color: var(--accent-green);
}

.channel-row-actions button.clear-report:hover {
    background: rgba(22, 163, 74, 0.3);
}

.channel-row-actions button.clear-report i {
    margin-right: 4px;
}

.channel-row-actions button:hover {
    transform: translateY(-2px);
}

.channel-row-actions button:active {
    transform: translateY(0);
}

.stream-tester {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: auto;
}

.stream-tester .tester-input {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stream-tester .tester-input label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.tester-url-field {
    display: flex;
    align-items: center;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    padding: 0 14px;
    gap: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tester-url-field:focus-within {
    border-color: rgba(220, 38, 38, 0.6);
}

.tester-url-field .icon {
    font-size: 16px;
    opacity: 0.65;
    color: var(--muted);
}

.tester-url-field:focus-within .icon {
    color: var(--accent);
    opacity: 1;
}

.tester-url-field input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text);
    padding: 12px 0;
    font-size: 14px;
}

.tester-url-field input:focus {
    outline: none;
}

.stream-tester .tester-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.stream-tester .video-shell {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 9;
}

#stream-debug-info {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.stream-tester input {
    width: 100%;
}

.channel-tags {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-top: 8px;
    align-items: center !important;
    max-width: 100%;
    width: 100%;
    flex-flow: row wrap !important;
}

.channel-tags .badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px;
    font-size: 11px;
    background: rgba(220, 38, 38, 0.2);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-weight: 600;
    border: 1px solid rgba(220, 38, 38, 0.3);
    width: fit-content !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    flex-basis: auto !important;
}

.channel-tags .badge:first-child {
    background: rgba(22, 163, 74, 0.2);
    color: var(--accent-green);
    border-color: rgba(22, 163, 74, 0.3);
}

.toast-area {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

.toast {
    min-width: 240px;
    padding: 14px 18px;
    border-radius: 14px;
    background: rgba(17, 19, 26, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: var(--shadow-md);
    animation: toastSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding-left: 40px;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-color: rgba(22, 163, 74, 0.5);
    background: rgba(17, 19, 26, 0.95);
}

.toast.success::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 14px;
    color: var(--accent-green);
    font-size: 1.1em;
}

.toast.error {
    border-color: rgba(220, 38, 38, 0.5);
    background: rgba(17, 19, 26, 0.95);
}

.toast.error::before {
    content: "\f00d";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 14px;
    color: var(--accent);
    font-size: 1.1em;
}

.toast.info::before {
    content: "\f05a";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 14px;
    color: var(--accent-gold);
    font-size: 1.1em;
}

.toast.fade-out {
    opacity: 0;
    transform: translateX(100%);
}

.login-shell {
    max-width: 360px;
    margin: 120px auto;
    background: var(--panel);
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: clamp(22px, 4vw, 32px);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.login-shell h1 {
    font-size: 20px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field input {
    width: 100%;
    padding: 12px 44px 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-size: 15px;
    letter-spacing: 0.02em;
    transition: border 160ms ease, box-shadow 160ms ease;
}

.password-field input::placeholder {
    color: rgba(255, 255, 255, 0.42);
}

.password-field input:focus {
    outline: none;
    border-color: rgba(220, 38, 38, 0.6);
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: rgba(255, 255, 255, 0.68);
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    cursor: pointer;
    padding: 0;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

.password-toggle:focus-visible {
    outline: 2px solid rgba(220, 38, 38, 0.6);
    outline-offset: 2px;
}

.password-toggle .icon-eye-off {
    display: none;
}

.password-toggle.is-active .icon-eye {
    display: none;
}

.password-toggle.is-active .icon-eye-off {
    display: block;
}

.login-shell input {
    width: 100%;
}

.login-form .button-primary {
    width: 100%;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1080px) {
    .main-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* En móvil, el anuncio se muestra entre las tarjetas usando order */
    .player-card {
        order: 1;
    }
    
    .mobile-between-cards-ad {
        order: 2;
        display: flex;
        padding: 0 clamp(16px, 2vw, 24px);
        margin: 0;
    }
    
    .sidebar-card {
        order: 3;
    }

    .channel-grid {
        max-height: none;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

    .stream-tester {
        grid-template-columns: 1fr;
    }

    .admin-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    header {
        padding: 16px clamp(12px, 2vw, 20px);
    }
    
    .header-content {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    nav {
        width: 100%;
    }

    nav a {
        flex: 1;
        text-align: center;
    }

    .main-layout {
        padding: clamp(12px, 2vw, 16px);
        gap: clamp(12px, 2vw, 16px);
    }
    
    /* Notificación responsive */
    .stream-status-notification {
        bottom: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }

    .player-card,
    .sidebar-card {
        padding: clamp(12px, 2vw, 16px);
        border-radius: 18px;
    }

    .player-card {
        min-height: auto;
        padding-bottom: clamp(12px, 2vw, 16px);
    }

    .sidebar-card {
        min-height: auto;
        max-height: none;
        height: auto;
    }

    .player-card h2,
    .sidebar-card h2 {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .player-card .badge {
        margin-bottom: 8px;
        padding: 4px 10px;
        font-size: 10px;
    }

    .player-shell {
        gap: 10px;
    }

    .video-shell {
        border-radius: 14px;
    }

    .channel-meta {
        margin-top: 10px;
        gap: 10px;
    }

    .channel-meta img {
        width: 48px;
        height: 48px;
    }

    .channel-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .channel-header-row h3 {
        width: 100%;
    }

    .channel-report-btn-meta {
        width: 100%;
        justify-content: center;
        padding: 10px 14px;
    }

    .channel-meta h3 {
        font-size: 16px;
        margin-bottom: 3px;
    }

    .channel-meta p {
        font-size: 13px;
        line-height: 1.3;
    }

    .channel-meta div {
        gap: 3px;
    }

    .channel-tags {
        margin-top: 6px;
        gap: 5px;
    }

    .channel-tags .badge {
        font-size: 10px;
        padding: 3px 8px;
    }

    .search-bar {
        margin-bottom: 14px;
        gap: 8px;
    }

    .search-bar input {
        padding: 10px 14px 10px 38px;
        font-size: 13px;
    }

    .search-bar button {
        padding: 10px 14px;
        font-size: 13px;
    }

    .channel-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .tester-actions {
        flex-direction: column;
        width: 100%;
    }

    .tester-actions button {
        width: 100%;
    }

    .form-split {
        grid-template-columns: 1fr;
    }

    .country-channels {
        gap: 8px;
    }

    .channel-pill {
        padding: 10px;
        gap: 10px;
    }

    .channel-pill img {
        width: 42px;
        height: 42px;
    }

    .channel-pill h4 {
        font-size: 13px;
    }

    .channel-pill .category-badge {
        font-size: 9px;
        padding: 3px 8px;
    }

    .country-accordion {
        margin-top: 10px;
        gap: 10px;
    }

    .country-toggle {
        padding: 12px 14px;
        font-size: 14px;
    }

    main {
        padding: 0;
    }

    body {
        padding: 0;
    }

    .player-card,
    .sidebar-card {
        margin: 0;
    }

    footer {
        padding: 12px clamp(12px, 2vw, 16px);
        margin-top: 12px;
    }

    footer .footer-content {
        font-size: 11px;
        gap: 6px;
        padding: 8px 0;
    }

    .native-banner-container {
        padding: 8px 0;
        margin: 12px 0;
    }
}

.video-shell video::-webkit-media-controls-timeline {
    display: none !important;
}

.video-shell video::-webkit-media-controls-current-time-display,
.video-shell video::-webkit-media-controls-time-remaining-display {
    display: none !important;
}
