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

:root {
    --primary-color: #ff6b9d;
    --secondary-color: #ffc2d1;
    --accent-color: #ff1744;
    --text-dark: #2c3e50;
    --text-light: #fff;
    --background-light: #fff5f8;
    --background-gradient: linear-gradient(135deg, #ffeef4 0%, #ffe4ec 100%);
    --shadow: 0 10px 30px rgba(255, 107, 157, 0.2);
    --shadow-hover: 0 15px 40px rgba(255, 107, 157, 0.3);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--background-gradient);
    overflow-x: hidden;
}

/* Scroll-triggered animations base */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-100px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(100px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-scale {
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

.scroll-reveal-rotate {
    opacity: 0;
    transform: rotate(-180deg) scale(0.5);
    transition: opacity 1s ease, transform 1s ease;
}

.scroll-reveal-rotate.revealed {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b9d, #ff1744);
    z-index: 9999;
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.1s ease;
    box-shadow: 0 2px 10px rgba(255, 107, 157, 0.5);
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff6b9d, #ff1744);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    z-index: 9998;
    box-shadow: 0 5px 20px rgba(255, 107, 157, 0.4);
    opacity: 0;
    transform: scale(0) rotate(-180deg);
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.visible {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.scroll-to-top:hover {
    box-shadow: 0 8px 30px rgba(255, 107, 157, 0.6);
    transform: scale(1.1) rotate(0deg);
    animation: heartbeat 1.5s ease-in-out infinite;
}

.scroll-to-top:active {
    transform: scale(0.95) rotate(0deg);
}

.scroll-to-top svg {
    width: 30px;
    height: 30px;
    animation: pulse 2s ease-in-out infinite;
}

@media (max-width: 768px) {
    .scroll-to-top {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }

    .scroll-to-top svg {
        width: 25px;
        height: 25px;
    }
}

/* Floating Hearts Background */
.hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-heart {
    position: absolute;
    font-size: 20px;
    animation: float-up 8s infinite ease-in;
    opacity: 0;
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    position: relative;
    z-index: 2;
    background: linear-gradient(135deg, #ffd1dc 0%, #ffb3c6 100%);
}

.hero-content {
    animation: fadeInUp 1s ease-out;
}

.heart-svg {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(0.9);
    }
    20%, 40%, 60%, 80% {
        transform: scale(1.1);
    }
    50%, 70% {
        transform: scale(1.05);
    }
}

.main-title {
    font-size: clamp(2.5rem, 8vw, 4rem);
    color: var(--accent-color);
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.sub-title {
    font-size: clamp(2rem, 6vw, 3rem);
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 600;
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

.date {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: var(--text-dark);
    font-style: italic;
    animation: fadeInUp 1s ease-out 0.6s backwards;
}

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

/* Love Letter Section */
.love-letter {
    padding: 60px 20px;
    background: white;
    position: relative;
    z-index: 2;
}

.letter-header {
    text-align: center;
    margin-bottom: 40px;
}

.envelope-icon {
    width: 80px;
    height: 64px;
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
}

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

.letter-header h2 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    color: var(--primary-color);
    margin-bottom: 10px;
}

.letter-content {
    max-width: 700px;
    margin: 0 auto;
    background: var(--background-light);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--primary-color);
}

.letter-content p {
    margin-bottom: 20px;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    line-height: 1.8;
    text-align: justify;
}

.letter-content strong {
    color: var(--accent-color);
}

.signature {
    text-align: right;
    font-style: italic;
    margin-top: 30px;
    font-size: clamp(1.1rem, 3vw, 1.3rem);
}

/* Timeline Section */
.timeline {
    padding: 60px 20px;
    background: linear-gradient(135deg, #ffe4ec 0%, #ffd1dc 100%);
    position: relative;
    z-index: 2;
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 5vw, 2.8rem);
    color: var(--accent-color);
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: var(--primary-color);
    margin: 20px auto 0;
    border-radius: 2px;
}

.timeline-items {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline-items::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
}

.timeline-item {
    display: flex;
    margin-bottom: 40px;
    position: relative;
    animation: slideInLeft 0.6s ease-out;
}

.timeline-item:nth-child(even) {
    animation: slideInRight 0.6s ease-out;
}

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

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

.timeline-icon {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    flex-shrink: 0;
    z-index: 1;
}

.timeline-icon svg {
    width: 30px;
    height: 30px;
}

.timeline-content {
    margin-left: 20px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    flex: 1;
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
}

.timeline-content p {
    color: var(--text-dark);
    font-size: clamp(0.95rem, 2.5vw, 1.05rem);
}

/* Love Reasons Section */
.love-reasons {
    padding: 60px 20px;
    background: white;
    position: relative;
    z-index: 2;
}

.reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.reason-card {
    background: var(--background-light);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 0.8s ease-out;
}

.reason-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.reason-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    animation: rotate 3s ease-in-out infinite;
}

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

.reason-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
}

.reason-card p {
    color: var(--text-dark);
    font-size: clamp(0.95rem, 2.5vw, 1.05rem);
}

/* Gallery Section */
.gallery {
    padding: 60px 20px;
    background: linear-gradient(135deg, #ffd1dc 0%, #ffb3c6 100%);
    position: relative;
    z-index: 2;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    aspect-ratio: 1;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 107, 157, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.heart-icon {
    width: 50px;
    height: 50px;
    animation: pulse 1s ease-in-out infinite;
}

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

/* Final Message Section */
.final-message {
    padding: 80px 20px;
    text-align: center;
    background: white;
    position: relative;
    z-index: 2;
}

.cupid-arrow {
    width: 200px;
    height: 100px;
    margin-bottom: 30px;
}

.arrow-line {
    animation: arrow-move 2s ease-in-out infinite;
}

@keyframes arrow-move {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(10px);
    }
}

.arrow-feather {
    animation: feather-flutter 1s ease-in-out infinite;
}

@keyframes feather-flutter {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.final-message h2 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    color: var(--accent-color);
    margin-bottom: 20px;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(255, 23, 68, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(255, 23, 68, 0.8);
    }
}

.final-message p {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    color: var(--text-dark);
    margin-bottom: 15px;
}

.website-credit {
    margin-top: 40px;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    color: var(--primary-color);
    font-style: italic;
}

/* Responsive Design - Mobile First */
@media (max-width: 768px) {
    .timeline-items::before {
        left: 20px;
    }

    .timeline-icon {
        width: 50px;
        height: 50px;
    }

    .timeline-icon svg {
        width: 25px;
        height: 25px;
    }

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

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }

    .letter-content {
        padding: 20px;
    }
}

@media (min-width: 769px) {
    .hero {
        min-height: 100vh;
    }

    .timeline-items::before {
        left: 50%;
        transform: translateX(-50%);
    }

    .timeline-item {
        width: calc(50% - 30px);
    }

    .timeline-item:nth-child(odd) {
        margin-left: 0;
        margin-right: auto;
        padding-right: 40px;
    }

    .timeline-item:nth-child(even) {
        margin-left: auto;
        margin-right: 0;
        padding-left: 40px;
        flex-direction: row-reverse;
    }

    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 0;
        margin-right: 20px;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Additional Animations */
@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromBottom {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInFromTop {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes zoomIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes rotateIn {
    0% {
        transform: rotate(-360deg) scale(0);
        opacity: 0;
    }
    100% {
        transform: rotate(0) scale(1);
        opacity: 1;
    }
}

@keyframes flipIn {
    0% {
        transform: perspective(400px) rotateY(90deg);
        opacity: 0;
    }
    100% {
        transform: perspective(400px) rotateY(0);
        opacity: 1;
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

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

@keyframes swing {
    0%, 100% {
        transform: rotate(0deg);
        transform-origin: top center;
    }
    20% {
        transform: rotate(15deg);
    }
    40% {
        transform: rotate(-10deg);
    }
    60% {
        transform: rotate(5deg);
    }
    80% {
        transform: rotate(-5deg);
    }
}

@keyframes wiggle {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px);
    }
}

/* Enhanced hover effects */
.reason-card {
    animation: fadeIn 0.8s ease-out;
    cursor: pointer;
}

.reason-card:hover .reason-icon {
    animation: wiggle 0.5s ease-in-out, rotate 3s ease-in-out infinite;
}

.gallery-item {
    cursor: pointer;
    animation: zoomIn 0.6s ease-out;
}

.timeline-icon {
    animation: bounceIn 0.8s ease-out;
}

.envelope-icon {
    animation: bounce 2s ease-in-out infinite, swing 3s ease-in-out infinite;
}

.heart-svg {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.heart-svg:hover {
    transform: scale(1.2);
    animation: heartbeat 1.5s ease-in-out infinite, wave 2s ease-in-out infinite;
}

.cupid-arrow {
    animation: slideInFromLeft 1s ease-out;
}

.main-title,
.sub-title,
.date {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 1s ease-out, wave 3s ease-in-out infinite;
}

/* Parallax effect */
.hero {
    background-attachment: fixed;
    background-size: cover;
}

/* Text reveal animation */
.letter-content p {
    animation: fadeInUp 0.8s ease-out;
    animation-fill-mode: both;
}

.letter-content p:nth-child(1) { animation-delay: 0.1s; }
.letter-content p:nth-child(2) { animation-delay: 0.2s; }
.letter-content p:nth-child(3) { animation-delay: 0.3s; }
.letter-content p:nth-child(4) { animation-delay: 0.4s; }
.letter-content p:nth-child(5) { animation-delay: 0.5s; }
.letter-content p:nth-child(6) { animation-delay: 0.6s; }

/* Staggered animations for reason cards */
.reason-card:nth-child(1) { animation-delay: 0.1s; }
.reason-card:nth-child(2) { animation-delay: 0.2s; }
.reason-card:nth-child(3) { animation-delay: 0.3s; }
.reason-card:nth-child(4) { animation-delay: 0.4s; }
.reason-card:nth-child(5) { animation-delay: 0.5s; }
.reason-card:nth-child(6) { animation-delay: 0.6s; }

/* Gallery staggered animations */
.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }

/* Timeline staggered animations */
.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.3s; }
.timeline-item:nth-child(3) { animation-delay: 0.5s; }
.timeline-item:nth-child(4) { animation-delay: 0.7s; }

/* Floating animation for sections */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.section-title {
    animation: fadeInUp 0.8s ease-out, float 3s ease-in-out infinite;
}

/* Glowing border effect */
@keyframes glow-border {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 107, 157, 0.5), 0 0 10px rgba(255, 107, 157, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 107, 157, 0.8), 0 0 30px rgba(255, 107, 157, 0.5);
    }
}

.letter-content {
    animation: fadeInUp 1s ease-out, glow-border 2s ease-in-out infinite;
}

/* Pulsing animation */
@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.05);
        filter: brightness(1.2);
    }
}

.final-message h2 {
    animation: glow 2s ease-in-out infinite, pulse-glow 2s ease-in-out infinite;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
