/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Main Color Palette - Warm & Romantic */
    --primary-pink: #FF7E9A;
    --primary-coral: #FF6B9D;
    --primary-peach: #FFB4A2;
    --secondary-pink: #FFD1DC;
    --accent-gold: #FFD700;
    --accent-rose: #FFB6C1;
    
    /* Gradients */
    --gradient-main: linear-gradient(135deg, #FFB4A2 0%, #FF7E9A 50%, #FF6B9D 100%);
    --gradient-soft: linear-gradient(135deg, #FFF0F3 0%, #FFE5EA 100%);
    --gradient-sunset: linear-gradient(135deg, #FFD4B2 0%, #FFAAA5 50%, #FF8E99 100%);
    --gradient-candy: linear-gradient(135deg, #FFB6C1 0%, #FF9AA2 100%);
    --gradient-warm: linear-gradient(135deg, #FFDEE9 0%, #FFC7D6 50%, #FFB5C3 100%);
    
    /* Text Colors */
    --text-dark: #2C2C2C;
    --text-medium: #5A5A5A;
    --text-light: #8A8A8A;
    --text-white: #FFFFFF;
    
    /* Background Colors */
    --bg-cream: #FFF9F6;
    --bg-light-pink: #FFF5F7;
    --bg-white: #FFFFFF;
    
    /* Shadows */
    --shadow-soft: 0 4px 12px rgba(255, 126, 154, 0.15);
    --shadow-medium: 0 8px 24px rgba(255, 107, 157, 0.2);
    --shadow-strong: 0 12px 36px rgba(255, 107, 157, 0.25);
    --shadow-hover: 0 16px 48px rgba(255, 107, 157, 0.3);
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #FFF9F6 0%, #FFE8EE 50%, #FFF0F3 100%);
    background-size: 400% 400%;
    animation: gradientFlow 20s ease infinite;
    color: var(--text-dark);
    overflow-x: hidden;
    line-height: 1.7;
}

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

html {
    scroll-behavior: smooth;
}

/* Music Toggle - Warm Theme */
.music-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--gradient-main);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-medium);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-size: 26px;
    border: 3px solid white;
}

.music-toggle:hover {
    transform: scale(1.15) rotate(15deg);
    box-shadow: var(--shadow-hover);
}

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

.music-toggle.playing {
    animation: musicPulse 1s ease-in-out infinite;
}

@keyframes musicPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 157, 0.7);
    }
    50% { 
        transform: scale(1.1);
        box-shadow: 0 0 0 15px rgba(255, 107, 157, 0);
    }
}

/* Section Styles */
.section {
    min-height: 100vh;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    opacity: 0;
    transition: opacity 0.8s ease;
    position: relative;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.2), transparent);
    pointer-events: none;
}

.section.active {
    display: flex;
    animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

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

.container {
    max-width: 1000px;
    width: 100%;
    text-align: center;
    z-index: 1;
}

/* Welcome Screen */
#welcome-screen {
    position: relative;
    overflow: hidden;
    background: var(--gradient-sunset);
}

#welcome-screen::after {
    content: '';
    position: absolute;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: backgroundMove 20s linear infinite;
}

@keyframes backgroundMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.welcome-content {
    z-index: 2;
    position: relative;
}

.main-title {
    font-size: 4.5rem;
    font-weight: 800;
    background: linear-gradient(45deg, #FFFFFF, #FFE5EA, #FFFFFF);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 30px;
    animation: bounceInScale 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    text-shadow: 0 4px 20px rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
}

@keyframes bounceInScale {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-10deg);
    }
    50% {
        transform: scale(1.1) rotate(3deg);
    }
    70% {
        transform: scale(0.95) rotate(-2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

.subtitle {
    font-size: 1.7rem;
    color: white;
    margin-bottom: 50px;
    font-weight: 300;
    animation: fadeInUp 1s ease 0.5s forwards;
    opacity: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    line-height: 1.8;
}

/* Enhanced Buttons */
.btn-primary, .btn-secondary, .btn-celebration {
    padding: 18px 50px;
    font-size: 1.3rem;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: var(--shadow-medium);
    font-family: 'Poppins', sans-serif;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary::before, .btn-secondary::before, .btn-celebration::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before, .btn-secondary:hover::before, .btn-celebration:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-candy);
    color: white;
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 24px rgba(255, 154, 162, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 32px rgba(255, 154, 162, 0.6);
    }
}

.btn-primary:hover, .btn-celebration:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-hover);
}

