* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f4f4f4;
    color: #333;
}

/* Navbar */
.navbar {
    background: #2c3e50;
    color: white;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 20px;
    font-weight: bold;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    color: white;
    text-decoration: none;
}

.btn-logout {
    background: #e74c3c;
    padding: 6px 14px;
    border-radius: 6px;
}

.btn-logout:hover {
    background: #c0392b;
}

/* Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #f4f4f4;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    margin-bottom: 24px;
    text-align: center;
    color: #2c3e50;
}

.login-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
}

.login-box button {
    width: 100%;
    padding: 12px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

.login-box button:hover {
    background: #1a252f;
}

/* Mensajes */
.error {
    background: #fdecea;
    color: #e74c3c;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 16px;
    text-align: center;
}

.success {
    background: #eafaf1;
    color: #27ae60;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 16px;
    text-align: center;
}

/* Contenedor principal */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Upload */
.upload-box {
    background: white;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.upload-box h2 {
    margin-bottom: 16px;
    color: #2c3e50;
}

.upload-box input[type="file"] {
    margin-right: 12px;
}

.upload-box button {
    padding: 10px 24px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
}

.upload-box button:hover {
    background: #1a252f;
}

/* Filtros */
.filtros {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.filtros a {
    padding: 8px 20px;
    background: white;
    border-radius: 20px;
    text-decoration: none;
    color: #555;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: all 0.2s;
}

.filtros a:hover,
.filtros a.activo {
    background: #2c3e50;
    color: white;
}

/* Galeria grid */
.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-4px);
}

.card img,
.card video {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.card-info {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-info span {
    font-size: 13px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 160px;
}

.btn-eliminar {
    color: #e74c3c;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
}

.btn-eliminar:hover {
    color: #c0392b;
}

/* Responsive */
@media (max-width: 600px) {
    .galeria-grid {
        grid-template-columns: 1fr;
    }

    .navbar {
        flex-direction: column;
        gap: 10px;
    }
}