/* ============================================
   改枪码网站 - 主样式
   风格：工业机械 + 游戏HUD
   ============================================ */

:root {
  --bg:        #0a0c0f;
  --bg2:       #111318;
  --bg3:       #181c24;
  --surface:   #1e2330;
  --surface2:  #252b3b;
  --border:    rgba(255,255,255,0.08);
  --border2:   rgba(255,255,255,0.15);
  
  --accent:    #e8a020;
  --accent2:   #f0c060;
  --accent-dim:#7a5010;
  
  --cyan:      #20c8e8;
  --cyan-dim:  #104868;
  
  --text:      #e0e4f0;
  --text2:     #8a90a8;
  --text3:     #4a5068;
  
  --green:     #40d080;
  --red:       #e84040;
  
  --radius:    8px;
  --radius-lg: 14px;
  --font-mono: 'Share Tech Mono', 'Courier New', monospace;
  --font-ui:   'Noto Sans SC', sans-serif;
  
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --glow-accent: 0 0 20px rgba(232,160,32,0.15);
  --glow-cyan:   0 0 20px rgba(32,200,232,0.12);
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
img { max-width: 100%; }

/* ===== 容器 ===== */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,12,15,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}
.logo-icon {
  font-size: 1.4rem;
  animation: spin-slow 8s linear infinite;
}
@keyframes spin-slow { to { transform: rotate(360deg); } }
.logo-text { color: var(--text); }

.main-nav { display: flex; gap: 4px; }
.nav-link {
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text2);
  transition: all 0.2s;
}
.nav-link:hover, .nav-link.active { 
  color: var(--text); 
  background: var(--surface);
}
.nav-admin {
  border: 1px solid var(--border2);
  color: var(--accent) !important;
}
.nav-admin:hover { background: var(--accent-dim) !important; }
.mobile-menu-btn { display: none; font-size: 1.4rem; color: var(--text); padding: 8px; }

/* ===== 英雄区域 ===== */
.hero {
  position: relative;
  padding: 80px 0 60px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
}
.hero-grid {
  width: 100%; height: 100%;
  background-image: 
    linear-gradient(rgba(232,160,32,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,160,32,0.04) 1px, transparent 1px);
  background-size: 50px 50px;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(transparent, var(--bg));
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 30px;
  border: 1px solid rgba(232,160,32,0.3);
  background: rgba(232,160,32,0.08);
  color: var(--accent2);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
}
.hero-title {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.hero-title .highlight {
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1rem;
  color: var(--text2);
  margin-bottom: 36px;
}
.hero-sub strong { color: var(--accent2); }

/* ===== 搜索框 ===== */
.search-box {
  position: relative;
  max-width: 600px;
  margin: 0 auto 28px;
}
.search-input-wrap {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 50px;
  padding: 4px 4px 4px 20px;
  transition: all 0.3s;
}
.search-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: var(--glow-accent);
}
.search-icon { font-size: 1.1rem; margin-right: 10px; color: var(--text3); }
.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font-ui);
  padding: 10px 0;
}
.search-input::placeholder { color: var(--text3); }
.search-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface2);
  color: var(--text2);
  font-size: 0.85rem;
  margin-right: 8px;
  transition: all 0.2s;
}
.search-clear:hover { background: var(--red); color: white; }

/* 搜索下拉 */
.search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  z-index: 50;
  max-height: 380px;
  overflow-y: auto;
}
.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--surface); }
.sri-main { display: flex; align-items: center; gap: 10px; }
.sri-name { font-weight: 500; }
.sri-en { font-size: 0.82rem; color: var(--text3); }
.sri-meta { display: flex; align-items: center; gap: 10px; }
.sri-cat {
  font-size: 0.78rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--surface2);
  color: var(--text2);
}
.sri-count { font-size: 0.82rem; color: var(--cyan); font-family: var(--font-mono); }
.search-empty { padding: 20px; text-align: center; color: var(--text3); }

