/* ============================================================
   Hiếu ❤️ Trang — Our Love Story
   Theme: soft sakura / blush. Custom styles layered on Tailwind.
   ============================================================ */

:root {
    --pink-50: #fff5f8;
    --pink-100: #ffe9f0;
    --pink-200: #ffd6e3;
    --pink-300: #ffb6cf;
    --pink-400: #ff8fab;
    --pink-500: #ff6b95;
    --pink-600: #f24f7e;
    --rose-text: #8a5a6b;
    --rose-muted: #b08496;
    --ink: #5d4954;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
}

body {
    font-family: "Quicksand", "Segoe UI", sans-serif;
    color: var(--ink);
    background: url("../images/bg.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.font-script {
    font-family: "Dancing Script", cursive;
    letter-spacing: 0.5px;
}

/* ---------- decorative layers ---------- */
#petals-container,
#hearts-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 5;
}

.petal {
    position: absolute;
    top: -8%;
    width: 16px;
    height: 16px;
    background: radial-gradient(circle at 30% 30%, #ffd9e6, #ff9ebc);
    border-radius: 80% 0 80% 0;
    opacity: 0.85;
    will-change: transform;
    animation: petal-fall linear forwards;
}

@keyframes petal-fall {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
        opacity: 0.9;
    }
    100% {
        transform: translateX(120px) translateY(110vh) rotate(540deg);
        opacity: 0;
    }
}

.heart {
    position: absolute;
    bottom: -5%;
    color: var(--pink-400);
    font-size: 22px;
    animation: heart-rise linear forwards;
    will-change: transform, opacity;
}

@keyframes heart-rise {
    0% {
        transform: translateY(0) scale(0.6);
        opacity: 0;
    }
    15% {
        opacity: 0.9;
    }
    100% {
        transform: translateY(-105vh) scale(1.1);
        opacity: 0;
    }
}

/* ---------- buttons ---------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.6rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, var(--pink-400), var(--pink-500));
    color: #fff;
    font-weight: 600;
    box-shadow: 0 12px 26px -10px rgba(242, 79, 126, 0.7);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px -10px rgba(242, 79, 126, 0.8);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.6rem;
    border-radius: 9999px;
    background: #fff;
    color: var(--pink-600);
    font-weight: 600;
    border: 1.5px solid var(--pink-200);
    transition: transform 0.25s ease, background 0.25s ease;
}
.btn-ghost:hover {
    transform: translateY(-2px);
    background: var(--pink-50);
}

/* ---------- section title ---------- */
.section-title {
    font-family: "Dancing Script", cursive;
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    color: var(--pink-500);
    text-align: center;
}

/* ---------- nav ---------- */
.nav-link {
    position: relative;
    color: var(--rose-text);
    font-weight: 500;
    transition: color 0.2s ease;
}
.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--pink-500);
    transition: width 0.25s ease;
}
.nav-link:hover,
.nav-link.active {
    color: var(--pink-600);
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ---------- side dock ---------- */
.dock-btn {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 9999px;
    background: #fff;
    color: var(--pink-500);
    box-shadow: 0 10px 24px -12px rgba(242, 79, 126, 0.6);
    transition: transform 0.2s ease, color 0.2s ease;
}
.dock-btn:hover {
    transform: scale(1.12);
    color: var(--pink-600);
}

/* ---------- polaroid ---------- */
.polaroid {
    background: #fff;
    padding: 14px 14px 54px;
    border-radius: 12px;
    box-shadow: 0 30px 60px -25px rgba(180, 80, 120, 0.55);
    transform: rotate(2deg);
    transition: transform 0.4s ease;
}
.polaroid:hover {
    transform: rotate(0deg) scale(1.02);
}
.polaroid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}
.tape {
    position: absolute;
    width: 120px;
    height: 30px;
    background: rgba(255, 222, 150, 0.55);
    top: -14px;
    left: 50%;
    transform: translateX(-50%) rotate(-3deg);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}
.sticky-note {
    background: #fff6c2;
    transform: rotate(-6deg);
    box-shadow: 0 14px 24px -14px rgba(0, 0, 0, 0.35);
}

/* ---------- counter ---------- */
.count-box .count-value {
    font-family: "Dancing Script", cursive;
    font-weight: 700;
    font-size: clamp(2.4rem, 5vw, 3.2rem);
    line-height: 1;
    color: var(--pink-500);
}

