body {
    font-family: 'Arial', sans-serif;
    background: #ffebee;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hearts-background {
    position: fixed;
    width: 100vw;
    height: 100vh;
    background: transparent;
    z-index: 0;
    overflow: hidden;
}

@keyframes hearts {
    0% { transform: translateY(110vh) scale(0.5); opacity: 0.8; }
    100% { transform: translateY(-10vh) scale(1.2); opacity: 0; }
}

h1 {
    font-family: 'Great Vibes', cursive;
    font-size: 3.5rem;
    color: #d32f2f;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    margin: 20px 0;
    text-align: center;
}

h2 {
    font-size: 1.2rem;
    color: #d32f2f;
    text-align: center;
    margin-bottom: 30px;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1000px;
    width: 100%;
    padding: 20px;
}

.card {
    background: transparent;
    width: 250px;
    height: 350px;
    perspective: 1000px;
    margin: 0 auto;
    cursor: pointer;
    opacity: 0.5;
    pointer-events: none;
}

.card.unlocked {
    opacity: 1;
    pointer-events: all;
    filter: drop-shadow(0 0 8px #ff6b6b);
}

.card.unlocked:hover {
    transform: translateY(-5px) scale(1.02);
    transition: all 0.3s ease;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.card-front {
    background: #ffffff;
    border: 3px solid #d32f2f;
    color: #d32f2f;
    font-size: 1.5em;
}

.card-back {
    background: #d32f2f;
    color: white;
    transform: rotateY(180deg);
    font-size: 1.2em;
}

#message {
    text-align: center;
    margin: 20px 0;
    color: #d32f2f;
    font-size: 1.2em;
}

@media (max-width: 600px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1rem; }
    .cards-container { grid-template-columns: 1fr; }
}