.btn-primary:active {
    transform: translateY(-2px) scale(1.02);
}

.btn-secondary {
    background: white;
    color: var(--primary-coral);
    margin-top: 30px;
    border: 2px solid var(--primary-coral);
}

.btn-secondary:hover {
    background: var(--gradient-candy);
    color: white;
    transform: translateY(-3px);
    border-color: transparent;
}

.btn-celebration {
    background: var(--gradient-main);
    color: white;
    font-size: 1.4rem;
    padding: 20px 60px;
    margin-top: 40px;
    animation: buttonShine 3s ease infinite;
}

@keyframes buttonShine {
    0%, 100% { 
        filter: brightness(1) hue-rotate(0deg); 
    }
    50% { 
        filter: brightness(1.1) hue-rotate(10deg); 
    }
}

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

.heart {
    position: absolute;
    font-size: 30px;
    animation: floatUp 8s ease-in infinite;
    opacity: 0;
    filter: drop-shadow(0 0 10px rgba(255, 182, 193, 0.8));
}

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

/* Section Titles */
.section-title {
    font-size: 3rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 50px;
    font-weight: 700;
    position: relative;
    display: inline-block;
    animation: titleSlideIn 0.8s ease;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient-candy);
    border-radius: 2px;
}

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

/* Memory Slider */
.slider-container {
    background: white;
    border-radius: 30px;
    padding: 50px;
    box-shadow: var(--shadow-strong);
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 209, 220, 0.3);
    transition: all 0.3s ease;
}

.slider-container:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.slider-wrapper {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide {
    display: none;
    flex-direction: column;
    align-items: center;
    animation: slideInRight 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.slide.active {
    display: flex;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.slide img {
    box-shadow: var(--shadow-strong);
    transition: all 0.3s ease;
    border: 5px solid white;
}

.slide img:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-hover);
}

.placeholder-image {
    width: 100%;
    max-width: 500px;
    height: 400px;
    background: var(--gradient-soft);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border: 3px dashed var(--secondary-pink);
}

.photo-icon {
    font-size: 80px;
    margin-bottom: 10px;
    animation: bounce 2s infinite;
}

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

.upload-hint {
    color: var(--text-medium);
    font-size: 1rem;
    font-weight: 300;
}

.slide-caption {
    font-size: 1.6rem;
    color: var(--text-dark);
    font-weight: 500;
    margin-top: 25px;
    font-style: italic;
    animation: fadeIn 1s ease 0.3s forwards;
    opacity: 0;
    line-height: 1.6;
}

/* Slider Controls */
.slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-top: 40px;
}

.slider-btn {
    background: var(--gradient-main);
    color: white;
    border: none;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: var(--shadow-medium);
}

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

.slider-dots {
    display: flex;
    gap: 12px;
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--secondary-pink);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 24px;
    height: 24px;
    border: 2px solid var(--primary-coral);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--gradient-candy);
    transform: scale(1.4);
}

.dot.active::after {
    transform: translate(-50%, -50%) scale(1);
}

.dot:hover {
    transform: scale(1.3);
}

/* Video Section */
.video-container {
    background: white;
    border-radius: 30px;
    padding: 30px;
    box-shadow: var(--shadow-strong);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 209, 220, 0.2);
}

.video-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 182, 193, 0.2), transparent);
    transition: left 0.5s;
}

.video-container:hover::before {
    left: 100%;
}

.video-container:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

#birthdayVideo {
    width: 100%;
    max-width: 750px;
    border-radius: 20px;
    outline: none;
    box-shadow: var(--shadow-soft);
}

.video-caption {
    font-size: 1.5rem;
    color: var(--text-dark);
    font-weight: 400;
    margin-top: 25px;
    animation: fadeIn 1s ease;
}

