/* 锋享PHP技术分享站 - 基础样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.7;
    color: #333;
    background-color: #f7f9fc;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 */
.site-header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
}

.main-nav a {
    color: #4b5563;
    text-decoration: none;
    margin-left: 24px;
    font-size: 15px;
    transition: color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    color: #2563eb;
}

/* 首页横幅 */
.hero {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    padding: 80px 0;
    text-align: center;
    margin-bottom: 48px;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 16px;
    font-weight: 700;
}

.hero p {
    font-size: 18px;
    margin-bottom: 28px;
    opacity: 0.92;
}

.btn-primary {
    display: inline-block;
    background: #fff;
    color: #2563eb;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* 内容区 */
.page-content {
    padding-top: 48px;
    padding-bottom: 48px;
}

.page-title {
    font-size: 28px;
    margin-bottom: 24px;
    color: #1f2937;
}

.section-title {
    font-size: 24px;
    margin: 48px 0 20px;
    color: #1f2937;
}

/* 分类筛选栏 */
.cat-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
    background: #fff;
    padding: 18px 20px;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.cat-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 10px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.cat-item:hover {
    background: #e0e7ff;
    color: #4338ca;
    border-color: #c7d2fe;
    transform: translateY(-1px);
}

.cat-item.active {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(37,99,235,0.32);
}

.cat-count {
    font-size: 12px;
    font-weight: 600;
    background: rgba(0,0,0,0.06);
    border-radius: 8px;
    padding: 1px 7px;
    line-height: 16px;
}

.cat-item.active .cat-count {
    background: rgba(255,255,255,0.28);
}

.cat-tip {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 20px;
}

.cat-link {
    color: #2563eb;
    text-decoration: none;
}

.cat-link:hover {
    text-decoration: underline;
}

.empty-tip {
    color: #9ca3af;
    padding: 32px 0;
    text-align: center;
}

/* 文章列表 */
.article-list {
    display: grid;
    gap: 20px;
}

.article-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s;
}

.article-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.article-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.article-card h3 a {
    color: #1f2937;
    text-decoration: none;
}

.article-card h3 a:hover {
    color: #2563eb;
}

.meta {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 10px;
}

.summary {
    color: #4b5563;
    font-size: 15px;
    margin-bottom: 14px;
}

.read-more {
    color: #2563eb;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.read-more:hover {
    text-decoration: underline;
}

.more-link {
    margin-top: 24px;
    text-align: right;
}

.more-link a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.back-link {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.back-link a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

/* 文章详情 */
.article-detail {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.article-detail h1 {
    font-size: 28px;
    margin-bottom: 12px;
    color: #1f2937;
}

.article-body {
    color: #374151;
    font-size: 16px;
}

.article-body h2 {
    font-size: 22px;
    margin: 28px 0 14px;
    color: #1f2937;
}

.article-body p {
    margin-bottom: 16px;
}

.article-body ul,
.article-body ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.article-body li {
    margin-bottom: 8px;
}

.article-body code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: Menlo, Monaco, Consolas, monospace;
    font-size: 14px;
}

.article-body pre {
    background: #1f2937;
    color: #e5e7eb;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
}

.article-body pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.article-body hr {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 24px 0;
}

/* 标签 / 分类入口 */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 48px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    color: #4b5563;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.tag:hover {
    color: #2563eb;
    border-color: #bfdbfe;
    box-shadow: 0 6px 18px rgba(37,99,235,0.12);
    transform: translateY(-2px);
}

.tag em {
    font-style: normal;
    font-size: 12px;
    font-weight: 600;
    color: #2563eb;
    background: #eff6ff;
    border-radius: 8px;
    padding: 1px 8px;
    line-height: 18px;
}

/* 页脚 */
.site-footer {
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 24px 0;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

.site-footer a {
    color: #6b7280;
    text-decoration: none;
}

.site-footer a:hover {
    color: #2563eb;
}

.site-footer p {
    margin: 4px 0;
}

/* 响应式 */
@media (max-width: 640px) {
    .site-header .container {
        flex-direction: column;
        height: auto;
        padding: 12px 20px;
    }
    .main-nav {
        margin-top: 10px;
    }
    .main-nav a {
        margin-left: 0;
        margin-right: 16px;
    }
    .hero {
        padding: 50px 0;
    }
    .hero h1 {
        font-size: 26px;
    }
    .article-detail {
        padding: 20px;
    }
}
