/* 基础重置与布局核心 - 解决footer固定底部问题 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%; /* 关键：让body占满视口高度 */
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background: #fdf6e3;
    line-height: 1.6;
}

/* 页面容器：弹性布局实现footer固定 */
.page-container {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 主内容区：自动填充剩余空间 */
.main-content {
    flex: 1;
    padding-bottom: 20px; /* 避免内容贴footer */
}

/* 文章主体容器 */
.article-box {
    max-width: 850px;
    margin: 30px auto;
    width: 100%;
    background: white;
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(178, 34, 34, 0.12);
    border: 2px solid #b22222;
    position: relative;
}

/* 文章标题 */
h1 {
    color: #b22222;
    font-size: 32px;
    margin-bottom: 25px;
    line-height: 1.4;
    font-weight: 700;
    border-bottom: 3px solid #f4d03f;
    padding-bottom: 15px;
}

/* 元信息区域 */
.meta {
    color: #666;
    font-size: 15px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f4d03f;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* 文章内容 */
.content {
    line-height: 1.9;
    font-size: 17px;
    color: #333;
    white-space: pre-wrap;
    padding: 15px 0;
}

/* 图片自适应优化 */
.content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 10px;
    user-select: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.content img:hover {
    transform: translateY(-2px);
}

/* 联系电话区域 */
.contact-phone {
    margin: 25px 0;
    padding: 15px;
    background: #fff8e1;
    border-radius: 10px;
    border: 1px solid #f4d03f;
    display: inline-block;
}

.contact-phone a {
    color: #b22222;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-phone a:hover {
    text-decoration: underline;
}

/* 工具栏按钮区域 */
.toolbar {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.toolbar-btn {
    padding: 14px 30px;
    font-size: 16px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-weight: 500;
}

/* 收藏/点赞按钮状态样式 */
.toolbar-btn.collected, .toolbar-btn.liked {
    background: #b22222;
    color: #fff;
}

.toolbar-btn:not(.collected):not(.liked) {
    background: #f4d03f;
    color: #8b0000;
}

.toolbar-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.toolbar-btn:disabled {
    background: #eee;
    color: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 登录提示 */
.login-tip {
    text-align: center;
    padding: 25px;
    background: #fff8e1;
    border-radius: 10px;
    color: #8b0000;
    margin: 30px 0;
    border: 1px solid #f4d03f;
    font-size: 15px;
}

.login-tip a {
    color: #b22222;
    font-weight: bold;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(244, 208, 63, 0.2);
}

.login-tip a:hover {
    background: rgba(244, 208, 63, 0.4);
}

/* 隐藏域样式 */
[type="hidden"] {
    display: none !important;
}

/* 移动端适配 - 主内容 */
@media (max-width: 768px) {
    .article-box {
        margin: 15px;
        padding: 20px;
    }

    h1 {
        font-size: 24px;
        margin-bottom: 20px;
        padding-bottom: 10px;
    }

    .meta {
        gap: 15px;
        font-size: 14px;
        margin-bottom: 20px;
    }

    .content {
        font-size: 16px;
        line-height: 1.8;
    }

    .content img {
        margin: 15px auto;
        border-radius: 8px;
    }

    .toolbar {
        gap: 15px;
    }

    .toolbar-btn {
        padding: 12px 25px;
        font-size: 15px;
        min-width: 120px;
    }

    .login-tip {
        padding: 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .article-box {
        margin: 10px;
        padding: 15px;
    }

    .toolbar-btn {
        width: 100%;
        max-width: 200px;
    }
}