/* style.css - 集成所有样式，简洁大气科技感 */
/* 全局重置与变量 */
:root {
    --primary-color: #0a84ff;
    --primary-dark: #0066cc;
    --bg-dark: #0b0f1c;
    --bg-card: #141b2b;
    --bg-section: #1a2030;
    --text-primary: #eaf0fb;
    --text-secondary: #a0b4cc;
    --text-muted: #6b7d95;
    --border-color: #243040;
    --accent-gradient: linear-gradient(135deg, #0a84ff, #00d4ff);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.4);
    --radius: 8px;
}

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

body {
    font-family: 'Segoe UI', 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    text-decoration: none;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 顶部通栏搜索框 */
.top-bar {
    background: #101624;
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    font-size: 14px;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.welcome-text {
    color: var(--text-secondary);
}

.search-box form {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s;
}

.search-box form:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(10,132,255,0.1);
}

.search-input {
    background: transparent;
    border: none;
    padding: 8px 16px;
    color: var(--text-primary);
    outline: none;
    width: 220px;
    font-size: 14px;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 20px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: background 0.2s;
    border-radius: 0 20px 20px 0;
}

.search-btn:hover {
    background: var(--primary-dark);
}

/* 头部与横向导航 */
.header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

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

.logo img {
    height: 40px;
    width: auto;
}

.main-nav ul {
    display: flex;
    gap: 5px;
}

.main-nav a {
    display: block;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 15px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
    background: rgba(10,132,255,0.1);
}

.header-extra {
    color: var(--text-muted);
    font-size: 14px;
}

/* 主体布局 */
.main-content {
    padding: 40px 0 60px;
}

.content-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
}

/* 左侧区域 */
.content-left {
    min-width: 0;
}

.section {
    background: var(--bg-section);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.section-title {
    font-size: 22px;
    font-weight: 600;
    color: white;
    position: relative;
    padding-left: 14px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.more-link {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
}

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

/* 产品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid transparent;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.product-img {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #1e2a3a;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-img img {
    transform: scale(1.05);
}

.product-info {
    padding: 16px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-time {
    font-size: 12px;
    color: var(--text-muted);
}

/* 攻略列表 */
.guide-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.guide-item {
    display: flex;
    gap: 18px;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    transition: box-shadow 0.2s;
}

.guide-item:hover {
    box-shadow: var(--shadow-md);
}

.guide-thumb {
    width: 150px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #1e2a3a;
}

.guide-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.guide-content {
    flex: 1;
}

.guide-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.guide-title a {
    color: white;
}

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

.guide-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

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

/* 右侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-widget {
    background: var(--bg-section);
    border-radius: var(--radius);
    padding: 22px;
    border: 1px solid var(--border-color);
}

.widget-title {
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.widget-title h3 {
    font-size: 18px;
    font-weight: 600;
    color: white;
    position: relative;
    padding-left: 12px;
}

.widget-title h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* 热门点击列表 */
.hot-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hot-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.hot-num {
    display: inline-flex;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    background: #2a3545;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.hot-num.top {
    background: var(--primary-color);
    color: white;
}

.hot-item a {
    flex: 1;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.hot-click {
    font-size: 12px;
    color: var(--text-muted);
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    display: inline-block;
    padding: 5px 12px;
    background: var(--bg-card);
    border-radius: 20px;
    font-size: 13px !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    white-space: nowrap;
}

.tag-item:hover {
    border-color: var(--primary-color);
    color: var(--primary-color) !important;
    background: rgba(10,132,255,0.1);
}

/* 订阅区块 */
.subscribe-box {
    text-align: center;
}

.subscribe-text {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.subscribe-input {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    border-radius: 6px;
    color: white;
    outline: none;
    font-size: 14px;
}

.subscribe-input:focus {
    border-color: var(--primary-color);
}

.subscribe-btn {
    background: var(--accent-gradient);
    border: none;
    padding: 10px;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    font-size: 15px;
}

.subscribe-btn:hover {
    opacity: 0.9;
}

.subscribe-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 10px;
}

/* 底部 */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 28px 0;
    margin-top: 20px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-secondary);
}

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

/* 响应式调整 */
@media (max-width: 900px) {
    .content-layout {
        grid-template-columns: 1fr;
    }
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .header-inner {
        flex-wrap: wrap;
        gap: 15px;
    }
    .main-nav ul {
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    .guide-item {
        flex-direction: column;
    }
    .guide-thumb {
        width: 100%;
        height: 160px;
    }
}


/* 在原有style.css基础上追加以下样式 */
/* 面包屑导航 */
.breadcrumb-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--text-secondary);
}

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

.breadcrumb .current {
    color: var(--text-primary);
    font-weight: 500;
}

/* 栏目列表样式 */
.list-section {
    background: var(--bg-section);
}

.result-count {
    color: var(--text-muted);
    font-size: 14px;
}

.article-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.article-item {
    display: flex;
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

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

.article-item:hover {
    background: rgba(10,132,255,0.02);
    margin: 0 -10px;
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 4px;
}

.article-thumb {
    width: 220px;
    height: 150px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #1e2a3a;
}

.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-item:hover .article-thumb img {
    transform: scale(1.05);
}

.article-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.article-title a {
    color: white;
}

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

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

.meta-pic-tag {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
}

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

.read-more {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 14px;
    align-self: flex-start;
}

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

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

.page-controls {
    display: flex;
    gap: 6px;
    align-items: center;
}

.page-btn, .page-num {
    display: inline-block;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 14px;
    transition: all 0.2s;
    min-width: 40px;
    text-align: center;
}

.page-btn:hover, .page-num:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-num.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

/* 内容页详情样式 */
.article-detail {
    padding: 32px 36px;
}

.article-main-title {
    font-size: 28px;
    font-weight: 700;
    color: white;
    line-height: 1.4;
    margin-bottom: 18px;
}

.article-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    color: var(--text-muted);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.meta-item a {
    color: var(--text-secondary);
}

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

.article-tags {
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-link {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(10,132,255,0.1);
    border-radius: 20px;
    font-size: 13px;
    color: var(--primary-color);
    border: 1px solid rgba(10,132,255,0.2);
    transition: all 0.2s;
}

.tag-link:hover {
    background: rgba(10,132,255,0.2);
    border-color: var(--primary-color);
}

/* 文章正文 */
.article-body {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-primary);
    word-wrap: break-word;
    margin-bottom: 30px;
}

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

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}

.article-body h2, .article-body h3, .article-body h4 {
    color: white;
    margin: 24px 0 12px;
}

.article-body a {
    color: var(--primary-color);
    text-decoration: underline;
}

.article-body blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 12px 20px;
    background: rgba(10,132,255,0.05);
    border-radius: 0 8px 8px 0;
    margin: 16px 0;
    color: var(--text-secondary);
}

