* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(180deg, #0a0f1b, #111827, #1e293b);
    color: #fff;
    overflow-x: hidden;
}

/* Floating hearts animation background */
.hearts::before, .hearts::after {
    content: "❤️";
    position: fixed;
    animation: float 6s infinite linear;
    font-size: 20px;
    opacity: 0.4;
}
.hearts::after {
    left: 70%;
    animation-duration: 9s;
}
.hearts::before {
    left: 20%;
}

@keyframes float {
    0% { top: 110%; transform: translateX(0); }
    100% { top: -10%; transform: translateX(30px); }
}

/* HERO SECTION */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.glow {
    font-size: 2.4rem;
    font-weight: 700;
    text-shadow: 0 0 15px #ff7b7b;
}

.subtitle {
    font-size: 1.1rem;
    margin: 15px 0 25px;
    color: #cbd5e1;
}

.magic-btn {
    padding: 12px 20px;
    background: #ff4d6d;
    border: none;
    color: white;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 0 12px rgba(255, 77, 109, 0.6);
}

.magic-btn:hover {
    transform: scale(1.08);
    background: #ff1744;
}

/* Pulse animation for buttons */
@keyframes pulse {
    0% {
        box-shadow: 0 0 12px rgba(255, 77, 109, 0.6);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 77, 109, 0.9);
    }
    100% {
        box-shadow: 0 0 12px rgba(255, 77, 109, 0.6);
    }
}

.magic-btn {
    animation: pulse 2s infinite;
}

/* TIMELINE */
.timeline-section {
    padding: 60px 20px;
    text-align: center;
}

.timeline {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.timeline-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 0 15px rgba(255, 70, 90, 0.1);
    backdrop-filter: blur(5px);
    transition: 0.3s ease;
}

.timeline-item:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 25px rgba(255, 70, 90, 0.3);
    transform: translateY(-5px);
}

/* LETTER */
.letter-section {
    padding: 60px 25px;
    text-align: center;
}

.letter {
    background: rgba(255,255,255,0.05);
    padding: 25px;
    border-radius: 14px;
    min-height: 180px;
    margin: 25px auto;
    max-width: 600px;
    box-shadow: 0 0 20px rgba(255, 100, 120, 0.2);
}

/* SURPRISE */
.surprise-section {
    padding: 60px 20px;
    text-align: center;
}

.surprise-btn {
    padding: 14px 26px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(90deg, #ff6a88, #ff99ac);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 0 18px rgba(255, 105, 135, 0.5);
}

.surprise-btn:hover {
    transform: scale(1.1);
}

#surprise-status {
    margin-top: 20px;
    font-size: 1rem;
    color: #cbd5e1;
}
.first-image {
    width: 100%;
    max-width: 380px;
    border-radius: 14px;
    margin: 15px auto;
    display: block;
    box-shadow: 0 0 20px rgba(255, 90, 110, 0.25);
    transition: transform 0.3s;
}

.first-image:hover {
    transform: scale(1.03);
}
.heart {
    position: fixed;
    pointer-events: none;
    animation: fadeUp 1s linear forwards;
    font-size: 18px;
    z-index: 9999;
}

@keyframes fadeUp {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-40px) scale(0.4); opacity: 0; }
}
.sparkle {
    position: relative;
}

.sparkle::after {
    content: "✨";
    position: absolute;
    right: -25px;
    top: -5px;
    animation: sparkle 1.3s infinite ease-in-out;
}

@keyframes sparkle {
    0% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
    100% { opacity: 0.3; transform: scale(1); }
}
.reveal {
    cursor: pointer;
    position: relative;
}

.reveal .hidden-text {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: 0.5s ease;
}

.reveal.open .hidden-text {
    opacity: 1;
    max-height: 200px;
    margin-top: 10px;
}

/* FALLING PETALS */
.petals-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.petal {
    position: absolute;
    top: -10px;
    font-size: 24px;
    animation: petalsfall linear forwards;
    opacity: 0.7;
}

@keyframes petalsfall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.7;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* MUSIC CONTROL */
.music-control {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.music-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 20px;
    background: #94a3b8;
    color: white;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 600;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.music-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 77, 109, 0.4);
}

.countdown-text {
    font-size: 1rem;
    color: #ff99ac;
    margin: 10px 0;
    font-weight: 600;
}

