/* ============================================================
   模板1: 科技深色风格 - 样式表
   暗色背景 + 霓虹蓝紫色调 + 矩阵粒子效果
   ============================================================ */

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

body {
    background: #0a0a12;
    color: #c0c8d8;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.8;
    overflow-x: hidden;
}

.matrix-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    opacity: 0.15;
    pointer-events: none;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部导航 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(100, 150, 255, 0.15);
    backdrop-filter: blur(10px);
    background: rgba(10, 10, 20, 0.6);
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 28px;
    color: #4d9eff;
    text-shadow: 0 0 10px rgba(77, 158, 255, 0.5);
}

.logo-text {
    font-size: 20px;
    font-weight: bold;
    background: linear-gradient(135deg, #4d9eff, #b46eff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 5px;
}

.nav a {
    color: #8a92a8;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

.nav a:hover, .nav a.active {
    color: #4d9eff;
    background: rgba(77, 158, 255, 0.1);
    text-shadow: 0 0 8px rgba(77, 158, 255, 0.3);
}

/* 搜索框 */
.search-bar {
    display: flex;
    gap: 10px;
    margin: 30px 0;
}

.search-input {
    flex: 1;
    padding: 14px 20px;
    background: rgba(20, 20, 35, 0.8);
    border: 1px solid rgba(77, 158, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: #4d9eff;
    box-shadow: 0 0 15px rgba(77, 158, 255, 0.2);
}

.search-btn {
    padding: 14px 30px;
    background: linear-gradient(135deg, #4d9eff, #b46eff);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.2s;
}

.search-btn:hover { transform: scale(1.05); }

/* 主内容区 */
.main-content {
    display: flex;
    gap: 30px;
    margin: 20px 0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.section-title h2 {
    font-size: 22px;
    color: #4d9eff;
    white-space: nowrap;
}

.section-title .line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(77, 158, 255, 0.5), transparent);
}

/* 文章卡片网格 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    flex: 1;
}

.article-card {
    background: rgba(20, 20, 35, 0.8);
    border: 1px solid rgba(77, 158, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.article-card:hover {
    border-color: rgba(77, 158, 255, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(77, 158, 255, 0.15);
}

.card-thumb {
    height: 140px;
    position: relative;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumb-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(77, 158, 255, 0.15), rgba(180, 110, 255, 0.1));
}

.card-num {
    font-size: 48px;
    font-weight: bold;
    color: rgba(77, 158, 255, 0.3);
    z-index: 1;
}

.card-body { padding: 15px; }

.card-title {
    font-size: 16px;
    color: #d0d8e8;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-desc {
    font-size: 13px;
    color: #6a7290;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #5a6280;
}

/* 侧边栏 */
.sidebar {
    width: 280px;
    flex-shrink: 0;
}

.widget {
    background: rgba(20, 20, 35, 0.8);
    border: 1px solid rgba(77, 158, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.widget-title {
    font-size: 16px;
    color: #4d9eff;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(77, 158, 255, 0.1);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    padding: 5px 12px;
    background: rgba(77, 158, 255, 0.08);
    border: 1px solid rgba(77, 158, 255, 0.15);
    border-radius: 20px;
    color: #8ab8ff;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s;
}

.tag-item:hover {
    background: rgba(77, 158, 255, 0.2);
    color: #4d9eff;
}

.link-list { display: flex; flex-direction: column; gap: 10px; }

.friend-link {
    color: #6a7290;
    text-decoration: none;
    font-size: 14px;
    padding: 5px 0;
    border-bottom: 1px dashed rgba(77, 158, 255, 0.08);
    transition: color 0.3s;
}

.friend-link:hover { color: #4d9eff; }

/* 列表页 */
.list-layout { gap: 30px; }
.list-main { flex: 1; }

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

.list-item {
    display: flex;
    gap: 20px;
    background: rgba(20, 20, 35, 0.8);
    border: 1px solid rgba(77, 158, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.list-item:hover {
    border-color: rgba(77, 158, 255, 0.3);
    transform: translateX(3px);
}

.list-thumb {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.list-num {
    font-size: 24px;
    font-weight: bold;
    color: rgba(77, 158, 255, 0.3);
}

.list-body { flex: 1; }
.list-title { font-size: 17px; color: #d0d8e8; margin-bottom: 8px; }
.list-desc { font-size: 13px; color: #6a7290; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.list-meta { display: flex; gap: 15px; font-size: 12px; color: #5a6280; }

/* 面包屑 */
.breadcrumb {
    padding: 15px 0;
    color: #5a6280;
    font-size: 13px;
}

.breadcrumb a { color: #4d9eff; text-decoration: none; }
.breadcrumb .sep { margin: 0 8px; }
.breadcrumb .current { color: #8a92a8; }

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

.page-btn {
    padding: 8px 14px;
    background: rgba(20, 20, 35, 0.8);
    border: 1px solid rgba(77, 158, 255, 0.15);
    border-radius: 6px;
    color: #8a92a8;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.page-btn:hover, .page-btn.active {
    background: rgba(77, 158, 255, 0.15);
    border-color: #4d9eff;
    color: #4d9eff;
}

.page-btn.disabled { opacity: 0.4; cursor: not-allowed; }

/* 文章详情 */
.article-layout { gap: 30px; }

.article-detail {
    flex: 1;
    background: rgba(20, 20, 35, 0.8);
    border: 1px solid rgba(77, 158, 255, 0.1);
    border-radius: 10px;
    padding: 35px;
}

.article-h1 {
    font-size: 26px;
    color: #d0d8e8;
    margin-bottom: 15px;
    line-height: 1.4;
}

.article-info {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #5a6280;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(77, 158, 255, 0.08);
    margin-bottom: 20px;
}

.article-content {
    color: #9aa4c0;
    font-size: 15px;
    line-height: 2;
}

.article-content p { margin-bottom: 18px; }

.article-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(77, 158, 255, 0.08);
}

.article-nav a {
    color: #4d9eff;
    text-decoration: none;
    font-size: 14px;
}

/* 相关推荐 */
.related-list { display: flex; flex-direction: column; gap: 12px; }

.related-item {
    color: #8a92a8;
    text-decoration: none;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.related-item:hover { color: #4d9eff; }
.related-item .dot { color: rgba(77, 158, 255, 0.4); font-size: 8px; }

/* 底部 */
.footer {
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid rgba(77, 158, 255, 0.1);
    color: #5a6280;
    font-size: 13px;
}

/* 响应式 */
@media (max-width: 900px) {
    .header { flex-direction: column; gap: 15px; }
    .nav { flex-wrap: wrap; justify-content: center; }
    .main-content { flex-direction: column; }
    .sidebar { width: 100%; }
    .article-grid { grid-template-columns: 1fr; }
}
