* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #000000;
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
    color: white;
}

.app-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
}

/* ========== BARRA DE BÚSQUEDA PROFESIONAL ========== */
.search-bar-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 25;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(15px);
    padding: 12px 16px 8px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    pointer-events: none;
    z-index: 2;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 48px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    color: white;
    font-size: 15px;
    font-weight: 500;
    outline: none;
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.18);
    border-color: #00f2ea;
    box-shadow: 0 0 0 2px rgba(0, 242, 234, 0.2);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

.clear-search-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s;
}

.clear-search-btn:hover {
    color: #00f2ea;
}

.search-results-count {
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 6px;
    letter-spacing: 0.3px;
}

/* Feed de videos */
.video-feed {
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-top: 72px; /* espacio para la barra de búsqueda */
}

.video-feed::-webkit-scrollbar {
    display: none;
}

.video-container {
    position: relative;
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    background: #000;
    overflow: hidden;
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

/* Thumbnail o miniatura */
.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 5;
    background: #0a0a0a;
}

/* Overlay oscuro sobre la miniatura */
.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 6;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.thumbnail-overlay:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Botón de play central */
.play-button {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.play-button i {
    font-size: 32px;
    color: #000;
    margin-left: 4px;
}

.play-button:hover {
    transform: scale(1.1);
    background: white;
}

/* ========== CONTROLES PERSONALIZADOS (SEEK + PAUSE) ========== */
.video-controls {
    position: absolute;
    bottom: 20px;
    left: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(12px);
    border-radius: 30px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
    pointer-events: auto;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.video-controls.show {
    opacity: 1;
    visibility: visible;
}

.control-play-pause {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.control-play-pause:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.seek-slider {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

.seek-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #00f2ea;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 6px #00f2ea;
}

.time-display {
    font-size: 11px;
    font-weight: 500;
    color: white;
    min-width: 85px;
    text-align: right;
    letter-spacing: 0.3px;
}

/* Overlay de información del video */
.video-info {
    position: absolute;
    bottom: 80px;
    left: 16px;
    right: 80px;
    z-index: 10;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    padding: 20px 12px 12px 12px;
    border-radius: 12px;
    pointer-events: none;
}

.channel-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
}

.channel-name i {
    font-size: 14px;
    color: #00f2ea;
}

.video-description {
    font-size: 13px;
    line-height: 1.4;
    opacity: 0.95;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.music-name {
    font-size: 11px;
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Botones de acción lateral */
.action-buttons {
    position: absolute;
    right: 12px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 10;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: transform 0.2s ease;
    pointer-events: auto;
}

.action-btn:hover {
    transform: scale(1.1);
}

.action-btn i {
    font-size: 28px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.action-btn span {
    font-size: 11px;
    font-weight: 500;
}

.action-btn.liked i {
    color: #ff3b6f;
    animation: likePop 0.3s ease;
}

@keyframes likePop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Barra inferior */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 20;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: color 0.2s;
    color: #888;
}

.nav-item i {
    font-size: 22px;
}

.nav-item span {
    font-size: 11px;
    font-weight: 500;
}

.nav-item.active {
    color: #00f2ea;
}

/* Indicador de reproducción */
.playing-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 8px;
    height: 8px;
    background: #00f2ea;
    border-radius: 50%;
    box-shadow: 0 0 8px #00f2ea;
    z-index: 10;
    display: none;
}

.playing-indicator.active {
    display: block;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Animación de fade out para miniatura */
.thumbnail-fade-out {
    animation: fadeOut 0.4s ease forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        visibility: visible;
    }
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Mensaje sin resultados */
.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(255,255,255,0.6);
    text-align: center;
    gap: 12px;
    font-size: 16px;
    padding: 40px;
}

.no-results i {
    font-size: 48px;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    .action-buttons {
        gap: 20px;
        right: 10px;
        bottom: 90px;
    }
    
    .action-btn i {
        font-size: 24px;
    }
    
    .video-info {
        bottom: 70px;
        left: 12px;
        right: 70px;
    }
    
    .channel-name {
        font-size: 14px;
    }
    
    .video-description {
        font-size: 12px;
    }

    .play-button {
        width: 60px;
        height: 60px;
    }

    .play-button i {
        font-size: 28px;
    }

    .video-controls {
        padding: 8px 12px;
        bottom: 12px;
    }
    
    .time-display {
        font-size: 10px;
        min-width: 70px;
    }
    
    .search-bar-container {
        padding: 10px 12px 6px 12px;
    }
    
    .video-feed {
        padding-top: 68px;
    }
}

/* Ocultar controles nativos del video */
video::-webkit-media-controls {
    display: none !important;
}

video::-webkit-media-controls-enclosure {
    display: none !important;
}