:root {
    --sky-top: #a8d4f5;
    --sky-bottom: #eaf6ff;
    --blue: #4a90d9;
    --blue-deep: #2f6fb3;
    --text: #33475b;
    --text-light: #6b8299;
    --card-bg: rgba(255, 255, 255, 0.82);
    --shadow: 0 12px 32px rgba(80, 140, 200, 0.16);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 100%);
    min-height: 100vh;
    line-height: 1.7;
    overflow-x: hidden;
}

/* ---------- 天空背景 ---------- */
.sky {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(180deg, var(--sky-top) 0%, #c8e4fb 55%, var(--sky-bottom) 100%);
}

.sun {
    position: absolute;
    top: 8%;
    right: 12%;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, #fff7d6, #ffdf8e 70%);
    box-shadow: 0 0 80px 24px rgba(255, 235, 160, 0.55);
    opacity: 0.9;
}

.cloud {
    position: absolute;
    background: #ffffff;
    border-radius: 60px;
    filter: drop-shadow(0 10px 18px rgba(80, 140, 200, 0.14));
    opacity: 0.95;
}

.cloud::before,
.cloud::after {
    content: "";
    position: absolute;
    background: #ffffff;
    border-radius: 50%;
}

.cloud::before {
    width: 55%;
    height: 150%;
    top: -75%;
    left: 14%;
}

.cloud::after {
    width: 45%;
    height: 130%;
    top: -65%;
    right: 12%;
}

.cloud-1 {
    width: 160px;
    height: 46px;
    top: 16%;
    animation: drift 70s linear infinite;
}

.cloud-2 {
    width: 220px;
    height: 58px;
    top: 30%;
    animation: drift 95s linear infinite;
    animation-delay: -30s;
    opacity: 0.85;
}

.cloud-3 {
    width: 130px;
    height: 40px;
    top: 48%;
    animation: drift 80s linear infinite;
    animation-delay: -55s;
    opacity: 0.8;
}

.cloud-4 {
    width: 200px;
    height: 52px;
    top: 12%;
    animation: drift 110s linear infinite;
    animation-delay: -70s;
    opacity: 0.7;
}

@keyframes drift {
    from {
        transform: translateX(-30vw);
    }
    to {
        transform: translateX(120vw);
    }
}

/* ---------- 页面容器 ---------- */
.page {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* ---------- 头部个人名片 ---------- */
.hero {
    text-align: center;
    padding: 64px 24px 40px;
}

.avatar {
    width: 96px;
    height: 96px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6cb2f0, #3f83d0);
    color: #fff;
    font-size: 40px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(63, 131, 208, 0.35);
    border: 4px solid rgba(255, 255, 255, 0.9);
}

.hero h1 {
    font-size: 32px;
    color: #25455f;
    letter-spacing: 2px;
}

.motto {
    margin-top: 10px;
    color: var(--text-light);
    font-size: 16px;
}

.tags {
    margin-top: 18px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.tags span {
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--blue-deep);
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(80, 140, 200, 0.12);
}

.stats {
    margin-top: 28px;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.stat {
    min-width: 140px;
    padding: 16px 20px;
    border-radius: 18px;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(6px);
}

.stat b {
    display: block;
    font-size: 26px;
    color: var(--blue-deep);
}

.stat span {
    font-size: 13px;
    color: var(--text-light);
}

/* ---------- 日记区域 ---------- */
.diary-section {
    margin-top: 20px;
}

.section-title {
    text-align: center;
    font-size: 24px;
    color: #25455f;
    margin-bottom: 24px;
    letter-spacing: 2px;
}

.section-title::after {
    content: "";
    display: block;
    width: 56px;
    height: 3px;
    margin: 10px auto 0;
    border-radius: 3px;
    background: linear-gradient(90deg, #6cb2f0, #3f83d0);
}

.diary-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.diary-card {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 24px 26px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.diary-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(80, 140, 200, 0.22);
}

.diary-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 13px;
}

.diary-meta .date {
    color: var(--blue-deep);
    font-weight: 600;
}

.diary-meta .chip {
    padding: 2px 12px;
    border-radius: 999px;
    background: #eaf4fd;
    color: #5a7d9e;
}

.diary-meta .mood {
    background: #fff3e0;
    color: #b07a2d;
}

.diary-meta .tag {
    background: #e7f6ee;
    color: #3d8b5f;
}

.diary-title {
    margin-top: 12px;
    font-size: 19px;
    color: #25455f;
}

.diary-content {
    margin-top: 8px;
    color: var(--text);
    font-size: 15px;
    white-space: pre-wrap;
}

.loading,
.empty {
    text-align: center;
    color: var(--text-light);
    padding: 40px 0;
    font-size: 15px;
}

/* ---------- 页脚 ---------- */
.footer {
    margin-top: 48px;
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
    padding: 20px 0;
}

.footer .icp {
    margin-top: 6px;
    font-size: 13px;
    color: #7d94ab;
}

.footer .icp a {
    color: #7d94ab;
    text-decoration: none;
}

.footer .icp a:hover {
    color: var(--blue-deep);
    text-decoration: underline;
}

/* ---------- 响应式 ---------- */
@media (max-width: 600px) {
    .hero {
        padding-top: 44px;
    }

    .hero h1 {
        font-size: 26px;
    }

    .stat {
        min-width: 110px;
        padding: 12px 14px;
    }

    .stat b {
        font-size: 22px;
    }

    .diary-card {
        padding: 18px 18px;
    }
}