/* ===== 平台标签 ===== */
.platform-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.platform-tab {
  padding: 8px 20px;
  border-radius: 30px;
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--text2);
  font-size: 0.9rem;
  transition: all 0.2s;
}
.platform-tab:hover { border-color: var(--accent); color: var(--accent); }
.platform-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  font-weight: 600;
}

/* ===== 通用区块 ===== */
.section { padding: 60px 0; }
.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title::before {
  content: '';
  display: block;
  width: 4px; height: 22px;
  background: var(--accent);
  border-radius: 2px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.section-header .section-title { margin-bottom: 0; }

/* ===== 分类网格 ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.25s;
  text-align: center;
}
.category-card:hover {
  background: var(--surface2);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--glow-accent);
}
.cat-icon { font-size: 1.8rem; }
.cat-name { font-size: 0.9rem; font-weight: 500; color: var(--text2); }
.category-card:hover .cat-name { color: var(--accent2); }

/* ===== 枪型卡片 ===== */
.guns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.guns-grid-sm { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

.gun-card {
  display: block;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all 0.25s;
  overflow: hidden;
}
.gun-card:hover {
  border-color: var(--cyan-dim);
  background: var(--surface2);
  transform: translateY(-2px);
  box-shadow: var(--glow-cyan);
}
.gun-card-inner { padding: 18px; }
.gun-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.gun-info { flex: 1; min-width: 0; }
.gun-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.gun-name-en {
  font-size: 0.78rem;
  color: var(--text3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-mono);
}
.gun-meta-right { flex-shrink: 0; margin-left: 8px; }
.gun-category {
  display: inline-block;
  padding: 3px 9px;
  font-size: 0.75rem;
  border-radius: 4px;
  background: rgba(232,160,32,0.12);
  color: var(--accent2);
  border: 1px solid rgba(232,160,32,0.2);
}
.gun-footer { 
  display: flex; 
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.gun-brand { font-size: 0.8rem; color: var(--text3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100px; }
.gun-code-count { 
  display: flex; 
  align-items: baseline; 
  gap: 4px; 
  margin-left: auto;
}
.count-num { 
  font-size: 1.2rem; 
  font-weight: 700; 
  color: var(--cyan);
  font-family: var(--font-mono);
}
.count-label { font-size: 0.75rem; color: var(--text3); }

/* ===== 筛选 ===== */
.filter-bar select {
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 0.88rem;
  cursor: pointer;
}
.active-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(32,200,232,0.08);
  border: 1px solid rgba(32,200,232,0.2);
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: var(--cyan);
}
.active-filter button {
  margin-left: auto;
  color: var(--text2);
  font-size: 0.85rem;
  padding: 4px 10px;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
}
.active-filter button:hover { color: var(--red); border-color: var(--red); }

/* ===== 加载更多 ===== */
.load-more-wrap { text-align: center; margin-top: 36px; }
.btn-load-more {
  padding: 12px 36px;
  border-radius: 30px;
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  transition: all 0.2s;
}
.btn-load-more:hover:not(:disabled) { 
  border-color: var(--accent);
  color: var(--accent);
}
.btn-load-more:disabled { opacity: 0.4; cursor: default; }

/* ===== 使用说明 ===== */
.howto-section { background: var(--bg2); }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.step-card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.step-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  opacity: 0;
  transition: opacity 0.3s;
}
.step-card:hover::before { opacity: 1; }
.step-num {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text3);
  margin-bottom: 12px;
  letter-spacing: -0.05em;
}
.step-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: var(--text);
}
.step-card p { font-size: 0.9rem; color: var(--text2); line-height: 1.7; }

/* ===== 面包屑 ===== */
.breadcrumb-bar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text3);
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span:last-child { color: var(--text2); }

