/* 
 * 全新响应式网站样式 - 元气姬手写版
 * 兼容 PC 和移动端，无外部依赖
 */

:root {
    --primary-color: #ff6600;
    --text-main: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    --bg-body: #f4f6f8;
    --bg-card: #ffffff;
    --border-color: #eaeaea;
    --container-width: 1200px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-color);
}

ul {
    list-style: none;
}

/* 容器 */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部 */
.header {
    background: var(--bg-card);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

/* 导航栏 */
.nav {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

.nav-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
}

.nav-item a {
    display: block;
    padding: 15px 20px;
    font-size: 16px;
    color: var(--text-main);
    font-weight: 500;
}

.nav-item a:hover, .nav-item.active a {
    color: var(--primary-color);
    background-color: #fff5f0;
}

/* 主要内容区 */
.main {
    padding: 30px 0;
    min-height: calc(100vh - 200px);
}

/* 卡片通用样式 */
.card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    border: 1px solid var(--border-color);
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    padding-left: 12px;
    border-left: 4px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title a.more {
    font-size: 14px;
    color: var(--text-light);
    font-weight: normal;
}

/* 文章列表项 */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-item {
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--border-color);
}

.article-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.article-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-main);
    display: block;
    margin-bottom: 8px;
    line-height: 1.4;
}

.article-meta {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.tag {
    background: #f0f2f5;
    color: #666;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.article-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 文章详情页 */
.article-detail-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.detail-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--text-main);
}

.detail-meta {
    color: var(--text-light);
    font-size: 14px;
}

.detail-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-main);
}

.detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 15px 0;
}

.detail-content p {
    margin-bottom: 15px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.page-item a {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-main);
    background: var(--bg-card);
}

.page-item.active a {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.page-item.disabled a {
    color: #ccc;
    cursor: not-allowed;
    background: #f9f9f9;
}

/* 页脚 */
.footer {
    background: #2d3436;
    color: #b2bec3;
    padding: 40px 0;
    text-align: center;
    margin-top: 40px;
}

.footer p {
    margin-bottom: 10px;
    font-size: 14px;
}

.footer a {
    color: #dfe6e9;
}

/* 响应式适配 (移动端) */
@media screen and (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header-inner {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
        gap: 10px;
    }

    .nav-list {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
    }

    .nav-item a {
        padding: 10px 15px;
        font-size: 14px;
    }

    .section-title {
        font-size: 18px;
    }

    .article-title {
        font-size: 16px;
    }

    .detail-title {
        font-size: 22px;
    }

    .detail-content {
        font-size: 15px;
    }
    
    .card {
        padding: 15px;
    }
}
