/* Configuración base para móviles */
body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #111; /* Fondo oscuro */
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
}

/* El contenedor ahora usa porcentajes de la pantalla (Responsive) */
.tarjeta-contenedor {
    width: 85vw; /* Ocupará el 85% del ancho de la pantalla en móviles */
    max-width: 350px; /* Límite máximo para que no se vea gigante en PC */
    height: 100dvh;
    perspective: 1000px;
}

.tarjeta {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Efecto de rebote al girar */
    transform-style: preserve-3d;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent; /* Quita el destello azul al tocar en móviles */
}

.tarjeta.rotar {
    transform: rotateY(180deg);
}

.cara {
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
    color: white;
    text-align: center;
    padding: 25px;
    box-sizing: border-box;
}

/* Estilos Frente */
.frente {
    background: linear-gradient(135deg, #2a2a2a, #0a0a0a);
    border: 1px solid #444;
}

.saludo {
    color: #e0a96d; /* Tono dorado/bronce */
    font-size: 1.8rem;
    margin-bottom: 10px;
}
.foto-cargada {
    border: 2px solid #e0a96d;
    background: linear-gradient(135deg, rgba(74, 14, 23, 0.92), rgba(177, 18, 43, 0.82));
    box-shadow: 0 0 0 2px rgba(74, 14, 23, 0.95), 0 8px 18px rgba(177, 18, 43, 0.35);
    padding: 3px;
    box-sizing: border-box;
}

.reloj {
    font-size: 1.6rem;
    font-weight: bold;
    font-family: 'Courier New', Courier, monospace;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    letter-spacing: 1px;
    border: 1px solid #333;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

.uploader {
    width: 100%;
    margin: 20px 0;
}

.form-foto {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 12px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

.texto-uploader {
    margin: 0;
    font-size: 0.95rem;
}

.form-foto input[type="file"] {
    display: none;
}

.boton-archivo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 12px 14px;
    font-weight: bold;
    cursor: pointer;
    background: linear-gradient(135deg, #4a0e17, #b1122b);
    color: #f8e5c8;
    border: 1px solid #e0a96d;
    box-shadow: 0 8px 18px rgba(177, 18, 43, 0.28);
}

.nombre-archivo {
    font-size: 0.82rem;
    color: #d7d7d7;
    min-height: 18px;
}

.form-foto button {
    border: 0;
    border-radius: 8px;
    padding: 10px;
    font-weight: bold;
    cursor: pointer;
    background: #e0a96d;
    color: #111;
    display: none;
}

.estado-subida {
    margin: 0;
    font-size: 0.85rem;
    color: #cfcfcf;
}

.instruccion {
    font-size: 0.9rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.galeria-recortes {
    width: 100%;
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 10px 0 14px;
}

.galeria-cargadas {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 0 0 12px;
}

.foto-recorte {
    width: 86px;
    height: 72px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid #444;
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
    cursor: zoom-in;
    background: #111;
}

.galeria-cargadas .foto-cargada {
    object-fit: cover;
    background: transparent;
}

.recorte-1 {
    object-position: left center;
}

.recorte-2 {
    object-position: center;
}

.recorte-3 {
    object-position: right center;
}

.visor-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 20px;
    box-sizing: border-box;
}

.visor-overlay.activo {
    display: flex;
}

.visor-marco {
    width: min(92vw, 460px);
    aspect-ratio: 4 / 5;
    position: relative;
    overflow: hidden;
    filter: drop-shadow(0 18px 38px rgba(0, 0, 0, 0.6));
}

.visor-marco::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('Marcos/Marco1.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    z-index: 2;
    pointer-events: none;
}

.visor-overlay:not(.con-marco) .visor-marco::after {
    display: none;
}

.visor-overlay:not(.con-marco) .visor-marco {
    width: min(92vw, 560px);
    aspect-ratio: auto;
    height: min(82vh, 720px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.visor-imagen {
    position: absolute;
    inset: 0;
    object-fit: contain;
    object-position: center center;
    z-index: 1;
}

.visor-overlay:not(.con-marco) .visor-imagen {
    position: static;
    width: 100%;
    height: 100%;
    transform: none;
    object-fit: contain;
}

.visor-overlay.con-marco .visor-imagen {
    top: 50%;
    left: 50%;
    width: 68%;
    height: 58%;
    transform: translate(-50%, -50%);
    object-fit: contain;
    background: #111;
}

/* Estilos Dorso (Pase VIP) */
.dorso {
    background: linear-gradient(135deg, #1a1a1a, #4a0e17); /* Tonos oscuros y rojizos */
    transform: rotateY(180deg);
    border: 1px solid #661a25;
    justify-content: flex-start;
}

.artista {
    font-size: 2.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.gira {
    font-size: 1.2rem;
    color: #e0a96d;
    font-style: italic;
    margin-bottom: 12px;
}

.foto-concierto {
    width: 100%;
    max-width: 300px;
    height: 165px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 14px;
    border: 1px solid #a23a4b;
    box-shadow: 0 12px 30px rgba(0,0,0,0.45);
    margin-bottom: 12px;
}

.detalles {
    background: rgba(255,255,255,0.05);
    padding: 15px 20px;
    border-radius: 10px;
    border-left: 4px solid #e0a96d;
}

.mensaje-amor {
    margin-top: auto;
    margin-bottom: 0;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: #b1122b;
    text-shadow: 0 0 10px rgba(177, 18, 43, 0.75), 0 0 24px rgba(90, 14, 35, 0.8);
    animation: latidoAmor 1.4s ease-in-out infinite;
}

@keyframes latidoAmor {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.08);
        opacity: 1;
    }
}