/*
Theme Name: 开源软件下载站
Theme URI: https://example.com/
Description: 专为软件下载站设计的WordPress主题，支持软件展示、多网盘下载链接、下载排行、软件分类等功能。
Version: 1.0.0
Author: WordPress主题开发者
Author URI: https://example.com/
License: GPL v2 or later
Text Domain: opensource-dl
*/

:root {
    --primary: #1890ff;
    --primary-dark: #096dd9;
    --success: #52c41a;
    --success-dark: #389e0d;
    --warning: #fa8c16;
    --danger: #f5222d;
    --bg-dark: #1a1a2e;
    --bg-darker: #16213e;
    --bg-light: #f5f6fa;
    --text: #333;
    --text-light: #666;
    --text-lighter: #999;
    --border: #e8e8e8;
    --white: #fff;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
    --radius: 8px;
    --radius-sm: 4px;
    --transition: all 0.3s ease;
    --container: 1200px;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:var(--font-family); font-size:14px; line-height:1.6; color:var(--text); background:var(--bg-light); min-width:320px; }
a { color:var(--primary); text-decoration:none; transition:var(--transition); }
a:hover { color:var(--primary-dark); }
ul,ol { list-style:none; }
img { max-width:100%; height:auto; }
.container { max-width:var(--container); margin:0 auto; padding:0 20px; }

