/* ============================================================
   宝宝成长记录网站 · 前台样式
   风格：温暖粉彩 / 圆润可爱 / 响应式
   ============================================================ */

:root {
    --pink: #f09ab4;
    --pink-deep: #e07d9c;
    --pink-soft: #fdeaf0;
    --gold: #f3bd6b;
    --gold-soft: #fdf3e0;
    --cream: #fff9f2;
    --ink: #49363f;
    --ink-soft: #8a7480;
    --line: #f2d9e2;
    --card: #ffffff;
    --radius: 20px;
    --shadow: 0 8px 26px rgba(224, 125, 156, 0.14);
    --shadow-sm: 0 4px 14px rgba(224, 125, 156, 0.10);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: var(--cream);
    color: var(--ink);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--pink-deep); text-decoration: none; }
a:hover { color: var(--pink); }

.container { width: min(1100px, 92%); margin: 0 auto; }

/* ---------- 顶部导航 ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 249, 242, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 0; gap: 16px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
    width: 42px; height: 42px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--pink), var(--pink-deep));
    color: #fff; border-radius: 14px;
    box-shadow: var(--shadow-sm);
}
.brand-text { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.5px; color: var(--ink); }

.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a {
    padding: 8px 18px; border-radius: 999px;
    font-size: 0.95rem; color: var(--ink-soft); font-weight: 500;
    transition: all 0.2s ease;
}
.main-nav a:hover { color: var(--pink-deep); background: var(--pink-soft); }
.main-nav a.active { color: #fff; background: linear-gradient(135deg, var(--pink), var(--pink-deep)); box-shadow: var(--shadow-sm); }

/* ---------- 通用区块 ---------- */
.section { padding: 56px 0 8px; }
.section-title {
    display: flex; align-items: center; gap: 12px;
    font-size: 1.5rem; font-weight: 800; margin-bottom: 26px;
}
.section-title .icon {
    width: 40px; height: 40px; border-radius: 12px; flex: none;
    display: grid; place-items: center;
    background: var(--pink-soft); color: var(--pink-deep);
}
.section-title .more { margin-left: auto; font-size: 0.9rem; font-weight: 500; }

.card {
    background: var(--card); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 24px; border: 1px solid #fff;
}

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 26px; border-radius: 999px; border: none; cursor: pointer;
    font-size: 0.98rem; font-weight: 600; font-family: inherit;
    background: linear-gradient(135deg, var(--pink), var(--pink-deep));
    color: #fff; box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: #fff; }
.btn-ghost { background: #fff; color: var(--pink-deep); border: 1.5px solid var(--pink); box-shadow: none; }
.btn-ghost:hover { background: var(--pink-soft); }

/* ---------- 首页 Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(circle at 12% 20%, rgba(243, 189, 107, 0.35) 0, transparent 38%),
        radial-gradient(circle at 88% 18%, rgba(240, 154, 180, 0.35) 0, transparent 40%),
        linear-gradient(160deg, #ffeef4 0%, #fff6ea 100%);
    border-radius: 0 0 44px 44px;
    padding: 64px 0 56px;
}
.hero-inner {
    display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: #fff; color: var(--pink-deep);
    padding: 8px 18px; border-radius: 999px; font-size: 0.9rem; font-weight: 600;
    box-shadow: var(--shadow-sm); margin-bottom: 20px;
}
.hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.25; font-weight: 900; margin-bottom: 10px; }
.hero .gender-tag {
    display: inline-block; vertical-align: middle; margin-left: 8px;
    background: var(--gold); color: #7a5310; font-size: 0.85rem;
    padding: 3px 12px; border-radius: 999px; font-weight: 600;
}
.hero .sub { color: var(--ink-soft); font-size: 1.05rem; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-card {
    background: #fff; border-radius: 28px; padding: 30px;
    box-shadow: var(--shadow); text-align: center; position: relative;
}
.hero-card .num {
    font-size: 3.4rem; font-weight: 900; line-height: 1.1;
    background: linear-gradient(135deg, var(--pink-deep), var(--gold));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-card .num-label { color: var(--ink-soft); font-size: 0.95rem; margin-top: 4px; }
.hero-card .chips {
    display: flex; justify-content: center; gap: 10px; flex-wrap: wrap;
    margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--line);
}
.hero-card .chips span {
    background: var(--pink-soft); color: var(--pink-deep);
    font-size: 0.86rem; font-weight: 600; padding: 6px 14px; border-radius: 999px;
}

/* 漂浮装饰 */
.floats { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.floats i {
    position: absolute; display: block; opacity: 0.5;
    animation: floatY 9s ease-in-out infinite;
}
.floats i:nth-child(1) { left: 6%; top: 16%; font-size: 34px; animation-delay: 0s; }
.floats i:nth-child(2) { left: 40%; top: 8%; font-size: 22px; animation-delay: 1.6s; }
.floats i:nth-child(3) { right: 8%; top: 22%; font-size: 28px; animation-delay: 3s; }
.floats i:nth-child(4) { left: 22%; bottom: 12%; font-size: 26px; animation-delay: 4.2s; }
.floats i:nth-child(5) { right: 26%; bottom: 8%; font-size: 20px; animation-delay: 2.4s; }
@keyframes floatY {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-14px) rotate(6deg); }
}

