@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');

/* --- ESTILOS PARA EL SELECTOR DE IDIOMA --- */
.language-selector {
    text-align: center;
    margin: 20px 0;
    font-size: 0.9em;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lang-btn {
    background: none;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9em;
    font-weight: bold;
    padding: 4px 8px;
    transition: color 0.3s;
}

.lang-btn:hover {
    color: #3498db;
}

.lang-btn.active {
    color: #3498db;
}

.lang-separator {
    color: #7f8c8d;
    font-size: 0.9em;
}

/* --- LÓGICA DE CARGA Y VISIBILIDAD --- */
body.is-loading #app-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f4f4f9;
    z-index: 9999;
}

body:not(.is-loading) #app-loader {
    display: none;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: #3498db;
    animation: spin 1s linear infinite;
}

.brand-spinner {
    width: 120px;
    height: auto;
}
/* La animacion la trae el GIF (img/festpic-spinner.gif). Con "reducir movimiento" el <picture>
   del HTML muestra en su lugar el simbolo quieto (img/logo-simbolo.png). */

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.7; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.7; }
}

/* ================================================= */
/* --- LÓGICA DE VISIBILIDAD DE PANELES --- */
/* ================================================= */

/* Ocultar todos los paneles principales por defecto */
#login-section,
#admin-panel,
#login-view,
#upload-view {
    display: none;
}

/* Reglas para mostrar paneles en admin.html */
body.show-login #login-section {
    display: block;
}
body.show-admin #admin-panel {
    display: block;
}

/* Reglas para mostrar paneles en index.html */
body.show-pin #login-view {
    display: block;
}
body.show-upload #upload-view {
    display: block;
}

/* Clase de utilidad para ocultar elementos de forma controlada por JS */
.hidden {
    display: none !important;
}


/* --- ESTILOS GENERALES DEL NUEVO DISEÑO --- */
body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f4f4f9;
    color: #333;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    /* PWA: Evitar selección de texto en móviles */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* PWA: Evitar zoom en inputs en iOS */
    -webkit-text-size-adjust: 100%;
}

/* PWA: Permitir selección en inputs y textareas */
input, textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.container {
    background-color: #ffffff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    text-align: center;
    /* PWA: Mejorar rendimiento en móviles */
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* --- ESTILOS PARA EL LOGO PRINCIPAL --- */
.main-logo {
    max-width: 120px;
    width: 100%;
    height: auto;
    margin: 0 auto 20px auto;
    display: block;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .main-logo {
        max-width: 80px;
        margin-bottom: 15px;
    }
}

h1 {
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 2.5em;
}

.date {
    font-size: 1.1em;
    color: #D4AF37; /* Un color dorado más oscuro y legible */
    margin-bottom: 30px;
    font-weight: bold;
    letter-spacing: 1.5px;
}

h2 {
    color: #34495e;
    font-size: 1.6em;
    margin-bottom: 10px;
    font-weight: normal;
}

.subtitle {
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 1.1em;
}

#login-form, #upload-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

label {
    font-weight: bold;
    text-align: left;
    color: #34495e;
}

/* AÑADIDO: Estilos para el ícono de información y tooltip */
.label-with-info {
    display: flex;
    align-items: center;
    gap: 8px; /* Espacio entre el label y el ícono */
}

.info-icon-container {
    position: relative;
    display: inline-block;
    cursor: help;
}

.info-icon {
    font-size: 1em;
    color: #3498db;
    border: 1px solid #3498db;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.info-tooltip {
    visibility: hidden;
    width: 220px;
    background-color: #34495e;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%; /* Posición sobre el ícono */
    left: 50%;
    margin-left: -110px; /* Centrar el tooltip */
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85em;
    font-weight: normal;
}

.info-icon-container:hover .info-tooltip {
    visibility: visible;
    opacity: 1;
}

input[type="password"],
input[type="text"],
input[type="email"],
input[type="url"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
    font-size: 1em;
}

input[type="file"] {
    display: none; /* El input real se oculta, usamos el label */
}

.info-note {
    font-size: 0.85em;
    color: #7f8c8d;
    margin: -15px 0 0 0;
    text-align: left;
}

button, .button-like-label {
    background-color: #2ecc71;
    color: white;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
}

#login-form button {
    background-color: #3498db;
}
#login-form button:hover:not(:disabled) {
    background-color: #2980b9;
}

.button-like-label {
    background-color: #3498db;
    display: block;
    text-align: center;
}
.button-like-label:hover {
    background-color: #2980b9;
}

button:hover:not(:disabled) {
    background-color: #27ae60;
}

button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

#status {
    margin-top: 20px;
    font-weight: bold;
    min-height: 24px; /* Para evitar que el layout salte */
}

#logout-link {
    display: block;
    margin-top: 20px;
    color: #7f8c8d;
    font-size: 0.9em;
}

/* Estilos de la Galería tipo Instagram */
#preview-gallery {
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.gallery-title {
    font-size: 1.2em;
    color: #34495e;
    margin-bottom: 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-bottom: 20px;
}

/* Mejoras móviles para galería */
@media (max-width: 768px) {
    .gallery-grid {
        gap: 2px;
    }
    
    .gallery-grid-item {
        border-radius: 2px;
    }
    
    .item-overlay {
        font-size: 0.7em;
        padding: 4px;
    }
}

.gallery-grid-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.gallery-grid-item:hover {
    transform: scale(1.02);
}

.gallery-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s ease;
}

.gallery-grid-item:hover img {
    opacity: 0.8;
}

.gallery-grid-item .item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    color: white;
    font-size: 0.8em;
    text-align: center;
    padding: 8px;
}

.gallery-grid-item:hover .item-overlay {
    opacity: 1;
}

/* Modal para vista detallada */
.image-detail-content {
    background: white;
    border-radius: 12px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Flechas de navegación */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    z-index: 15;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
}

.nav-arrow:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.prev-arrow {
    left: 10px;
}

.next-arrow {
    right: 10px;
}

.nav-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.3);
}

.nav-arrow:disabled:hover {
    transform: translateY(-50%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .prev-arrow {
        left: 15px;
    }
    
    .next-arrow {
        right: 15px;
    }
    
    .nav-arrow {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

#detail-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    background: #f8f9fa;
}

.image-detail-info {
    padding: 20px;
    border-top: 1px solid #eee;
}

.image-comment-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

#detail-comment {
    font-style: italic;
    color: #7f8c8d;
    margin: 0;
    flex-grow: 1;
    text-align: center;
}

.image-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#detail-edit-btn, #detail-delete-btn {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s;
}

#detail-edit-btn {
    color: #3498db;
}

#detail-delete-btn {
    color: #e74c3c;
}

#detail-edit-btn:hover, #detail-delete-btn:hover {
    transform: scale(1.2);
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .image-detail-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    #detail-image {
        max-height: 60vh;
    }
    
    .image-detail-info {
        padding: 15px;
    }
    
    .modal-close-btn {
        width: 40px;
        height: 40px;
        font-size: 22px;
        top: 10px;
        right: 10px;
    }
    
    #detail-edit-btn, #detail-delete-btn {
        font-size: 20px;
        padding: 8px;
    }
}



.copyright {
    margin-top: 10px;
    font-size: 0.85em;
    color: #7f8c8d;
}

.live-link {
    display: block;
    margin-top: 25px;
    padding: 12px;
    background-color: #e74c3c;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background-color 0.3s;
    text-align: center;
}
.live-link:hover {
    background-color: #c0392b;
}