/* 版权声明 */
.article-footer-info {
    background: var(--bg-card);
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 28px;
    border-left: 3px solid var(--primary-color);
}

.copyright-notice a {
    color: var(--primary-color);
}

/* 上下篇 */
.article-neighbor {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 32px;
}

.prev-article, .next-article {
    flex: 1;
    background: var(--bg-card);
    padding: 16px 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.neighbor-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.neighbor-label.disabled {
    color: var(--text-muted);
    opacity: 0.6;
}

.prev-article a, .next-article a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
}

.prev-article a:hover, .next-article a:hover {
    color: var(--primary-color);
}

/* 相关推荐 */
.related-articles {
    margin-top: 10px;
}

.related-title {
    font-size: 20px;
    font-weight: 600;
    color: white;
    margin-bottom: 18px;
    padding-left: 12px;
    border-left: 3px solid var(--primary-color);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.related-item {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.2s;
}

.related-item:hover {
    transform: translateY(-4px);
}

.related-thumb {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #1e2a3a;
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-text {
    display: block;
    padding: 10px 12px 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-text:hover {
    color: var(--primary-color);
}

.related-date {
    display: block;
    padding: 0 12px 10px;
    font-size: 12px;
    color: var(--text-muted);
}

/* 作者卡片 */
.author-widget .author-card {
    text-align: center;
    padding: 16px 0;
}

.author-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 12px;
    background: #1e2a3a;
    border: 2px solid var(--border-color);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-name {
    font-weight: 600;
    font-size: 16px;
    color: white;
    margin-bottom: 4px;
}

.author-bio {
    font-size: 13px;
    color: var(--text-muted);
}

/* 响应式补充 */
@media (max-width: 900px) {
    .article-item {
        flex-direction: column;
    }
    .article-thumb {
        width: 100%;
        height: 200px;
    }
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .article-detail {
        padding: 24px 20px;
    }
    .article-neighbor {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
    .article-main-title {
        font-size: 22px;
    }
}