/* ---------- 出生档案 ---------- */
.info-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px;
}
.info-item {
    background: #fff; border-radius: 16px; padding: 18px 20px;
    box-shadow: var(--shadow-sm); border: 1px solid #fff;
}
.info-item .k { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 6px; }
.info-item .v { font-size: 1.08rem; font-weight: 700; }
.info-item .v small { font-weight: 500; color: var(--ink-soft); font-size: 0.9rem; }

/* ---------- 里程碑 ---------- */
.milestones { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.mile {
    background: #fff; border-radius: 18px; padding: 20px;
    box-shadow: var(--shadow-sm); text-align: center; position: relative; overflow: hidden;
}
.mile .dot { font-size: 1.6rem; margin-bottom: 6px; }
.mile .name { font-weight: 800; font-size: 1.05rem; }
.mile .date { color: var(--ink-soft); font-size: 0.85rem; margin: 4px 0 10px; }
.mile .status {
    display: inline-block; padding: 5px 14px; border-radius: 999px;
    font-size: 0.85rem; font-weight: 600;
}
.mile.done .status { background: var(--gold-soft); color: #9a6a1f; }
.mile.upcoming .status { background: var(--pink-soft); color: var(--pink-deep); }
.mile .bar { height: 6px; border-radius: 3px; background: #f4e3ea; margin-top: 14px; overflow: hidden; }
.mile .bar b { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--pink), var(--gold)); }

/* ---------- 首页照片墙 ---------- */
.photo-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.photo-strip .cell { aspect-ratio: 1; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); }
.photo-strip img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.photo-strip .cell:hover img { transform: scale(1.06); }