/* --- ESTILOS PARA LA PÁGINA DE TRANSMISIÓN (live.html) --- */
#live-player-container {
    position: relative;
    /* Proporción 16:9 (9 / 16 = 0.5625) */
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 12px; /* Coincide con el radio del contenedor principal */
    margin: 30px 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
.responsive-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.player-note {
    font-size: 0.9em;
    color: #7f8c8d;
    margin-top: -10px; /* Lo acerca un poco al reproductor */
    margin-bottom: 30px; /* Le da espacio antes del enlace de volver */
    padding: 0 15px;
}

/* Estilos para la previsualización de archivos múltiples */
#file-preview-container {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.file-preview-item {
    display: flex;
    align-items: center; /* Centra verticalmente los elementos para mejor alineación */
    gap: 15px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 10px;
    text-align: left;
    transition: border 0.3s;
}

.file-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background-color: #e9ecef;
}

.file-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.edit-image-btn {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 0.85em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 5px; /* Espacio sobre el campo de comentario */
}

.file-name {
    font-weight: bold;
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.char-counter {
    font-size: 0.85em;
    color: #7f8c8d;
    text-align: right;
    margin-top: -4px; /* Acerca el contador al textarea */
}

.file-comment-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95em;
    resize: none; /* Evita que el usuario pueda cambiar el tamaño */
    min-height: 50px; /* Un poco más de altura por defecto */
    transition: border-color 0.3s, box-shadow 0.3s;
}

.file-comment-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.remove-file-btn {
    background-color: #e9ecef;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    width: 28px; /* Tamaño fijo */
    height: 28px; /* Tamaño fijo */
    border-radius: 70%; /* Forma circular */
    font-size: 1.4em;
    font-weight: bold;
    line-height: 5; /* Ajuste para centrar la 'x' */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Evita que se encoja */
    transition: background-color 0.3s, color 0.3s;
}

.remove-file-btn:hover {
    background-color: #e74c3c;
    color: white;
}

.item-status {
    font-weight: bold;
    margin-top: 5px;
    font-size: 0.9em;
}
.item-status.success {
    color: #2ecc71;
}
.item-status.error {
    color: #e74c3c;
}

.item-progress-container {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    margin-top: 5px;
    overflow: hidden;
    display: none; /* Oculto por defecto */
}

.item-progress-bar {
    width: 0%;
    height: 100%;
    background-color: #3498db;
    transition: width 0.2s ease-in-out;
}

/* --- ESTILOS ADICIONALES PARA ADMIN.HTML --- */

/* Estilo para el header del panel de admin */
.header-admin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}
.header-admin h2 {
    margin: 0;
}

/* AÑADIDO: Estilo para la fecha en el panel de admin */
#admin-panel .date {
    margin-bottom: 0;
    text-align: left;
    font-size: 1em;
    letter-spacing: 0.5px;
}

/* Estilo para el botón de logout */
#logout-button {
    background-color: #e74c3c;
    padding: 10px 15px;
    width: auto; /* Ancho automático para el botón */
}
#logout-button:hover {
    background-color: #c0392b;
}

/* Estilo para el contenedor de botones del formulario */
.form-buttons {
    display: flex;
    gap: 10px;
}
#clear-form-button {
    background-color: #7f8c8d;
}
#clear-form-button:hover {
    background-color: #6c757d;
}

/* Estilo para el contenedor del PIN y el botón de generar */
.pin-container {
    display: flex;
    align-items: center;
    gap: 10px;
}
.pin-container input {
    flex-grow: 1; /* El input ocupa el espacio restante */
}

#generate-pin-btn {
    width: auto; /* Ancho automático */
    padding: 12px 15px;
    background-color: #95a5a6;
}
#generate-pin-btn:hover {
    background-color: #7f8c8d;
}

.pin-show-toggle {
    margin-top: 5px; /* Añade un pequeño espacio debajo del input del PIN */
    font-size: 0.9em;
}

/* Estilo para el label del checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    cursor: pointer;
    font-weight: normal;
}
.checkbox-label input {
    width: auto;
}

.edit-btn {
    background-color: #f39c12;
}
.edit-btn:hover {
    background-color: #e67e22;
}
.delete-btn, .modal-confirm-delete {
    background-color: #e74c3c;
}
.delete-btn:hover, .modal-confirm-delete:hover {
    background-color: #c0392b;
}
.copy-btn {
    background-color: #3498db;
}
.copy-btn:hover {
    background-color: #2980b9;
}

/* Estilo genérico para los mensajes de feedback */
.feedback {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    font-weight: bold;
    min-height: 20px;
}
.feedback:empty {
    display: none;
}
.feedback.error {
    background-color: #f8d7da;
    color: #721c24;
}
.feedback.success {
    background-color: #d4edda;
    color: #155724;
}

/* --- ESTILOS PARA EL MODAL DE CONFIRMACIÓN --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.modal-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: white;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay:not(.hidden) .modal-content {
    transform: scale(1);
}

.modal-content p {
    font-size: 1.1em;
    color: #34495e;
    margin-bottom: 25px;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.modal-buttons button {
    width: auto;
    min-width: 120px;
}

/* --- ESTILOS PARA EL MODAL DEL EDITOR DE IMÁGENES --- */
#image-editor-modal .editor-content {
    background: #282828; /* Fondo oscuro para el editor */
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 95vw;
    height: 90vh;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
}

#tui-image-editor-container {
    flex-grow: 1;
    min-height: 0; /* Permite que el contenedor se encoja */
}

#image-editor-modal .modal-buttons {
    margin-top: 15px;
    flex-shrink: 0; /* Evita que los botones se encojan */
}

#image-editor-modal .modal-buttons button {
    background-color: #2ecc71;
}

#image-editor-modal .modal-buttons button:hover:not(:disabled) {
    background-color: #27ae60;
}

/* Sobrescribir algunos estilos de Toast UI para que encajen mejor */
.tui-image-editor-header-logo, .tui-image-editor-help-menu {
    display: none !important; /* Ocultar el logo y menú de ayuda de TUI */
}

/* Ocultar la barra de menú principal ya que solo nos interesa el submenú de filtros */
#image-editor-modal .tui-image-editor-menu-bar {
    display: none;
}

.tui-image-editor-header-buttons {
    right: 4px !important;
}

/* --- MEJORAS PARA MÓVILES EN EL EDITOR DE IMÁGENES --- */
@media (max-width: 600px) {
    /* Hacemos que el contenedor de los filtros sea un flexbox para controlar el scroll */
    #image-editor-modal .tui-image-editor-submenu > div {
        display: flex;
        flex-wrap: nowrap; /* Evita que los filtros salten a la siguiente línea */
        overflow-x: auto;  /* Habilita el scroll horizontal */
        -webkit-overflow-scrolling: touch; /* Scroll más suave en iOS */
        padding-bottom: 15px; /* Espacio para la barra de scroll */
    }

    /* Ajustamos cada filtro para que tenga un tamaño mínimo y no se encoja */
    #image-editor-modal .tui-image-editor-submenu-item {
        flex: 0 0 100px; /* No se encoge, no crece, base de 100px */
    }

    /* Ocultamos la barra de scroll visualmente pero mantenemos la funcionalidad */
    #image-editor-modal .tui-image-editor-submenu > div::-webkit-scrollbar {
        display: none;
    }
}
/* Estilos para el botón de editar comentario en vista previa */
.edit-comment-btn {
    background-color: #f39c12;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 0.85em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 5px;
}

.edit-comment-btn:hover {
    background-color: #e67e22;
}
/* Actualizar estilos del botón de editar comentario */
#gallery-edit-btn {
    position: absolute;
    top: 35px;
    right: 10px;
    background-color: transparent;
    color: #3498db;
    border: none;
    width: auto;
    height: auto;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    z-index: 11;
}

