:root {
    --primary-red: #ff4d4d;
    --dark-red: #c0392b;
    --soft-pink: #fff5f5;
    --gold: #ffd700;
    --white: #ffffff;
    --text-color: #2d3436;
}

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

body {
    font-family: 'Quicksand', sans-serif;
    background-color: var(--soft-pink);
    color: var(--text-color);
    overflow-x: hidden;
    width: 100%;
}

h1, h2, h3, .dancing, .date {
    font-family: 'Dancing Script', cursive;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Heart Background */
.heart-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.heart {
    position: absolute;
    color: var(--primary-red);
    opacity: 0.3;
    animation: float 10s linear infinite;
}

@keyframes float {
    0% { transform: translateY(110vh) rotate(0deg) scale(1); opacity: 0.6; }
    100% { transform: translateY(-10vh) rotate(360deg) scale(1.5); opacity: 0; }
}

/* Music Control */
.music-control {
    margin-top: 20px;
    z-index: 1000;
    width: 100%;
    display: flex;
    justify-content: center;
}

.music-btn {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    font-size: 0.9rem;
}

.music-btn:hover {
    background: var(--primary-red);
    color: white;
    transform: scale(1.05);
}

/* Hero Section */
#hero {
    min-height: 100vh;
    background: linear-gradient(rgba(255, 77, 77, 0.7), rgba(192, 57, 43, 0.8)), url('https://images.unsplash.com/photo-1518199266791-5375a83190b7?auto=format&fit=crop&q=80&w=1200');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hero-content {
    width: 100%;
    max-width: 800px;
}

.hero-hearts { font-size: 3rem; animation: pulse 2s infinite; margin-bottom: 10px; }
#hero h1 { font-size: clamp(3rem, 10vw, 6rem); text-shadow: 2px 2px 10px rgba(0,0,0,0.3); line-height: 1.1; }
.subtitle { font-size: clamp(1.2rem, 4vw, 1.8rem); opacity: 0.9; margin: 15px 0; }

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

.scroll-indicator {
    margin-top: 30px;
    font-size: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

/* Sections General */
section {
    padding: 60px 15px;
    width: 100%;
}

.section-title { 
    font-size: clamp(2.5rem, 8vw, 4rem); 
    text-align: center; 
    color: var(--dark-red); 
    margin-bottom: 40px; 
}

/* Timeline Styling */
.timeline { 
    position: relative; 
    max-width: 900px; 
    margin: 0 auto; 
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: var(--primary-red);
    top: 0; bottom: 0; left: 50%;
    margin-left: -2px;
}

.timeline-item { 
    padding: 20px 30px; 
    position: relative; 
    width: 50%; 
    opacity: 0; 
}

.left { left: 0; text-align: right; }
.right { left: 50%; text-align: left; }

.timeline-item::after {
    content: '❤';
    position: absolute;
    width: 30px; height: 30px;
    right: -15px; top: 30px;
    background: white;
    border: 3px solid var(--primary-red);
    border-radius: 50%;
    z-index: 1;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary-red);
    font-size: 0.8rem;
}
.right::after { left: -15px; }

.content {
    padding: 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    width: 100%;
}

.date { font-size: 1.4rem; color: var(--primary-red); font-weight: bold; margin-bottom: 5px; }
.content h3 { font-size: 1.6rem; margin-bottom: 10px; color: var(--text-color); }
.content p { font-size: 1rem; line-height: 1.5; }
.timeline-img { 
    width: 100%; 
    border-radius: 12px; 
    margin: 15px 0; 
    border: 2px solid var(--soft-pink); 
    object-fit: cover;
}

/* Highlight Section */
#highlights-section {
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.highlight-card {
    background: var(--soft-pink);
    padding: clamp(20px, 5vw, 40px);
    border-radius: 30px;
    box-shadow: 0 15px 40px rgba(255, 77, 77, 0.1);
    max-width: 800px;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 30px;
    border: 2px solid #ffcccc;
}

.highlight-img {
    width: 250px;
    height: 350px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.highlight-text { flex: 1; }
.highlight-text h3 { font-size: clamp(1.8rem, 5vw, 2.5rem); color: var(--dark-red); margin-bottom: 15px; }
.highlight-text p { font-size: 1.1rem; line-height: 1.6; margin-bottom: 12px; }

/* Flower Picker */
#flower-picker { text-align: center; background: white; }
.instruction { margin-bottom: 25px; font-size: 1.1rem; padding: 0 10px; }

.flower-options { 
    display: flex; 
    justify-content: center; 
    flex-wrap: wrap;
    gap: 15px; 
    margin: 30px 0; 
}

.flower {
    padding: 15px; 
    border: 2px dashed #ffcccc; 
    border-radius: 15px;
    cursor: pointer; 
    transition: 0.3s; 
    font-size: 1rem;
    min-width: 80px;
    background: white;
}
.flower:active { transform: scale(0.9); }

.action-buttons { 
    display: flex; 
    flex-direction: column;
    align-items: center;
    gap: 15px; 
    margin-bottom: 30px; 
}

.primary-btn, .secondary-btn {
    padding: 15px 30px; 
    border: none; 
    border-radius: 30px; 
    cursor: pointer;
    font-size: 1.1rem; 
    font-weight: 700; 
    width: 100%;
    max-width: 280px;
}
.primary-btn { background: var(--primary-red); color: white; box-shadow: 0 4px 15px rgba(255, 77, 77, 0.3); }
.secondary-btn { background: #f0f0f0; color: var(--text-color); }

/* Bouquet Result */
#bouquet-container { 
    min-height: 420px; 
    display: flex; 
    justify-content: center; 
    margin-top: 20px;
}

#final-bouquet-display {
    position: relative; 
    width: 100%;
    max-width: 320px; 
    height: 420px;
    background: #fffafa; 
    border-radius: 160px 160px 20px 20px;
    border: 10px solid #ffe4e1; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    overflow: hidden;
}

#flower-wrap {
    width: 100%; height: 280px; display: flex; flex-wrap: wrap;
    justify-content: center; align-content: flex-end; padding: 15px;
    font-size: 2.5rem; gap: 3px;
}
.ribbon { font-size: 3.5rem; position: absolute; top: 230px; z-index: 2; }
.bouquet-handle { width: 35px; height: 90px; background: #8b4513; border-radius: 0 0 10px 10px; }
.bouquet-msg { margin-top: 15px; font-family: 'Dancing Script', cursive; font-size: 1.4rem; color: var(--dark-red); font-weight: bold; }

/* Final Message */
#final-message { padding: 80px 15px; }
.message-card {
    max-width: 700px; 
    margin: 0 auto; 
    background: white; 
    padding: clamp(30px, 8vw, 60px);
    border-radius: 30px; 
    border: 8px double var(--soft-pink); 
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.message-card h2 { font-size: clamp(2.5rem, 8vw, 4rem); color: var(--dark-red); margin-bottom: 20px; }
.message-card p { font-size: clamp(1rem, 4vw, 1.2rem); line-height: 1.7; margin-bottom: 20px; }
.sign-off { font-size: clamp(1.8rem, 6vw, 2.5rem); color: var(--primary-red); }

/* Mobile Optimization Queries */
@media (max-width: 768px) {
    .timeline::after { left: 30px; }
    
    .timeline-item { 
        width: 100%; 
        padding-left: 60px; 
        padding-right: 15px;
        text-align: left;
    }
    
    .timeline-item::after { left: 15px; }
    .left, .right { left: 0; }
    
    .highlight-card {
        flex-direction: column;
        text-align: center;
    }
    
    .highlight-img {
        width: 100%;
        max-width: 300px;
        height: 350px;
    }
}

@media (max-width: 480px) {
    section { padding: 50px 10px; }
    .content { padding: 15px; }
    .content h3 { font-size: 1.4rem; }
    .date { font-size: 1.2rem; }
    .flower { min-width: 70px; padding: 10px; }
    .lock-card { padding: 30px 20px; }
}

.hidden { display: none !important; }
