body {
    background: #0f172a;
    color: #e5e7eb;
    font-family: 'Segoe UI', Arial, sans-serif;
    padding: 20px;
    text-align: center;
    margin: 0;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Botones con degradado */
.main-btn, .btn {
    display: inline-block;
    margin: 10px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white !important;
    text-decoration: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.main-btn:hover {
    transform: scale(1.05);
}

/* Cuadrícula de archivos */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    justify-content: center;
    padding: 20px;
}

.item {
    background: #1e293b;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.item img, .item video {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}

.item a {
    display: block;
    margin-top: 10px;
    color: #60a5fa;
    text-decoration: none;
    font-size: 14px;
}

/* MODAL Mejorado */
.modal {
    display: none; /* Se activa con JS */
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

/* Barra de progreso */
.progress-item {
    background: #1e293b;
    padding: 15px;
    margin: 10px auto;
    max-width: 500px;
    border-radius: 8px;
}
.progress-bar {
    background: #334155;
    height: 10px;
    border-radius: 5px;
    margin: 10px 0;
}
.progress-bar span {
    display: block;
    height: 100%;
    width: 0%;
    background: #22c55e;
    transition: width 0.3s;
}

/* --- Mejoras para el INDEX --- */

.main-wrapper {
    max-width: 900px;
    margin: 50px auto;
    padding: 20px;
}

header h1 {
    font-size: 2.5rem;
    color: #f8fafc;
    margin-bottom: 10px;
}

header p {
    color: #94a3b8;
    margin-bottom: 40px;
}

.dashboard {
    display: flex;
    gap: 25px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Estilo de las Tarjetas */
.card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 20px;
    width: 280px;
    padding: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
}

.card:hover {
    transform: translateY(-10px);
    border-color: #3b82f6;
    background: #232f45;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.card-icon {
    font-size: 50px;
    color: #3b82f6;
    margin-bottom: 20px;
}

.card-info h3 {
    margin: 10px 0;
    font-size: 1.4rem;
}

.card-info p {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* Botón decorativo dentro de la tarjeta */
.btn-mini {
    padding: 8px 20px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid #3b82f6;
    color: #3b82f6;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: bold;
    transition: 0.3s;
}

.card:hover .btn-mini {
    background: #3b82f6;
    color: white;
}

footer {
    margin-top: 60px;
    color: #475569;
    font-size: 0.8rem;
}

/* Variables de color llamativas */
:root {
    --bg-dark: #05070a;
    --grad-video: linear-gradient(45deg, #ff0055, #ff5e00);
    --grad-photo: linear-gradient(45deg, #00d2ff, #3a7bd5);
    --glass: rgba(255, 255, 255, 0.05);
}

body {
    background: var(--bg-dark);
    background-image: radial-gradient(circle at 50% -20%, #1e293b, #05070a);
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.hero-container {
    width: 100%;
    max-width: 1100px;
    padding: 40px 20px;
    text-align: center;
}

.text-gradient {
    background: linear-gradient(to right, #00d2ff, #ff0055);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
}

.glass-header {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 30px;
    margin-bottom: 50px;
}

/* Dashboard de cartas gigantes */
.dashboard-colorful {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.mega-card {
    position: relative;
    width: 320px;
    height: 400px;
    border-radius: 40px;
    text-decoration: none;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: #111;
    border: 2px solid rgba(255,255,255,0.05);
}

.mega-card:hover {
    transform: translateY(-15px) scale(1.02);
}

.card-content {
    position: relative;
    z-index: 2;
    color: white;
}

.icon-circle {
    width: 90px;
    height: 90px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 20px;
    backdrop-filter: blur(5px);
}

/* Colores específicos */
.video-card:hover { box-shadow: 0 20px 50px rgba(255, 0, 85, 0.3); border-color: #ff0055; }
.photo-card:hover { box-shadow: 0 20px 50px rgba(0, 210, 255, 0.3); border-color: #00d2ff; }

.video-card .icon-circle { color: #ff0055; }
.photo-card .icon-circle { color: #00d2ff; }

/* El "Manchón" de color de fondo (Blob) */
.blob {
    position: absolute;
    width: 200px;
    height: 200px;
    filter: blur(60px);
    z-index: 1;
    opacity: 0.3;
    transition: 0.5s;
}

.video-card .blob { background: #ff0055; top: -50px; right: -50px; }
.photo-card .blob { background: #00d2ff; bottom: -50px; left: -50px; }

.mega-card:hover .blob {
    opacity: 0.8;
    width: 300px;
    height: 300px;
}

/* Botón de acción interno */
.action-btn {
    margin-top: 20px;
    display: inline-block;
    padding: 12px 25px;
    background: white;
    color: black;
    border-radius: 50px;
    font-weight: bold;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.video-card .action-btn { background: var(--grad-video); color: white; }
.photo-card .action-btn { background: var(--grad-photo); color: white; }

.main-footer {
    margin-top: 60px;
    color: #475569;
}
/* 1. Quitamos restricciones de ancho del contenedor principal */
.container {
    width: 100%;
    max-width: 100vw; /* Ocupa todo el ancho de la ventana */
    padding: 20px;
    box-sizing: border-box;
}

/* 2. Cuadrícula que llena TODA la pantalla */
.grid {
    display: grid;
    /* Esto crea tantas columnas como quepan, mínimo 200px cada una */
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
    gap: 20px;
    width: 100%;
    margin-top: 30px;
    justify-items: center; /* Centra los items dentro de su celda */
}

/* 3. Estilo de cada tarjeta de archivo */
.item {
    background: #1e293b;
    border-radius: 12px;
    padding: 10px;
    width: 100%; /* Ocupa el ancho de la columna del grid */
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.item:hover {
    transform: scale(1.03);
    border-color: #3b82f6;
}

/* 4. Miniaturas uniformes */
.item img, .item video {
    width: 100%;
    height: 180px; /* Altura fija para que todas las filas queden alineadas */
    object-fit: cover; /* Recorta la imagen para llenar el cuadro sin deformarse */
    border-radius: 8px;
    display: block;
}

/* Ajuste para móviles: si la pantalla es pequeña, se verá en 2 columnas */
@media (max-width: 500px) {
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }
    .item img, .item video {
        height: 120px;
    }
}

.item {
    background: #1e293b;
    border-radius: 15px;
    padding: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255,255,255,0.05);
}

.item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

.item img, .item video {
    width: 100%;
    height: 200px; /* Altura fija para que todas se vean parejas */
    object-fit: cover; /* Evita que la imagen se estire feo */
    border-radius: 10px;
}