/* --- 1. CONFIGURACIÓN GLOBAL --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif; /* Tipografía limpia para textos */
    background-color: #fdfdfd; /* Blanco roto muy suave */
    color: #333;
    line-height: 1.6;
}

/* Tipografía elegante para títulos */
h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

/* --- 2. HEADER Y NAVEGACIÓN --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: #fff;
    position: relative;
    border-bottom: 1px solid #eee;
}

header h1 {
    font-size: 2.5rem;
    color: #000;
    margin-bottom: 15px;
    letter-spacing: -1px;
    background: #fff;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 0;
}

nav a {
    text-decoration: none;
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

nav a:hover {
    color: #000;
}

/* --- 3. SECCIÓN DE SUBIDA (PANEL ADMIN) --- */
#upload-section {
    max-width: 800px;
    margin: 0 auto 50px auto;
    padding: 30px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

#upload-section h3 {
    margin-bottom: 20px;
    color: #000;
}

.upload-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.upload-container input {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    flex: 1;
    min-width: 200px;
    font-family: 'Inter', sans-serif;
}

#upload-btn {
    background-color: #000;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    transition: background-color 0.3s;
}

#upload-btn:hover {
    background-color: #333;
}

/* --- 4. LA GALERÍA (GRILLA) --- */
.art-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 50px 20px;
}

/* --- 5. TARJETAS DE ARTE (ART-CARD) --- */
.art-card {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.art-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.art-card img {
    width: 100%;
    height: 300px; /* Altura fija para uniformidad */
    object-fit: cover; /* Recorta la imagen para que llene el espacio sin deformarse */
}

.art-card .info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.art-card h3 {
    font-size: 1.4rem;
    color: #000;
    margin-bottom: 5px;
}

.art-card p {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 15px;
    font-style: italic;
}

/* Interacción (Likes) */
.interaction {
    margin-bottom: 15px;
}

.like-btn {
    background: none;
    border: 1px solid #ccc;
    padding: 5px 10px;
    border-radius: 20px;
    cursor: pointer;
    color: #555;
    transition: background 0.3s ease;
}

.like-btn:hover {
    background-color: #f9f9f9;
    transform: scale(1.1);
}

/* --- 6. SECCIÓN DE COMENTARIOS --- */
.comments-section {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: auto;
}

.comments-list {
    max-height: 150px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.comment-item {
    font-size: 0.85rem;
    background-color: #f9f9f9;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment-input-group {
    display: flex;
    gap: 5px;
}

.comment-input-group input {
    flex: 1;
    padding: 8px;
    border: 1px solid #eee;
    border-radius: 4px;
    font-size: 0.8rem;
}

.comment-input-group button {
    background-color: #f0f0f0;
    color: #333;
    border: none;
    padding: 0 15px;
    border-radius: 4px;
    cursor: pointer;
}

/* --- 7. BOTONES DE ADMIN (BORRAR) --- */
.admin-only {
    display: none; /* Oculto por defecto */
}

body.admin-logged-in .admin-only {
    display: inline-block; /* Se muestra cuando eres admin */
}

.delete-comment-btn {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.5;
}

.delete-comment-btn:hover {
    opacity: 1;
}

/* Controles de Login fijos abajo */
#admin-controls {
    display: none;
}

#login-btn, #logout-btn {
   background: none; /* Quitamos el fondo negro circular */
    color: #666;      /* Color gris como los otros enlaces */
    padding: 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: color 0.3s;
    border: none;
}

#login-btn:hover, #logout-btn:hover {
    color: #000;      /* Se pone negro al pasar el mouse */
    background: none;
}

/* Aseguramos que el observador de Firebase controle la visibilidad */
.admin-logged-in #login-btn {
    display: none !important;
}

.admin-logged-in #logout-btn {
    display: inline-block !important;
}

/* Boton eliminar*/
.art-card {
    position: relative; /* Necesario para ubicar la X */
}

.delete-art-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #ff4d4d;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: 0.3s;
}

.delete-art-btn:hover {
    background: #ff4d4d;
    color: #fff;
}

.like-btn.liked {
    background-color: #ffebeb;
    border-color: #ff4d4d;
    color: #ff4d4d;
    cursor: default;
}

