/* GLOBAL STYLES */
body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    /* restore soft gradient background for pages without the photo */
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    text-align: center;
    color: #d63384;
    position: relative;
}

/* blurred full-screen background image (apply only when body has .bg-valentine) */
.bg-valentine::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url('images/wp2.jpeg');
    background-size: cover;
    background-position: center;
    filter: blur(10px) brightness(0.7);
    transform: scale(1.03);
    z-index: -1;
}

h1 { font-family: 'Pacifico', cursive; font-size: 3rem; margin-bottom: 20px; }
button {
    padding: 12px 24px;
    background-color: #ff6f91;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s;
}
button:hover { transform: scale(1.05); }

/* ANIMATIONS */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.fade-in { animation: fadeIn 1s ease-in; width: 100%; max-width: 600px; }

/* LOGIN PAGE */
input { padding: 12px; border: 2px solid #ffb7b2; border-radius: 8px; font-size: 1rem; outline: none; }
.error-shake { animation: shake 0.5s; border-color: red; }
@keyframes shake { 0% { transform: translateX(0); } 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 100% { transform: translateX(0); } }
.hint { font-size: 0.8rem; color: #888; margin-top: 15px; }
.error-msg { color: red; font-weight: bold; margin-top: 10px; display: none; }

/* INTRO PAGE */
.btn-group { position: relative; height: 100px; margin-top: 30px; }
.btn-yes, .btn-no { position: absolute; display: inline-flex; align-items: center; justify-content: center; padding: 12px 24px; border-radius: 8px; }
.btn-yes { left: 20%; background-color: #ff6f91; color: white; border: none; }
.btn-no { right: 20%; background-color: #28a745; color: white; border: none; }

/* MEMORY GAME */
.grid { display: grid; grid-template-columns: repeat(6, auto); gap: 12px; margin: 20px auto; perspective: 1000px; justify-content: center; }
.card { width: 100px; height: 100px; position: relative; transform-style: preserve-3d; transition: transform 0.6s; cursor: pointer; }
.card.flipped { transform: rotateY(180deg); }
.front, .back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 2rem; }
.front { background: rgba(255,183,178,0.9); color: white; box-shadow: 0 6px 18px rgba(214,51,132,0.08), 0 2px 6px rgba(0,0,0,0.06); }
.back { background: white; border: 2px solid rgba(255,111,145,0.9); transform: rotateY(180deg); box-shadow: 0 6px 24px rgba(40,167,69,0.06); }

/* subtle glow around the cards */
.card .back img { filter: drop-shadow(0 6px 14px rgba(214,51,132,0.12)); }

/* FINALE */
.heart { font-size: 6rem; animation: heartbeat 1.5s infinite; margin-top: 20px; }
@keyframes heartbeat { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* Secret button and secret page styles */
.secret-btn {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1200;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.06);
    cursor: pointer;
    transition: all 0.55s ease;
    font-weight: 600;
}
.secret-btn.secret-heart {
    width: 72px;
    height: 72px;
    padding: 0;
    border-radius: 50%;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.secret-page { display:flex; flex-direction:column; align-items:center; justify-content:center; height:100vh; }
.secret-content { margin-top:40px; padding:20px; max-width:700px; text-align:center; }

/* Footer for the secret page */
.secret-footer { position:fixed; left:0; right:0; bottom:0; height:56px; display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,0.85); backdrop-filter: blur(6px); font-weight:600; z-index:1000; }