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

:root {
    --primary-pink: #ff6b9d;
    --secondary-pink: #c44569;
    --light-pink: #f093fb;
    --purple: #667eea;
    --gold: #ffd700;
    --white: #ffffff;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #ff6b9d 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    position: relative;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Canvas Layers */
#particles, #fireworks {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#particles {
    z-index: 1;
}

#fireworks {
    z-index: 2;
}

/* Floating Elements */
#hearts-container, #stars-container, #confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

#hearts-container { z-index: 3; }
#stars-container { z-index: 4; }
#confetti-container { z-index: 5; }

.heart, .star {
    position: absolute;
    font-size: 24px;
    animation: floatUp 6s linear infinite;
    opacity: 0;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg) scale(1);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(-100px) rotate(360deg) scale(0.5);
        opacity: 0;
    }
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confettiFall 3s linear forwards;
}

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

/* Music Start Overlay */
.music-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease;
}

.music-overlay.hidden {
    display: none;
}

.music-prompt {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #ff6b9d 100%);
    padding: 60px 50px;
    border-radius: 30px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(255, 107, 157, 0.5);
    max-width: 500px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.music-prompt-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.music-prompt h2 {
    font-family: 'Great Vibes', cursive;
    font-size: 3rem;
    color: white;
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.music-prompt p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
}

.music-start-btn {
    display: block;
    width: 100%;
    padding: 20px 50px;
    margin: 20px 0;
    font-size: 1.5rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ffd700, #ff6b9d);
    color: white;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
    animation: pulse 2s infinite;
}

.music-start-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.8);
}

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

/* Music Button */
.music-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    animation: musicPulse 2s infinite;
}

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

.music-btn:hover {
    transform: scale(1.2) rotate(15deg);
    box-shadow: 0 8px 30px rgba(255, 107, 157, 0.6);
}

/* Container */
.container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.section {
    display: none;
    width: 100%;
    max-width: 1200px;
    animation: sectionFadeIn 1s ease-in;
}

.section.active {
    display: block;
}

@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Section Titles */
.section-title {
    font-family: 'Great Vibes', cursive;
    font-size: 4rem;
    color: #fff;
    text-align: center;
    margin-bottom: 50px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8),
                 0 0 40px rgba(255, 182, 193, 0.6);
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.8),
                     0 0 40px rgba(255, 182, 193, 0.6);
    }
    50% {
        text-shadow: 0 0 30px rgba(255, 255, 255, 1),
                     0 0 60px rgba(255, 182, 193, 0.9);
    }
}

/* ===== 1. GREETING SECTION ===== */
.greeting-content {
    text-align: center;
}

.love-counter {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: counterFloat 3s ease-in-out infinite;
}

@keyframes counterFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.counter-label {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 300;
    margin: 10px 0;
}

.counter-number {
    font-size: 5rem;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    animation: numberPulse 2s infinite;
}

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

.title {
    font-family: 'Great Vibes', cursive;
    font-size: 5rem;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8),
                 0 0 40px rgba(255, 182, 193, 0.6);
    margin-bottom: 20px;
}

.name {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    color: #ffe4e1;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
    font-style: italic;
}

.subtitle {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
}

.gift-emoji {
    font-size: 6rem;
    margin: 40px 0;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-30px); }
}

/* Fade Animations */
.fade-in { animation: fadeInDown 1s ease-out; }
.fade-in-delay { animation: fadeInDown 1s ease-out 0.3s backwards; }
.fade-in-delay-2 { animation: fadeInDown 1s ease-out 0.6s backwards; }
.fade-in-delay-3 { animation: fadeInDown 1s ease-out 0.9s backwards; }

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 2. TIMELINE SECTION ===== */
.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto 50px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-pink), var(--purple));
    border-radius: 2px;
}

.timeline-item {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 60px 0;
    position: relative;
    animation: timelineSlide 1s ease-out;
}

@keyframes timelineSlide {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.timeline-icon {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    z-index: 2;
    animation: iconPop 0.5s ease-out;
}

@keyframes iconPop {
    0% { transform: translateX(-50%) scale(0); }
    80% { transform: translateX(-50%) scale(1.2); }
    100% { transform: translateX(-50%) scale(1); }
}

.timeline-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 40%;
    backdrop-filter: blur(10px);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: auto;
    margin-left: 0;
    transform: translateX(-120px);
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: auto;
    margin-right: 0;
    transform: translateX(120px);
}

.timeline-content h3 {
    color: var(--secondary-pink);
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.timeline-content p {
    color: #333;
    line-height: 1.6;
}

/* ===== 3. REASONS CARDS ===== */
.reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
    padding: 20px;
}

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

.reason-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

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

.reason-front, .reason-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.reason-front {
    background: linear-gradient(135deg, var(--primary-pink), var(--light-pink));
    color: white;
}

.reason-back {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    transform: rotateY(180deg);
}

.reason-emoji {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: emojiFloat 3s ease-in-out infinite;
}

@keyframes emojiFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.reason-front h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
}

.reason-back p {
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
}

/* ===== 4. PHOTO GALLERY ===== */
.photo-note {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin-bottom: 40px;
    font-style: italic;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
    padding: 20px;
}

.photo-frame {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    animation: photoFadeIn 1s ease-out;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

@keyframes photoFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.photo-frame:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 107, 157, 0.4);
}

.photo-frame:hover .photo-overlay {
    opacity: 1;
}

.photo-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 107, 157, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 15px;
}

.photo-overlay span {
    font-size: 4rem;
    animation: heartBeat 1.5s infinite;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1); }
}

/* Photo Modal */
.photo-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.photo-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 10px;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.7);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 50px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: var(--primary-pink);
    transform: scale(1.2) rotate(90deg);
}

