/* ============================================================
   模板: soft - 全屏清爽大气风格
   左栏导航 + 右栏内容区
   ============================================================ */

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

:root {
    --bg: #f5f7fa;
    --sidebar-bg: #1e2a3a;
    --sidebar-hover: #2d3e54;
    --sidebar-active: #3b82f6;
    --text: #1a202c;
    --text-light: #718096;
    --text-white: #e2e8f0;
    --text-white-dim: #94a3b8;
    --border: #e2e8f0;
    --accent: #3b82f6;
    --card-bg: #ffffff;
    --radius: 10px;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   全屏布局 - 左右两栏
   ============================================================ */
.layout {
    display: flex;
    min-height: 100vh;
}

/* ---- 左栏导航 ---- */
.sidebar {
    width: 240px;
    background: var(--sidebar-bg);
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 22px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand a {
    color: var(--text-white);
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
}
.sidebar-brand a:hover { text-decoration: none; }
.sidebar-brand small {
    display: block;
    font-size: 11px;
    color: var(--text-white-dim);
    margin-top: 4px;
}

.sidebar-search {
    padding: 16px 20px 12px;
}
.sidebar-search input {
    width: 100%;
    padding: 8px 14px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    color: var(--text-white);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}
.sidebar-search input::placeholder { color: var(--text-white-dim); }
.sidebar-search input:focus { border-color: var(--accent); }

.sidebar-nav {
    flex: 1;
    padding: 8px 12px;
}
.nav-section {
    margin-bottom: 6px;
}
.nav-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-white-dim);
    padding: 12px 12px 6px;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    color: var(--text-white-dim);
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.15s;
    cursor: pointer;
}
.nav-link:hover {
    background: var(--sidebar-hover);
    color: var(--text-white);
    text-decoration: none;
}
.nav-link.active {
    background: var(--sidebar-active);
    color: #fff;
}
.nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 14px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 12px;
    color: var(--text-white-dim);
}

/* ---- 右栏顶部导航条（浮动，不影响内容排版） ---- */
.topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 32px;
    height: 56px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 240px;
    right: 0;
    z-index: 50;
}
.topbar-search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}
.topbar-search input {
    flex: 1;
    max-width: 480px;
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    background: var(--bg);
    color: var(--text);
}
.topbar-search input::placeholder { color: var(--text-light); }
.topbar-search input:focus { border-color: var(--accent); }
.topbar-search button {
    padding: 7px 18px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}
.topbar-search button:hover { opacity: 0.85; }
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
.topbar-btn {
    padding: 7px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    text-decoration: none;
}
.topbar-btn.login {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.topbar-btn.login:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.topbar-btn.register {
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
}
.topbar-btn.register:hover { opacity: 0.85; text-decoration: none; }

/* ---- 右栏容器 ---- */
.main {
    flex: 1;
    margin-left: 240px;
    padding-top: 56px;
    padding-bottom: 28px;
    padding-left: 32px;
    padding-right: 32px;
    min-width: 0;
}

/* ---- 右栏内部双列布局 ---- */
.main-cols {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}
.content-col {
    flex: 1;
    min-width: 0;
}
.sidebar-col {
    width: 300px;
    flex-shrink: 0;
}

/* ---- 右栏侧边栏组件 ---- */
.side-widget {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 20px;
}
.side-widget-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
}
.side-widget-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.side-widget-list a {
    font-size: 13px;
    color: var(--text-light);
    padding: 4px 0;
    transition: color 0.15s;
}
.side-widget-list a:hover { color: var(--accent); }
.side-widget .tag-cloud a { font-size: 12px; }

.page-header {
    margin-bottom: 24px;
}
.page-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
}
.breadcrumb {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 6px;
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { margin: 0 6px; color: var(--border); }

/* ---- 卡片网格 ---- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}
.card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.card-thumb {
    height: 140px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    color: #fff;
}
.card-body { padding: 16px 18px; }
.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.card-desc {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-light);
}

/* ---- 列表式 ---- */
.list-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 28px;
}
.list-item {
    display: flex;
    gap: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    cursor: pointer;
    transition: all 0.2s;
}
.list-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    border-color: var(--accent);
}
.list-thumb {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    flex-shrink: 0;
}
.list-body { flex: 1; min-width: 0; }
.list-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}
.list-desc {
    font-size: 13px;
    color: var(--text-light);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.list-meta {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-light);
}

/* ---- 文章详情 ---- */
.article {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 36px;
    margin-bottom: 28px;
}
.article h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 12px;
}
.article-meta {
    display: flex;
    gap: 18px;
    font-size: 13px;
    color: var(--text-light);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}
.article-body {
    font-size: 15px;
    line-height: 1.8;
    color: #2d3748;
}
.article-body p { margin-bottom: 14px; }

/* ---- 软件详情 ---- */
.soft-detail {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 36px;
    margin-bottom: 28px;
}
.soft-header {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}
.soft-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #fff;
    flex-shrink: 0;
}
.soft-info { flex: 1; }
.soft-info h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}
.soft-attrs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-size: 13px;
    color: var(--text-light);
}
.soft-attrs .attr { display: flex; gap: 4px; }
.soft-attrs .attr-label { color: var(--text-light); }
.soft-attrs .attr-value { color: var(--text); font-weight: 500; }

.soft-download {
    margin: 20px 0;
    padding: 16px 24px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff;
    border-radius: var(--radius);
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    display: inline-block;
    padding: 12px 40px;
}
.soft-download:hover { text-decoration: none; opacity: 0.9; }

.soft-body {
    font-size: 15px;
    line-height: 1.8;
    color: #2d3748;
}
.soft-body p { margin-bottom: 14px; }

/* ---- 分页 ---- */
.pager {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 28px 0;
}
.pager a {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text);
    background: var(--card-bg);
    transition: all 0.15s;
}
.pager a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pager a.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---- 标签云 ---- */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a {
    padding: 4px 12px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-light);
    background: var(--card-bg);
    transition: all 0.15s;
}
.tag-cloud a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ---- 友情链接 ---- */
.friend-links { display: flex; flex-direction: column; gap: 8px; }
.friend-links a {
    font-size: 13px;
    color: var(--text-light);
    padding: 4px 0;
}
.friend-links a:hover { color: var(--accent); }

/* ---- 内容区快捷卡片 ---- */
.content-cards {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.content-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 8px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s;
    cursor: pointer;
}
.content-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(59,130,246,0.12);
    transform: translateY(-2px);
    text-decoration: none;
}
.content-card-icon {
    font-size: 28px;
    line-height: 1;
}
.content-card-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    text-align: center;
}

/* ---- 快捷卡片 ---- */
.quick-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.quick-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.15s;
    cursor: pointer;
}
.quick-card:hover {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 2px 8px rgba(59,130,246,0.1);
    text-decoration: none;
}
.quick-icon {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}
.quick-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- 移动端 ---- */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    .sidebar-brand a, .sidebar-brand small,
    .nav-section-title, .nav-link span:not(.nav-icon),
    .sidebar-search, .sidebar-footer { display: none; }
    .topbar { margin-left: 60px; padding: 0 16px; gap: 8px; }
    .topbar-search input { max-width: none; }
    .topbar-btn { padding: 6px 12px; font-size: 12px; }
    .main { margin-left: 60px; padding: 20px 16px; }
    .main-cols { flex-direction: column; }
    .sidebar-col { width: 100%; }
    .card-grid { grid-template-columns: 1fr; }
    .article, .soft-detail { padding: 20px; }
    .soft-header { flex-direction: column; }
}