#gallery-edit-btn:hover {
    color: #2980b9;
    transform: scale(1.1);
}
/* Contenedor del comentario y botón de editar */
.gallery-comment-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 2.5em;
    padding: 0 10px;
}

#gallery-comment {
    margin: 0;
    font-style: italic;
    color: #7f8c8d;
}

/* Botón de editar al lado del comentario */
#gallery-edit-btn {
    background-color: transparent;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 2px;
    transition: transform 0.2s;
    flex-shrink: 0;
}

#gallery-edit-btn:hover {
    transform: scale(1.2);
}
/* Override para posicionar correctamente el botón de editar */
#gallery-edit-btn {
    position: static !important;
    top: auto !important;
    right: auto !important;
    background-color: transparent;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 2px;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.gallery-comment-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 2.5em;
    padding: 0 10px;
    position: relative;
    z-index: 15;
}

#gallery-comment {
    margin: 0;
    font-style: italic;
    color: #7f8c8d;
    flex-grow: 1;
    text-align: center;
}
/* Estilos para páginas legales */
.legal-content {
    text-align: left;
    margin: 30px 0;
}

.legal-content h2 {
    color: #2c3e50;
    font-size: 1.3em;
    margin: 25px 0 15px 0;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
}

.legal-content p {
    margin: 15px 0;
    line-height: 1.6;
}

.legal-content ul {
    margin: 15px 0;
    padding-left: 25px;
}

.legal-content li {
    margin: 8px 0;
    line-height: 1.5;
}

.legal-content a {
    color: #3498db;
    text-decoration: none;
}

.legal-content a:hover {
    text-decoration: underline;
}

.legal-navigation {
    display: flex;
    justify-content: space-between;
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid #eee;
}

.legal-navigation a {
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
    padding: 10px 15px;
    border: 1px solid #3498db;
    border-radius: 5px;
    transition: all 0.3s;
}

.legal-navigation a:hover {
    background-color: #3498db;
    color: white;
}

/* Responsive para móviles */
@media (max-width: 600px) {
    .legal-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .legal-navigation a {
        text-align: center;
    }
}
/* Estilos para enlaces legales en footer */
.legal-links {
    margin-top: 10px;
    font-size: 0.9em;
}

.legal-links a {
    color: #7f8c8d;
    text-decoration: none;
    transition: color 0.3s;
}

.legal-links a:hover {
    color: #3498db;
    text-decoration: underline;
}
/* Centrar enlaces legales en footer */
.legal-links {
    text-align: center;
}
/* Posicionar selector de idioma en la esquina superior derecha */
.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Ajustes móviles para selector de idioma */
@media (max-width: 768px) {
    .language-selector {
        top: 10px;
        right: 10px;
        padding: 6px 10px;
        font-size: 0.85em;
    }
}

.lang-btn {
    background: none;
    border: none;
    color: #7f8c8d;
    font-weight: bold;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s;
}

.lang-btn.active {
    color: #3498db;
    background-color: rgba(52, 152, 219, 0.1);
}

.lang-btn:hover {
    color: #3498db;
}

.lang-separator {
    color: #bdc3c7;
    margin: 0 4px;
}
/* Estilos para protección de menores */
.minors-disclaimer {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 10px;
    margin: 10px 0;
}

.warning-text {
    color: #856404;
    font-size: 0.9em;
    margin: 0;
    text-align: center;
}

/* Botón de reporte */
.report-btn {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: transparent;
    color: #e74c3c;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s;
    z-index: 12;
}

.report-btn:hover {
    background-color: rgba(231, 76, 60, 0.1);
    transform: scale(1.1);
}
/* Botón de reporte al lado del lápiz */
#gallery-report-btn {
    background-color: transparent;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 2px;
    transition: transform 0.2s;
    flex-shrink: 0;
    color: #e74c3c;
}

#gallery-report-btn:hover {
    transform: scale(1.2);
}
/* Enlace de reporte en la parte inferior derecha */
.report-link {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 12px;
    color: #7f8c8d;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s;
    z-index: 10;
}

.report-link:hover {
    color: #e74c3c;
    background-color: rgba(255, 255, 255, 0.95);
    text-decoration: underline;
}
/* Estilos para página home */

/* Header */
.home-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.home-header.sticky {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.home-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.header-logo {
    height: 40px;
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.main-nav a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: #3498db;
}

.admin-link {
    background: #3498db;
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.admin-link:hover {
    background: #2980b9 !important;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8rem 0 4rem;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #667eea;
}

/* About Section */
.about-section {
    padding: 4rem 0;
    background: #f8f9fa;
}

.about-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #2c3e50;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.about-item {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.about-item:hover {
    transform: translateY(-5px);
}

.about-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.about-item h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

/* Services Section */
.services-section {
    padding: 4rem 0;
}

.services-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #2c3e50;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.service-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    position: relative;
}

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

.service-card.featured {
    border: 3px solid #3498db;
    transform: scale(1.05);
}

.service-card.featured::before {
    content: 'Más Popular';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #3498db;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.service-price {
    font-size: 2rem;
    font-weight: bold;
    color: #3498db;
    margin: 1rem 0;
}

.service-card ul {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.service-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.btn-service {
    background: #3498db;
    color: white;
    padding: 1rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
    display: inline-block;
    width: 100%;
}

.btn-service:hover {
    background: #2980b9;
}

/* Contact Section */
.contact-section {
    padding: 4rem 0;
    background: #f8f9fa;
}

.contact-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #2c3e50;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info h3, .contact-form h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.contact-item {
    margin-bottom: 1rem;
}

.contact-item a {
    color: #3498db;
    text-decoration: none;
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.contact-form button {
    background: #3498db;
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.contact-form button:hover {
    background: #2980b9;
}

/* Footer */
.home-footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    height: 40px;
    margin-bottom: 1rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #3498db;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #3498db;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    text-align: center;
    color: #bdc3c7;
}

/* Responsive */
@media (max-width: 768px) {
    .home-header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card.featured {
        transform: none;
    }
}
/* Ajustar z-index del selector de idioma para que esté debajo del header */
.language-selector {
    z-index: 999;
}
/* Selector de idioma en footer para página home */
.footer-language-selector {
    margin-bottom: 1rem;
}

.footer-language-selector .language-selector {
    position: static;
    background: transparent;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
}

.footer-language-selector .lang-btn {
    color: #bdc3c7;
}

.footer-language-selector .lang-btn.active {
    color: #3498db;
    background: transparent;
}

.footer-language-selector .lang-separator {
    color: #7f8c8d;
}

/* Centrar botón del plan empresarial */
.service-card .btn-service {
    text-align: center;
}
/* Estilos para página en construcción */
.construction-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.construction-container {
    text-align: center;
    max-width: 600px;
    padding: 2rem;
}

.construction-logo {
    height: 80px;
    margin-bottom: 2rem;
    filter: brightness(0) invert(1);
}

.construction-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.construction-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.construction-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.feature-icon {
    font-size: 1.5rem;
}

.construction-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.btn-construction {
    background: #3498db;
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

.btn-construction:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-construction-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

.btn-construction-secondary:hover {
    background: white;
    color: #667eea;
}

.construction-info {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.construction-info p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .construction-content h1 {
        font-size: 2rem;
    }
    
    .construction-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .feature-item {
        font-size: 1rem;
    }
}
/* Estilos para página de error */
.error-page {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.error-container {
    text-align: center;
    max-width: 600px;
    padding: 2rem;
}

.error-logo {
    height: 60px;
    margin-bottom: 2rem;
    filter: brightness(0) invert(1);
}

.error-content h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.error-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.error-code {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 2rem 0;
    text-align: left;
    backdrop-filter: blur(10px);
}

.error-code ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.error-code li {
    margin: 0.5rem 0;
    opacity: 0.9;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.btn-error {
    background: #3498db;
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

.btn-error:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-error-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

.btn-error-secondary:hover {
    background: white;
    color: #e74c3c;
}

.error-help {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.error-help code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #f1c40f;
}

.error-help a {
    color: #f1c40f;
    text-decoration: none;
}

.error-help a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .error-content h1 {
        font-size: 1.8rem;
    }
    
    .error-actions {
        flex-direction: column;
        align-items: center;
    }
}
/* Estilos para campos de fecha */
.date-range-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

.date-field {
    display: flex;
    flex-direction: column;
}

.date-field label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.date-field input[type="datetime-local"] {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.date-field input[type="datetime-local"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .date-range-container {
        grid-template-columns: 1fr;
    }
}
/* Espaciado adicional para el select de timezone */
#timezone {
    margin-bottom: 1rem;
}

/* Asegurar espaciado consistente en todos los campos del formulario */
#event-form label {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    display: block;
}

#event-form label:first-of-type {
    margin-top: 0;
}

#event-form input, 
#event-form select {
    margin-bottom: 1rem;
}

#event-form hr {
    margin: 1.5rem 0;
    border: none;
    border-top: 1px solid #ddd;
}
/* Estilos para página de evento no disponible */
.btn-error {
    background: #3498db;
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
    margin-top: 1rem;
}

