:root {

    --color-primary: #3D71BD;
    --color-primary-light: #5A8FC9;
    --color-primary-dark: #2A5290;
    --color-secondary: #FFECB2;
    --color-accent: #FFD54F;
    --color-gold: #FFECB2;


    --color-bg: #0A121F;
    --color-bg-light: #152030;
    --color-bg-lighter: #233045;
    --color-text: #F9FAFB;
    --color-text-muted: #D1D5DB;
    --color-text-subtle: #9CA3AF;

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    --font-display: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    --blur-sm: 8px;
    --blur-md: 16px;
    --blur-lg: 24px;

    --z-countdown: 9999;
    --z-audio: 1000;
    --z-lightbox: 10000;
    --z-progress: 999;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    scroll-padding-top: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}


.countdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;

    background: var(--color-bg);

    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-countdown);
    opacity: 1;
    transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.countdown-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.countdown-container {
    text-align: center;
    padding: var(--spacing-lg);
    max-width: 90%;
}

.lock-icon {
    color: var(--color-primary);
    margin-bottom: var(--spacing-lg);
    animation: lockPulse 2s ease-in-out infinite;
}

@keyframes lockPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.countdown-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 8vw, 3.5rem);
    font-weight: 700;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
}

.countdown-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-lg);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(var(--blur-sm));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: var(--spacing-sm) var(--spacing-md);
    min-width: 70px;
}

.time-value {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 6vw, 2.5rem);
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
}

.time-label {
    font-size: 0.75rem;
    color: var(--color-text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: var(--spacing-xs);
}

.time-separator {
    font-size: 2rem;
    color: var(--color-primary);
    font-weight: 700;
    margin: 0 var(--spacing-xs);
}

.countdown-message {
    font-size: 0.875rem;
    color: var(--color-text-subtle);
    font-style: italic;
}


.main-content {
    opacity: 1;
    transition: opacity var(--transition-slow);
}

.main-content.locked {
    opacity: 0;
    pointer-events: none;
}


.audio-player {
    position: fixed;
    top: var(--spacing-md);
    right: var(--spacing-md);
    z-index: var(--z-audio);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(var(--blur-md));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: var(--spacing-sm) var(--spacing-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all var(--transition-normal);
}

.audio-toggle {
    background: var(--color-primary);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: transform var(--transition-fast);
    flex-shrink: 0;
}

.audio-toggle:active {
    transform: scale(0.95);
}

.audio-info {
    display: none;

}

.audio-title {
    font-size: 0.875rem;
    color: var(--color-text);
    font-weight: 500;
}


.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--color-primary);
    z-index: var(--z-progress);
    width: 0%;
    transition: width 0.1s ease;
}


.hero-section {
    min-height: 100vh;
    min-height: 100dvh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-lg);
    position: relative;

}

.hero-content {
    max-width: 600px;
    animation: fadeInUp 1s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 10vw, 4.5rem);
    font-weight: 700;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    line-height: 1.1;
    animation: floatTitle 3s ease-in-out infinite;
}

@keyframes floatTitle {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.hero-subtitle {
    font-size: clamp(1rem, 4vw, 1.5rem);
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-xl);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--color-text-subtle);
    font-size: 0.875rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.scroll-hint svg {
    animation: arrowBounce 1.5s ease-in-out infinite;
}

@keyframes arrowBounce {

    0%,
    100% {
        transform: translateY(0);
        opacity: 1;
    }

    50% {
        transform: translateY(8px);
        opacity: 0.5;
    }
}


.timeline-container {
    position: relative;
    padding: var(--spacing-xl) 0;
}


.month-section {
    min-height: 100vh;
    min-height: 100dvh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--spacing-lg) var(--spacing-md);
    margin-bottom: 0;
    opacity: 0;
    transform: translateY(80px) scale(0.95);
    transition: opacity 1s ease, transform 1s ease;
}

.month-section.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.month-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease 0.2s, transform 0.8s ease 0.2s;
}

.month-section.visible .month-header {
    opacity: 1;
    transform: translateY(0);
}

.month-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 8vw, 3.5rem);
    font-weight: 700;
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: var(--spacing-sm);
}

.month-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
    font-style: italic;
}


.photo-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-lg) 0;
}