.header { background:var(--white); box-shadow:0 1px 4px rgba(0,0,0,0.06); position:sticky; top:0; z-index:1000; }
.header-top { background:var(--bg-dark); color:#ccc; font-size:12px; padding:6px 0; }
.header-top .container { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; }
.header-top span { color:#aaa; }
.header-top-links { display:flex; gap:16px; }
.header-top-links a { color:#ccc; font-size:12px; }
.header-top-links a:hover { color:var(--white); }

.header-main { padding:16px 0; border-bottom:1px solid var(--border); }
.header-main .container { display:flex; align-items:center; gap:24px; flex-wrap:wrap; }
.logo { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.logo a { display:flex; align-items:center; gap:10px; color:var(--text); }
.logo-icon { font-size:36px; line-height:1; }
.logo h1 { font-size:22px; font-weight:700; color:var(--bg-dark); line-height:1.2; margin:0; }
.logo p { font-size:11px; color:var(--text-lighter); margin:0; letter-spacing:0.5px; }

.search-box { flex:1; max-width:480px; min-width:200px; }
.search-form { display:flex; border:2px solid var(--border); border-radius:24px; overflow:hidden; transition:var(--transition); background:var(--white); }
.search-form:focus-within { border-color:var(--primary); box-shadow:0 0 0 3px rgba(24,144,255,0.1); }
.search-form input { flex:1; border:none; outline:none; padding:10px 18px; font-size:14px; background:transparent; color:var(--text); }
.search-form input::placeholder { color:#bbb; }
.search-form button { background:var(--primary); color:var(--white); border:none; padding:10px 24px; cursor:pointer; font-size:14px; font-weight:500; transition:var(--transition); white-space:nowrap; }
.search-form button:hover { background:var(--primary-dark); }

.nav { background:var(--bg-dark); }
.nav .container { position:relative; }
.nav ul { display:flex; flex-wrap:wrap; }
.nav ul li { position:relative; }
.nav ul li > a { display:block; color:#ddd; padding:14px 18px; font-size:14px; font-weight:500; transition:var(--transition); white-space:nowrap; }
.nav ul li > a:hover,
.nav ul li.current-menu-item > a,
.nav ul li.current > a { color:var(--white); background:rgba(255,255,255,0.08); }
.nav ul li.current-menu-item > a,
.nav ul li.current > a { color:#fff; background:var(--primary); }
.nav ul li .sub-menu { display:none; position:absolute; top:100%; left:0; background:var(--white); min-width:160px; box-shadow:var(--shadow-hover); border-radius:0 0 var(--radius) var(--radius); z-index:999; overflow:hidden; }
.nav ul li:hover > .sub-menu { display:block; animation:fadeInDown 0.2s ease; }
.nav ul li .sub-menu li { border-bottom:1px solid #f0f0f0; }
.nav ul li .sub-menu li:last-child { border-bottom:none; }
.nav ul li .sub-menu a { color:var(--text); padding:10px 18px; font-size:13px; font-weight:400; display:block; }
.nav ul li .sub-menu a:hover { background:#f5f7fa; color:var(--primary); }
@keyframes fadeInDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }
.nav-toggle { display:none; background:none; border:none; color:#ddd; font-size:26px; cursor:pointer; padding:10px 14px; line-height:1; }
.nav-toggle:hover { color:#fff; }

.main { padding:28px 0; min-height:60vh; }
.main-content { display:flex; gap:28px; }
.content-wrap { flex:1; min-width:0; }
.sidebar { width:300px; flex-shrink:0; }

.section { background:var(--white); border-radius:var(--radius); box-shadow:var(--shadow); margin-bottom:24px; overflow:hidden; }
.section-header { display:flex; justify-content:space-between; align-items:center; padding:16px 20px; border-bottom:1px solid var(--border); }
.section-title { font-size:17px; font-weight:600; color:var(--text); position:relative; padding-left:14px; }
.section-title::before { content:''; position:absolute; left:0; top:50%; transform:translateY(-50%); width:4px; height:18px; background:var(--primary); border-radius:2px; }
.section-more { font-size:13px; color:var(--text-lighter); transition:var(--transition); }
.section-more:hover { color:var(--primary); }
.section-body { padding:20px; }

.software-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
.software-card { border:1px solid var(--border); border-radius:var(--radius); padding:20px 16px; text-align:center; transition:var(--transition); background:var(--white); display:flex; flex-direction:column; align-items:center; }
.software-card:hover { box-shadow:var(--shadow-hover); transform:translateY(-3px); border-color:transparent; }
.software-icon { font-size:48px; line-height:1; margin-bottom:10px; }
.software-icon img { width:56px; height:56px; object-fit:contain; border-radius:12px; }
.software-name { font-size:15px; font-weight:600; margin-bottom:6px; line-height:1.3; }
.software-name a { color:var(--text); }
.software-name a:hover { color:var(--primary); }
.software-desc { font-size:12px; color:var(--text-light); margin-bottom:10px; line-height:1.5; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; flex:1; }
.software-meta { display:flex; gap:10px; font-size:11px; color:var(--text-lighter); margin-bottom:12px; flex-wrap:wrap; justify-content:center; }
.software-download-btn { display:inline-block; background:var(--success); color:var(--white)!important; padding:8px 22px; border-radius:20px; font-size:13px; font-weight:500; transition:var(--transition); text-decoration:none; }
.software-download-btn:hover { background:var(--success-dark); transform:scale(1.03); }

.software-list { display:flex; flex-direction:column; gap:0; }
.software-item { display:flex; align-items:center; gap:16px; padding:16px 0; border-bottom:1px solid #f0f0f0; transition:var(--transition); }
.software-item:last-child { border-bottom:none; }
.software-item:hover { background:#fafbfc; margin:0 -20px; padding-left:20px; padding-right:20px; border-radius:var(--radius-sm); }
.software-item-icon { font-size:40px; flex-shrink:0; width:50px; text-align:center; }
.software-item-icon img { width:44px; height:44px; object-fit:contain; border-radius:10px; }
.software-item-info { flex:1; min-width:0; }
.software-item-name { font-size:15px; font-weight:600; margin-bottom:4px; }
.software-item-name a { color:var(--text); }
.software-item-name a:hover { color:var(--primary); }
.software-item-desc { font-size:12px; color:var(--text-light); margin-bottom:6px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; line-height:1.5; }
.software-item-meta { display:flex; gap:12px; font-size:11px; color:var(--text-lighter); flex-wrap:wrap; }
.software-item-download { flex-shrink:0; }
.download-btn { display:inline-block; background:var(--success); color:var(--white)!important; padding:8px 20px; border-radius:20px; font-size:13px; font-weight:500; transition:var(--transition); text-decoration:none; white-space:nowrap; }
.download-btn:hover { background:var(--success-dark); }

.rank-list { display:flex; flex-direction:column; }
.rank-item { display:flex; align-items:center; gap:10px; padding:9px 0; border-bottom:1px dashed #f0f0f0; font-size:13px; }
.rank-item:last-child { border-bottom:none; }
.rank-num { display:inline-flex; align-items:center; justify-content:center; width:24px; height:24px; border-radius:50%; font-size:12px; font-weight:700; flex-shrink:0; background:#e8e8e8; color:var(--text-light); }
.rank-item:nth-child(1) .rank-num { background:#ff4d4f; color:#fff; }
.rank-item:nth-child(2) .rank-num { background:#ff7a45; color:#fff; }
.rank-item:nth-child(3) .rank-num { background:#ffa940; color:#fff; }
.rank-name { flex:1; color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rank-name:hover { color:var(--primary); }
.rank-count { color:var(--text-lighter); font-size:11px; flex-shrink:0; }

.category-nav { display:flex; flex-wrap:wrap; gap:8px; }
.category-nav a { padding:6px 14px; border:1px solid var(--border); border-radius:20px; font-size:12px; color:var(--text-light); transition:var(--transition); white-space:nowrap; }
.category-nav a:hover,
.category-nav a.active { background:var(--primary); color:var(--white); border-color:var(--primary); }

.breadcrumb { font-size:13px; color:var(--text-lighter); margin-bottom:16px; padding:10px 0; }
.breadcrumb a { color:var(--text-light); }
.breadcrumb a:hover { color:var(--primary); }
.breadcrumb span { margin:0 6px; color:#ccc; }

.software-detail { background:var(--white); border-radius:var(--radius); box-shadow:var(--shadow); padding:28px; }
.detail-header { display:flex; gap:20px; padding-bottom:20px; border-bottom:1px solid var(--border); margin-bottom:20px; flex-wrap:wrap; }
.detail-icon { font-size:72px; line-height:1; flex-shrink:0; }
.detail-icon img { width:80px; height:80px; object-fit:contain; border-radius:16px; }
.detail-info { flex:1; min-width:200px; }
.detail-title { font-size:24px; font-weight:700; color:var(--text); margin-bottom:6px; line-height:1.3; }
.detail-subtitle { font-size:14px; color:var(--text-light); margin-bottom:14px; }
.detail-meta { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:8px 16px; font-size:13px; color:var(--text-light); }
.detail-meta-item span:first-child { color:var(--text-lighter); margin-right:4px; }

.alternative-box { display:flex; gap:14px; background:linear-gradient(135deg,#f6ffed 0%,#e6f7ff 100%); border:1px solid #b7eb8f; border-radius:var(--radius); padding:16px 20px; margin-bottom:20px; align-items:flex-start; }
.alternative-icon { font-size:28px; flex-shrink:0; }
.alternative-content h3 { font-size:15px; font-weight:600; color:#389e0d; margin-bottom:4px; }
.alternative-content p { font-size:13px; color:var(--text-light); margin-bottom:8px; line-height:1.5; }
.alternative-tags { display:flex; gap:8px; flex-wrap:wrap; }
.alt-tag { display:inline-block; padding:3px 10px; background:#fff; border:1px solid #b7eb8f; border-radius:12px; font-size:11px; color:#389e0d; font-weight:500; }

.detail-download-area { text-align:center; padding:24px; background:#fafbfc; border-radius:var(--radius); margin-bottom:24px; border:2px dashed #d9d9d9; }
.detail-download-btn { display:inline-block; background:var(--success); color:var(--white)!important; padding:14px 40px; border-radius:28px; font-size:17px; font-weight:600; transition:var(--transition); text-decoration:none; margin-bottom:12px; }
.detail-download-btn:hover { background:var(--success-dark); transform:translateY(-2px); box-shadow:0 6px 20px rgba(82,196,26,0.4); }
.detail-download-info { font-size:12px; color:var(--text-lighter); line-height:1.8; }

.detail-section { margin-bottom:24px; padding-bottom:20px; border-bottom:1px solid #f0f0f0; }
.detail-section:last-child { border-bottom:none; margin-bottom:0; padding-bottom:0; }
.detail-section-title { font-size:18px; font-weight:600; color:var(--text); margin-bottom:14px; padding-left:10px; border-left:3px solid var(--primary); }
.detail-content { font-size:14px; line-height:1.8; color:var(--text); }
.detail-content p { margin-bottom:10px; }
.detail-content ul,
.detail-content ol { padding-left:20px; list-style:disc; margin-bottom:10px; }
.detail-content ul li { list-style:disc; margin-bottom:4px; }

.feature-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:14px; }
.feature-item { display:flex; gap:12px; padding:14px; background:#fafbfc; border-radius:var(--radius); transition:var(--transition); }
.feature-item:hover { background:#f0f5ff; }
.feature-icon { font-size:26px; flex-shrink:0; line-height:1; }
.feature-content h4 { font-size:14px; font-weight:600; margin-bottom:4px; color:var(--text); }
.feature-content p { font-size:12px; color:var(--text-light); line-height:1.5; margin:0; }

.system-requirements { display:flex; flex-direction:column; gap:0; border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.sys-req-item { display:flex; border-bottom:1px solid #f0f0f0; }
.sys-req-item:last-child { border-bottom:none; }
.sys-req-label { width:120px; flex-shrink:0; padding:10px 16px; background:#fafbfc; font-weight:600; font-size:13px; color:var(--text); }
.sys-req-value { flex:1; padding:10px 16px; font-size:13px; color:var(--text-light); }

.screenshot-gallery { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.screenshot-item { aspect-ratio:16/10; border-radius:var(--radius); overflow:hidden; cursor:pointer; transition:var(--transition); background:#e8e8e8; display:flex; align-items:center; justify-content:center; }
.screenshot-item img { width:100%; height:100%; object-fit:cover; }
.screenshot-item:hover { transform:scale(1.03); box-shadow:var(--shadow-hover); }

.download-tips { background:#fffbe6; border:1px solid #ffe58f; border-radius:var(--radius-sm); padding:10px 16px; margin-bottom:16px; font-size:13px; color:#ad6800; }
.download-links-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:12px; margin-bottom:16px; }
.download-item { border:1px solid var(--border); border-radius:var(--radius); padding:16px; text-align:center; transition:var(--transition); }
.download-item:hover { box-shadow:var(--shadow-hover); border-color:var(--primary); }
.download-item-header { display:flex; align-items:center; justify-content:center; gap:6px; margin-bottom:6px; font-weight:600; font-size:14px; }
.download-icon { font-size:20px; }
.download-desc { font-size:11px; color:var(--text-lighter); margin-bottom:10px; }
.download-link-btn { display:inline-block; background:var(--primary); color:var(--white)!important; padding:7px 18px; border-radius:18px; font-size:12px; font-weight:500; transition:var(--transition); }
.download-link-btn:hover { background:var(--primary-dark); }
.download-notice { background:#f9f9f9; border-radius:var(--radius-sm); padding:14px 18px; font-size:12px; color:var(--text-light); }
.download-notice h4 { font-size:13px; margin-bottom:6px; color:var(--text); }
.download-notice ul { padding-left:16px; list-style:disc; }
.download-notice ul li { list-style:disc; margin-bottom:3px; }

.install-tutorial { display:flex; flex-direction:column; gap:0; }
.install-step { display:flex; gap:14px; padding:14px 0; border-bottom:1px dashed #e8e8e8; }
.install-step:last-child { border-bottom:none; }
.step-number { display:flex; align-items:center; justify-content:center; width:32px; height:32px; border-radius:50%; background:var(--primary); color:#fff; font-weight:700; font-size:14px; flex-shrink:0; }
.step-content h4 { font-size:14px; font-weight:600; margin-bottom:3px; }
.step-content p { font-size:13px; color:var(--text-light); margin:0; line-height:1.5; }

.pagination { display:flex; justify-content:center; gap:6px; margin-top:24px; flex-wrap:wrap; }
.pagination a,
.pagination span { display:inline-flex; align-items:center; justify-content:center; min-width:36px; height:36px; padding:0 10px; border:1px solid var(--border); border-radius:var(--radius-sm); font-size:13px; color:var(--text); background:var(--white); transition:var(--transition); }
.pagination a:hover { border-color:var(--primary); color:var(--primary); }
.pagination .current { background:var(--primary); color:#fff; border-color:var(--primary); font-weight:600; }

.error-404 { text-align:center; padding:60px 20px; background:var(--white); border-radius:var(--radius); box-shadow:var(--shadow); }
.error-404 h1 { font-size:80px; color:#d9d9d9; margin-bottom:10px; }
.error-404 h2 { font-size:22px; margin-bottom:10px; }
.error-404 p { color:var(--text-light); margin-bottom:20px; }

.footer { background:var(--bg-darker); color:#bbb; padding:40px 0 0; margin-top:40px; }
.footer-content { display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:30px; padding-bottom:30px; border-bottom:1px solid rgba(255,255,255,0.1); }
.footer h4 { color:#fff; font-size:15px; font-weight:600; margin-bottom:14px; }
.footer p { font-size:13px; line-height:1.7; margin-bottom:8px; }
.footer ul li { margin-bottom:8px; }
.footer ul li a { color:#bbb; font-size:13px; }
.footer ul li a:hover { color:#fff; }
.footer-bottom { text-align:center; padding:20px 0; font-size:12px; color:#888; }
.footer-bottom a { color:#aaa; margin:0 4px; }
.footer-bottom a:hover { color:#fff; }
.footer-bottom p { margin-bottom:6px; }

.notice-box { background:#fff7e6; border:1px solid #ffd591; border-radius:var(--radius); padding:12px 20px; margin-bottom:20px; color:#d46b08; font-size:13px; }

@media (max-width:1024px) {
    .software-grid { grid-template-columns:repeat(3,1fr); }
    .main-content { flex-direction:column; }
    .sidebar { width:100%; }
    .footer-content { grid-template-columns:1fr 1fr; gap:20px; }
    .screenshot-gallery { grid-template-columns:repeat(2,1fr); }
}
@media (max-width:768px) {
    .header-main .container { flex-direction:column; gap:12px; align-items:stretch; }
    .search-box { max-width:none; }
    .header-top .container { flex-direction:column; text-align:center; gap:4px; }
    .software-grid { grid-template-columns:repeat(2,1fr); }
    .nav ul { display:none; flex-direction:column; width:100%; }
    .nav ul.active { display:flex; }
    .nav-toggle { display:block; }
    .nav ul li .sub-menu { position:static; box-shadow:none; background:rgba(255,255,255,0.05); border-radius:0; }
    .nav ul li .sub-menu a { color:#ccc; padding-left:30px; }
    .detail-header { flex-direction:column; align-items:center; text-align:center; }
    .detail-meta { grid-template-columns:1fr 1fr; }
    .feature-list { grid-template-columns:1fr; }
    .footer-content { grid-template-columns:1fr; }
    .download-links-grid { grid-template-columns:1fr 1fr; }
    .sys-req-item { flex-direction:column; }
    .sys-req-label { width:100%; }
}
@media (max-width:480px) {
    .software-grid { grid-template-columns:1fr; }
    .software-item { flex-direction:column; text-align:center; }
    .detail-meta { grid-template-columns:1fr; }
    .download-links-grid { grid-template-columns:1fr; }
    .screenshot-gallery { grid-template-columns:1fr; }
}