* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, #ffeef8 0%, #ffe0f0 50%, #ffd4e5 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

.hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.heart {
    position: absolute;
    font-size: 24px;
    animation: float 6s ease-in infinite;
    opacity: 0.6;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

.container {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(255, 182, 193, 0.4);
    text-align: center;
    backdrop-filter: blur(10px);
}

header {
    margin-bottom: 30px;
}

h1 {
    font-family: 'Dancing Script', cursive;
    font-size: 3em;
    color: #d63384;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.subtitle {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 20px;
}

.game-area {
    animation: fadeIn 0.5s ease-out;
}

.input-section {
    margin: 30px 0;
}

label {
    display: block;
    font-size: 1.1em;
    color: #555;
    margin-bottom: 15px;
    font-weight: 700;
}

input[type="text"] {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.2em;
    border: 3px solid #ffb6c1;
    border-radius: 50px;
    outline: none;
    transition: all 0.3s ease;
    text-align: center;
    font-family: 'Nunito', sans-serif;
    color: #555;
}

input[type="text"]:focus {
    border-color: #d63384;
    box-shadow: 0 0 20px rgba(214, 51, 132, 0.2);
    transform: scale(1.02);
}

button {
    margin-top: 20px;
    padding: 15px 40px;
    font-size: 1.1em;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #d63384, #ff69b4);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(214, 51, 132, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(214, 51, 132, 0.4);
}

button:active {
    transform: translateY(0);
}

.hint {
    margin-top: 20px;
    padding: 15px;
    background: #fff5f8;
    border-radius: 15px;
    border-left: 4px solid #ffb6c1;
}

.hint p {
    color: #888;
    font-size: 0.95em;
}

.message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 15px;
    font-weight: 700;
    display: none;
    animation: shake 0.5s ease-in-out;
}

.message.error {
    display: block;
    background: #ffe0e0;
    color: #d63333;
    border: 2px solid #ff9999;
}

.message.success {
    display: block;
    background: #e0ffe0;
    color: #33aa33;
    border: 2px solid #99ff99;
}

.success-area {
    animation: fadeIn 1s ease-out;
}

.success-content {
    padding: 20px;
}

.success-area h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5em;
    color: #d63384;
    margin-bottom: 30px;
}

.final-message {
    background: linear-gradient(135deg, #fff5f8, #ffe0f0);
    border-radius: 20px;
    padding: 30px;
    margin: 20px 0;
    border: 3px solid #ffb6c1;
}

.final-message p {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8em;
    color: #d63384;
    line-height: 1.6;
}

.final-message .signature {
    font-size: 2em;
    margin-top: 15px;
    color: #ff1493;
}

#playSongButton {
    margin-top: 25px;
    font-size: 1.2em;
    padding: 18px 45px;
}

audio {
    width: 100%;
    margin-top: 20px;
    border-radius: 50px;
}

@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); }
}

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

.pulse {
    animation: pulse 2s infinite;
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    animation: confetti-fall 3s linear forwards;
    z-index: 100;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2.2em;
    }
    
    .container {
        padding: 25px;
    }
    
    .final-message p {
        font-size: 1.4em;
    }
}