/* ---------- 成长记录（首页预览 + 列表） ---------- */
.growth-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.gp-item { background: #fff; border-radius: 18px; padding: 20px; box-shadow: var(--shadow-sm); }
.gp-item .date { color: var(--pink-deep); font-size: 0.85rem; font-weight: 700; }
.gp-item h3 { font-size: 1.1rem; margin: 6px 0 10px; }
.gp-item .meta { display: flex; gap: 8px; flex-wrap: wrap; }
.gp-item .meta span { background: var(--gold-soft); color: #9a6a1f; font-size: 0.82rem; padding: 3px 10px; border-radius: 999px; }

/* 时间线 */
.timeline { position: relative; padding-left: 34px; }
.timeline::before {
    content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px;
    width: 3px; border-radius: 3px; background: linear-gradient(180deg, var(--pink), var(--gold));
}
.tl-item { position: relative; margin-bottom: 26px; }
.tl-item::before {
    content: ""; position: absolute; left: -29px; top: 8px;
    width: 15px; height: 15px; border-radius: 50%;
    background: #fff; border: 4px solid var(--pink-deep); box-shadow: 0 0 0 4px var(--pink-soft);
}
.tl-card { background: #fff; border-radius: 18px; padding: 22px; box-shadow: var(--shadow-sm); }
.tl-card .head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.tl-card .date { background: var(--pink-soft); color: var(--pink-deep); font-size: 0.82rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.tl-card .age { background: var(--gold-soft); color: #9a6a1f; font-size: 0.82rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; }
.tl-card h3 { font-size: 1.15rem; }
.tl-card .meta { display: flex; gap: 16px; margin: 10px 0; flex-wrap: wrap; }
.tl-card .meta span { font-size: 0.9rem; color: var(--ink-soft); }
.tl-card .meta b { color: var(--ink); }
.tl-card .note { color: var(--ink-soft); }
.tl-card .tl-photo { margin-top: 14px; border-radius: 14px; overflow: hidden; max-width: 320px; }

/* ---------- 相册 ---------- */
.cat-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.cat-tabs button {
    border: 1.5px solid var(--line); background: #fff; color: var(--ink-soft);
    padding: 7px 18px; border-radius: 999px; cursor: pointer;
    font-size: 0.92rem; font-weight: 600; font-family: inherit; transition: all 0.2s ease;
}
.cat-tabs button:hover { border-color: var(--pink); color: var(--pink-deep); }
.cat-tabs button.active { background: linear-gradient(135deg, var(--pink), var(--pink-deep)); border-color: transparent; color: #fff; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.g-item { border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-sm); background: #fff; cursor: zoom-in; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.g-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.g-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.g-item .cap { padding: 12px 16px 14px; }
.g-item .cap .t { font-weight: 700; font-size: 0.98rem; }
.g-item .cap .d { color: var(--ink-soft); font-size: 0.85rem; margin-top: 2px; }

/* 灯箱 */
.lightbox {
    position: fixed; inset: 0; z-index: 100; display: none;
    align-items: center; justify-content: center;
    background: rgba(40, 22, 32, 0.86); padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox figure { max-width: min(900px, 94vw); text-align: center; }
.lightbox img { max-height: 78vh; border-radius: 16px; margin: 0 auto; box-shadow: 0 20px 60px rgba(0,0,0,0.4); }
.lightbox figcaption { color: #ffe; margin-top: 14px; font-size: 1rem; }
.lightbox .close {
    position: absolute; top: 22px; right: 26px; cursor: pointer;
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255,255,255,0.16); color: #fff; border: none;
    font-size: 1.4rem; display: grid; place-items: center;
}
.lightbox .close:hover { background: rgba(255,255,255,0.3); }

/* ---------- 留言 ---------- */
.message-form .card { max-width: 720px; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.form-row input[type="text"], .form-row textarea {
    width: 100%; padding: 12px 16px; border: 1.5px solid var(--line);
    border-radius: 12px; font-size: 0.98rem; font-family: inherit;
    background: #fff; color: var(--ink); outline: none; transition: border-color 0.2s ease;
}
.form-row input:focus, .form-row textarea:focus { border-color: var(--pink); }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }

.msg-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.msg-item { background: #fff; border-radius: 18px; padding: 20px; box-shadow: var(--shadow-sm); position: relative; }
.msg-item .who { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.msg-item .avatar {
    width: 40px; height: 40px; border-radius: 50%; flex: none;
    background: linear-gradient(135deg, var(--pink), var(--gold));
    color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 1rem;
}
.msg-item .who b { font-size: 1rem; }
.msg-item .when { color: var(--ink-soft); font-size: 0.82rem; }
.msg-item p { color: var(--ink-soft); }
.msg-item::after {
    content: ""; position: absolute; left: 22px; bottom: -8px;
    width: 16px; height: 16px; background: #fff; transform: rotate(45deg);
}

.notice { background: var(--pink-soft); border: 1px dashed var(--pink); color: var(--pink-deep); border-radius: 14px; padding: 16px 20px; margin-bottom: 20px; font-size: 0.95rem; }
.empty-state { text-align: center; padding: 46px 20px; color: var(--ink-soft); }
.empty-state .art { font-size: 3rem; margin-bottom: 10px; opacity: 0.7; }

/* ---------- 页脚 ---------- */
.site-footer { margin-top: 60px; background: #fff; border-top: 1px solid var(--line); }
.footer-inner { text-align: center; padding: 30px 0; }
.footer-motto { font-weight: 600; }
.footer-meta { margin-top: 6px; font-size: 0.85rem; color: var(--ink-soft); }
.footer-filing {
    margin-top: 10px; font-size: 0.82rem; color: var(--ink-soft);
    display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
}
.footer-filing a { color: var(--ink-soft); text-decoration: none; }
.footer-filing a:hover { color: var(--pink-deep); }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
    .hero-inner { grid-template-columns: 1fr; }
    .photo-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
    .header-inner { justify-content: center; text-align: center; }
    .main-nav a { padding: 7px 13px; font-size: 0.88rem; }
    .section { padding-top: 42px; }
    .photo-strip { grid-template-columns: repeat(2, 1fr); }
}