.btn-error:hover {
    background: #2980b9;
    transform: translateY(-2px);
}
/* Estilos para cuenta regresiva */
.countdown-container {
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.countdown-container h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: #2c3e50;
}

.countdown-timer {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.countdown-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.countdown-item span {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.countdown-item label {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: 600;
    text-transform: uppercase;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .countdown-timer {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .countdown-item span {
        font-size: 1.5rem;
    }
    
    .countdown-item {
        padding: 0.8rem;
    }
}
/* Advertencia de zona horaria */
.timezone-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 0.75rem;
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #856404;
}

.warning-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.timezone-warning span:last-child {
    line-height: 1.4;
}
/* Estilos para página de feedback */
.feedback-form {
    max-width: 600px;
    margin: 0 auto;
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-group select,
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Rating stars */
.rating-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stars {
    display: flex;
    gap: 0.25rem;
}

.star {
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    filter: grayscale(100%);
}

.star:hover,
.star.active {
    filter: grayscale(0%);
    transform: scale(1.1);
}

#rating-text {
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Character counter */
.char-counter {
    text-align: right;
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-top: 0.25rem;
}

/* Form buttons */
.form-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* Feedback status */
.feedback-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.feedback-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 768px) {
    .feedback-form {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .form-buttons {
        flex-direction: column;
    }
    
    .stars {
        justify-content: center;
    }
}
/* Centrar copyright en footer */
.copyright {
    text-align: center;
    padding: 1rem;
    background: #2c3e50;
    color: white;
    margin-top: 2rem;
}

.copyright .legal-links {
    margin-top: 0.5rem;
    text-align: center;
}

.copyright .legal-links a {
    color: #ecf0f1;
    text-decoration: none;
    margin: 0 0.25rem;
}

.copyright .legal-links a:hover {
    text-decoration: underline;
}
/* Override para copyright transparente */
.copyright {
    background: transparent !important;
    color: inherit !important;
}

.copyright .legal-links a {
    color: #7f8c8d !important;
}

/* ================================================= */
/* --- ESTILOS ESPECÍFICOS PARA PWA --- */
/* ================================================= */

/* Ocultar elementos de navegador cuando se ejecuta como PWA */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    /* Ajustar selector de idioma en modo standalone */
    .language-selector {
        top: calc(20px + env(safe-area-inset-top));
    }
}

/* Estilos para dispositivos con notch */
@supports (padding: max(0px)) {
    body {
        padding-top: max(20px, env(safe-area-inset-top));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
}

/* Mejorar rendimiento en dispositivos táctiles */
button, .button-like-label, .gallery-grid-item {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Optimizar animaciones para PWA */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Indicador de instalación PWA */
.install-prompt {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: #3498db;
    color: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: none;
    align-items: center;
    justify-content: space-between;
    z-index: 10001;
    animation: slideUp 0.3s ease;
}

.install-prompt.show {
    display: flex;
}

.install-prompt button {
    background: white;
    color: #3498db;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 10px;
}

.install-prompt .close-btn {
    background: transparent;
    color: white;
    font-size: 18px;
    padding: 5px;
    min-width: auto;
    width: auto;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive para PWA en diferentes orientaciones */
@media (orientation: landscape) and (max-height: 500px) {
    .container {
        padding: 20px 30px;
        margin: 10px;
    }
    
    .main-logo {
        max-width: 120px;
        margin-bottom: -15px;
    }
    
    h1 {
        font-size: 2em;
    }
}

/* Guía de instalación PWA */
.pwa-installation-guide {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 20px;
    box-sizing: border-box;
}

.pwa-installation-guide.show {
    display: flex;
}

.pwa-guide-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.pwa-guide-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #7f8c8d;
    width: auto;
    min-width: auto;
}

.pwa-guide-content h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.5em;
}

.pwa-guide-content p {
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 25px;
}

.installation-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    border-radius: 10px;
    background: #f8f9fa;
}

.step-icon {
    font-size: 2em;
    flex-shrink: 0;
}

.step-content h4 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 1.1em;
}

.step-content ol {
    margin: 0;
    padding-left: 20px;
    color: #34495e;
}

.step-content li {
    margin: 5px 0;
    line-height: 1.4;
}

.pwa-benefits {
    background: #e8f4fd;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.pwa-benefits h4 {
    color: #2c3e50;
    margin: 0 0 15px 0;
}

.pwa-benefits ul {
    margin: 0;
    padding-left: 20px;
    color: #34495e;
}

.pwa-benefits li {
    margin: 8px 0;
    line-height: 1.4;
}

.pwa-guide-button {
    background: #3498db;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
}

.pwa-guide-button:hover {
    background: #2980b9;
}

/* Responsive para la guía */
@media (max-width: 768px) {
    .pwa-guide-content {
        padding: 20px;
        margin: 10px;
    }
    
    .installation-steps {
        gap: 15px;
    }
    
    .step {
        padding: 15px;
    }
    
    .step-icon {
        font-size: 1.5em;
    }
}
/* Estilos para el contador de fotos */
.photo-count {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    font-weight: bold;
    font-size: 0.95em;
    margin: 10px 0;
    transition: all 0.3s ease;
}

.photo-count:empty {
    display: none;
}
/* Contenedor del contador de fotos con ícono */
.photo-count-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 10px 0;
}

.photo-count-container .info-icon {
    font-size: 16px;
    color: #3498db;
    cursor: help;
}
/* Estilo para enlace de recuperar contraseña */
#forgot-password-link {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: #3498db;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s;
}

#forgot-password-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Estilos para secciones MFA */
#mfa-section, #mfa-setup-section {
    display: none;
}

#qr-code-container {
    text-align: center;
    margin: 20px 0;
}

#qr-code {
    margin: 15px 0;
    display: flex;
    justify-content: center;
}

#manual-key {
    background-color: #f8f9fa;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
    word-break: break-all;
    margin: 0 10px;
    display: inline-block;
}

