/* ===== Theme ===== */
:root {
    --ink: #1f1b24;
    --ink-soft: rgba(31, 27, 36, 0.72);
    --paper: #f7f2ea;
    --paper-strong: #fffaf5;
    --rose: #e24c6b;
    --coral: #f48a6a;
    --mint: #7bd6c1;
    --sky: #b0d6f5;
    --gold: #f1c768;
    --card: rgba(255, 249, 243, 0.9);
    --card-border: rgba(31, 27, 36, 0.1);
    --shadow: 0 20px 60px rgba(31, 27, 36, 0.14);
    --shadow-soft: 0 12px 30px rgba(31, 27, 36, 0.12);
    --shadow-strong: 0 28px 70px rgba(31, 27, 36, 0.18);
    --radius: 28px;
    --radius-sm: 18px;
    --transition: 0.35s ease;
    --ring: rgba(226, 76, 107, 0.35);
    --accent-gradient: linear-gradient(120deg, var(--rose), var(--coral), var(--gold));
    --font-body: "Manrope", sans-serif;
    --font-title: "Playfair Display", serif;
    --font-script: "Marck Script", cursive;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    color: var(--ink);
    background: linear-gradient(135deg, #fff6ee 0%, #f3f8ff 45%, #fff1f5 100%);
    overflow-x: hidden;
    line-height: 1.6;
    letter-spacing: 0.01em;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin: 0 0 12px;
}

img,
video {
    display: block;
    max-width: 100%;
}

button,
input {
    font-family: inherit;
    color: inherit;
}

::selection {
    background: rgba(226, 76, 107, 0.18);
    color: var(--ink);
}

*:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 3px;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(244, 179, 123, 0.3), transparent 45%),
        radial-gradient(circle at 80% 0%, rgba(127, 211, 199, 0.25), transparent 40%),
        radial-gradient(circle at 70% 80%, rgba(182, 215, 242, 0.35), transparent 50%);
    pointer-events: none;
    z-index: -2;
}

body[data-theme="dark"] {
    color: #f2eee6;
    background: linear-gradient(135deg, #0f1116 0%, #121827 45%, #1b1220 100%);
    --ring: rgba(255, 179, 199, 0.6);
    --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.4);
    --shadow-strong: 0 28px 70px rgba(0, 0, 0, 0.6);
}

body[data-theme="dark"]::before {
    background:
        radial-gradient(circle at 20% 20%, rgba(46, 90, 130, 0.35), transparent 45%),
        radial-gradient(circle at 80% 0%, rgba(44, 120, 105, 0.3), transparent 40%),
        radial-gradient(circle at 70% 80%, rgba(120, 70, 140, 0.35), transparent 50%);
}

body[data-theme="dark"] .gridlines {
    background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    opacity: 0.15;
}

body[data-theme="dark"] .theme-toggle,
body[data-theme="dark"] .hero-note {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-soft);
}

body[data-theme="dark"] .theme-label,
body[data-theme="dark"] .eyebrow,
body[data-theme="dark"] .lead,
body[data-theme="dark"] .small-label,
body[data-theme="dark"] .hero-note {
    color: rgba(242, 238, 230, 0.78);
}

body[data-theme="dark"] .tag {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(242, 238, 230, 0.8);
    border-color: rgba(255, 255, 255, 0.18);
}

body[data-theme="dark"] .title,
body[data-theme="dark"] .section-head h2,
body[data-theme="dark"] .section-head h3,
body[data-theme="dark"] .section-head h5 {
    color: #f7f3eb;
}

