/* General Styles Rules */

* {
    border-radius: 12px;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Baloo Bhai 2", sans-serif;
    background: linear-gradient(to bottom, #ffd4eb 0%, #ffe9f3 100%);
    background-attachment: fixed;
    color: #333;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 
    Navigation Styles
    Mobile-first layout: links stack vertically.
    Rounded corners and pastel colors for playful theme
*/

.nav {
    display: flex;
    flex-direction: column;
    background-color: #ffd4eb;
    padding: 10px;
    border-radius: 0 0 15px 15px;
    border-bottom: 2px solid #ffb3df;
}

.nav a {
    text-decoration: none;
    color: #333;
    background: #ffb3df;
    margin: 5px 0;
    padding: 10px;
    border-radius: 10px;
}

/* Hover Effect for Desktop */

.nav a:hover {
    background: #ff8ccd;
    transform: scale(1.07) rotate(1deg);
    transition: 0.25s;
}

/* Hero Section */

.hero {
    padding: 80px 20px;
    background: transparent;
    text-align: center;
    border-radius: 0 0 40px 40px;
    position: relative;
    overflow: hidden;
}

/* Floating heart background */

.hero::before {
    content: "♥";
    font-size: 150px;
    position: absolute;
    top: 20px;
    left: 80px;
    opacity: 0.28;
    animation: floatLeft 5s infinite ease-in-out;
}

.hero::after {
    content: "♥";
    font-size: 100px;
    position: absolute;
    top: 120px;
    right: 120px;
    opacity: 0.25;
    animation: floatRight 7s infinite ease-in-out;
}

/* Animated hearts */

@keyframes floatLeft {
    0%      { transform: translateY(0px) rotate(0deg); }
    50%     { transform: translateY(-30px) rotate(6deg); }
    100%    { transform: translateY(0px) rotate(0deg); }
}

@keyframes floatRight {
    0%      { transform: translateY(0px) rotate(0deg); }
    50%     { transform: translateY(25px) rotate(-8deg); }
    100%    { transform: translateY(0px) rotate(0deg); }
}

/* Floating Heart Trails (3 columns) */

.heart-trail {
    position: absolute;
    bottom: 10px;
    font-size: 22px;
    opacity: 0.9;
    pointer-events: none;
    animation: heartFloat 4s infinite ease-out;
}
.heart-trail.left {
    left: 20%;
    animation-delay: 0s;
}
.heart-trail.center {
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 1s;
}
.heart-trail.right {
    left: 80%;
    animation-delay: 2s;
}
@keyframes heartFloat {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.7;
    }
    40% {
        opacity: 1;
    }
    100% {
        transform: translateY(-160px) scale(1.6);
        opacity: 0;
    }
}

/* Hero Text */

.hero-title {
    font-size: 36px;
    color: #333;
    font-weight: 800;
    margin-bottom: 10px;
}

.hero-subtitle {
    font-size: 18px;
    color: #555;
    max-width: 600px;
    margin: 0 auto 25px auto;
}

.hero-message {
    font-size: 16px;
    padding: 12px 15px;
    background: #fff0fa;
    display: inline-block;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(255, 140, 205, 0.25);
}

/* Page Title & Intro Text */

.page-title {
    text-align: center;
    margin-top: 20px;
}

.intro {
    padding: 10px;
    text-align: center;
}

/* Reason Box */

.reasons-box {
    background: linear-gradient(180deg, #fff3fb, #fee8f3);
    padding: 40px 20px;
    margin: 30px auto;
    width: 90%;
    max-width: 900px;
    height: 460px;
    overflow: hidden;
    position: relative;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(255, 120, 180, 0.25);
}

/* Fade Effect */

.reasons-box::before,
.reasons-box::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 60px;
    pointer-events: none;
    z-index: 2;
}

.reasons-box::before {
    top: 0%;
    background: linear-gradient(to bottom, #fff3fb, transparent);
}

.reasons-box::after {
    bottom: 0;
    height: 80px;
    background: linear-gradient(to top, #fee8f3 20%, transparent);
    z-index: 2;
}

.reasons-box p {
    position: relative;
    padding: 16px 20px;
    margin: 22px auto;
    width: 80%;
    max-width: 800px;
    background: rgba(255, 240, 250, 0.55);
    backdrop-filter: blur(6px);
    border-radius: 16px;
    box-shadow: 0 8px 18px rgba(255, 150, 200, 0.35);
    animation: floatUp 12s ease-out forwards;
    opacity: 0;
}

@keyframes floatUp {
    0% {
        transform: translateY(460px);
        opacity: 0;
    }
    100% {
        transform: translateY(0px);
        opacity: 1;
    }
}

/* Stagger animation */

.reason1 { animation-delay: 1s; }
.reason2 { animation-delay: 2.5s; }
.reason3 { animation-delay: 4s; }
.reason4 { animation-delay: 5.5s; }
.reason5 { animation-delay: 7s; }

/* Fade-Slide + Animation */

@keyframes fadeSlideUp {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }
    50% {
        opacity: 1;
        transform: translateY(0) scale(1.03);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Sparkle Pulse */

.reasons-box p::after {
    content: "✨";
    font-size: 22px;
    position: absolute;
    right: -25px;
    top: -12px;
    animation: sparklePulse 2.2s infinite ease-in-out;
    opacity: 0.8;
}

@keyframes sparklePulse {
    0% { transform: scale(1) rotate(0deg); opacity: 0.6;}
    50% { transform: scale(1.5) rotate(13deg); opacity: 1;}
    100% { transform: scale(1) rotate(0deg); opacity: 0.6;}
}

/* Scrapbook corners */

.reasons-box p::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 20px;
    width: 60px;
    height: 20px;
    background: #ffe0f0;
    opacity: 0.8;
    transform: rotate(-7deg);
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.reasons-box p:nth-child(even)::before {
    left: auto;
    right: 20px;
    transform: rotate(6deg);
}

.reason1 { font-size: 28px; }
.reason2 { font-size: 22px; }
.reason3 { font-size: 17px; }
.reason4 { font-size: 13px; }
.reason5 { font-size: 10px; }
.reason6 {
    font-size: 8px;
    opacity: 0.7;
    animation-delay: 8.5s
}

/* Mobile-Only and Desktop-Only Code */

.mobile-only { display: block; }
.desktop-only { display: none; }

/* About Her */

.about-sequence {
    margin: 60px auto;
    width: 90%;
    max-width: 900px;
    position: relative;
    height: 360px;
}

.seq-stage {
    position: absolute;
    top: 0; 
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.1s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.seq-stage.active {
    opacity: 1;
}

.seq-box {
    background: rgba(255, 240, 250, 0.85);
    backdrop-filter: blur(10px);
    padding: 35px 45px;
    border-radius: 22px;
    font-size: 22px;
    line-height: 1.55;
    color: #444;
    max-width: 820px;
    box-shadow: 0 12px 30px rgba(255, 130, 200, 0.25);
    position: relative;
}

/* Scrapbook tape corners */

.with-tape::before,
.with-tape::after {
    content: "";
    position: absolute;
    width: 85px;
    height: 28px;
    background: #ffe0f0;
    opacity: 0.95;
    border-radius: 4px;
    top: -16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.with-tape::before {
    left: 25px;
    transform: rotate(-7deg);
}

.with-tape::after {
    right: 25px;
    transform: rotate(6deg);
}

.seq-emoji-big {
    width: 300px;            
    opacity: 0.95;
    filter: drop-shadow(0 8px 25px rgba(255, 120, 180, 0.45));
    transform: translateY(0);
}

.emoji-wrapper {
    position: relative;
    display: inline-block;
}

.emoji-wrapper::before {
    content: "";
    position: absolute;
    inset: -50px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 182, 220, 0.7) 0%,
        rgba(255, 150, 210, 0.5) 40%,
        rgba(255, 120, 200, 0.3) 65%,
        transparent 75%
    );
    filter: blur(40px);
    z-index: 0%;
}

.seq-emoji-big {
    position: relative;
    z-index: 1;
}

/* Side hearts + sparkles with gentle shimmer */

.side-deco {
    position: absolute;
    font-size: 40px;
    opacity: 0.8;
    animation: shimmerFloat 3.5s ease-in-out infinite;
    pointer-events: none;
    user-select: none;
}

.side-deco.left {
    left: -70px;
    top: 50%;
    transform: translateY(-50%);
}

.side-deco.right {
    right: -70px;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 700px) {
    .side-deco {
        display: none;
    }
}

@keyframes shimmerFloat {
    0%   { transform: translateY(-50%) rotate(0deg) scale(1); opacity: 0.7; }
    50%  { transform: translateY(-58%) rotate(6deg) scale(1.12); opacity: 1; }
    100% { transform: translateY(-50%) rotate(0deg) scale(1); opacity: 0.75; }
}

/* Typewriter final text */

#typewriter {
    font-weight: 600;
    color: #444;
    font-size: 22px;
    white-space: normal;
    border-right: 3px solid #ff8ccd;
    overflow: hidden;
    word-break: break-word;
    display: inline-block;
    animation: cursorBlink .7s infinite;
}

/* Blinking cursor */

@keyframes cursorBlink {
    0% { border-color: transparent; }
    50% { border-color: #ff8ccd; }
    100% { border-color: transparent; }
}

#typewriter {
    animation: cursorBlink .7s infinite;
}

/* Gallery */

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 40px 20px 80px 20px;
    max-width: 1000px;
    margin: 0 auto;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
}

.gallery-item {
    background: #fff;
    padding: 12px;
    border-radius: 4%;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    position: relative;
}

/* Washi Tape */

.gallery-item::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 70px;
    height: 25px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 5;
}

/* Tilts */

.gallery-item:nth-child(odd) {
    transform: rotate(-1.5deg);
}

.gallery-item:nth-child(even) {
    transform: rotate(1.5deg);
}

/* Straight on hover */

.gallery-item:hover {
    transform: rotate(0deg) scale(1.05) translate(-5px);
    z-index: 10;
    box-shadow: 0 15px 30px rgba(255, 140, 205, 0.4);
}

.gallery-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 2px;
}