#mfa-code, #setup-mfa-code {
    text-align: center;
    font-family: monospace;
    font-size: 1.2em;
    letter-spacing: 2px;
}
/* Mejoras para la sección MFA */
#qr-code canvas,
#qr-code img {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mfa-instructions {
    background-color: #e8f4fd;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    font-size: 0.9em;
    color: #0c5460;
}

.mfa-instructions ol {
    margin: 10px 0;
    padding-left: 20px;
}

.mfa-instructions li {
    margin: 5px 0;
    line-height: 1.4;
}
/* ================================================= */
/* --- PANEL DE ADMINISTRACIÓN: TARJETAS (4.9) --- */
/* ================================================= */
body.show-admin .container { max-width: 1100px; }
body.show-admin #admin-panel { text-align: left; }
#admin-panel .mono { font-family: ui-monospace, Consolas, 'Courier New', monospace; font-size: 0.85em; color: #6b7785; }
#admin-panel .muted { color: #8a949e; }

/* Botones compactos del panel (anulan el botón global de ancho completo) */
#admin-panel .btn {
    width: auto; min-height: 36px; padding: 7px 14px; font-size: 0.85em; font-weight: 600;
    border-radius: 8px; line-height: 1.2; display: inline-flex; align-items: center; justify-content: center;
    box-sizing: border-box; text-decoration: none; cursor: pointer;
}
#admin-panel .btn-pri { background: #3498db; color: #fff; border: 1px solid #3498db; }
#admin-panel .btn-pri:hover:not(:disabled) { background: #2980b9; border-color: #2980b9; }
#admin-panel .btn-sec { background: #fff; color: #2c3e50; border: 1px solid #d5dbe1; }
#admin-panel .btn-sec:hover:not(:disabled) { background: #f4f6f8; }
#admin-panel .btn:disabled { background: #f1f3f5; color: #a0a8b0; border-color: #e3e7eb; cursor: not-allowed; }
#admin-panel .btn.copied { background: #28a745; border-color: #28a745; color: #fff; }
#admin-panel .btn:focus-visible, #admin-panel .filter-chip:focus-visible, #admin-panel summary:focus-visible { outline: 3px solid #85c1e9; outline-offset: 2px; }