body[data-theme="dark"] .title span {
    background: linear-gradient(120deg, #ff7fa4, #ffb38a, #ffd36f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body[data-theme="dark"] .card {
    background: rgba(20, 23, 28, 0.92);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

body[data-theme="dark"] .hero-card {
    background: linear-gradient(160deg, rgba(24, 27, 33, 0.95), rgba(40, 24, 34, 0.95));
}

body[data-theme="dark"] .countdown-card {
    background: linear-gradient(160deg, rgba(20, 24, 32, 0.95), rgba(24, 34, 48, 0.95));
}

body[data-theme="dark"] .rel-sub-text,
body[data-theme="dark"] .mood-message {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(242, 238, 230, 0.85);
    border-color: rgba(255, 255, 255, 0.14);
}

body[data-theme="dark"] .rel-main-text {
    color: #ff9fb6;
}

body[data-theme="dark"] #relationship-card h5,
body[data-theme="dark"] #relationship-card .card-kicker {
    color: #f7f3eb;
}

body[data-theme="dark"] .countdown-item,
body[data-theme="dark"] .list-group-item,
body[data-theme="dark"] .mood-btn {
    background: rgba(18, 20, 26, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
    color: inherit;
}

body[data-theme="dark"] .countdown-number {
    color: #ffd1dc;
}

body[data-theme="dark"] .countdown-label {
    color: rgba(242, 238, 230, 0.85);
}

body[data-theme="dark"] .mood-btn.active {
    background: linear-gradient(135deg, rgba(226, 76, 107, 0.3), rgba(241, 199, 104, 0.18));
    border-color: rgba(226, 76, 107, 0.5);
}

body[data-theme="dark"] .photo-item {
    border-color: rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .media-tile {
    background: rgba(18, 20, 26, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] ::selection {
    background: rgba(255, 179, 199, 0.35);
    color: #f7f3eb;
}

/* ===== Ambient Background ===== */
.ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.65;
    animation: orbFloat 14s ease-in-out infinite alternate;
}

.orb-1 {
    width: 280px;
    height: 280px;
    top: -40px;
    left: -60px;
    background: rgba(228, 90, 122, 0.35);
}

.orb-2 {
    width: 360px;
    height: 360px;
    right: -120px;
    bottom: 40px;
    background: rgba(127, 211, 199, 0.35);
    animation-delay: -3s;
}

.orb-3 {
    width: 240px;
    height: 240px;
    top: 35%;
    right: 18%;
    background: rgba(182, 215, 242, 0.45);
    animation-delay: -6s;
}

.gridlines {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(31, 27, 36, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(31, 27, 36, 0.04) 1px, transparent 1px);
    background-size: 120px 120px;
    opacity: 0.28;
}

@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(20px, -30px) scale(1.08); }
}

/* ===== Page Layout ===== */
.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px 80px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: relative;
    z-index: 2;
}

.hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 28px;
    align-items: center;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.35em;
    font-size: 0.7rem;
    color: var(--ink-soft);
    margin: 0;
}

.eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: linear-gradient(90deg, var(--rose), transparent);
}

.title {
    font-family: var(--font-title);
    font-size: clamp(2.6rem, 6vw, 4rem);
    line-height: 0.95;
    letter-spacing: -0.02em;
    margin: 0;
}

.title span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lead {
    font-size: 1.05rem;
    color: var(--ink-soft);
    margin: 0;
    max-width: 520px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    row-gap: 12px;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(31, 27, 36, 0.1);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.theme-toggle:hover,
.theme-toggle:focus-within {
    transform: translateY(-1px);
    box-shadow: var(--shadow-strong);
    border-color: rgba(226, 76, 107, 0.2);
}

.theme-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--ink-soft);
}

.hero-note {
    font-size: 0.95rem;
    color: rgba(31, 27, 36, 0.75);
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(31, 27, 36, 0.08);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
}

/* ===== Theme Switch (Uiverse) ===== */
.switch {
    font-size: 17px;
    position: relative;
    display: inline-block;
    width: 3.5em;
    height: 2em;
    cursor: pointer;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch input:focus-visible + .slider {
    box-shadow: 0 0 0 3px var(--ring);
}

.slider {
    --background: #20262c;
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--background);
    transition: 0.5s;
    border-radius: 30px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 1.4em;
    width: 1.4em;
    border-radius: 50%;
    left: 10%;
    bottom: 15%;
    box-shadow: inset 8px -4px 0px 0px #ececd9, -4px 1px 4px 0px #dadada;
    background: var(--background);
    transition: 0.5s;
}