/* PASSWORD MODAL */
.password-modal {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, #0a0f1b, #111827, #1e293b);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.password-modal.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.password-box {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    padding: 40px;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(255, 70, 90, 0.2);
    text-align: center;
    color: #fff;
    max-width: 420px;
    border: 1px solid rgba(255, 77, 109, 0.3);
}
.password-box h2 {
    font-size: 1.8rem;
    margin-bottom: 12px;
    color: #ff7b9c;
}
.password-box p {
    font-size: 0.95rem;
    color: #cbd5e1;
    margin-bottom: 20px;
    line-height: 1.5;
}
#password-input {
    width: 100%;
    padding: 14px;
    border: 2px solid rgba(255, 77, 109, 0.4);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-radius: 10px;
    font-size: 1rem;
    margin-bottom: 16px;
    transition: border 0.3s ease;
}
#password-input:focus {
    outline: none;
    border-color: #ff6a88;
    box-shadow: 0 0 12px rgba(255, 106, 136, 0.3);
}
#password-input::placeholder {
    color: #94a3b8;
}
.password-box button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(90deg, #ff6a88, #ff99ac);
    border: none;
    color: white;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 0 18px rgba(255, 105, 135, 0.4);
}
.password-box button:hover {
    transform: scale(1.02);
    box-shadow: 0 0 25px rgba(255, 105, 135, 0.6);
}
.error-text {
    color: #ff6b6b;
    font-size: 0.85rem;
    margin-top: 10px;
    display: none;
}
.error-text.show {
    display: block;
}

/* Surprise overlay styles */
.surprise-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 8, 20, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.surprise-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.surprise-center {
    text-align: center;
    color: #fff;
}

.gift-box {
    width: 160px;
    height: 120px;
    position: relative;
    margin: 0 auto 18px;
    transform-style: preserve-3d;
}
.gift-box .box {
    width: 160px;
    height: 90px;
    background: linear-gradient(180deg,#ff6a88,#ff99ac);
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(255,90,110,0.25);
    position: absolute;
    bottom: 0;
}
.gift-box .lid {
    width: 180px;
    height: 40px;
    background: linear-gradient(180deg,#ff9bb0,#ff5a7a);
    border-radius: 6px;
    position: absolute;
    left: -10px;
    top: -10px;
    transform-origin: center bottom;
    transition: transform 0.9s cubic-bezier(.2,.9,.3,1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.gift-box.open .lid {
    transform: rotateX(-90deg) translateY(-20px);
}

.surprise-content {
    max-width: 1100px;
    margin-top: 10px;
    color: #fff;
}
.surprise-carousel {
    display: flex;
    flex-direction: column;
    gap: 18px;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
}
.main-photo { width: 80vw; max-width: 1100px; }
.main-photo img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 28px 70px rgba(0,0,0,0.7);
    display: block;
    /* Ensure tall portrait images fill available viewport height without overflowing */
    max-height: calc(100vh - 220px);
    max-width: 96vw;
}
.thumbs {
    display: flex;
    gap: 14px;
    justify-content: center;
    align-items: center;
}
.thumbs img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    opacity: 0.45;
    cursor: pointer;
    transition: transform .25s ease, opacity .25s ease, box-shadow .25s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}
.thumbs img.active {
    opacity: 1;
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 18px 40px rgba(0,0,0,0.6);
}

/* make sure the carousel doesn't break layout on small screens */
@media (max-width: 1100px) {
    .surprise-content { max-width: 92vw; }
    .main-photo { width: 92vw; }
    .thumbs img { width: 84px; height: 56px; }
}
@media (max-width: 560px) {
    .surprise-carousel { gap: 10px; }
    .main-photo { width: 96vw; }
    .thumbs img { width: 72px; height: 48px; }
}

.surprise-message {
    font-size: 1.05rem;
    max-width: 680px;
    margin: 14px auto;
    line-height: 1.5;
    color: #ffd7e0;
    min-height: 56px;
}

.surprise-actions { margin-top: 10px; }

/* small responsive tweak */
@media (max-width: 560px) {
    .gift-box { width: 120px; height: 90px; }
    .gift-box .lid { width: 140px; height: 36px; left: -10px; }
    .surprise-carousel img { width: 96px; height: 72px; }
}