/* Fondo general y partículas */
body {
    background: linear-gradient(135deg, #181c24 0%, #23272f 100%);
    color: #fff;
    font-family: 'Inter', system-ui, sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Contenedor principal */
.container {
    max-width: 1100px;
    margin: 80px auto 2rem; /* antes 200px, ahora 100px */
    padding: 2.5rem 2rem;
    background: rgba(24, 28, 36, 0.98);
    border-radius: 22px;
    box-shadow: 0 8px 32px #ff9d0033, 0 1.5px 0 #fff2 inset;
    border: 2px solid #ff4d4d;
    backdrop-filter: blur(10px);
    transition: box-shadow 0.3s;
}
.container h2 {
    color: #ff4d4d;
    margin-bottom: 2rem;
    font-size: 2rem;
    letter-spacing: 1px;
    text-align: center;
}

/* Video List Grid */
#video-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 2rem;
}

/* Tarjeta de video */
.video-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #23272f 80%, #181c24 100%);
    border-radius: 18px;
    box-shadow: 0 4px 24px #ff4d4d33, 0 1.5px 0 #fff2 inset;
    border: 2px solid #ff4d4d;
    text-decoration: none;
    color: #fff;
    overflow: hidden;
    transition: transform 0.18s, box-shadow 0.18s, border 0.18s;
    min-height: 340px;
    position: relative;
}
.video-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 8px 32px #ffae3355;
    border: 2px solid #ffae33;
    z-index: 2;
}

/* Miniatura */
.thumbnail {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    background: #181c24;
    border-bottom: 2px solid #ff4d4d;
}

/* Info del video */
.video-info {
    padding: 1.2rem 1rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    flex: 1;
}
.title {
    font-size: 1.18rem;
    font-weight: bold;
    color: #ffae33;
    margin-bottom: 0.2rem;
    letter-spacing: 0.5px;
}
.category {
    font-size: 0.98rem;
    color: #ff4d4d;
    font-weight: 500;
}
.description {
    font-size: 0.97rem;
    color: #fff;
    opacity: 0.85;
    margin-top: 0.2rem;
}

/* Buscador */
.search-container {
    display: flex;
    align-items: center;
    background: #23272f;
    border-radius: 30px;
    padding: 0.2rem 1rem;
    box-shadow: 0 2px 8px #ff4d4d22;
    margin: 2.5rem auto 1.5rem auto; /* Más espacio arriba y centrado */
    width: 100%;
    max-width: 420px;
    display: flex;
    justify-content: center;
}
.search-icon {
    font-size: 1.2rem;
    margin-right: 0.7rem;
    color: #ffae33;
}
#search {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1rem;
    outline: none;
    width: 140px;
    padding: 0.5rem 0;
}
.clear-btn {
    background: none;
    border: none;
    color: #ff4d4d;
    font-size: 1.1rem;
    cursor: pointer;
    margin-left: 0.5rem;
    display: none;
    transition: color 0.2s;
}
.clear-btn:hover {
    color: #ffae33;
}

/* Partículas */
.particle {
    position: fixed;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff4d4d 0%, #ffae33 100%);
    opacity: 0.18;
    pointer-events: none;
    z-index: 0;
    animation: float 8s linear infinite;
}
@keyframes float {
    0% { transform: translateY(0) scale(1);}
    100% { transform: translateY(-120vh) scale(0.7);}
}

/* Responsive */
@media (max-width: 900px) {
    .search-container {
        margin: 1.2rem 1rem 0 1rem;
        width: auto;
        min-width: 0;
        max-width: 100%;
        justify-content: center;
    }
    .container {
        margin-top: 60px;
        padding: 1.2rem 0.5rem;
    }
    #video-list {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
}