.decoration {
    position: absolute;
    content: "";
    height: 2px;
    width: 2px;
    border-radius: 50%;
    right: 20%;
    top: 15%;
    background: #e5f041e6;
    backdrop-filter: blur(10px);
    transition: all 0.5s;
    box-shadow: -7px 10px 0 #e5f041e6, 8px 15px 0 #e5f041e6, -17px 1px 0 #e5f041e6,
        -20px 10px 0 #e5f041e6, -7px 23px 0 #e5f041e6, -15px 25px 0 #e5f041e6;
}

.switch input:checked ~ .decoration {
    transform: translateX(-20px);
    width: 10px;
    height: 10px;
    background: white;
    box-shadow: -12px 0 0 white, -6px 0 0 1.6px white, 5px 15px 0 1px white,
        1px 17px 0 white, 10px 17px 0 white;
}

.switch input:checked + .slider {
    background-color: #5494de;
}

.switch input:checked + .slider:before {
    transform: translateX(100%);
    box-shadow: inset 15px -4px 0px 15px #efdf2b, 0 0 10px 0px #efdf2b;
}

/* ===== Cards ===== */
.card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: transform 0.45s ease, box-shadow 0.45s ease, border-color 0.45s ease, filter 0.45s ease;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    will-change: transform;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0.7;
}

.card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 10%, rgba(226, 76, 107, 0.08), transparent 65%);
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-strong);
    border-color: rgba(226, 76, 107, 0.25);
}

.card:hover::after {
    opacity: 0.8;
}

.hero-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(255, 229, 238, 0.88));
    border: 1px solid rgba(226, 76, 107, 0.18);
    box-shadow: 0 26px 70px rgba(226, 76, 107, 0.16);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.countdown-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(231, 247, 255, 0.88));
    border: 1px solid rgba(110, 182, 226, 0.2);
}

.card-kicker {
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-size: 0.65rem;
    color: var(--ink-soft);
    margin: 0;
}

.date-chip {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: linear-gradient(120deg, rgba(226, 76, 107, 0.18), rgba(241, 199, 104, 0.22));
    color: var(--rose);
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid rgba(226, 76, 107, 0.25);
    box-shadow: 0 8px 18px rgba(226, 76, 107, 0.12);
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    position: relative;
}

.section-head::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 70px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--rose), transparent);
}

.section-head h2,
.section-head h3,
.section-head h5 {
    margin: 0;
    font-family: var(--font-title);
    font-weight: 600;
    font-size: clamp(1.4rem, 3vw, 2rem);
}

.tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(226, 76, 107, 0.15), rgba(241, 199, 104, 0.18));
    color: rgba(31, 27, 36, 0.78);
    border: 1px solid rgba(226, 76, 107, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

/* ===== Relationship ===== */
.rel-stats {
    font-size: 1.1rem;
}

.rel-main-text {
    font-family: var(--font-title);
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 600;
    color: var(--rose);
    text-shadow: 0 12px 30px rgba(226, 76, 107, 0.2);
}

.rel-sub-text {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(31, 27, 36, 0.06);
    font-size: 0.9rem;
    color: rgba(31, 27, 36, 0.7);
    border: 1px solid rgba(31, 27, 36, 0.08);
}

/* ===== Photo Gallery ===== */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 18px;
}

.photo-item {
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 1 / 1;
    position: relative;
    transform: translateZ(0);
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    border: 1px solid rgba(31, 27, 36, 0.08);
    background: var(--paper-strong);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.photo-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(31, 27, 36, 0.35));
    opacity: 0;
    transition: opacity var(--transition);
}