/* Message Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 35px;
    margin-bottom: 40px;
}

.message-card {
    background: white;
    padding: 50px 30px;
    border-radius: 25px;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.message-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-warm);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.message-card:hover::before {
    opacity: 1;
}

.message-card:hover {
    transform: translateY(-15px) scale(1.05) rotate(2deg);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-peach);
}

.message-card:active {
    transform: translateY(-10px) scale(1.02);
}

.card-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    animation: iconBounce 2s ease infinite;
    position: relative;
    z-index: 1;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(-5deg); }
    75% { transform: translateY(-5px) rotate(5deg); }
}

.message-card h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 126, 154, 0.3);
    backdrop-filter: blur(8px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    padding: 50px;
    border-radius: 30px;
    max-width: 550px;
    width: 90%;
    position: relative;
    box-shadow: var(--shadow-hover);
    animation: modalSlideUp 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 3px solid var(--secondary-pink);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(100px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: var(--primary-coral);
    background: var(--bg-light-pink);
    transform: rotate(90deg);
}

#modalBody {
    font-size: 1.3rem;
    line-height: 2;
    color: var(--text-dark);
}

#modalBody h3 {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

#modalBody p {
    margin-bottom: 15px;
}

/* Apology Section */
.apology-content {
    background: white;
    padding: 70px 50px;
    border-radius: 30px;
    box-shadow: var(--shadow-strong);
    position: relative;
    overflow: hidden;
    border: 2px solid var(--secondary-pink);
}

.apology-content::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 182, 193, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.apology-icon {
    font-size: 5rem;
    margin-bottom: 30px;
    animation: heartbeat 1.5s ease infinite;
    position: relative;
    z-index: 1;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    10%, 30% { transform: scale(1.1); }
    20%, 40% { transform: scale(0.95); }
}

.apology-text {
    font-size: 1.5rem;
    line-height: 2;
    color: var(--text-dark);
    margin-bottom: 25px;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

/* Final Wish */
.final-content {
    background: white;
    padding: 70px 50px;
    border-radius: 30px;
    box-shadow: var(--shadow-strong);
    position: relative;
    overflow: hidden;
    border: 2px solid var(--secondary-pink);
}

.typewriter {
    font-size: 2.3rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 35px;
    font-weight: 700;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.wish-emoji {
    font-size: 4rem;
    margin: 35px 0;
    animation: emojiFloat 2s ease-in-out infinite;
}

@keyframes emojiFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(-10deg); }
    50% { transform: translateY(-10px) rotate(0deg); }
    75% { transform: translateY(-15px) rotate(10deg); }
}

.final-note {
    font-size: 1.6rem;
    color: var(--text-dark);
    margin-top: 40px;
    font-weight: 500;
    animation: fadeIn 1s ease 1s forwards;
    opacity: 0;
}

/* Confetti Canvas */
#confettiCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* Progress Indicator */
.progress-indicator {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 999;
    background: white;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: var(--shadow-medium);
    border: 2px solid var(--secondary-pink);
}

.progress-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--secondary-pink);
    transition: all 0.3s ease;
}

.progress-dot.active {
    background: var(--gradient-candy);
    transform: scale(1.5);
    box-shadow: 0 0 10px rgba(255, 107, 157, 0.5);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.8rem;
    }

    .subtitle {
        font-size: 1.3rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .slider-container {
        padding: 30px 20px;
    }

    .slide img {
        height: 350px;
    }

    .slide-caption {
        font-size: 1.2rem;
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .message-card {
        padding: 35px 20px;
    }

    .card-icon {
        font-size: 3rem;
    }

    .message-card h3 {
        font-size: 1.1rem;
    }

    .apology-content, .final-content {
        padding: 50px 30px;
    }

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

    .typewriter {
        font-size: 1.7rem;
        min-height: 100px;
    }

    .btn-primary, .btn-secondary, .btn-celebration {
        font-size: 1.1rem;
        padding: 15px 35px;
    }

    .modal-content {
        padding: 40px 25px;
    }

    #modalBody {
        font-size: 1.1rem;
    }

    .music-toggle {
        width: 50px;
        height: 50px;
        top: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .section {
        padding: 40px 15px;
    }

    .slide img {
        height: 280px;
    }

    .photo-icon {
        font-size: 60px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .slider-btn {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }
}

/* Loading Animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Utility Classes */
.text-gradient {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 209, 220, 0.3);
}
