/* ===== 基础重置 ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

/* ===== 日记详情页 ===== */
body {
    min-height: 100vh;
    margin: 0;
    padding: 64px 20px 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    justify-content: safe center;

    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
        "Segoe UI", system-ui, -apple-system, sans-serif;
    font-size: 17px;
    line-height: 1.95;
    color: #1f2937;

    /* 与首页保持同一张背景，叠加半透明白色渐变提升可读性 */
    background-image:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.8),
            rgba(255, 255, 255, 0.55) 45%,
            rgba(255, 255, 255, 0.78)
        ),
        url(./pic/miao.jpg);
    background-position: center, 65% center;
    background-repeat: no-repeat, no-repeat;
    background-size: cover, cover;
    background-attachment: fixed, fixed;

    -webkit-font-smoothing: antialiased;
}

/* ===== 日期标题 ===== */
.diary-date {
    width: 100%;
    max-width: 720px;
    margin: 0 0 18px;
    padding-left: 6px;

    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: #0f2b46;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

.diary-date span {
    margin-left: 8px;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: #5b7387;
}

/* ===== 正文卡片 ===== */
p {
    width: 100%;
    max-width: 720px;
    margin: 0;
    padding: 34px 38px;

    text-align: justify;
    text-indent: 2em;
    letter-spacing: 0.02em;
    word-break: break-word;

    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 18px;
    box-shadow: 0 22px 50px -30px rgba(15, 23, 42, 0.7);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* ===== 返回按钮 ===== */
a {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    margin-top: 26px;
    padding: 10px 22px;
    font-size: 15px;
    color: #0b4f8a;
    text-decoration: none;

    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(11, 79, 138, 0.18);
    border-radius: 999px;
    box-shadow: 0 10px 24px -18px rgba(15, 23, 42, 0.7);

    transition: background-color 0.18s ease, color 0.18s ease,
        transform 0.18s ease, box-shadow 0.18s ease;
}

a::before {
    content: "←";
    font-size: 14px;
}

a:hover {
    color: #ffffff;
    background: #0b6fc2;
    border-color: #0b6fc2;
    transform: translateY(-2px);
    box-shadow: 0 16px 30px -18px rgba(11, 111, 194, 0.9);
}

/* ===== 移动端适配 ===== */
@media (max-width: 480px) {
    body {
        padding: 40px 14px 56px;
        font-size: 16px;
    }

    .diary-date {
        margin-bottom: 14px;
        padding-left: 2px;
        font-size: 19px;
    }

    p {
        padding: 24px 22px;
        border-radius: 14px;
    }
}