.photo-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-strong);
    border-color: rgba(226, 76, 107, 0.2);
}

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

.photo-item:hover::after {
    opacity: 1;
}

/* ===== Media Gallery ===== */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.media-tile {
    margin: 0;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    background: rgba(255, 255, 255, 0.75);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(31, 27, 36, 0.08);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.media-tile img,
.media-tile video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.media-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-strong);
    border-color: rgba(226, 76, 107, 0.2);
}

.video-tile video {
    aspect-ratio: 4 / 5;
}

/* ===== Countdown ===== */
.countdown-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.birthday-countdown {
    text-align: center;
}

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.countdown-item {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 247, 244, 0.82));
    border: 1px solid rgba(31, 27, 36, 0.08);
    border-radius: 16px;
    padding: 16px 10px;
    text-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.countdown-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-strong);
    border-color: rgba(226, 76, 107, 0.2);
}

.countdown-number {
    display: block;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 700;
    color: var(--rose);
    line-height: 1;
}

.countdown-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(31, 27, 36, 0.7);
    margin-top: 6px;
    display: block;
}

.birthday-today {
    font-family: var(--font-title);
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    color: var(--rose);
    text-align: center;
    animation: celebratePulse 1.2s ease-in-out infinite;
}

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

/* ===== Mood ===== */
.mood-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.mood-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.mood-btn {
    border: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 245, 243, 0.85));
    border-radius: 999px;
    font-size: 1.6rem;
    padding: 12px 16px;
    cursor: pointer;
    transition: transform 0.35s ease, box-shadow 0.35s ease, background 0.35s ease, border-color 0.35s ease;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(31, 27, 36, 0.08);
}

.mood-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 1);
    box-shadow: var(--shadow-strong);
    border-color: rgba(226, 76, 107, 0.25);
}

.mood-btn.active {
    background: linear-gradient(135deg, rgba(226, 76, 107, 0.22), rgba(241, 199, 104, 0.25));
    box-shadow: 0 18px 36px rgba(226, 76, 107, 0.22);
    border-color: rgba(226, 76, 107, 0.4);
    transform: translateY(-1px);
}

.mood-message {
    padding: 14px 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(127, 211, 199, 0.2), rgba(176, 214, 245, 0.18));
    color: rgba(31, 27, 36, 0.75);
    font-size: 0.95rem;
    border: 1px solid rgba(127, 211, 199, 0.22);
    box-shadow: var(--shadow-soft);
}

.small-label {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(31, 27, 36, 0.55);
    margin: 0 0 10px;
}

.list-group {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.list-group-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(31, 27, 36, 0.08);
    box-shadow: var(--shadow-soft);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.list-group-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

/* ===== Heart Button ===== */
.heart-btn {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: radial-gradient(circle at 30% 30%, #ffffff, #ffe7ef 60%, #fff3f8 100%);
    box-shadow: 0 18px 40px rgba(228, 90, 122, 0.25);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.heart-btn::after {
    content: "";
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8), transparent 60%);
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
}

.heart-btn svg {
    fill: var(--rose);
    position: relative;
    z-index: 1;
}

.heart-btn:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 24px 50px rgba(228, 90, 122, 0.32);
}

.heart-btn:hover::after {
    opacity: 0.8;
}

.heart-btn.clicked {
    animation: heartPop 0.6s ease;
}

@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

/* ===== Falling Hearts ===== */
.hearts-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.falling-heart {
    position: absolute;
    font-size: 18px;
    color: rgba(228, 90, 122, 0.5);
    animation: fall linear forwards;
    text-shadow: 0 2px 6px rgba(228, 90, 122, 0.25);
}

@keyframes fall {
    0% { transform: translateY(-10vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}

.falling-heart.wobble {
    animation: fall linear forwards, wobble 2s ease-in-out infinite;
}

@keyframes wobble {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-12px); }
    75% { transform: translateX(12px); }
}