/* ===== 武器详情英雄 ===== */
.gun-hero {
  padding: 48px 0 36px;
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.gun-hero-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}
.gun-badges { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 500;
}
.badge-cat {
  background: rgba(232,160,32,0.12);
  color: var(--accent2);
  border: 1px solid rgba(232,160,32,0.25);
}
.badge-brand {
  background: var(--surface);
  color: var(--text2);
  border: 1px solid var(--border2);
}
.gun-detail-name {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.gun-detail-en {
  font-size: 1rem;
  color: var(--text3);
  font-family: var(--font-mono);
  margin-bottom: 14px;
}
.gun-detail-desc { font-size: 0.95rem; color: var(--text2); max-width: 600px; margin-bottom: 24px; }
.gun-stats-row { display: flex; gap: 24px; }
.gun-stat { text-align: center; }
.stat-num { display: block; font-size: 1.8rem; font-weight: 700; color: var(--cyan); font-family: var(--font-mono); }
.stat-lbl { font-size: 0.8rem; color: var(--text3); }

.gun-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}
.btn-copy-all, .btn-share {
  padding: 12px 22px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-copy-all {
  background: var(--accent);
  color: var(--bg);
}
.btn-copy-all:hover { background: var(--accent2); transform: scale(1.02); }
.btn-share {
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--text2);
}
.btn-share:hover { border-color: var(--cyan); color: var(--cyan); }

/* ===== 平台筛选条 ===== */
.platform-filter-bar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  position: sticky;
  top: 58px;
  z-index: 50;
}
.platform-filter-bar .container { 
  display: flex; 
  gap: 8px;
  flex-wrap: wrap;
}
.pf-tab {
  padding: 7px 18px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text2);
  font-size: 0.85rem;
  transition: all 0.2s;
}
.pf-tab:hover { border-color: var(--accent); color: var(--accent); }
.pf-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  font-weight: 600;
}

/* ===== 改枪码列表 ===== */
.codes-section { padding: 40px 0 60px; }
.platform-group { margin-bottom: 40px; }
.platform-group-title { margin-bottom: 16px; }
.platform-badge {
  display: inline-block;
  padding: 5px 16px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.codes-list { display: flex; flex-direction: column; gap: 12px; }
.code-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  transition: border-color 0.2s;
}
.code-item:hover { border-color: var(--border2); }
.code-item-header { margin-bottom: 12px; }
.code-purpose { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.purpose-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(64,208,128,0.1);
  border: 1px solid rgba(64,208,128,0.2);
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 500;
}
.code-desc { font-size: 0.88rem; color: var(--text2); }

.code-block {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.code-text {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent2);
  word-break: break-all;
  letter-spacing: 0.03em;
}
.copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text2);
  font-size: 0.85rem;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}
.copy-btn:hover { 
  background: var(--accent); 
  border-color: var(--accent); 
  color: var(--bg);
}
.copy-btn.copied {
  background: var(--green);
  border-color: var(--green);
  color: var(--bg);
}
.copy-icon { font-size: 1rem; }

.code-notes {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(232,200,32,0.06);
  border-left: 3px solid var(--accent-dim);
  border-radius: 0 6px 6px 0;
  font-size: 0.85rem;
  color: var(--text2);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.notes-icon { flex-shrink: 0; }

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text3);
}
.btn-back {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 24px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text2);
  transition: all 0.2s;
}
.btn-back:hover { border-color: var(--accent); color: var(--accent); }

/* ===== 相关武器 ===== */
.related-section { padding: 40px 0 60px; background: var(--bg2); }

/* ===== 页脚 ===== */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.footer-inner { text-align: center; }
.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 10px;
}
.footer-note, .footer-update {
  font-size: 0.82rem;
  color: var(--text3);
  margin-top: 4px;
}

/* ===== Toast提示 ===== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--green);
  color: var(--bg);
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
  z-index: 1000;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== 管理员区域 ===== */