/* ===== 5. MESSAGE SECTION ===== */
.message-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 60px;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.message-title {
    font-family: 'Great Vibes', cursive;
    font-size: 3rem;
    color: var(--secondary-pink);
    margin-bottom: 30px;
    text-align: center;
}

.message-content {
    text-align: left;
    line-height: 2;
    color: #333;
    font-size: 1.2rem;
    min-height: 200px;
}

.typewriter {
    font-family: 'Playfair Display', serif;
}

.typewriter p {
    margin-bottom: 25px;
    text-indent: 30px;
}

.cursor {
    display: inline-block;
    width: 3px;
    height: 1.2em;
    background-color: var(--primary-pink);
    animation: blink 1s step-start infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.message-footer {
    margin-top: 40px;
    animation: fadeIn 1s ease-in;
}

.signature {
    text-align: right;
    font-style: italic;
    color: var(--secondary-pink);
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.date {
    text-align: center;
    font-size: 1.2rem;
    color: var(--primary-pink);
    font-weight: 600;
    margin: 30px 0;
}

/* Gift Boxes */
.gift-boxes {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 40px 0;
}

.gift-box {
    font-size: 5rem;
    cursor: pointer;
    transition: transform 0.3s;
    animation: wiggle 1s infinite;
}

.gift-box:nth-child(1) { animation-delay: 0s; }
.gift-box:nth-child(2) { animation-delay: 0.2s; }
.gift-box:nth-child(3) { animation-delay: 0.4s; }

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg); }
    75% { transform: rotate(15deg); }
}

.gift-box:hover {
    transform: scale(1.4) rotate(360deg);
}

/* ===== 6. FINAL SECTION ===== */
.final-message {
    text-align: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    padding: 80px 40px;
    border-radius: 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.final-title {
    font-family: 'Great Vibes', cursive;
    font-size: 6rem;
    color: #fff;
    text-shadow: 0 0 30px rgba(255, 255, 255, 1),
                 0 0 60px rgba(255, 107, 157, 0.8);
    margin-bottom: 30px;
    animation: finalTitlePulse 2s ease-in-out infinite;
}

@keyframes finalTitlePulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 30px rgba(255, 255, 255, 1),
                     0 0 60px rgba(255, 107, 157, 0.8);
    }
    50% {
        transform: scale(1.05);
        text-shadow: 0 0 40px rgba(255, 255, 255, 1),
                     0 0 80px rgba(255, 107, 157, 1);
    }
}

.final-text {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 30px;
    font-weight: 300;
}

.final-emojis {
    font-size: 4rem;
    margin: 40px 0;
    animation: bounce 2s infinite;
}

.final-note {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 30px;
    font-style: italic;
}

/* ===== BUTTONS ===== */
.continue-btn, .celebrate-btn {
    background: linear-gradient(135deg, var(--primary-pink), var(--secondary-pink));
    color: white;
    border: none;
    padding: 20px 50px;
    font-size: 1.4rem;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 40px;
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.4);
    transition: all 0.3s ease;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.glow-btn {
    animation: buttonGlow 2s ease-in-out infinite;
}

@keyframes buttonGlow {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(255, 107, 157, 0.4);
    }
    50% {
        box-shadow: 0 10px 40px rgba(255, 107, 157, 0.8),
                    0 0 30px rgba(255, 107, 157, 0.6);
    }
}

.continue-btn:hover, .celebrate-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 50px rgba(255, 107, 157, 0.8);
}

.continue-btn:active, .celebrate-btn:active {
    transform: scale(0.95);
}

.mega-btn {
    font-size: 1.8rem;
    padding: 25px 60px;
    animation: megaPulse 1.5s ease-in-out infinite;
}

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

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .title { font-size: 3rem; }
    .name { font-size: 2.5rem; }
    .subtitle { font-size: 1.1rem; }
    .gift-emoji { font-size: 4rem; }
    .counter-number { font-size: 3.5rem; }
    .section-title { font-size: 2.5rem; }
    
    .timeline-container::before { left: 30px; }
    .timeline-item { flex-direction: column; }
    .timeline-icon {
        position: relative;
        left: 0;
        transform: translateX(0);
        margin-bottom: 20px;
    }
    .timeline-content {
        width: 100%;
        transform: translateX(0) !important;
    }
    
    .reasons-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .photo-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .message-card {
        padding: 30px 20px;
    }
    
    .message-title { font-size: 2rem; }
    .message-content { font-size: 1rem; }
    
    .gift-box { font-size: 3.5rem; }
    
    .final-title { font-size: 3.5rem; }
    .final-text { font-size: 1.3rem; }
    .final-emojis { font-size: 2.5rem; }
    
    .continue-btn, .celebrate-btn {
        padding: 15px 35px;
        font-size: 1.1rem;
    }
    
    .mega-btn {
        font-size: 1.3rem;
        padding: 18px 40px;
    }
    
    .music-prompt {
        padding: 40px 30px;
        max-width: 90%;
    }
    
    .music-prompt h2 {
        font-size: 2.5rem;
    }
    
    .music-prompt p {
        font-size: 1.1rem;
    }
    
    .music-start-btn {
        font-size: 1.2rem;
        padding: 18px 40px;
    }
    
    .modal-close {
        top: 15px;
        right: 20px;
        font-size: 40px;
    }
}

@media (max-width: 480px) {
    .container { padding: 20px 10px; }
    .title { font-size: 2.5rem; }
    .name { font-size: 2rem; }
    
    .music-prompt {
        padding: 30px 20px;
    }
    
    .music-prompt h2 {
        font-size: 2rem;
    }
    
    .music-prompt-icon {
        font-size: 4rem;
    }
    
    .music-start-btn {
        font-size: 1.1rem;
        padding: 16px 30px;
    }
}