/* ===== Loader ===== */
#loader-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 171, 200, 0.25), transparent 45%),
        radial-gradient(circle at 80% 0%, rgba(120, 208, 224, 0.25), transparent 40%),
        linear-gradient(135deg, #fff5ef, #eef6ff, #fff1f8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease;
}

#loader-overlay::after {
    content: "Для тебя";
    margin-top: 28px;
    font-size: 1rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(31, 27, 36, 0.7);
}

.loader-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.loader-logo {
    width: min(360px, 70vw);
}

.logo-svg {
    width: 100%;
    height: auto;
}

.logo-text {
    font-family: var(--font-script);
    font-size: 96px;
    fill: none;
    stroke: #e24c6b;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    paint-order: stroke;
    filter: drop-shadow(0 8px 16px rgba(226, 76, 107, 0.25));
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: strokeDraw 3.6s ease-in-out infinite;
}

@keyframes strokeDraw {
    0% { stroke-dashoffset: 1200; opacity: 0.15; }
    40% { stroke-dashoffset: 0; opacity: 1; }
    70% { stroke-dashoffset: 0; opacity: 1; }
    100% { stroke-dashoffset: -1200; opacity: 0.15; }
}

.loader-hearts {
    display: flex;
    gap: 12px;
    font-size: 1.4rem;
    flex-wrap: wrap;
    justify-content: center;
}

.loader-hearts span {
    animation: heartFloat 1.6s ease-in-out infinite;
}

.loader-hearts span:nth-child(2) { animation-delay: 0.2s; }
.loader-hearts span:nth-child(3) { animation-delay: 0.4s; }
.loader-hearts span:nth-child(4) { animation-delay: 0.6s; }
.loader-hearts span:nth-child(5) { animation-delay: 0.8s; }
.loader-hearts span:nth-child(6) { animation-delay: 1s; }
.loader-hearts span:nth-child(7) { animation-delay: 1.2s; }
.loader-hearts span:nth-child(8) { animation-delay: 1.4s; }

@keyframes heartFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.8; }
    50% { transform: translateY(-10px) scale(1.1); opacity: 1; }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
    animation: fadeInUp 0.9s ease both;
}

/* ===== Page Reveal ===== */
.page > section,
.hero {
    animation: floatIn 0.9s ease both;
}

.page > section:nth-of-type(1) { animation-delay: 0.05s; }
.page > section:nth-of-type(2) { animation-delay: 0.15s; }
.page > section:nth-of-type(3) { animation-delay: 0.25s; }
.page > section:nth-of-type(4) { animation-delay: 0.35s; }
.page > section:nth-of-type(5) { animation-delay: 0.45s; }

@keyframes floatIn {
    0% { opacity: 0; transform: translateY(24px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Subtle floating accents */
.orb {
    animation: orbFloat 16s ease-in-out infinite alternate;
}

.hero-card {
    animation: softGlow 6s ease-in-out infinite;
}

@keyframes softGlow {
    0%, 100% { box-shadow: 0 20px 60px rgba(31, 27, 36, 0.14); }
    50% { box-shadow: 0 26px 70px rgba(226, 76, 107, 0.2); }
}

/* Interactive micro-motions */
.photo-item:hover img {
    transform: scale(1.02);
}

.countdown-item:hover {
    transform: translateY(-2px);
}

.mood-btn:hover {
    transform: translateY(-1px);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .page > section,
    .hero,
    .orb,
    .hero-card,
    .photo-item,
    .media-tile,
    .countdown-item,
    .mood-btn,
    .heart-btn,
    .theme-toggle,
    .list-group-item {
        animation: none !important;
        transition: none !important;
    }
}
/* ===== Responsive ===== */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .countdown-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .page {
        padding: 24px 18px 60px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .card {
        padding: 20px;
        border-radius: 22px;
    }

    .countdown-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mood-btn {
        font-size: 1.4rem;
        padding: 10px 12px;
    }
}
