/* ========== 基础重置 ========== */
*, *::before, *::after {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
-webkit-text-size-adjust: 100%;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
background: #0f1117;
color: #e0e0e0;
line-height: 1.6;
min-height: 100vh;
}
/* ========== 顶部栏 ========== */
.site-header {
position: sticky;
top: 0;
z-index: 100;
display: flex;
align-items: center;
justify-content: space-between;
padding: 14px 20px;
background: #0f1117;
border-bottom: 1px solid #2a2d3a;
gap: 16px;
}
.site-title {
font-size: 18px;
font-weight: 700;
color: #f0a030;
white-space: nowrap;
letter-spacing: 0.5px;
}
.search-box {
flex-shrink: 0;
}
.search-input {
width: 200px;
padding: 6px 12px;
background: #1a1d27;
border: 1px solid #2a2d3a;
border-radius: 4px;
color: #e0e0e0;
font-size: 14px;
outline: none;
transition: border-color 0.2s;
}
.search-input::placeholder {
color: #888888;
}
.search-input:focus {
border-color: #f0a030;
}
/* ========== 分类导航 ========== */
.cat-nav {
position: sticky;
top: 53px;
z-index: 99;
background: #0f1117;
border-bottom: 1px solid #2a2d3a;
}
.nav-scroll {
display: flex;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
padding: 0 20px;
}
.nav-scroll::-webkit-scrollbar {
display: none;
}
.nav-item {
flex-shrink: 0;
padding: 10px 16px;
font-size: 14px;
color: #888888;
text-decoration: none;
white-space: nowrap;
border-bottom: 2px solid transparent;
cursor: pointer;
transition: color 0.2s, border-color 0.2s;
}
.nav-item:hover {
color: #e0e0e0;
}
.nav-item.active {
color: #f0a030;
border-bottom-color: #f0a030;
}
/* ========== 主内容区 ========== */
.main-content {
max-width: 960px;
margin: 0 auto;
padding: 20px 16px 60px;
}
/* ========== 大类区块 ========== */
.category-section {
margin-bottom: 32px;
}
.category-title {
display: flex;
align-items: center;
gap: 8px;
padding: 12px 16px;
background: #1a1d27;
border: 1px solid #2a2d3a;
border-radius: 5px;
font-size: 16px;
font-weight: 700;
color: #f0a030;
cursor: pointer;
user-select: none;
}
.category-title:hover {
background: #1e2130;
}
.cat-count {
font-size: 13px;
font-weight: 400;
color: #888888;
}
.category-content {
padding-top: 8px;
}
/* ========== 枪械块 ========== */
.gun-block {
margin-top: 4px;
}
.gun-title {
display: flex;
align-items: center;
gap: 6px;
padding: 8px 16px;
font-size: 14px;
font-weight: 600;
color: #e0e0e0;
cursor: pointer;
user-select: none;
border-left: 2px solid #2a2d3a;
margin-left: 12px;
transition: border-color 0.2s;
}
.gun-title:hover {
border-left-color: #f0a030;
color: #f0a030;
}
.gun-content {
padding: 4px 0 8px 0;
}
/* ========== 小三角箭头（仅控制旋转，显示隐藏由 JS 负责） ========== */
.arrow {
display: inline-block;
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-top: 6px solid #888888;
transition: transform 0.2s;
flex-shrink: 0;
}
.category-title.collapsed .arrow,
.gun-title.collapsed .arrow {
transform: rotate(-90deg);
}
.category-title:hover .arrow,
.gun-title:hover .arrow {
border-top-color: #f0a030;
}
/* ========== 作者图标 ========== */
.author-icon {
flex-shrink: 0;
width: 18px;
height: 18px;
display: flex;
align-items: center;
justify-content: center;
background: transparent;
color: #666666;
font-size: 12px;
font-weight: bold;
border: 1px solid #444444;
border-radius: 3px;
cursor: pointer;
user-select: none;
line-height: 1;
}
.author-icon:hover {
color: #f0a030;
border-color: #f0a030;
}
/* ========== 改枪码行 ========== */
.code-row {
display: flex;
align-items: center;
gap: 10px;
padding: 8px 16px 8px 16px;
min-height: 40px;
}
.code-row:hover {
background: rgba(240, 160, 48, 0.04);
}
.code-label {
flex-shrink: 0;
width: 140px;
font-size: 13px;
color: #888888;
text-align: left;
line-height: 28px;
}
.code-text {
flex: 1;
font-family: "SF Mono", "Menlo", "Consolas", "Courier New", monospace;
font-size: 13px;
color: #c8d6e5;
background: #14161e;
padding: 6px 12px;
border-radius: 4px;
border: 1px solid #2a2d3a;
overflow-x: auto;
white-space: nowrap;
cursor: pointer;
transition: border-color 0.2s;
scrollbar-width: thin;
scrollbar-color: #2a2d3a transparent;
text-align: left;
line-height: 1.6;
height: 30px;
display: flex;
align-items: center;
}
.code-text::-webkit-scrollbar {
height: 3px;
}
.code-text::-webkit-scrollbar-track {
background: transparent;
}
.code-text::-webkit-scrollbar-thumb {
background: #2a2d3a;
border-radius: 2px;
}
.code-text:hover {
border-color: #f0a030;
}
/* ========== 复制按钮 ========== */
.copy-btn {
flex-shrink: 0;
padding: 6px 16px;
font-size: 12px;
color: #e0e0e0;
background: #1a1d27;
border: 1px solid #2a2d3a;
border-radius: 4px;
cursor: pointer;
white-space: nowrap;
transition: background 0.2s, border-color 0.2s, color 0.2s;
height: 30px;
line-height: 1;
}
.copy-btn:hover {
background: #f0a030;
color: #0f1117;
border-color: #f0a030;
}
.copy-btn.copied {
background: #2a6e2a;
color: #ffffff;
border-color: #2a6e2a;
}
/* ========== 作者弹窗 ========== */
.author-popup {
opacity: 0;
transform: translateY(-10px);
transition: opacity 0.2s, transform 0.2s;
z-index: 1000;
}
.author-popup.show {
opacity: 1;
transform: translateY(0);
}
.author-popup-content {
background: #1a1d27;
border: 1px solid #2a2d3a;
border-radius: 8px;
padding: 12px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
min-width: 160px;
}
.author-popup-title {
font-size: 12px;
color: #888888;
margin-bottom: 8px;
}
.author-popup-text {
font-size: 14px;
color: #e0e0e0;
font-weight: 500;
}
/* ========== 减弱动效偏好 ========== */
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
transition-duration: 0.01ms !important;
}
}