/* style.css - Diseño Elegante y Decorado para Andrea */

/* Importar fuentes elegantes */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;1,700&family=Poppins:wght@300;400;600&display=swap');

body {
    background-color: #f3e5f5; /* Lila claro base */
    background-image: linear-gradient(135deg, #f3e5f5 0%, #fff8e1 50%, #f3e5f5 100%); /* Degradado acuarela */
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    color: #512da8;
    position: relative;
    overflow-x: hidden;
}

/* Grandes numerales XV en el fondo */
body::before {
    content: "XV";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Playfair Display', serif;
    font-size: 50vh;
    font-weight: bold;
    color: rgba(103, 58, 183, 0.05); /* Muy, muy sutil */
    z-index: -1;
}

.container {
    text-align: center;
    background: white;
    padding: 60px 40px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    max-width: 400px;
    width: 90%;
    position: relative;
    overflow: hidden; /* Para que las flores no se salgan */
    border: 2px solid #e1bee7;
    transition: transform 0.3s ease;
}

.container:hover {
    transform: translateY(-5px); /* Efecto de levitación sutil */
}

/* Flores en las esquinas */
.container::before,
.container::after {
    content: "";
    position: absolute;
    width: 100px;
    height: 100px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.8;
}

.container::before {
    background-image: url('images/flower-corner-tr.png'); /* Asegúrate de subir una imagen similar a tu carpeta images */
    top: -10px;
    right: -10px;
}

.container::after {
    background-image: url('images/flower-corner-bl.png'); /* Asegúrate de subir una imagen similar a tu carpeta images */
    bottom: -10px;
    left: -10px;
}

/* Mariposas flotando sutilmente */
.butterfly {
    position: absolute;
    width: 30px;
    height: 30px;
    background-size: contain;
    background-repeat: no-repeat;
    animation: float 10s infinite ease-in-out;
    opacity: 0.6;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(15px, 20px) rotate(10deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

/* Cabecera con tipografía de invitación */
h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    margin: 0;
    color: #673ab7;
    margin-bottom: 5px;
}

.anos {
    margin: 0;
    margin-bottom: 30px;
    font-size: 1.2rem;
    color: #b39ddb;
}

.subtitle {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1rem;
    margin-bottom: 40px;
    color: #512da8;
}

/* Formulario decorado */
input[type="text"], input[type="password"] {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border: 1px solid #d1c4e9;
    border-radius: 12px;
    box-sizing: border-box;
    font-size: 1rem;
    transition: all 0.3s;
}

input[type="text"]:focus {
    border-color: #673ab7;
    box-shadow: 0 0 10px rgba(103, 58, 183, 0.2);
    outline: none;
}

.file-label {
    display: block;
    background: #ede7f6;
    padding: 20px;
    border-radius: 12px;
    border: 2px dashed #b39ddb;
    cursor: pointer;
    margin-bottom: 20px;
    transition: 0.3s;
    color: #673ab7;
    position: relative;
}

.file-label:hover {
    background: #d1c4e9;
    border-color: #673ab7;
}

.file-label::before {
    content: "🦋 ";
    font-size: 1.2rem;
}

.file-label input {
    display: none;
}

button {
    background-image: linear-gradient(135deg, #673ab7 0%, #512da8 100%);
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 30px;
    font-size: 1.1rem;
    cursor: pointer;
    width: 100%;
    transition: 0.4s;
    box-shadow: 0 5px 15px rgba(103, 58, 183, 0.4);
    font-weight: 600;
}

button:hover {
    box-shadow: 0 10px 25px rgba(103, 58, 183, 0.6);
    transform: translateY(-2px);
}

.admin-link {
    font-size: 0.8rem;
    color: #b39ddb;
    text-decoration: none;
    margin-top: 30px;
    display: inline-block;
    transition: 0.3s;
}

.admin-link:hover {
    color: #673ab7;
    text-decoration: underline;
}

/* Estilo para el Panel Admin Actualizado (Sigue igual funcionalmente) */
.admin-view {
    background: #f1f1f1;
    font-family: 'Poppins', sans-serif;
}

.container-admin {
    max-width: 1000px;
    margin: 50px auto;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 20px;
}

.card {
    background: white;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    text-align: center;
}

.card img {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.card a {
    display: inline-block;
    background: #673ab7;
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* =========================================
   ESTILOS PARA LA VISTA PREVIA (INDEX)
   ========================================= */
.preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
    margin-top: -10px;
}

.preview-image {
    width: 65px;
    height: 65px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #d1c4e9;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    animation: aparecer 0.3s ease-out forwards;
}

@keyframes aparecer {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* =========================================
   ESTILOS PARA EL PANEL DE ADMINISTRADOR
   ========================================= */
.admin-body {
    background-color: #f8f9fa; /* Fondo más limpio para leer mejor */
    background-image: none; /* Quitamos el decorado de fondo aquí */
    align-items: flex-start;
    padding: 20px;
}

.admin-wrapper {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.admin-header {
    background: white;
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.admin-header h2 {
    margin: 0;
    color: #512da8;
    font-size: 1.8rem;
}

.admin-header p {
    margin: 5px 0 0 0;
    color: #666;
}

.admin-actions {
    display: flex;
    gap: 10px;
}

.btn-outline, .btn-danger {
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.3s;
}

.btn-outline {
    background: white;
    color: #673ab7;
    border: 2px solid #673ab7;
}

.btn-outline:hover {
    background: #ede7f6;
}

.btn-danger {
    background: #ff5252;
    color: white;
}

.btn-danger:hover {
    background: #ff1744;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

.admin-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

.admin-card:hover {
    transform: translateY(-5px);
}

.img-container {
    height: 200px;
    overflow: hidden;
    background: #f1f1f1;
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recorta la foto para que todas las tarjetas sean iguales */
}

.card-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.uploader-name {
    margin: 0;
    font-weight: 600;
    color: #333;
    font-size: 1.05rem;
}

.upload-date {
    margin: 5px 0 15px 0;
    font-size: 0.8rem;
    color: #888;
}

.download-btn {
    margin-top: auto;
    display: block;
    text-align: center;
    background: #ede7f6;
    color: #673ab7;
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    transition: 0.3s;
}

.download-btn:hover {
    background: #673ab7;
    color: white;
}

.empty-state {
    text-align: center;
    padding: 50px;
    background: white;
    border-radius: 15px;
    color: #888;
    font-size: 1.2rem;
}