/* ===== TWITCH SEARCH RESULTS VIEW ===== */
.tsr-view {
    width: 1920px  ;
    height: 1080px  ;
    display: grid  ;
    grid-template-rows: auto 1fr  ;
    gap: 24px  ;
    padding: 32px  ;
    background: linear-gradient(135deg, #0b0f14 0%, #0e1420 100%)  ;
    border-radius: 24px  ;
    backdrop-filter: blur(20px)  ;
    border: 1px solid rgba(255, 255, 255, 0.1)  ;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3)  ;
    overflow: visible  ;
    position: relative  ;
    color: #ffffff  ;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif  ;
}

/* ===== HEADER ===== */
.tsr-header {
    display: flex  ;
    align-items: center  ;
    gap: 24px  ;
    padding: 16px 0  ;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1)  ;
}



.tsr-back-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    text-decoration: none;
}

.tsr-back-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.tsr-back-button:active {
    transform: scale(0.98);
}

.tsr-back-button .tsr-back-icon {
    font-size: 18px;
    font-weight: bold;
}

.tsr-back-button .tsr-back-text {
    font-size: 14px;
}

.tsr-title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    flex: 1;
}

/* ===== BARRA DE BÚSQUEDA ===== */
.tsr-search-bar {
    padding: 16px 0  ;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1)  ;
}

.tsr-search-bar .tsr-search-container {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.tsr-search-bar .tsr-search-input {
    flex: 1;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 400;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    outline: none;
}

.tsr-search-bar .tsr-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.tsr-search-bar .tsr-search-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #9146ff;
    box-shadow: 0 0 0 3px rgba(145, 70, 255, 0.1);
}

.tsr-search-bar .tsr-search-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #9146ff 0%, #7c3aed 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(145, 70, 255, 0.3);
}

.tsr-search-bar .tsr-search-button:hover {
    background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 100%);
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(145, 70, 255, 0.4);
}

.tsr-search-bar .tsr-search-icon {
    font-size: 20px;
}



/* ===== CONTENIDO ===== */
.tsr-content {
    display: flex  ;
    flex-direction: column  ;
    gap: 24px  ;
    overflow-y: auto  ;
    padding-right: 8px  ;
}

/* Scrollbar personalizado */
.tsr-content::-webkit-scrollbar {
    width: 8px;
}

.tsr-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.tsr-content::-webkit-scrollbar-thumb {
    background: rgba(145, 70, 255, 0.6);
    border-radius: 4px;
}

.tsr-content::-webkit-scrollbar-thumb:hover {
    background: rgba(145, 70, 255, 0.8);
}

/* ===== ESTADOS ===== */
.tsr-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 60px 20px;
    text-align: center;
}

.tsr-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(145, 70, 255, 0.2);
    border-top: 4px solid #9146ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.tsr-loading-text {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.tsr-error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 60px 20px;
    text-align: center;
}

.tsr-error-icon {
    font-size: 48px;
    color: #ef4444;
}

.tsr-error-message {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.tsr-retry-button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #9146ff 0%, #7c3aed 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.tsr-retry-button:hover {
    background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 100%);
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(145, 70, 255, 0.3);
}

/* ===== CONTENEDOR DE RESULTADOS ===== */
.tsr-results-container {
    width: 100%  ;
    height: auto  ;
    position: static  ;
    top: auto  ;
    left: auto  ;
    right: auto  ;
    bottom: auto  ;
    display: block  ;
    flex-direction: unset  ;
    gap: 0  ;
    padding: 0  ;
    overflow: visible  ;
    background: none  ;
}

/* ===== SECCIÓN DE RESULTADOS ===== */
.tsr-search-results-section {
    width: 100%  ;
    height: auto  ;
}

/* ===== GRID DE VIDEOS ===== */
.tsr-videos-grid {
    display: grid  ;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr))  ;
    gap: 24px  ;
    padding: 16px 0  ;
}

.tsr-video-card {
    display: flex  ;
    flex-direction: column  ;
    background: rgba(255, 255, 255, 0.05)  ;
    border: 1px solid rgba(255, 255, 255, 0.1)  ;
    border-radius: 16px  ;
    overflow: hidden  ;
    cursor: pointer  ;
    transition: all 0.3s ease  ;
    backdrop-filter: blur(10px)  ;
    position: relative  ;
}