/* Cabecera de la sección y formulario */
.events-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.events-header h3 { margin: 0; }
.event-editor { border: 1px solid #e4e8ec; border-radius: 12px; padding: 20px 24px; margin: 0 0 20px; background: #fbfcfd; }
.event-editor > h3 { margin: 0 0 16px; color: #2c3e50; }
.event-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.event-form-grid .form-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.event-form-grid .form-col-title { margin: 0 0 4px; font-size: 0.75em; text-transform: uppercase; letter-spacing: 0.6px; color: #8a949e; }
.event-form-grid select { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-family: inherit; font-size: 1em; background: #fff; }
.event-form-grid .checkbox-label { margin-top: 6px; }
.event-form-grid .form-buttons { grid-column: 1 / -1; justify-content: flex-end; margin-top: 18px; padding-top: 16px; border-top: 1px solid #eef1f4; }
.event-form-grid .form-buttons button { width: auto; min-width: 160px; }

/* Panel de descarga / código (4.7, 4.8) */
.download-panel { margin: 12px 0; padding: 12px 16px; border: 1px solid #b6d4fe; background: #f0f6ff; border-radius: 8px; }
.download-panel button { width: auto; padding: 8px 14px; font-size: 0.9em; min-height: 36px; }

/* Buscador y filtros */
.events-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 8px 0 18px; }
.events-toolbar #event-search { flex: 1 1 260px; width: auto; padding: 10px 12px; margin: 0; }
.event-filters { display: flex; gap: 6px; flex-wrap: wrap; }
#admin-panel .filter-chip { width: auto; min-height: 34px; padding: 6px 14px; font-size: 0.85em; border-radius: 999px; background: #eef0f4; color: #444; font-weight: 600; border: 0; }
#admin-panel .filter-chip:hover:not(.on) { background: #e2e6ec; }
#admin-panel .filter-chip.on { background: #2c3e50; color: #fff; }
.events-loader { margin: 20px auto; text-align: center; }
.events-loader img { width: 60px; }
.events-empty { color: #7f8c8d; text-align: center; padding: 24px 0; }

/* Tarjetas */
.events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.event-card { border: 1px solid #e4e8ec; border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); min-width: 0; }
.event-card.estado-deleting { opacity: 0.6; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-title { margin: 0; font-size: 1.1em; color: #2c3e50; overflow-wrap: anywhere; }
.card-id { overflow-wrap: anywhere; }
.card-meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 0.85em; }
.card-meta dt { color: #8a949e; }
.card-meta dd { margin: 0; color: #34495e; min-width: 0; }
.card-meta .pin-cell { display: flex; align-items: center; gap: 6px; }
#admin-panel .toggle-pin-btn { width: auto; min-height: 0; padding: 0 4px; background: none; border: 0; font-size: 1em; line-height: 1; cursor: pointer; }
#admin-panel .toggle-pin-btn:hover { background: none; opacity: 0.7; }
.card-actions { display: flex; gap: 6px; align-items: center; border-top: 1px solid #f0f2f4; padding-top: 12px; margin-top: auto; }
.card-actions .card-menu { margin-left: auto; }
.card-actions .btn { white-space: nowrap; }

/* Etiquetas de estado */
.status-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 0.72em; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase; }
.status-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-chip.live { background: #e3f7ec; color: #1e8449; }
.status-chip.upcoming { background: #e6f0fb; color: #2471a3; }
.status-chip.ended { background: #eef0f2; color: #5d6d7e; }
.status-chip.deleting { background: #fdecea; color: #c0392b; }

/* Interruptor de habilitado */
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85em; font-weight: 600; color: #555; cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; width: 36px; height: 20px; border-radius: 999px; background: #ccd1d6; position: relative; margin: 0; cursor: pointer; transition: background 0.2s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left 0.2s; }
.switch input:checked { background: #2ecc71; }
.switch input:checked::after { left: 18px; }
.switch input:disabled { opacity: 0.5; cursor: not-allowed; }
.switch input:focus-visible { outline: 3px solid #85c1e9; outline-offset: 2px; }

/* Menú "⋯" */
.card-menu { position: relative; }
.card-menu > summary { list-style: none; font-size: 1.1em; letter-spacing: 1px; min-width: 44px; user-select: none; }
.card-menu > summary::-webkit-details-marker { display: none; }
.card-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; background: #fff; border: 1px solid #e1e5ea; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12); padding: 6px; width: 250px; }
.card-menu-list hr { border: 0; border-top: 1px solid #eee; margin: 6px 0; }
#admin-panel .menu-item { display: flex; gap: 10px; align-items: flex-start; width: 100%; min-height: 0; text-align: left; background: none; color: #2c3e50; padding: 9px 10px; font-weight: 500; font-size: 0.9em; border-radius: 6px; border: 0; }
#admin-panel .menu-item:hover:not(:disabled) { background: #f2f4f7; }
#admin-panel .menu-item:disabled { background: none; color: #aab2ba; }
#admin-panel .menu-item.danger { color: #c0392b; }
#admin-panel .menu-item.danger:hover:not(:disabled) { background: #fdecea; }
#admin-panel .menu-item.danger:disabled { color: #e3aaa3; }
.menu-item .menu-icon { width: 18px; flex: none; text-align: center; }
.menu-item small { display: block; color: #8a949e; font-weight: 400; font-size: 0.8em; margin-top: 2px; }

@media (max-width: 768px) {
    body.show-admin .container { padding: 20px 16px; }
    .event-form-grid { grid-template-columns: 1fr; }
    .event-form-grid .form-col + .form-col { margin-top: 16px; }
    .event-form-grid .form-buttons button { flex: 1; min-width: 0; }
    .events-grid { grid-template-columns: 1fr; }
    #admin-panel .card-actions .btn { padding: 7px 10px; }
    .event-editor { padding: 16px; }
}

/* ================================================= */
/* --- INVITADOS: APP MÓVIL (4.10) --- */
/* Todo bajo body.guest para no afectar al resto de páginas. */
/* ================================================= */
body.guest {
    --g-ink: #1f2d3d; --g-muted: #7b8794; --g-line: #eceef2; --g-bg: #f4f5f8;
    --g-grad: linear-gradient(135deg, #ff7a59, #ff3d77);
    --g-safe-b: env(safe-area-inset-bottom, 0px);
    display: block; padding: 0; min-height: 100vh; background: var(--g-bg); color: var(--g-ink);
    overflow-x: hidden;
}
body.guest.viewer-open, body.guest.sheet-open { overflow: hidden; }
body.guest .container.guest-shell {
    max-width: none; width: 100%; padding: 0; margin: 0; background: none; box-shadow: none;
    border-radius: 0; text-align: left; transform: none; box-sizing: border-box;
}
body.guest *, body.guest *::before, body.guest *::after { box-sizing: border-box; }
body.guest.show-upload .copyright { display: none; }
body.guest.show-pin .copyright { padding-bottom: 24px; }
body.guest.show-upload .language-selector { display: none; }
body.guest.show-pin .language-selector { top: 12px; right: 12px; background: rgba(255, 255, 255, 0.22); box-shadow: none; }
body.guest.show-pin .language-selector .lang-btn { color: rgba(255, 255, 255, 0.8); }
body.guest.show-pin .language-selector .lang-btn.active { color: #fff; background: rgba(255, 255, 255, 0.2); }
body.guest.show-pin .language-selector .lang-separator { color: rgba(255, 255, 255, 0.6); }

/* Entrada al evento */
body.guest .guest-hero {
    min-height: 240px; padding: 56px 22px 44px; color: #fff; position: relative;
    background: linear-gradient(135deg, #ff7a59, #ff3d77 55%, #7b5cff);
    display: flex; flex-direction: column; justify-content: flex-end;
}
body.guest .hero-logo { position: absolute; top: 14px; left: 18px; height: 30px; width: auto; background: rgba(255, 255, 255, 0.92); border-radius: 8px; padding: 3px 6px; }
body.guest .hero-kicker { margin: 0; opacity: 0.9; font-size: 14px; }
body.guest .guest-hero h1 { color: #fff; margin: 4px 0 0; font-size: 30px; line-height: 1.12; text-align: left; overflow-wrap: anywhere; }
body.guest .hero-date { margin: 6px 0 0; color: rgba(255, 255, 255, 0.9); font-size: 14px; font-weight: 600; letter-spacing: 0; text-align: left; }
body.guest .login-card {
    background: #fff; margin: -24px 14px 0; border-radius: 18px; padding: 22px 20px;
    position: relative; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08); max-width: 480px;
}
@media (min-width: 520px) { body.guest .login-card { margin-left: auto; margin-right: auto; } }
body.guest .login-card h2 { margin: 0 0 4px; font-size: 21px; text-align: left; color: var(--g-ink); }
body.guest .login-card .subtitle { margin: 0 0 14px; text-align: left; font-size: 14px; color: var(--g-muted); }
body.guest #login-form { display: flex; flex-direction: column; gap: 8px; }
body.guest #login-form label { font-weight: 700; font-size: 14px; text-align: left; }
body.guest #login-form input[type="text"], body.guest #login-form input[type="password"] {
    border: 1px solid #dfe3e8; border-radius: 12px; padding: 14px; font-size: 16px; margin: 0;
}
body.guest #login-form .pin-input { font-size: 26px; font-weight: 700; letter-spacing: 0.5em; text-align: center; padding: 12px; }
body.guest #login-form .checkbox-label { font-weight: 500; color: #5b6675; margin: 2px 0 6px; }
body.guest #login-form button[type="submit"] {
    margin-top: 10px; border-radius: 14px; padding: 16px; background: var(--g-grad);
    box-shadow: 0 8px 20px rgba(255, 61, 119, 0.25);
}
body.guest #login-form button[type="submit"]:hover:not(:disabled) { background: var(--g-grad); filter: brightness(0.96); }

/* Barra superior de la app */
body.guest .app-bar {
    position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; background: rgba(255, 255, 255, 0.94); border-bottom: 1px solid var(--g-line);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
body.guest .app-bar-title { flex: 1; min-width: 0; }
body.guest .app-bar h2 { margin: 0; font-size: 17px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--g-ink); }
body.guest .app-bar small { color: var(--g-muted); font-size: 12px; }
body.guest .live-pill {
    display: inline-flex; align-items: center; gap: 6px; flex: none; text-decoration: none;
    background: #fdecea; color: #c0392b; font-weight: 800; font-size: 12px; border-radius: 999px; padding: 7px 11px;
}
body.guest .live-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #e74c3c; animation: g-pulso 1.6s infinite; }
@keyframes g-pulso { 50% { opacity: 0.3; } }
body.guest .app-menu { position: relative; flex: none; }
body.guest .app-icon-btn {
    list-style: none; width: 40px; height: 40px; border-radius: 50%; background: #f1f3f6; color: var(--g-ink);
    display: grid; place-items: center; font-size: 20px; cursor: pointer; user-select: none;
}
body.guest .app-icon-btn::-webkit-details-marker { display: none; }
body.guest .app-menu-list {
    position: absolute; right: 0; top: calc(100% + 8px); width: 240px; background: #fff; border-radius: 14px;
    border: 1px solid var(--g-line); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.14); padding: 6px; display: flex; flex-direction: column;
}
body.guest .app-menu-list a { padding: 12px; border-radius: 8px; color: var(--g-ink); text-decoration: none; font-size: 15px; margin: 0; display: block; }
body.guest .app-menu-list a:hover { background: #f4f6f8; }
body.guest .app-menu-list a.danger { color: #c0392b; border-top: 1px solid var(--g-line); border-radius: 0 0 8px 8px; }
body.guest .app-menu-lang { display: flex; align-items: center; gap: 6px; padding: 8px 12px; color: var(--g-muted); font-size: 14px; border-bottom: 1px solid var(--g-line); }
body.guest .app-menu-lang span { flex: 1; }
body.guest .menu-lang { width: auto; min-height: 32px; padding: 4px 12px; font-size: 13px; border-radius: 999px; background: #eef0f4; color: #3c4858; }
body.guest .menu-lang:hover:not(:disabled) { background: #e2e6ec; }
body.guest .menu-lang.active { background: var(--g-ink); color: #fff; }

/* Galería */
body.guest .gallery-main { max-width: 960px; margin: 0 auto; padding-bottom: calc(96px + var(--g-safe-b)); border: 0; }
body.guest .hello-line { margin: 0; padding: 14px 16px 4px; color: #5b6675; font-size: 14px; }
body.guest .gallery-title { margin: 0; padding: 4px 16px 12px; font-size: 18px; text-align: left; color: var(--g-ink); }
body.guest .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 2px; margin: 0; }
@media (min-width: 700px) { body.guest .gallery-grid { grid-template-columns: repeat(4, 1fr); gap: 4px; } }
body.guest .gallery-grid-item { border-radius: 0; background: #e6e9ee; transition: none; }
body.guest .gallery-grid-item:hover { transform: none; }
body.guest .gallery-grid-item:hover img { opacity: 1; }
body.guest .gallery-grid-item:focus-visible { outline: 3px solid #ff3d77; outline-offset: -3px; }
body.guest .gallery-grid-item img { display: block; }
body.guest .badge-mine { position: absolute; left: 6px; bottom: 6px; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
body.guest .badge-comment { position: absolute; right: 6px; top: 5px; font-size: 13px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5)); }
body.guest .gallery-empty { text-align: center; padding: 48px 24px; color: var(--g-muted); }
body.guest .gallery-empty p { margin: 0 0 16px; font-size: 15px; }
body.guest .empty-upload-btn, body.guest .load-more {
    display: inline-block; width: auto; min-height: 44px; padding: 12px 22px; border-radius: 999px; font-weight: 700; cursor: pointer;
}
body.guest .empty-upload-btn { background: var(--g-grad); color: #fff; }
body.guest .load-more { display: block; margin: 16px auto; background: #fff; color: var(--g-ink); border: 1px solid #dfe3e8; }
body.guest .load-more:hover:not(:disabled) { background: #f4f6f8; }
body.guest .load-more.hidden { display: none !important; }

/* Barra inferior */
body.guest .tab-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: 1fr 1fr 1fr;
    background: #fff; border-top: 1px solid var(--g-line); padding: 6px 0 calc(8px + var(--g-safe-b));
}
body.guest.no-uploads .tab-bar { grid-template-columns: 1fr 1fr; }
body.guest .tab {
    width: auto; min-height: 48px; background: none; color: #8a94a0; padding: 4px 0; border-radius: 0; font-size: 11px; font-weight: 700;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; margin: 0;
}
body.guest .tab:hover:not(:disabled) { background: none; color: var(--g-ink); }
body.guest .tab.active { color: var(--g-ink); }
body.guest .tab-icon { font-size: 20px; line-height: 1; filter: grayscale(1); opacity: 0.7; }
body.guest .tab.active .tab-icon { filter: none; opacity: 1; }
body.guest .tab-upload { margin-top: -28px; }
body.guest .tab-plus {
    width: 60px; height: 60px; border-radius: 50%; background: var(--g-grad); color: #fff; display: grid; place-items: center;
    font-size: 34px; font-weight: 400; line-height: 1; box-shadow: 0 8px 20px rgba(255, 61, 119, 0.35); border: 4px solid #fff;
}
@media (min-width: 700px) { body.guest .tab-bar { left: 50%; transform: translateX(-50%); max-width: 520px; border-radius: 18px 18px 0 0; border: 1px solid var(--g-line); } }

/* Mensajes (toast) */
body.guest #status { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(92px + var(--g-safe-b)); z-index: 9500; margin: 0; min-height: 0; width: max-content; max-width: calc(100% - 32px); pointer-events: none; }
body.guest.show-pin #status { bottom: calc(24px + var(--g-safe-b)); }
body.guest #status.toast { padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; color: #fff; background: #1f2d3d; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); text-align: center; }
body.guest #status.toast-success { background: #1e8449; }
body.guest #status.toast-error { background: #c0392b; }
body.guest #status.toast-warning { background: #d35400; }

/* Hoja de subida */
body.guest .sheet-overlay { position: fixed; inset: 0; z-index: 8000; background: rgba(15, 20, 30, 0.45); display: flex; align-items: flex-end; justify-content: center; }
body.guest .sheet {
    width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: #fff; border-radius: 20px 20px 0 0;
    padding: 10px 16px calc(20px + var(--g-safe-b)); box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
    display: flex; flex-direction: column; gap: 8px; animation: g-subir 0.22s ease-out;
}
@keyframes g-subir { from { transform: translateY(40px); opacity: 0; } }
body.guest .sheet-handle { width: 40px; height: 5px; border-radius: 3px; background: #d8dce2; margin: 0 auto 6px; }
body.guest .sheet h3 { margin: 0; font-size: 19px; text-align: left; color: var(--g-ink); }
body.guest .sheet-sub { margin: 0; color: var(--g-muted); font-size: 13px; }
body.guest .photo-count { display: inline; padding: 0; margin: 0; background: none; border: 0; font-size: inherit; font-weight: 700; color: var(--g-ink); }
body.guest .photo-count.full { color: #c0392b; }
body.guest .sheet-strip { display: flex; gap: 10px; overflow-x: auto; padding: 8px 2px 6px; margin: 0; }
body.guest .file-preview-item {
    flex: none; width: 96px; height: 96px; border-radius: 12px; position: relative; padding: 0; margin: 0;
    background: #eef0f3; border: 3px solid transparent; cursor: pointer; display: block; overflow: visible;
}
body.guest .file-preview-item.selected { border-color: #ff3d77; }
body.guest .file-preview-item .file-thumbnail { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; display: block; margin: 0; }
body.guest .remove-file-btn {
    position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; min-height: 0; padding: 0; border-radius: 50%;
    background: var(--g-ink); color: #fff; border: 2px solid #fff; font-size: 15px; line-height: 1; display: grid; place-items: center;
}
body.guest .remove-file-btn:hover:not(:disabled) { background: #000; }
body.guest .thumb-comment { position: absolute; left: 5px; bottom: 5px; background: rgba(255, 255, 255, 0.92); border-radius: 8px; font-size: 11px; padding: 1px 5px; }
body.guest .file-preview-item .item-progress-container { display: none; position: absolute; left: 6px; right: 6px; bottom: 6px; height: 6px; margin: 0; background: rgba(255, 255, 255, 0.7); border-radius: 3px; overflow: hidden; }
body.guest .file-preview-item.uploading .item-progress-container { display: block; }
body.guest .file-preview-item .item-progress-bar { height: 100%; background: #2ecc71; width: 0; }
body.guest .file-preview-item .item-status { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7); margin: 0; padding: 0 4px; }
body.guest .file-preview-item .item-status.success { color: #fff; }
body.guest .file-preview-item .item-status.success::before { content: "✓ "; }
body.guest .file-preview-item .item-status.error { color: #fff; background: rgba(192, 57, 43, 0.85); border-radius: 6px; margin: 0 4px; }
body.guest .file-preview-add {
    flex: none; width: 96px; height: 96px; border-radius: 12px; border: 2px dashed #cfd5dd; background: #fafbfc;
    display: grid; place-items: center; color: #8a94a0; font-size: 30px; cursor: pointer;
}
body.guest .sheet-label { font-size: 13px; font-weight: 700; color: #5b6675; margin: 4px 0 0; text-align: left; }
body.guest .sheet-comment { width: 100%; border: 1px solid #dfe3e8; border-radius: 12px; padding: 12px; font: inherit; font-size: 16px; resize: none; height: 68px; margin: 0; }
body.guest .sheet .char-counter { text-align: right; margin: -4px 0 0; color: #a0a8b2; font-size: 12px; }
body.guest .sheet-warning { margin: 4px 0; background: #fff8e1; border: 1px solid #ffe8a3; color: #7a5b00; font-size: 12px; border-radius: 10px; padding: 8px 10px; text-align: left; }
body.guest .sheet-primary { border-radius: 14px; padding: 16px; background: var(--g-grad); margin-top: 4px; }
body.guest .sheet-primary:hover:not(:disabled) { background: var(--g-grad); filter: brightness(0.96); }
body.guest .sheet-primary:disabled { background: #c9ced6; }
body.guest .sheet-secondary { border-radius: 14px; padding: 14px; background: #f1f3f6; color: var(--g-ink); }
body.guest .sheet-secondary:hover:not(:disabled) { background: #e6e9ee; }

/* Visor a pantalla completa */
body.guest .viewer { position: fixed; inset: 0; z-index: 9000; background: #000; color: #fff; display: flex; flex-direction: column; }
body.guest .viewer-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; padding-top: max(12px, env(safe-area-inset-top)); }
body.guest .viewer-btn, body.guest .viewer .modal-close-btn {
    position: static; width: 40px; height: 40px; min-height: 0; padding: 0; border-radius: 50%;
    background: rgba(255, 255, 255, 0.16); color: #fff; font-size: 18px; display: grid; place-items: center;
}
body.guest .viewer-counter { font-size: 13px; opacity: 0.8; }
body.guest .viewer-spacer { width: 40px; }
body.guest .viewer-stage { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
body.guest .viewer #detail-image { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 0; margin: 0; }
body.guest .viewer .nav-arrow { background: rgba(255, 255, 255, 0.16); box-shadow: none; width: 46px; height: 46px; min-height: 0; padding: 0; }
body.guest .viewer .nav-arrow:disabled { opacity: 0; }
@media (hover: none) { body.guest .viewer .nav-arrow { display: none; } }
body.guest .viewer-info { padding: 14px 16px calc(18px + var(--g-safe-b)); background: linear-gradient(transparent, rgba(0, 0, 0, 0.85) 25%); text-align: left; border: 0; }
body.guest .viewer-author { margin: 0; font-size: 14px; font-weight: 700; color: #fff; }
body.guest .viewer-comment { margin: 4px 0 0; font-size: 15px; line-height: 1.35; color: #fff; font-style: normal; overflow-wrap: anywhere; }
body.guest .viewer-actions { display: flex; gap: 10px; margin-top: 12px; }
body.guest .viewer-actions:not(:has(button:not(.hidden))) { display: none; }
body.guest .viewer-actions button { flex: 1; min-height: 44px; padding: 10px; border-radius: 12px; font-size: 14px; font-weight: 600; background: rgba(255, 255, 255, 0.16); color: #fff; }
body.guest .viewer-actions button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.24); }
body.guest .viewer-actions button.danger { color: #ff8a80; }
body.guest .viewer-foot { margin: 12px 0 0; text-align: center; font-size: 12px; color: rgba(255, 255, 255, 0.6); }
body.guest .viewer-foot .report-link { color: rgba(255, 255, 255, 0.75); }

/* Ventanas de confirmación, edición y reporte por encima del visor */
body.guest .modal-overlay { z-index: 10000; }
body.guest .modal-content { text-align: left; border-radius: 16px; }

/* Anulan reglas antiguas por ID de la página de invitados */
body.guest #preview-gallery { margin-top: 0; border-top: 0; padding-top: 0; padding-bottom: calc(110px + var(--g-safe-b)); }
body.guest #file-preview-container { margin-top: 0; flex-direction: row; gap: 10px; }
body.guest #logout-link { margin-top: 0; color: #c0392b; font-size: 15px; }
body.guest #detail-comment { font-style: normal; color: #fff; text-align: left; flex-grow: 0; }
body.guest #detail-image { max-height: 100%; background: none; }
body.guest #detail-edit-btn, body.guest #detail-delete-btn { margin: 0; padding: 10px; color: #fff; background: rgba(255, 255, 255, 0.16); border-radius: 12px; }
body.guest #detail-delete-btn { color: #ff8a80; }
body.guest .viewer .report-link { position: static; display: inline; padding: 0; margin: 0; background: none; border: 0; font-size: 12px; text-decoration: underline; color: rgba(255, 255, 255, 0.75); }
body.guest.viewer-open #status, body.guest.sheet-open #status { bottom: auto; top: calc(68px + env(safe-area-inset-top, 0px)); }

/* ================================================= */
/* --- TRANSMISIÓN EN VIVO: PÁGINA OSCURA (4.11) --- */
/* ================================================= */
body.guest.live-page { background: #0b0d12; color: #fff; }
body.guest.live-page .language-selector { display: none; }
body.guest.live-page .live-bar { background: rgba(11, 13, 18, 0.92); border-bottom-color: #1d2230; }
body.guest.live-page .live-bar h2 { color: #fff; }
body.guest.live-page .live-bar small { color: #9aa4b0; }
body.guest.live-page .live-back { text-decoration: none; background: #1d2230; color: #fff; flex: none; }
body.guest.live-page .live-pill { background: #fff; }
body.guest .live-main { max-width: 960px; margin: 0 auto; padding-bottom: calc(24px + var(--g-safe-b)); }
body.guest.live-page #live-player-container {
    position: relative; padding-bottom: 0; height: auto; aspect-ratio: 16 / 9; margin: 0;
    border-radius: 0; box-shadow: none; background: #000; overflow: hidden;
}
@media (min-width: 700px) { body.guest.live-page #live-player-container { margin-top: 16px; border-radius: 14px; } }
body.guest.live-page #live-player-container.is-error { aspect-ratio: auto; display: flex; align-items: center; justify-content: center; min-height: 200px; padding: 24px; background: #151924; }
body.guest .live-error { margin: 0; text-align: center; color: #e1e5ea; font-size: 15px; line-height: 1.4; }
body.guest .live-note { margin: 0; padding: 12px 16px; font-size: 13px; color: #9aa4b0; }
body.guest .live-actions { display: flex; gap: 10px; padding: 8px 16px; }
body.guest .live-btn {
    flex: 1; display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 14px;
    border-radius: 14px; font-weight: 700; font-size: 15px; text-decoration: none; text-align: center;
}
body.guest .live-btn-primary { background: var(--g-grad); color: #fff; box-shadow: 0 8px 20px rgba(255, 61, 119, 0.25); }
body.guest .live-btn-secondary { background: #1d2230; color: #fff; }

/* "+" resaltado al volver desde la transmisión con "Subir fotos" */
body.guest .tab-upload.pulse .tab-plus { animation: g-latido 1.1s ease-in-out infinite; }
@keyframes g-latido { 50% { transform: scale(1.12); box-shadow: 0 0 0 10px rgba(255, 61, 119, 0.18), 0 8px 20px rgba(255, 61, 119, 0.35); } }
@media (prefers-reduced-motion: reduce) { body.guest .tab-upload.pulse .tab-plus, body.guest .live-pill::before { animation: none; } }
body.guest.live-page #live-player-container iframe { border: 0; }
body.guest .live-btn { gap: 6px; }

/* =============================================================
   FASE 5.4: estilos que antes iban en atributos style="..."
   (la CSP ya no permite 'unsafe-inline' en style-src).
   Los ocultos al cargar se muestran desde JS con el.style.display,
   que no es un estilo en linea a efectos de la CSP (CSSOM).
   ============================================================= */
#mfa-section,
#mfa-setup-section,
#reset-password-section {
    display: none;
}

#qr-code-container {
    text-align: center;
    margin: 20px 0;
}

#qr-code {
    margin-bottom: 15px;
}

#manual-key {
    background: #f0f0f0;
    padding: 5px;
    word-break: break-all;
    display: inline-block;
    max-width: 100%;
}

#mfa-banner {
    display: none;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 12px 16px;
    margin: 12px 0;
    border: 1px solid #f0ad4e;
    background: #fff8e6;
    color: #5c4300;
    border-radius: 8px;
}

#modal-confirm-input {
    display: none;
    width: 100%;
    margin: 8px 0;
}

#dl-links {
    display: none;
    margin-top: 12px;
}

/* Codigo de descarga recien generado (panel) */
.code-line {
    margin: 6px 0;
}

.code-link {
    word-break: break-all;
}

.code-box {
    font-family: monospace;
    font-size: 1.4em;
    letter-spacing: 2px;
    margin: 8px 0;
    user-select: all;
}
