/* lctjw.com 公共样式 v1.0 */

/* ========== 基础重置 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: #f5f7fa;
  color: #1e293b;
  min-height: 100vh;
  padding-top: 48px;
  line-height: 1.6;
}

/* ========== 导航栏 ========== */
.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 16px;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  white-space: nowrap;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.nav-bar a {
  color: #475569;
  text-decoration: none;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  margin: 0 1px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}

.nav-bar a:hover {
  background: #e2e8f0;
}

.nav-bar a.active {
  background: #2563eb;
  color: #ffffff;
  font-weight: 600;
}

.nav-bar .sep {
  color: #94a3b8;
  font-size: 12px;
  margin: 0 2px;
}

/* ========== 容器 ========== */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* ========== 页眉 ========== */
.header {
  background: linear-gradient(135deg, #f1f5f9 0%, #ffffff 100%);
  padding: 40px 32px 30px;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
}

.header h1 {
  font-size: 36px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.header p {
  color: #64748b;
  font-size: 15px;
  margin-top: 8px;
}

.header .tagline {
  color: #94a3b8;
  font-size: 13px;
  margin-top: 4px;
}

.page-header {
  background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
  padding: 18px 24px;
  border-bottom: 1px solid #e2e8f0;
}

.page-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}

.page-header .sub {
  color: #64748b;
  font-size: 12px;
  margin-top: 4px;
}

.page-header .date {
  color: #2563eb;
  font-size: 12px;
  margin-top: 2px;
}

/* ========== 区块标题 ========== */
.section-title {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 20px;
  padding-left: 12px;
  border-left: 3px solid #2563eb;
}

/* ========== 卡片网格 ========== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
  display: block;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.card:hover {
  transform: translateY(-3px);
  border-color: #93c5fd;
  box-shadow: 0 6px 20px rgba(37,99,235,0.1);
}

.card .icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.card h3 {
  font-size: 17px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 6px;
}

.card p {
  font-size: 13px;
  color: #64748b;
  line-height: 1.6;
}

.card .tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 10px;
  background: #f1f5f9;
  color: #64748b;
}

.card .tag-new {
  background: #ecfdf5;
  color: #16a34a;
}

.card .badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #2563eb;
  color: #ffffff;
  font-weight: 600;
}

.card .badge-warn {
  background: #f59e0b;
}

/* ========== 按钮 ========== */
.btn {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #1e293b;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.btn-primary {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.btn-primary:hover {
  background: #1d4ed8;
}

/* ========== 表格 ========== */
.wrap {
  overflow-x: auto;
  padding: 0 24px 16px;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: #ffffff;
  position: relative;
}

th {
  background: #f8fafc;
  color: #64748b;
  padding: 10px 8px;
  text-align: right;
  border-bottom: 2px solid #e2e8f0;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
  position: sticky;
  top: 48px;
  z-index: 5;
}

th:first-child {
  text-align: center;
  width: 40px;
}

th:hover {
  background: #f1f5f9;
}

td {
  padding: 8px;
  text-align: right;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}

td:first-child {
  text-align: center;
  color: #94a3b8;
  font-size: 11px;
}

td.n {
  text-align: left;
  font-weight: 500;
  color: #0f172a;
}

tr:hover {
  background: #fafbfc;
}

/* ========== 颜色工具类 ========== */
.up, .r { color: #ef5350; }
.down, .g { color: #10b981; }
.flat { color: #64748b; }

/* ========== 表单控件 ========== */
.controls {
  padding: 8px 24px;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.controls input,
.controls select {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #1e293b;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.controls input {
  flex: 1;
  min-width: 180px;
}

.controls input:focus,
.controls select:focus {
  border-color: #2563eb;
}

.controls span {
  color: #64748b;
  font-size: 12px;
}

/* ========== Tab标签页 ========== */
.tabs {
  display: flex;
  gap: 0;
  padding: 10px 24px 0;
  max-width: 1400px;
  margin: 0 auto;
}

.tab {
  padding: 10px 20px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-size: 13px;
  margin-right: -1px;
  transition: all 0.2s;
}

.tab.act {
  background: #f5f7fa;
  color: #2563eb;
  font-weight: 600;
  border-bottom: 1px solid #f5f7fa;
}

.tab:hover:not(.act) {
  background: #fafbfc;
}

/* ========== 统计卡片 ========== */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  padding: 16px 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.stat-card {
  background: #ffffff;
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.stat-card .num {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

.stat-card .label {
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ========== 图表容器 ========== */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 0 24px 14px;
  max-width: 1400px;
  margin: 0 auto;
}

.chart-box {
  background: #ffffff;
  border-radius: 8px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  min-height: 200px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.chart-box h3 {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 10px;
  font-weight: 600;
}

/* ========== 加载与错误状态 ========== */
.loading {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
  font-size: 14px;
}

.loading::before {
  content: '⏳';
  font-size: 32px;
  display: block;
  margin-bottom: 12px;
}

.error {
  text-align: center;
  padding: 40px 20px;
  color: #ef5350;
  font-size: 14px;
}

.error::before {
  content: '❌';
  font-size: 32px;
  display: block;
  margin-bottom: 12px;
}

/* ========== 返回顶部 ========== */
#backTop {
  position: fixed;
  bottom: 40px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
  border: none;
  font-size: 20px;
  cursor: pointer;
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
  transition: all 0.2s;
}

#backTop:hover {
  background: #1d4ed8;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(37,99,235,0.4);
}

/* ========== 关于区块 ========== */
.about {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid #e2e8f0;
  margin-bottom: 36px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.about h3 {
  font-size: 16px;
  color: #2563eb;
  margin-bottom: 12px;
}

.about p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.7;
}

.about ul {
  list-style: none;
  padding: 0;
  margin-top: 12px;
}

.about ul li {
  padding: 6px 0;
  font-size: 13px;
  color: #64748b;
}

.about ul li::before {
  content: "▸ ";
  color: #2563eb;
  font-weight: bold;
}

/* ========== 页脚 ========== */
footer {
  text-align: center;
  padding: 24px;
  color: #94a3b8;
  font-size: 12px;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}

footer a {
  color: #2563eb;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

.update-info {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: #94a3b8;
}

.update-info span {
  margin: 0 8px;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  body {
    padding-top: 48px;
  }
  
  .nav-bar {
    padding: 0 12px;
    justify-content: flex-start;
  }
  
  .nav-bar a {
    font-size: 12px;
    padding: 6px 10px;
  }
  
  .header h1 {
    font-size: 28px;
  }
  
  .container {
    padding: 24px 16px;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .charts-row {
    grid-template-columns: 1fr;
  }
  
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 12px 16px;
  }
  
  table {
    font-size: 11px;
  }
  
  th, td {
    padding: 6px 4px;
  }
  
  .controls {
    padding: 8px 16px;
  }
  
  .controls input {
    min-width: 100%;
  }
  
  #backTop {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .container {
    max-width: 720px;
  }
}

@media (min-width: 1400px) {
  .container {
    max-width: 1200px;
  }
  
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