.tsr-video-card:hover {
    transform: scale(1.02);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.tsr-video-thumbnail {
    width: 100%  ;
    height: 180px  ;
    object-fit: cover  ;
}

.tsr-video-info {
    padding: 16px  ;
}

.tsr-video-title {
    font-size: 14px  ;
    font-weight: 500  ;
    color: #ffffff  ;
    margin-bottom: 8px  ;
    line-height: 1.4  ;
    display: -webkit-box  ;
    -webkit-line-clamp: 2  ;
    -webkit-box-orient: vertical  ;
    overflow: hidden  ;
}

.tsr-video-meta {
    font-size: 12px  ;
    color: rgba(255, 255, 255, 0.6)  ;
}

/* ===== GRID DE CANALES ===== */
.tsr-channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding: 16px 0;
}

/* ===== TARJETAS DE CANAL ===== */
.tsr-channel-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
}

.tsr-channel-card:hover {
    transform: scale(1.02);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* ===== NÚMEROS DE CANAL ===== */
.tsr-channel-number {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #9146ff, #7c3aed);
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(145, 70, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.tsr-channel-card:hover .tsr-channel-number {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(145, 70, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.4);
}

.tsr-channel-thumbnail {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.tsr-channel-info {
    padding: 16px;
}

.tsr-channel-title {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tsr-channel-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* ===== ESTADO ONLINE/OFFLINE ===== */
.tsr-stream-status {
    position: absolute  ;
    top: 12px  ;
    right: 12px  ;
    display: flex  ;
    align-items: center  ;
    gap: 6px  ;
    background: rgba(0, 0, 0, 0.8)  ;
    padding: 4px 8px  ;
    border-radius: 12px  ;
    border: 1px solid rgba(255, 255, 255, 0.2)  ;
    backdrop-filter: blur(8px)  ;
    z-index: 10  ;
}

.tsr-stream-status.online {
    border: 1px solid rgba(0, 255, 0, 0.3)  ;
}

.tsr-stream-status.offline {
    border: 1px solid rgba(102, 102, 102, 0.3)  ;
}

.tsr-stream-status .tsr-status-dot {
    width: 8px  ;
    height: 8px  ;
    border-radius: 50%  ;
    background: #00ff00  ;
    box-shadow: 0 0 6px rgba(0, 255, 0, 0.6)  ;
}

.tsr-stream-status.offline .tsr-status-dot {
    background: #666666  ;
    box-shadow: 0 0 6px rgba(102, 102, 102, 0.6)  ;
}

.tsr-stream-status .tsr-status-text {
    font-size: 10px  ;
    font-weight: 600  ;
    color: #ffffff  ;
}

.tsr-stream-status.offline .tsr-status-text {
    color: #666666  ;
}

/* ===== SCROLLBAR PERSONALIZADO ===== */
.tsr-content::-webkit-scrollbar {
    width: 8px;
}

.tsr-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.tsr-content::-webkit-scrollbar-thumb {
    background: rgba(145, 70, 255, 0.6);
    border-radius: 4px;
}

.tsr-content::-webkit-scrollbar-thumb:hover {
    background: rgba(145, 70, 255, 0.8);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .tsr-videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .tsr-view {
        padding: 20px;
        gap: 16px;
    }
    
    .tsr-videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 16px;
    }
    
    .tsr-title {
        font-size: 20px;
    }
}

/* ===== ANIMACIONES - DESHABILITADAS para evitar conflictos con CSS3D ===== */
.tsr-video-card {
    /* animation: fadeInUp 0.4s ease forwards; */
}

.video-card:nth-child(1) { animation-delay: 0.1s; }
.video-card:nth-child(2) { animation-delay: 0.2s; }
.video-card:nth-child(3) { animation-delay: 0.3s; }
.video-card:nth-child(4) { animation-delay: 0.4s; }
.video-card:nth-child(5) { animation-delay: 0.5s; }
.video-card:nth-child(6) { animation-delay: 0.6s; }

/* ===== DWELL CLICK EFFECTS ===== */
.video-card[data-dwell-hover="true"] {
    background: rgba(145, 70, 255, 0.1);
    border-color: rgba(145, 70, 255, 0.5);
    transform: scale(1.02);
}

.video-card[data-dwell-active="true"] {
    background: rgba(145, 70, 255, 0.2);
    border-color: #9146ff;
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(145, 70, 255, 0.4);
}

.video-card[data-dwell-ready="true"] {
    background: rgba(145, 70, 255, 0.15);
    border-color: rgba(145, 70, 255, 0.6);
    transform: scale(1.03);
    box-shadow: 0 0 20px rgba(145, 70, 255, 0.3);
}
