/* Modern, Creative Birthday Website Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --gold: #d4af37;
    --rose: #e91e63;
    --deep-purple: #4a148c;
    --soft-pink: #fce4ec;
    --midnight: #1a0033;
    --cream: #fdf4e3;
    --font-elegant: 'Playfair Display', serif;
    --font-modern: 'Poppins', sans-serif;
}

body {
    font-family: var(--font-modern);
    overflow-x: hidden;
    background: #000;
    color: #fff;
}

/* Hero Scene */
.hero-scene {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--midnight) 0%, var(--deep-purple) 50%, var(--rose) 100%);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.3;
}

.floating-hearts {
    position: absolute;
    width: 100%;
    height: 100%;
}

.heart {
    position: absolute;
    font-size: 2rem;
    color: var(--rose);
    animation: float-up var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
    opacity: 0;
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

.heart:nth-child(1) { left: 10%; }
.heart:nth-child(2) { left: 30%; }
.heart:nth-child(3) { left: 50%; }
.heart:nth-child(4) { left: 70%; }
.heart:nth-child(5) { left: 90%; }

.hero-content {
    text-align: center;
    z-index: 10;
    padding: 2rem;
}

.hero-text-reveal {
    margin-bottom: 3rem;
}

.hero-title {
    font-family: var(--font-elegant);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-title .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px);
    animation: reveal-word 1s ease-out forwards;
    animation-delay: var(--delay);
    margin: 0 0.3rem;
}

.hero-title .golden {
    color: var(--gold);
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
}

@keyframes reveal-word {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    font-size: 1.5rem;
    opacity: 0;
    animation: fade-in 1s ease-out forwards;
    animation-delay: var(--delay);
    color: var(--soft-pink);
    font-weight: 300;
}

@keyframes fade-in {
    to {
        opacity: 1;
    }
}

.enter-button {
    background: linear-gradient(135deg, var(--gold), var(--rose));
    border: none;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.enter-button:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.4);
}

.button-sparkle {
    position: absolute;
    animation: sparkle 1.5s linear infinite;
}

@keyframes sparkle {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(0deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(360deg);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    animation: bounce 2s infinite;
}

.scroll-text {
    font-size: 0.9rem;
    color: var(--soft-pink);
    margin-bottom: 0.5rem;
    display: block;
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border-bottom: 3px solid var(--gold);
    border-right: 3px solid var(--gold);
    transform: rotate(45deg);
    margin: 0 auto;
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

/* Timeline Section */
.timeline-section {
    padding: 100px 20px;
    background: linear-gradient(180deg, #000 0%, var(--midnight) 100%);
    position: relative;
}

.timeline-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-elegant);
    font-size: 3rem;
    text-align: center;
    margin-bottom: 4rem;
    background: linear-gradient(135deg, var(--gold), var(--rose));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.floating-title {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.timeline-path {
    position: relative;
    padding: 2rem 0;
}

.timeline-path::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--gold), var(--rose));
    opacity: 0.3;
}

.timeline-item {
    display: flex;
    justify-content: center;
    margin: 4rem 0;
    position: relative;
    opacity: 0;
    transform: translateY(50px);
    animation: slide-up 1s ease-out forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.2s; }
.timeline-item:nth-child(2) { animation-delay: 0.4s; }
.timeline-item:nth-child(3) { animation-delay: 0.6s; }
.timeline-item:nth-child(4) { animation-delay: 0.8s; }

@keyframes slide-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-item::before {
    content: attr(data-year);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -30px;
    font-size: 0.9rem;
    color: var(--gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    max-width: 400px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.2);
}

.golden-item {
    border: 2px solid var(--gold);
    background: rgba(212, 175, 55, 0.1);
}

.timeline-content h3 {
    font-family: var(--font-elegant);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--gold);
}

.timeline-content p {
    color: var(--soft-pink);
    line-height: 1.6;
}

/* Video Section */
.video-section.modern {
    padding: 100px 20px;
    background: var(--midnight);
    position: relative;
}

.video-container {
    max-width: 1000px;
    margin: 0 auto;
}

.video-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.elegant-title {
    font-family: var(--font-elegant);
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--gold);
}

.elegant-subtitle {
    font-size: 1.2rem;
    color: var(--soft-pink);
    font-weight: 300;
}

.video-showcase {
    position: relative;
}

.video-frame {
    position: relative;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(212, 175, 55, 0.3);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.play-overlay:hover {
    background: rgba(0, 0, 0, 0.5);
}

.play-overlay:hover .play-button-modern {
    transform: scale(1.2);
}

.play-button-modern {
    width: 100px;
    height: 100px;
    transition: all 0.3s ease;
}

.play-button-modern svg {
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.5));
}

.play-text {
    margin-top: 1rem;
    font-size: 1.2rem;
    color: white;
    font-weight: 300;
}

#birthdayVideo {
    width: 100%;
    height: auto;
    display: block;
}

.video-caption {
    text-align: center;
    margin-top: 2rem;
    font-style: italic;
    color: var(--soft-pink);
}

/* Reasons Gallery */
.reasons-gallery {
    padding: 100px 20px;
    background: transparent;
    position: relative;
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-title {
    font-family: var(--font-elegant);
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--gold);
}

.gallery-subtitle {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--soft-pink);
}

.constellation-container {
    position: relative;
    min-height: 600px;
}

#constellation {
    position: absolute;
    width: 100%;
    height: 100%;
}

