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

body {
    min-height: 100vh;
    padding-bottom: 110px;
    overflow-x: hidden;
    color: #fff;
    font-family: Arial, sans-serif;
    background: radial-gradient(ellipse at 50% 40%, #35121f, #170c14 50%, #08080c);
}

button {
    font-family: inherit;
}

.background-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -2;
    background:
        radial-gradient(circle at 15% 70%, #a20c3330, transparent 30%),
        radial-gradient(circle at 85% 20%, #d5a4c020, transparent 30%);
}

.particles {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    color: #ff557d;
    opacity: .5;
    animation: float 9s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-35px) rotate(15deg); }
}

/* ШАПКА */

.header {
    width: 100%;
    padding: 24px 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: Georgia, serif;
    font-size: 19px;
    font-style: italic;
    color: #f6c8d4;
}

.logo span {
    color: #ff416e;
    font-size: 25px;
}

.header-date {
    color: #d8a9b8;
    font-size: 11px;
    letter-spacing: 3px;
}

/* СТРАНИЦЫ */

.page {
    display: none;
    min-height: calc(100vh - 130px);
    padding: 30px 20px 45px;
}

.page.active {
    display: block;
    animation: appear .55s ease;
}

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

/* ГЛАВНАЯ */

.hero {
    max-width: 900px;
    margin: 0 auto;
    padding-top: 15px;
    text-align: center;
}

.eyebrow {
    color: #ff8da8;
    font-size: 12px;
    letter-spacing: 5px;
    margin-bottom: 22px;
}

