/* ============================================
   塑交所 PC端 - 全局样式
   ============================================ */

/* CSS变量 */
:root {
  --primary-color: #2B7DE9;
  --primary-dark: #1a5fc4;
  --accent-color: #ff8c00;
  --success-color: #27ae60;
  --warning-color: #f39c12;
  --danger-color: #e74c3c;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-light: #f5f7fa;
  --bg-white: #ffffff;
  --border-color: #e8e8e8;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* 重置样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-light);
  line-height: 1.6;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-dark);
}

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

/* ============================================
   顶部导航
   ============================================ */
.site-header {
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
}

.logo-icon {
  font-size: 28px;
}

.main-nav {
  display: flex;
  gap: 32px;
}

.nav-link {
  color: var(--text-primary);
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.header-actions {
  display: flex;
  gap: 12px;
}

/* ============================================
   按钮
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

/* ============================================
   Hero区域
   ============================================ */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 60px 0;
}

.hero-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 32px;
}

/* 搜索框 */
.search-box {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
}

.search-type {
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: rgba(255,255,255,0.9);
  cursor: pointer;
}

.search-box input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.search-box .btn {
  padding: 12px 32px;
}

/* 数据概览 */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat-card {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  display: block;
}

.stat-unit {
  font-size: 14px;
  margin-left: 4px;
}

.stat-label {
  font-size: 13px;
  opacity: 0.8;
  display: block;
  margin-top: 4px;
}

/* ============================================
   快捷入口
   ============================================ */
.quick-access {
  padding: 40px 0;
}

.access-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.access-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
}

.access-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.access-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 12px;
}

.access-title {
  font-size: 16px;
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}

.access-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================
   通用Section
   ============================================ */
.section {
  padding: 40px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
}

.section-more {
  font-size: 14px;
  color: var(--text-muted);
}

.section-more:hover {
  color: var(--primary-color);
}

/* ============================================
   报价卡片
   ============================================ */
.quotes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.quote-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
}

.quote-card:hover {
  box-shadow: var(--shadow-md);
}

.quote-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.quote-model {
  font-size: 16px;
  font-weight: 600;
}

.quote-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--danger-color);
}

.quote-company {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.quote-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================
   新闻列表
   ============================================ */
.news-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.news-tab {
  padding: 8px 16px;
  border: none;
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.news-tab.active {
  background: var(--primary-color);
  color: white;
}

.news-list {
  display: grid;
  gap: 12px;
}

.news-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-white);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  transition: all 0.2s;
}

.news-item:hover {
  box-shadow: var(--shadow-sm);
}

.news-tag {
  padding: 4px 8px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.news-title {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
}

.news-date {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================
   企业卡片
   ============================================ */
.companies-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.company-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
}

.company-card:hover {
  box-shadow: var(--shadow-md);
}

.company-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.company-type {
  display: inline-block;
  padding: 4px 8px;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.company-info {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================
   页脚
   ============================================ */
.site-footer {
  background: #1a1a2e;
  color: white;
  padding: 40px 0 20px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 30px;
}

.footer-col h3 {
  font-size: 16px;
  margin-bottom: 16px;
}

.footer-col p {
  font-size: 13px;
  opacity: 0.7;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: rgba(255,255,255,0.7);
  font-size: 13px;
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
  opacity: 0.5;
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 768px) {
  .main-nav {
    display: none;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .access-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .quotes-grid {
    grid-template-columns: 1fr;
  }

  .companies-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
