/* --- ESTILOS GENERALES --- */
:root { 
    --primary-color: #d6336c; 
    --bg-color: #ffe6e9; 
    --card-bg: #ffffff; 
}

body { 
    margin: 0; 
    padding: 20px; 
    background-color: var(--bg-color); 
    font-family: 'Montserrat', sans-serif; 
    color: #333; 
    overflow-x: hidden; 
}

.main-container { 
    background-color: var(--card-bg); 
    max-width: 600px; 
    margin: 30px auto; 
    padding: 30px; 
    border-radius: 25px; 
    box-shadow: 0 10px 30px rgba(214, 51, 108, 0.2); 
    text-align: center; 
    position: relative; 
    z-index: 10; 
    transition: all 0.5s ease; 
}

h1 { 
    font-family: 'Dancing Script', cursive; 
    font-size: 3.5rem; 
    color: var(--primary-color); 
    margin-bottom: 10px; 
}

.intro-text { 
    margin-bottom: 30px; 
    color: #666; 
}

/* --- GALERÍA 1 (FOTOS GRID) --- */
.photo-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px; 
}

.photo-item { 
    position: relative; 
    width: 100%; 
    aspect-ratio: 1 / 1; 
    border-radius: 15px; 
    overflow: hidden; 
    cursor: pointer; 
}

.photo-item img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.5s ease; 
}

.overlay { 
    position: absolute; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(214, 51, 108, 0.9); 
    color: white; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    opacity: 0; 
    transition: opacity 0.3s ease; 
    padding: 10px; 
}

.photo-item:hover .overlay { opacity: 1; }
.photo-item:hover img { transform: scale(1.1); }

.location { font-weight: bold; margin-bottom: 5px; font-size: 0.9rem; }
.message { font-size: 0.85rem; font-style: italic; }

/* --- QUIZ --- */
.btn-grid { 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
}

.btn-answer { 
    background-color: #fff0f3; 
    border: 2px solid var(--primary-color); 
    color: var(--primary-color); 
    padding: 15px; 
    border-radius: 15px; 
    font-size: 1.1rem; 
    cursor: pointer; 
    font-family: 'Montserrat', sans-serif; 
    font-weight: 600; 
    transition: 0.2s;
}

.btn-answer:hover { background-color: var(--primary-color); color: white; }
.btn-answer.correct { background-color: #4caf50; border-color: #4caf50; color: white; }
.btn-answer.wrong { background-color: #f44336; border-color: #f44336; color: white; animation: shake 0.5s; }

/* --- MEMORICE --- */
.memory-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 10px; 
    margin-top: 20px; 
}

.memory-card { 
    background-color: var(--primary-color); 
    height: 80px; 
    border-radius: 10px; 
    cursor: pointer; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    font-size: 2rem; 
    color: transparent; 
    transition: transform 0.3s; 
    transform-style: preserve-3d; 
}

.memory-card.flipped { 
    background-color: #fff; 
    border: 2px solid var(--primary-color); 
    color: #333; 
    transform: rotateY(180deg); 
}

.memory-card.matched { 
    background-color: #a5d6a7; 
    border-color: #4caf50; 
    color: #333; 
    cursor: default; 
}

/* --- ATRAPA EL CORAZÓN --- */
#catch-board {
    height: 300px;
    background-color: #fff0f3;
    border: 2px dashed var(--primary-color);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    cursor: crosshair;
    margin-bottom: 20px;
}

#catch-heart {
    position: absolute;
    font-size: 3rem;
    cursor: pointer;
    user-select: none;
    transition: transform 0.1s;
}
#catch-heart:active { transform: scale(0.8); }

/* --- POLAROID --- */
.polaroid-gallery { 
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center; 
    gap: 20px; 
    margin-top: 30px; 
}

.polaroid-item { 
    background: white; 
    padding: 10px 10px 30px 10px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.15); 
    width: 130px; 
    transform: rotate(-3deg); 
    border: 1px solid #ddd; 
}

.polaroid-item:nth-child(even) { transform: rotate(3deg); }
.polaroid-item img { width: 100%; }

/* --- BOTONES Y CONTROLES --- */
.btn-proposal { 
    margin-top: 30px; 
    background-color: var(--primary-color); 
    color: white; 
    border: none; 
    padding: 15px 30px; 
    font-size: 1.3rem; 
    border-radius: 50px; 
    font-family: 'Dancing Script', cursive; 
    cursor: pointer; 
    box-shadow: 0 5px 15px rgba(214, 51, 108, 0.4); 
    transition: transform 0.2s;
}

.btn-proposal:hover { transform: scale(1.05); }

.btn-back { 
    margin-top: 15px; 
    background: transparent; 
    border: 2px solid #ddd; 
    color: #888; 
    padding: 8px 20px; 
    border-radius: 30px; 
    cursor: pointer; 
    font-family: 'Montserrat', sans-serif; 
    font-size: 0.9rem; 
    transition: all 0.3s; 
}

.btn-back:hover { background: #eee; color: #333; border-color: #ccc; }

input { 
    padding: 12px; 
    font-size: 1.2rem; 
    border-radius: 10px; 
    border: 2px solid #ffccd5; 
    text-align: center; 
    width: 70%;
}

.hidden { display: none; }
.fade-in { animation: fadeIn 0.8s; }

/* --- ANIMACIONES --- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shake { 0%, 100% {transform: translateX(0);} 25% {transform: translateX(-10px);} 75% {transform: translateX(10px);} }

.heart-fall { 
    position: fixed; 
    top: -10%; 
    z-index: 1; 
    pointer-events: none; 
    animation: fall linear forwards; 
}

@keyframes fall { to { top: 110vh; transform: rotate(360deg); } }

/* --- VERSIÓN MÓVIL (AJUSTES PARA CELULAR) --- */
@media (max-width: 480px) {
    h1 {
        font-size: 2.5rem;
    }
    
    .main-container {
        width: 90%;
        padding: 20px;
        margin: 10px auto;
    }

    .memory-grid {
        gap: 5px;
    }
    
    .memory-card {
        height: 60px;
        font-size: 1.5rem;
    }

    #catch-board {
        height: 250px;
    }
    
    #catch-heart {
        font-size: 2.5rem;
    }

    .polaroid-item {
        width: 40%; /* Las fotos polaroid se ajustarán mejor en pantallas pequeñas */
    }
}