/* Ocultar elementos de admin por defecto */
.admin-only, #upload-section {
    display: none;
}

/* Solo cuando el body tiene la clase admin-logged-in, se muestran */
.admin-logged-in .admin-only {
    display: inline-block;
}

.admin-logged-in #upload-section {
    display: block !important;
}

/* MODAL */
/* Fondo oscuro translúcido */
.modal-overlay {
    display: none; /* Oculto por defecto */
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(5px); /* Efecto de desenfoque moderno */
}

/* Caja blanca del formulario */
.modal-content {
    background: white;
    width: 90%; max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.modal-content input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.modal-content button {
    width: 100%;
    padding: 12px;
    background: #000;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.close-modal {
    position: absolute;
    right: 15px; top: 10px;
    font-size: 24px;
    cursor: pointer;
}


/* Agrega o actualiza esto en el <style> de admin.html */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: white;
    color: #333;
    font-family: 'Inter', sans-serif;
}

.admin-table th {
   background-color: #f4f4f4; /* Fondo gris claro para el encabezado */
    color: #333 !important;    /* Texto oscuro forzado */
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #ddd;
    font-weight: bold;
}

.admin-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.btn-delete {
    background: #ff4d4d;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.3s;
}

.btn-delete:hover {
    background: #cc0000;
}

/* Botón Hamburguesa (Oculto por defecto en PC) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #333;
}

/* Menú de navegación */
.nav-menu {
    display: flex;
    gap: 20px;
}

.nav-menu a {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: color 0.3s;
}

/* Color para el enlace cuando está activo */
.nav-menu a.active {
    color: #000 !important; /* Color más oscuro o el que prefieras */
    font-weight: bold;
    border-bottom: 2px solid #f1c40f; /* Una línea dorada abajo */
    padding-bottom: 2px;
}

/* EFECTO CUANDO YA DIO LIKE: Fondo rojo suave */
.like-btn.liked-active {
    background-color: rgba(255, 0, 0, 0.1); /* Rojo muy suave y transparente */
    border-color: rgba(255, 0, 0, 0.2);     /* Borde sutilmente rojizo */
    cursor: default;                        /* Quita la manito de click */
    transform: none !important;             /* Bloquea cualquier salto */
}

/* El salto de hover SOLO para los que NO han dado Like */
.like-btn:not(.liked-active):hover {
    transform: scale(1.1);
    background-color: #f9f9f9;
}

.nav-menu a.active {
    color: #000 !important;
    font-weight: bold;
    border-bottom: 2px solid #f1c40f;
}


/* Estilo especial para el botón VIP en el menú */
.btn-vip-resaltado {
    background-color: #f1c40f; /* Dorado */
    color: #000 !important;    /* Texto negro para contraste */
    padding: 0 5px;         /* Espaciado interno para que parezca botón */
    border-radius: 5px;       /* Bordes redondeados */
    font-weight: bold;         /* Texto en negrita */
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #f1c40f;
    box-shadow: 0 0 10px rgba(241, 196, 15, 0.3); /* Brillo sutil */
    margin-left: 10px;         /* Separación de los otros links */
}

/* Efecto al pasar el mouse */
.btn-vip-resaltado:hover {
    background-color: transparent; /* Se vuelve hueco */
    color: #5e4f11 !important;     /* Texto dorado */
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.6); /* Brillo más fuerte */
    transform: translateY(-2px);   /* Pequeño salto */
}
/* ---------------------------------------------------- */
/* --- MÓVIL (Pantallas menores a 768px) --- */
@media (max-width: 768px) {
    .menu-toggle {
        display: block; /* Aparece el botón */
    }

    .nav-menu {
        display: none; /* Se oculta el menú normal */
        flex-direction: column;
        position: absolute;
        top: 100%; /* Justo debajo del header */
        left: 0;
        width: 100%;
        background-color: #fff;
        padding: 20px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        z-index: 999;
        text-align: center;
    }

    /* Clase que activaremos con JS */
    .nav-menu.active {
        display: flex;
    }
.btn-vip-resaltado {
    
    padding: 10px 5px;         /* Espaciado interno para que parezca botón */

}
}