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

body {
    font-family: 'Playfair Display', serif;
    background: linear-gradient(135deg, #ffeef8 0%, #ffe0f0 50%, #ffd4e8 100%);
    color: #5a3a47;
    overflow-x: hidden;
    position: relative;
}

html {
    scroll-behavior: smooth;
}

/* Floating Hearts Background */
.floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.heart-float {
    position: absolute;
    font-size: 20px;
    opacity: 0.3;
    animation: float-up 15s infinite ease-in;
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.heart-container {
    position: relative;
    animation: fadeInScale 2s ease-out;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.heart {
    position: relative;
    width: 300px;
    height: 300px;
    animation: pulse 2s ease-in-out infinite;
}

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

.heart::before,
.heart::after {
    content: "";
    position: absolute;
    top: 0;
    width: 150px;
    height: 240px;
    background: linear-gradient(135deg, #ff6b9d 0%, #c94b7f 100%);
    border-radius: 150px 150px 0 0;
}

.heart::before {
    left: 75px;
    transform: rotate(-45deg);
    transform-origin: 0 100%;
}

.heart::after {
    left: 0;
    transform: rotate(45deg);
    transform-origin: 100% 100%;
}

.heart-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 3;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.heart-text h1 {
    font-family: 'Great Vibes', cursive;
    font-size: 3rem;
    margin-bottom: 10px;
    line-height: 1.2;
}

.heart-text .name {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    font-weight: 700;
}

/* Birthday Message Section */
.message-section {
    min-height: 100vh;
    padding: 80px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.message-container {
    max-width: 800px;
    background: rgba(255, 255, 255, 0.9);
    padding: 60px 40px;
    border-radius: 30px;
    box-shadow: 0 10px 40px rgba(201, 75, 127, 0.2);
    animation: fadeInUp 1.5s ease-out;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-container h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 3rem;
    color: #c94b7f;
    text-align: center;
    margin-bottom: 40px;
}

.birthday-message {
    font-size: 1.3rem;
    line-height: 2;
    text-align: center;
    color: #5a3a47;
    animation: typewriter 3s steps(40) 0.5s forwards;
    overflow: hidden;
    white-space: pre-wrap;
}

/* Why I Love You Section */
.love-section {
    min-height: 100vh;
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.love-container {
    max-width: 700px;
    width: 100%;
    text-align: center;
}

.love-container h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 3.5rem;
    color: #c94b7f;
    margin-bottom: 50px;
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.reason-display {
    background: rgba(255, 255, 255, 0.9);
    padding: 50px 40px;
    border-radius: 25px;
    box-shadow: 0 10px 40px rgba(201, 75, 127, 0.2);
    margin-bottom: 40px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reason-text {
    font-size: 1.5rem;
    line-height: 1.8;
    color: #5a3a47;
    font-style: italic;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reason-text.fade-out {
    opacity: 0;
    transform: translateY(-20px);
}

.reason-text.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.generate-btn {
    background: linear-gradient(135deg, #ff6b9d 0%, #c94b7f 100%);
    color: white;
    border: none;
    padding: 18px 50px;
    font-size: 1.3rem;
    font-family: 'Dancing Script', cursive;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(201, 75, 127, 0.4);
    transition: all 0.3s ease;
}

.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(201, 75, 127, 0.6);
}

.generate-btn:active {
    transform: translateY(-1px);
}

/* Footer */
.footer {
    padding: 40px 20px;
    text-align: center;
    font-family: 'Dancing Script', cursive;
    font-size: 1.3rem;
    color: #c94b7f;
    position: relative;
    z-index: 2;
}

/* Interactive Memory Cards Section */
.memory-section {
    min-height: 100vh;
    padding: 80px 20px;
    position: relative;
    z-index: 2;
}

.memory-section h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 3.5rem;
    color: #c94b7f;
    text-align: center;
    margin-bottom: 60px;
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.memory-card {
    perspective: 1000px;
    height: 300px;
    cursor: pointer;
}

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

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

.memory-card-front,
.memory-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(201, 75, 127, 0.3);
}

.memory-card-front {
    background: linear-gradient(135deg, #ff6b9d 0%, #c94b7f 100%);
    color: white;
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
}

.memory-card-back {
    background: rgba(255, 255, 255, 0.95);
    color: #5a3a47;
    transform: rotateY(180deg);
    font-size: 1.1rem;
    line-height: 1.8;
    overflow-y: auto;
}

/* Interactive Kiss Button Section */
.kiss-section {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    position: relative;
    z-index: 2;
}

.kiss-section h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 3rem;
    color: #c94b7f;
    margin-bottom: 30px;
    text-align: center;
}

.kiss-btn {
    background: linear-gradient(135deg, #ff6b9d 0%, #c94b7f 100%);
    color: white;
    border: none;
    padding: 25px 60px;
    font-size: 2rem;
    font-family: 'Dancing Script', cursive;
    border-radius: 60px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(201, 75, 127, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.kiss-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 40px rgba(201, 75, 127, 0.6);
}

.kiss-btn:active {
    transform: scale(0.95);
}

.flying-kiss {
    position: fixed;
    font-size: 3rem;
    pointer-events: none;
    z-index: 9999;
    animation: flyKiss 3s ease-out forwards;
}

@keyframes flyKiss {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0) rotate(720deg);
        opacity: 0;
    }
}

/* Cursor Hearts */
.cursor-heart {
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    font-size: 20px;
    animation: floatUpFade 2s ease-out forwards;
}

@keyframes floatUpFade {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(0);
        opacity: 0;
    }
}

/* Birthday Cake Section */
.cake-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    position: relative;
    z-index: 2;
}

.cake-section h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 3rem;
    color: #c94b7f;
    margin-bottom: 20px;
    text-align: center;
}

.cake-container {
    position: relative;
    margin: 40px 0;
}

.cake {
    width: 300px;
    height: 200px;
    background: linear-gradient(to bottom, #ffb3d9 0%, #ff85c2 50%, #ff6ba8 100%);
    border-radius: 20px 20px 0 0;
    position: relative;
    box-shadow: 0 10px 30px rgba(201, 75, 127, 0.4);
}

.cake::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 10px;
    right: 10px;
    height: 40px;
    background: linear-gradient(to right, #ffd4e8 0%, #ffb3d9 50%, #ffd4e8 100%);
    border-radius: 40px 40px 0 0;
}

.cake::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -10px;
    right: -10px;
    height: 30px;
    background: #ff5c9e;
    border-radius: 0 0 15px 15px;
}

.candles {
    display: flex;
    justify-content: center;
    gap: 40px;
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
}

.candle {
    width: 12px;
    height: 60px;
    background: linear-gradient(to bottom, #fff 0%, #ffe6f0 100%);
    border-radius: 5px 5px 0 0;
    position: relative;
    transition: opacity 0.5s ease;
}

.candle.blown-out {
    opacity: 0.3;
}

.candle.blown-out .flame {
    display: none;
}

.flame {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 30px;
    background: radial-gradient(circle at center, #fff700 0%, #ff6b00 50%, #ff0000 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flicker 0.3s infinite alternate;
}

@keyframes flicker {
    0% { transform: translateX(-50%) scale(1); }
    100% { transform: translateX(-50%) scale(1.1, 0.95); }
}

.blow-instruction {
    text-align: center;
    font-size: 1.3rem;
    color: #5a3a47;
    margin-top: 60px;
    font-family: 'Dancing Script', cursive;
}

.blow-btn {
    background: linear-gradient(135deg, #ff6b9d 0%, #c94b7f 100%);
    color: white;
    border: none;
    padding: 20px 50px;
    font-size: 1.5rem;
    font-family: 'Dancing Script', cursive;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(201, 75, 127, 0.4);
    transition: all 0.3s ease;
    margin-top: 20px;
}

.blow-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(201, 75, 127, 0.6);
}

.cake-message {
    text-align: center;
    font-size: 1.5rem;
    color: #c94b7f;
    font-family: 'Dancing Script', cursive;
    margin-top: 30px;
    opacity: 0;
    transition: opacity 1s ease;
}

.cake-message.show {
    opacity: 1;
}

/* Love Letter Section */
.letter-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 20px;
    position: relative;
    z-index: 2;
}

.envelope {
    position: relative;
    width: 400px;
    height: 280px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.envelope:hover {
    transform: scale(1.05);
}

.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 200px solid transparent;
    border-right: 200px solid transparent;
    border-top: 140px solid #ff85c2;
    transform-origin: top center;
    transition: transform 0.8s ease, z-index 0s 0.4s;
    z-index: 3;
}

.envelope.open .envelope-flap {
    transform: rotateX(180deg);
    z-index: 1;
}

.envelope-body {
    position: absolute;
    top: 140px;
    left: 0;
    width: 400px;
    height: 140px;
    background: #ff6ba8;
    clip-path: polygon(0 0, 50% 45%, 100% 0, 100% 100%, 0 100%);
    z-index: 2;
}

.letter {
    position: absolute;
    top: 40px;
    left: 30px;
    width: 340px;
    height: 500px;
    background: #fff;
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
    transition: transform 0.8s ease, z-index 0s 0.4s;
    z-index: 1;
    overflow-y: auto;
}

.envelope.open .letter {
    transform: translateY(-200px);
    z-index: 4;
}

.letter-content {
    font-family: 'Dancing Script', cursive;
    font-size: 1.3rem;
    line-height: 2;
    color: #5a3a47;
    white-space: pre-wrap;
}

.letter-instruction {
    text-align: center;
    font-size: 1.3rem;
    color: #c94b7f;
    font-family: 'Dancing Script', cursive;
    margin-bottom: 40px;
}

/* Wishes Wall Section */
.wishes-section {
    min-height: 80vh;
    padding: 80px 20px;
    position: relative;
    z-index: 2;
}

.wishes-section h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 3.5rem;
    color: #c94b7f;
    text-align: center;
    margin-bottom: 30px;
}

.wishes-instruction {
    text-align: center;
    font-size: 1.2rem;
    color: #5a3a47;
    margin-bottom: 50px;
}

.wishes-wall {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.wish-note {
    background: linear-gradient(135deg, #fff9e6 0%, #ffe6f0 100%);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(201, 75, 127, 0.2);
    transform: rotate(-2deg);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.wish-note:nth-child(even) {
    transform: rotate(2deg);
}

.wish-note:hover {
    transform: rotate(0deg) translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(201, 75, 127, 0.4);
    z-index: 10;
}

.wish-note.revealed .wish-text {
    filter: none;
    opacity: 1;
}

.wish-note::before {
    content: '📌';
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 1.5rem;
}

.wish-text {
    font-size: 1.1rem;
    color: #5a3a47;
    line-height: 1.6;
    font-style: italic;
    filter: blur(8px);
    opacity: 0.3;
    transition: all 0.5s ease;
}

.wish-note::after {
    content: '👆 Click to Reveal';
    position: absolute;
    font-size: 0.9rem;
    color: #c94b7f;
    font-family: 'Dancing Script', cursive;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.wish-note.revealed::after {
    opacity: 0;
}

/* Music Control */
.music-control {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(201, 75, 127, 0.3);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.music-control:hover {
    transform: scale(1.1);
}

.music-control span {
    font-size: 24px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .heart {
        width: 200px;
        height: 200px;
    }

    .heart::before,
    .heart::after {
        width: 100px;
        height: 160px;
        border-radius: 100px 100px 0 0;
    }

    .heart::before {
        left: 50px;
    }

    .heart-text h1 {
        font-size: 2rem;
    }

    .heart-text .name {
        font-size: 1.8rem;
    }

    .message-container {
        padding: 40px 25px;
    }

    .message-container h2 {
        font-size: 2.2rem;
    }

    .birthday-message {
        font-size: 1.1rem;
        line-height: 1.8;
    }

    .love-container h2 {
        font-size: 2.5rem;
    }

    .reason-display {
        padding: 35px 25px;
        min-height: 150px;
    }

    .reason-text {
        font-size: 1.2rem;
    }

    .generate-btn {
        padding: 15px 40px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .heart-text h1 {
        font-size: 1.5rem;
    }

    .heart-text .name {
        font-size: 1.4rem;
    }

    .birthday-message {
        font-size: 1rem;
    }

    .reason-text {
        font-size: 1.1rem;
    }
}