.reason-cards-floating {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

/* Photo Mosaic */
.photo-mosaic {
    padding: 100px 20px;
    background: #000;
}

.mosaic-container {
    max-width: 1200px;
    margin: 0 auto;
}

.mosaic-title {
    font-family: var(--font-elegant);
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--gold);
}

.photo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    padding: 20px;
}

.photo-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, var(--deep-purple), var(--rose));
    border: 2px solid transparent;
    opacity: 0;
}

.photo-item:hover {
    transform: scale(1.08) rotate(2deg);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.5);
    border-color: var(--gold);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.photo-item img.loading {
    opacity: 0;
}

.photo-item img.loaded {
    opacity: 1;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
    transition: opacity 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--gold);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    font-size: 30px;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(212, 175, 55, 0.3);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.2rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 10px;
}

.load-more-btn {
    display: block;
    margin: 40px auto;
    background: linear-gradient(135deg, var(--gold) 0%, var(--rose) 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.4);
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}

/* Fun photo animations */
@keyframes pop-in {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-rotate {
    from {
        opacity: 0;
        transform: rotate(-10deg) scale(0.9);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

@keyframes zoom-bounce {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    60% {
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes flip-in {
    from {
        opacity: 0;
        transform: perspective(400px) rotateY(90deg);
    }
    to {
        opacity: 1;
        transform: perspective(400px) rotateY(0);
    }
}

.photo-item.pop-in { animation: pop-in 0.5s ease-out forwards; }
.photo-item.slide-up { animation: slide-up 0.5s ease-out forwards; }
.photo-item.fade-rotate { animation: fade-rotate 0.5s ease-out forwards; }
.photo-item.zoom-bounce { animation: zoom-bounce 0.6s ease-out forwards; }
.photo-item.flip-in { animation: flip-in 0.6s ease-out forwards; }

/* Sparkle effect */
.photo-sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ffd700;
    border-radius: 50%;
    pointer-events: none;
    animation: sparkle 1s ease-out forwards;
}

@keyframes sparkle {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(1.5) rotate(180deg) translateY(-20px);
        opacity: 0;
    }
}

/* Loading message */
.loading-message {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.5rem;
    color: var(--gold);
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Lightbox closing animation */
.lightbox.closing {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Love Letters */
.love-letters {
    padding: 100px 20px;
    background: linear-gradient(180deg, #000 0%, var(--midnight) 100%);
}

.letters-container {
    max-width: 1000px;
    margin: 0 auto;
}

.letters-title {
    font-family: var(--font-elegant);
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--gold);
}

.letter-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.letter {
    width: 300px;
    cursor: pointer;
}

.envelope {
    position: relative;
    background: linear-gradient(135deg, #fff, var(--cream));
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.letter:hover .envelope {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.3);
}

.envelope-front {
    color: var(--deep-purple);
    font-family: var(--font-elegant);
    font-size: 1.2rem;
    text-align: center;
}

.letter-content {
    display: none;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    color: var(--deep-purple);
    font-size: 1rem;
    line-height: 1.8;
    margin-top: 1rem;
}

.letter.open .letter-content {
    display: block;
    animation: unfold 0.5s ease-out;
}

@keyframes unfold {
    from {
        transform: scaleY(0);
        opacity: 0;
    }
    to {
        transform: scaleY(1);
        opacity: 1;
    }
}

/* Finale */
.finale {
    padding: 150px 20px;
    background: linear-gradient(135deg, var(--midnight) 0%, var(--deep-purple) 50%, var(--rose) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.finale-container {
    text-align: center;
    max-width: 800px;
}

.finale-title {
    font-family: var(--font-elegant);
    font-size: 4rem;
    margin-bottom: 2rem;
    color: var(--gold);
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
}

.finale-text {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
    font-weight: 300;
}

.finale-signature {
    font-family: var(--font-elegant);
    font-size: 1.3rem;
    font-style: italic;
    color: var(--soft-pink);
    margin-bottom: 3rem;
}

.celebration-trigger {
    background: linear-gradient(135deg, var(--gold), var(--rose));
    border: none;
    padding: 1.5rem 4rem;
    font-size: 1.3rem;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(212, 175, 55, 0.8);
    }
}

.celebration-trigger:hover {
    transform: scale(1.1);
}

/* Celebration Overlay */
.celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.celebration-overlay.active {
    display: flex;
}

#fireworks {
    position: absolute;
    width: 100%;
    height: 100%;
}

.celebration-message {
    z-index: 10001;
    text-align: center;
}

.celebration-message h1 {
    font-family: var(--font-elegant);
    font-size: 5rem;
    color: var(--gold);
    text-shadow: 0 0 50px rgba(212, 175, 55, 0.8);
    animation: pulse-text 1s ease-in-out infinite;
}

@keyframes pulse-text {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .section-title,
    .elegant-title,
    .gallery-title,
    .mosaic-title,
    .letters-title {
        font-size: 2rem;
    }

    .finale-title {
        font-size: 2.5rem;
    }

    .photo-grid-modern {
        grid-template-columns: 1fr;
    }

    .photo-cell.large,
    .photo-cell.horizontal {
        grid-column: span 1;
    }

    .timeline-path::before {
        left: 20px;
    }

    .timeline-item {
        justify-content: flex-start;
        padding-left: 50px;
    }

    .timeline-item::before {
        left: 50px;
    }
}