.gallery-item:hover img {
    transform: scale(1.08);
    box-shadow: 0 10px 25px rgba(255, 120, 200, 0.4);
}

.gallery-item .caption {
    margin-top: 10px;
    font-size: 15px;
    color:#555;
    font-weight: 600;
}

@media (min-width: 600px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablet Media Query */

@media (min-width: 600px) {
    .nav {
        flex-direction: row;
        justify-content: space-around;
    }

    .nav a {
        margin: 0 5px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .flip-card {
        width: 45%
    }

    .memory-card {
        max-width: 700px;
    }
}

/* Desktop Media Query */

@media (min-width: 900px) {

    .reasons-box {
        max-width: 900px;
        margin: 50px auto;
    }

    .nav {
        background-color: #ffc2ea;
    }

    .desktop-only {
        display: block;
        padding: 10px;
        text-align: center;
        font-size: 18px;
    }

    .mobile-only {
        display: none;
    }

    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Memories Page Image Styling */

.memories-section {
    padding: 40px 20px;
    text-align: center;

}

.photo-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto;
}

/* Flip Card */

.flip-card {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 3 / 4;
    perspective: 1000px;
}

/* Inner flip */

.flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

/* Trigger */

.flip-card.flipped .flip-inner {
    transform: rotateY(180deg);
}

.flip-card.flipped {
    transform: scale(1.03);
    transition: transform 0.3s ease;
}

/* Front + Back */

.flip-front,
.flip-back {
    position: absolute;
    inset: 0%;
    border-radius: 20px;
    backface-visibility: hidden;
}

.flip-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.flip-front {
    overflow: hidden;
}

.flip-back {
    transform: rotateY(180deg);
    background: linear-gradient(145deg, #fff3fb, #ffe6f5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(255, 140, 205, 0.3);
    font-size: 19px;
    font-weight: 600;
    color: #444;
    text-align: center;
}

.flip-back::before {
    content: "💖";
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 26px;
    animation: sparkleFloat 2.5s infinite ease-in-out;
    filter: drop-shadow(0 4px 10px rgba(255, 120, 200, 0.6));
}

@keyframes sparkleFloat {
    0% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0); }
}

/* memory card */

.memory-card {
    background: #fff0fa;
    margin: 30px auto 0 auto;
    padding: 20px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(255, 140, 205, 0.25);
    font-size: 18px;
}

@media(max-width:400px) {
    .reason1 { font-size: 22px; }
    .reason2 { font-size: 18px; }
    .reason3 { font-size: 15px; }
    .reason4 { font-size: 12px; }
    .reason5 { font-size: 10px; }
    .nav {
        padding: 5px 0;
    }
}

@media (min-width: 600px) {
        .flip-card {
        width: 45%
    }

    .memory-card {
        max-width: 700px;
    }
}