.heart-scene {
    position: relative;
    width: 270px;
    height: 180px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.big-heart {
    font-size: 155px;
    line-height: 1;
    color: #ff416e;
    text-shadow: 0 0 12px #ff315f, 0 0 35px #ff315f, 0 0 75px #ff174d;
    animation: heartbeat 3s infinite ease-in-out;
}

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

.orbit {
    position: absolute;
    width: 300px;
    height: 95px;
    border: 2px solid #ff8ba780;
    border-radius: 50%;
}

.orbit-one {
    animation: orbitMove 12s linear infinite;
}

.orbit-two {
    width: 330px;
    height: 110px;
    transform: rotate(28deg);
    border-color: #e6c6d050;
}

@keyframes orbitMove {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.floating-heart {
    position: absolute;
    color: #ff7a9a;
    text-shadow: 0 0 15px #ff315f;
    animation: float 4s infinite ease-in-out;
}

.heart-one { top: 5px; left: 5px; font-size: 28px; }
.heart-two { right: 0; bottom: 20px; font-size: 22px; animation-delay: 1s; }
.heart-three { right: 25px; top: 0; font-size: 30px; animation-delay: 2s; }

.hero h1 {
    font-size: clamp(42px, 8vw, 82px);
    letter-spacing: 8px;
    font-weight: 900;
    background: linear-gradient(180deg, #fff, #d8b7c1 55%, #ff7596);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 5px 15px #ff416e50);
}

.age {
    margin-top: -3px;
    color: #ffd5df;
    font-size: 65px;
    font-weight: bold;
    text-shadow: 0 0 25px #ff416e;
}

.hero h2 {
    margin: 8px 0 18px;
    color: #ff8ca9;
    font-family: Georgia, serif;
    font-size: clamp(30px, 5vw, 48px);
    font-style: italic;
    text-shadow: 0 0 20px #ff416e70;
}

.hero-text {
    color: #eadde2;
    font-size: 17px;
    line-height: 1.8;
}

.main-button, .secondary-button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 40px;
    cursor: pointer;
    font-size: 16px;
    transition: .3s;
}

.main-button {
    margin-top: 30px;
    border: 1px solid #ff7898;
    color: white;
    background: linear-gradient(135deg, #ff416e, #a40d3c);
    box-shadow: 0 0 25px #ff315f55;
}

.main-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 35px #ff315f90;
}

.secondary-button {
    margin-top: 30px;
    border: 1px solid #a96c7a;
    color: #f7dce5;
    background: #28131f;
}

.signature {
    margin-top: 25px;
    color: #c9a8b4;
    font-style: italic;
}

/* РАЗДЕЛЫ */

.section-content {
    max-width: 1050px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    margin-bottom: 12px;
    color: #fce9ef;
    font-family: Georgia, serif;
    font-size: clamp(35px, 6vw, 55px);
}

.section-title span {
    color: #ff416e;
}

.section-description {
    margin-bottom: 35px;
    color: #d5bfc8;
    line-height: 1.6;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.photo-card {
    position: relative;
    height: 220px;
    overflow: hidden;
    border: 1px solid #a96c7a70;
    border-radius: 17px;
    background: linear-gradient(135deg, #49202f, #171018);
    box-shadow: 0 8px 25px #0005;
    cursor: pointer;
    transition: .3s;
}

.photo-card:hover {
    transform: translateY(-5px);
    border-color: #ff7998;
}

.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #f3c4d1;
}

.photo-placeholder span {
    font-size: 35px;
}

.page-controls {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* ПИСЬМО */

.letter-section {
    max-width: 850px;
}

.letter-card {
    margin: 30px auto;
    padding: 35px;
    border: 1px solid #b77c8d80;
    border-radius: 20px;
    background: linear-gradient(145deg, #29141f, #120d12);
    box-shadow: 0 0 35px #ff416e18;
    text-align: left;
}

.letter-card h3 {
    margin-bottom: 25px;
    color: #ff9ab2;
    font-family: Georgia, serif;
    font-size: 25px;
}

.letter-card p {
    margin-bottom: 18px;
    color: #eee0e6;
    font-size: 16px;
    line-height: 1.9;
}

.letter-card .letter-signature {
    margin-top: 30px;
    color: #ff9ab2;
    font-size: 19px;
    font-style: italic;
}

/* ФИНАЛ */

.final-content {
    max-width: 750px;
    margin: 0 auto;
    padding-top: 55px;
    text-align: center;
}

.final-heart {
    margin-bottom: 15px;
    color: #ff416e;
    font-size: 120px;
    text-shadow: 0 0 30px #ff315f, 0 0 65px #ff174d;
    animation: heartbeat 3s infinite;
}

.final-content h2 {
    margin-bottom: 25px;
    color: #ffdce5;
    font-family: Georgia, serif;
    font-size: clamp(32px, 6vw, 52px);
}

.final-message {
    color: #f0dce3;
    font-size: 20px;
    line-height: 1.9;
}

.final-hearts {
    margin-top: 30px;
    color: #ff547c;
    font-size: 45px;
    text-shadow: 0 0 20px #ff315f;
}

.final-signature {
    margin-top: 20px;
    color: #ff9ab2;
    font-family: Georgia, serif;
    font-size: 22px;
    font-style: italic;
}

/* LIQUID NAVIGATION */

.liquid-nav {
    position: fixed;
    z-index: 20;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    width: min(440px, calc(100% - 30px));
    height: 76px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    border: 1px solid #a96c7a70;
    border-radius: 24px;
    background: rgba(18, 12, 21, .92);
    box-shadow: 0 12px 35px #0008, 0 0 25px #ff416e20;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.nav-button {
    position: relative;
    z-index: 2;
    width: 25%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    border-radius: 18px;
    background: transparent;
    color: #e8dce2;
    cursor: pointer;
    transition: transform .45s cubic-bezier(.2, .8, .2, 1), color .3s;
}

.nav-icon {
    width: 43px;
    height: 43px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    transition: .4s cubic-bezier(.2, .8, .2, 1);
}

.nav-label {
    max-width: 100%;
    font-size: 11px;
    white-space: nowrap;
    opacity: .8;
    transition: .3s;
}

.nav-button.active {
    color: white;
    transform: translateY(-17px);
}

.nav-button.active .nav-icon {
    color: #21121a;
    background: linear-gradient(145deg, #fff, #f2cbd7);
    box-shadow: 0 0 20px #ffb3c7a0;
    transform: scale(1.12);
}

.nav-button.active .nav-label {
    opacity: 1;
    color: #ffb5c8;
    font-weight: bold;
}

.nav-button:focus-visible {
    outline: 2px solid #ff8da8;
    outline-offset: 3px;
}

.nav-indicator {
    position: absolute;
    z-index: 1;
    left: 8px;
    top: 8px;
    width: calc((100% - 16px) / 4);
    height: 60px;
    border-radius: 20px;
    background: #ff416e12;
    transition: transform .45s cubic-bezier(.2, .8, .2, 1);
    pointer-events: none;
}

/* ПРОСМОТР ФОТО */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 30;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 25px;
    background: #08060cf2;
}

.lightbox.open {
    display: flex;
}

.lightbox img {
    max-width: 75%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    border: 0;
    background: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

.lightbox-arrow {
    width: 45px;
    height: 45px;
    border: 0;
    border-radius: 50%;
    background: #542033;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

/* АДАПТАЦИЯ */

@media (max-width: 750px) {
    .header {
        padding: 20px 5%;
    }

    .header-date {
        font-size: 9px;
        letter-spacing: 1px;
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .photo-card {
        height: 160px;
    }

    .letter-card {
        padding: 22px;
    }

    .hero {
        padding-top: 25px;
    }
}

@media (max-width: 420px) {
    .gallery {
        grid-template-columns: 1fr;
    }

    .photo-card {
        height: 220px;
    }

    .nav-label {
        font-size: 10px;
    }

    .nav-icon {
        width: 39px;
        height: 39px;
        font-size: 25px;
    }

    .liquid-nav {
        bottom: 14px;
        height: 72px;
    }

    .hero-text {
        font-size: 15px;
    }

    .letter-card p {
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

/* Дополнения для новых блоков. Старый дизайн в style.css не меняется. */

/* Подписи к фото в галерее (видны только если заданы в script.js) */
.photo-card figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 24px 12px 10px;
    font-size: 13px;
    text-align: center;
    color: #fff;
    background: linear-gradient(transparent, #000b);
}

/* Две фотографии в конце */
.final-photos {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

.final-photo {
    margin: 34px 0 0;
    width: min(230px, 42vw);
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border: 1px solid #a96c7a70;
    border-radius: 18px;
    box-shadow: 0 10px 28px #0006, 0 0 24px #ff416e25;
}

.final-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
}

/* Тёплые слова в конце (в стиле карточки письма) */
.final-love {
    max-width: 560px;
    margin: 34px auto 0;
    padding: 26px 24px;
    border: 1px solid #b77c8d80;
    border-radius: 20px;
    background: linear-gradient(145deg, #29141f, #120d12);
    box-shadow: 0 0 35px #ff416e18;
    text-align: center;
}

.final-love p {
    margin-bottom: 14px;
    color: #eee0e6;
    font-size: 16px;
    line-height: 1.9;
}

.final-love .love-big {
    margin-bottom: 0;
    color: #ff9ab2;
    font-family: Georgia, serif;
    font-size: 22px;
    font-style: italic;
}

/* Подписи к двум фотографиям в конце (пустая подпись не показывается) */
.final-photo {
    position: relative;
}

.final-photo figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 24px 12px 10px;
    font-size: 13px;
    text-align: center;
    color: #fff;
    background: linear-gradient(transparent, #000b);
}

.final-photo figcaption:empty {
    display: none;
}