.admin-layout {
  min-height: 100vh;
  display: flex;
}
.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 24px 0;
}
.admin-main { flex: 1; overflow: auto; padding: 32px; }
.admin-sidebar .logo { padding: 0 20px 20px; border-bottom: 1px solid var(--border); display: flex; }
.admin-nav { padding: 12px 0; }
.admin-nav-link {
  display: block;
  padding: 10px 20px;
  color: var(--text2);
  font-size: 0.9rem;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.admin-nav-link:hover { background: var(--surface); color: var(--text); }
.admin-nav-link.active { 
  color: var(--accent); 
  background: rgba(232,160,32,0.08);
  border-left-color: var(--accent);
}

/* ===== 统计卡片 ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.stat-card-num { 
  font-size: 2rem; 
  font-weight: 700; 
  font-family: var(--font-mono);
  color: var(--accent);
}
.stat-card-lbl { font-size: 0.85rem; color: var(--text2); margin-top: 4px; }

/* ===== 表单 ===== */
.form-group { margin-bottom: 18px; }
.form-label { display: block; margin-bottom: 6px; font-size: 0.88rem; color: var(--text2); }
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  padding: 10px 14px;
  transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-textarea { min-height: 100px; resize: vertical; }
.btn-primary {
  padding: 11px 28px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
  transition: all 0.2s;
}
.btn-primary:hover { background: var(--accent2); }
.btn-secondary {
  padding: 11px 20px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text2);
  font-size: 0.9rem;
  border-radius: var(--radius);
  transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--text); color: var(--text); }
.btn-danger {
  padding: 8px 16px;
  background: rgba(232,64,64,0.12);
  border: 1px solid rgba(232,64,64,0.3);
  color: var(--red);
  font-size: 0.85rem;
  border-radius: var(--radius);
  transition: all 0.2s;
}
.btn-danger:hover { background: var(--red); color: white; }

/* ===== 数据表格 ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table th {
  text-align: left;
  padding: 12px 16px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border2);
  color: var(--text2);
  font-weight: 500;
  white-space: nowrap;
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.data-table tr:hover td { background: var(--surface); }
.code-cell {
  font-family: var(--font-mono);
  color: var(--accent2);
  font-size: 0.85rem;
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== 上传区 ===== */
.upload-zone {
  border: 2px dashed var(--border2);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--accent);
  background: rgba(232,160,32,0.04);
}
.upload-icon { font-size: 3rem; margin-bottom: 16px; }
.upload-text { color: var(--text2); margin-bottom: 8px; }
.upload-hint { font-size: 0.82rem; color: var(--text3); }

/* ===== 消息提示 ===== */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-success { background: rgba(64,208,128,0.1); border: 1px solid rgba(64,208,128,0.3); color: var(--green); }
.alert-error { background: rgba(232,64,64,0.1); border: 1px solid rgba(232,64,64,0.3); color: var(--red); }
.alert-info { background: rgba(32,200,232,0.08); border: 1px solid rgba(32,200,232,0.2); color: var(--cyan); }

/* ===== 分页 ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.page-btn {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--text2);
  font-size: 0.88rem;
  transition: all 0.2s;
  padding: 0 10px;
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }
.page-btn:disabled { opacity: 0.3; cursor: default; }

/* ===== 卡片容器 ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}
.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 18px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title::before {
  content: '';
  display: inline-block;
  width: 3px; height: 18px;
  background: var(--accent);
  border-radius: 2px;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .hero { padding: 50px 0 40px; }
  .hero-title { font-size: 1.9rem; }
  .main-nav { display: none; }
  .mobile-menu-btn { display: block; }
  
  .gun-hero-inner { flex-direction: column; }
  .gun-hero-actions { flex-direction: row; }
  
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); padding: 12px 0; }
  .admin-nav { display: flex; overflow-x: auto; padding: 0 12px; }
  .admin-nav-link { white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; }
  .admin-main { padding: 20px; }
  
  .guns-grid { grid-template-columns: 1fr 1fr; }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  
  .code-block { flex-direction: column; align-items: stretch; }
  .copy-btn { width: 100%; justify-content: center; }
}
@media (max-width: 480px) {
  .guns-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
}