/* ---------- timeline ---------- */
.timeline-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 1rem 0.25rem 1.5rem;
    scrollbar-width: none;
}
.timeline-track::-webkit-scrollbar {
    display: none;
}
.timeline-card {
    scroll-snap-align: start;
    flex: 0 0 clamp(240px, 80vw, 280px);
    background: #fff;
    border-radius: 26px;
    padding: 1.4rem;
    box-shadow: 0 24px 44px -28px rgba(180, 80, 120, 0.5);
    border: 1px solid var(--pink-100);
    transition: transform 0.3s ease;
}
.timeline-card:hover {
    transform: translateY(-6px);
}
.timeline-dot {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 9999px;
    background: linear-gradient(135deg, var(--pink-300), var(--pink-500));
    color: #fff;
    font-size: 1.1rem;
    box-shadow: 0 8px 18px -8px rgba(242, 79, 126, 0.7);
}
.arrow-btn {
    width: 44px;
    height: 44px;
    border-radius: 9999px;
    display: grid;
    place-items: center;
    background: #fff;
    color: var(--pink-500);
    border: 1px solid var(--pink-100);
    box-shadow: 0 10px 22px -14px rgba(242, 79, 126, 0.6);
    transition: background 0.2s ease, transform 0.2s ease;
}
.arrow-btn:hover {
    background: var(--pink-50);
    transform: scale(1.08);
}

/* ---------- gallery ---------- */
.filter-chip {
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--rose-text);
    background: #fff;
    border: 1px solid var(--pink-100);
    cursor: pointer;
    transition: all 0.2s ease;
}
.filter-chip.active,
.filter-chip:hover {
    background: linear-gradient(135deg, var(--pink-400), var(--pink-500));
    color: #fff;
    border-color: transparent;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    cursor: pointer;
    box-shadow: 0 20px 40px -26px rgba(180, 80, 120, 0.55);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.gallery-item:hover img {
    transform: scale(1.08);
}
.gallery-item .caption {
    position: absolute;
    inset: auto 0 0 0;
    padding: 1rem;
    color: #fff;
    font-family: "Dancing Script", cursive;
    font-size: 1.3rem;
    background: linear-gradient(transparent, rgba(120, 40, 70, 0.65));
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.gallery-item:hover .caption {
    opacity: 1;
    transform: translateY(0);
}
.gallery-item.is-hidden {
    display: none;
}

/* ---------- envelope ---------- */
.envelope {
    position: relative;
    width: 100%;
    max-width: 360px;
    aspect-ratio: 4 / 3;
    margin-inline: auto;
    filter: drop-shadow(0 24px 40px rgba(180, 80, 120, 0.35));
}
.envelope .env-body {
    position: absolute;
    inset: 18% 0 0 0;
    background: linear-gradient(160deg, #ffe0ea, #ffc2d6);
    border-radius: 14px;
}
.envelope .env-flap {
    position: absolute;
    top: 18%;
    left: 0;
    right: 0;
    height: 0;
    border-left: 50% solid transparent;
    border-right: 50% solid transparent;
    border-top: 90px solid #ffd1de;
    transform-origin: top;
}
.envelope .env-heart {
    position: absolute;
    top: 38%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    z-index: 2;
    filter: drop-shadow(0 6px 10px rgba(180, 80, 120, 0.4));
    animation: beat 1.6s ease-in-out infinite;
}
@keyframes beat {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.12); }
}

/* ---------- player ---------- */
.player-progress {
    height: 6px;
    border-radius: 9999px;
    background: var(--pink-100);
    overflow: hidden;
    cursor: pointer;
}
.player-progress span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 9999px;
    background: linear-gradient(90deg, var(--pink-400), var(--pink-600));
}
.play-btn {
    width: 54px;
    height: 54px;
    border-radius: 9999px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--pink-400), var(--pink-500));
    color: #fff;
    box-shadow: 0 12px 24px -12px rgba(242, 79, 126, 0.7);
    transition: transform 0.2s ease;
}
.play-btn:hover {
    transform: scale(1.08);
}

/* ---------- reveal on scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- modal ---------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(90, 40, 60, 0.72);
    backdrop-filter: blur(4px);
}
.modal.open {
    display: flex;
}
.modal-img {
    max-width: 90vw;
    max-height: 88vh;
    border-radius: 18px;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}
.modal-close {
    position: absolute;
    top: 22px;
    right: 30px;
    color: #fff;
    font-size: 2.4rem;
    line-height: 1;
    cursor: pointer;
}

/* ---------- confetti ---------- */
.confetti {
    position: fixed;
    width: 10px;
    height: 14px;
    border-radius: 2px;
    z-index: 1200;
    pointer-events: none;
}

/* ---------- floating action heart ---------- */
.fab-heart {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 60px;
    height: 60px;
    border-radius: 9999px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--pink-400), var(--pink-600));
    color: #fff;
    font-size: 1.5rem;
    z-index: 60;
    box-shadow: 0 16px 30px -12px rgba(242, 79, 126, 0.8);
    cursor: pointer;
    animation: beat 1.8s ease-in-out infinite;
}