.stacked-preview {
    position: relative;
    width: 200px;
    height: 250px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.stacked-preview:active {
    transform: scale(0.98);
}

.stack-item {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: var(--color-bg-light);
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.stack-item:nth-child(1) {
    transform: rotate(-5deg) translateY(0px);
    z-index: 1;
}

.stack-item:nth-child(2) {
    transform: rotate(0deg) translateY(6px);
    z-index: 2;
}

.stack-item:nth-child(3) {
    transform: rotate(3deg) translateY(12px);
    z-index: 3;
}

.stacked-preview:hover .stack-item:nth-child(1) {
    transform: rotate(-7deg) translateY(-4px);
}

.stacked-preview:hover .stack-item:nth-child(2) {
    transform: rotate(0deg) translateY(4px);
}

.stacked-preview:hover .stack-item:nth-child(3) {
    transform: rotate(5deg) translateY(12px);
}

.stack-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-count-badge {
    position: absolute;
    bottom: -8px;
    right: -8px;
    background: var(--color-primary);
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(61, 113, 189, 0.4);
}


@media (min-width: 640px) {
    .stacked-preview {
        width: 280px;
        height: 350px;
    }

    .stack-item:nth-child(2) {
        transform: rotate(0deg) translateY(8px);
    }

    .stack-item:nth-child(3) {
        transform: rotate(4deg) translateY(16px);
    }

    .photo-count-badge {
        bottom: -10px;
        right: -10px;
        padding: 8px 16px;
        font-size: 0.875rem;
    }
}




.gallery-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: var(--color-bg);
    z-index: var(--z-lightbox);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    padding: 0;
    margin: 0;
}

.gallery-overlay.active {
    opacity: 1;
    transform: translateY(0);
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.gallery-header h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 5vw, 2rem);
    color: var(--color-secondary);
    margin: 0;
    text-transform: capitalize;
}

.gallery-close {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(var(--blur-sm));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all var(--transition-fast);
    padding: 0;
}

.gallery-close:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.2);
}

.gallery-scroll-container {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
    margin: 0;
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: auto;
    grid-auto-columns: auto;
    gap: 0;
    height: 100%;
    align-content: start;
    align-items: start;
    justify-content: start;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    line-height: 0;
    font-size: 0;
}

.gallery-photo-item {
    width: 120px;
    height: 120px;
    border-radius: 0;
    overflow: hidden;
    background: var(--color-bg-light);
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    scroll-snap-align: start;
    display: block;
    margin: 0;
    padding: 0;
}

.gallery-photo-item:active {
    transform: scale(0.95);
}

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


@media (min-width: 640px) {
    .gallery-photo-item {
        width: 160px;
        height: 160px;
    }

    .gallery-photo-item:hover {
        transform: scale(1.05);
        box-shadow: 0 8px 20px rgba(61, 113, 189, 0.3);
        z-index: 10;
    }
}


.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(var(--blur-lg));
    z-index: var(--z-lightbox);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
    padding: var(--spacing-lg);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(var(--blur-sm));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all var(--transition-fast);
    z-index: 1;
}

.lightbox-close:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;

    max-height: 80dvh;
    border-radius: 12px;
    object-fit: contain;
    transition: opacity 0.2s ease;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.2s ease;
    z-index: 2;
    padding: 0;
    line-height: 1;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.lightbox-prev {
    left: var(--spacing-md);
}

.lightbox-next {
    right: var(--spacing-md);
}

.random-photo-section {
    min-height: 100vh;
    min-height: 100dvh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl) var(--spacing-lg);
    text-align: center;
}

.random-photo-container {
    max-width: 800px;
    width: 100%;
}

.random-photo-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
}

.random-photo-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.random-photo-item {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 12px;
    overflow: hidden;
    background: var(--color-bg-light);
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.random-photo-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(61, 113, 189, 0.3);
    z-index: 10;
}

.random-photo-item:active {
    transform: translateY(-2px) scale(1.01);
}

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

.random-photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 18, 31, 0.9);
    color: var(--color-secondary);
    padding: var(--spacing-md) var(--spacing-sm);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.05em;
    margin: 0;
}

@media (min-width: 640px) {
    .random-photo-wrapper {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-lg);
    }

    .random-photo-caption {
        font-size: 1rem;
        padding: var(--spacing-lg) var(--spacing-md);
    }
}

@media (min-width: 1024px) {
    .random-photo-wrapper {
        grid-template-columns: repeat(4, 1fr);
    }
}

.wishes-section {
    min-height: 100vh;
    min-height: 100dvh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl) var(--spacing-lg);
    text-align: center;
    background: var(--color-bg);
}

.wishes-content {
    max-width: 700px;
    animation: fadeInUp 1s ease-out;
}

.wishes-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
}

.wishes-subtitle {
    font-size: clamp(1rem, 4vw, 1.5rem);
    color: var(--color-secondary);
    margin-bottom: var(--spacing-2xl);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.wishes-text {
    font-size: clamp(1rem, 3vw, 1.25rem);
    line-height: 1.8;
    color: var(--color-text-muted);
}

.wishes-text p {
    margin-bottom: var(--spacing-lg);
}

.wishes-closing {
    font-size: clamp(1.125rem, 4vw, 1.5rem);
    font-style: italic;
    color: var(--color-primary);
    margin-top: var(--spacing-2xl);
    font-weight: 500;
}

@media (min-width: 640px) {
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .audio-info {
        display: block;
    }

    .time-unit {
        min-width: 90px;
        padding: var(--spacing-md) var(--spacing-lg);
    }
}

@media (min-width: 1024px) {
    .photo-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .month-section {
        padding: var(--spacing-2xl) var(--spacing-xl);
    }

    .photo-item:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 40px rgba(139, 92, 246, 0.3);
    }

    .photo-item:hover img {
        transform: scale(1.1);
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}