/* ========================================
   components.css - 通用组件样式
   ======================================== */

/* ===== Dashboard Panel ===== */
.dash-panel {
  background: #fff;
  border-radius: var(--radius-xl);
  border: 1px solid #eee;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,.03);
}

.dash-panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid #f0f0f0;
  background: linear-gradient(90deg, #fff, #fafafa);
}

.dash-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
}

.dash-panel-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--red-600), var(--red-500));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
}

/* Time Filters */
.dash-time-filters {
  display: flex;
  gap: 6px;
}

.time-filter {
  padding: 5px 14px;
  font-size: 13px;
  border-radius: var(--radius-full);
  color: #999;
  cursor: pointer;
  transition: all .25s;
  border: 1px solid transparent;
}

.time-filter.active {
  background: var(--red-600);
  color: #fff;
  border-color: var(--red-600);
}

.time-filter:hover:not(.active) {
  background: #fef2f2;
  color: var(--red-600);
  border-color: var(--red-200);
}

/* Metrics Grid */
.dash-metrics {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.dash-card {
  background: linear-gradient(145deg, #fff 0%, #fef9f9 100%);
  border: 1px solid var(--red-100);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.dash-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--red-600), var(--red-500));
}

.dash-card:hover {
  box-shadow: 0 8px 20px rgba(220,38,38,.1);
  transform: translateY(-2px);
  border-color: var(--red-200);
}

.dash-card-icon {
  display: none;
}

.dash-card-label {
  font-size: 12px;
  color: #888;
  font-weight: 500;
  display: block;
}

.dash-card-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--gray-800);
  font-family: 'SF Mono', 'Consolas', monospace;
  margin: 2px 0;
}

.dash-card-value-inline {
  font-size: 20px;
  font-weight: 800;
  color: var(--gray-800);
  font-family: 'SF Mono', 'Consolas', monospace;
  margin: 2px 0;
}

.dash-card-value-inline span {
  color: var(--red-600);
}

.dash-card-value-inline small {
  font-size: 13px;
  color: #999;
  font-weight: 400;
}

.dash-card-sub {
  font-size: 11px;
  color: #aaa;
  margin-top: 1px;
}

/* Chart Area */
.dash-charts {
  padding: 12px;
}

.dash-chart-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.dash-tab {
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 500;
  color: #666;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all .25s;
  border: 1px solid transparent;
}

.dash-tab.active {
  background: linear-gradient(135deg, var(--red-600), var(--red-500));
  color: #fff;
  animation: dashGlow 2s ease-in-out infinite;
}

.dash-tab:hover:not(.active) {
  background: #fef2f2;
  color: var(--red-600);
  border-color: var(--red-200);
}

.chart-container {
  height: 240px;
}

/* ===== Pricing Cards ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 1200px;
  margin: 0 auto;
}

.cabinet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.price-card,
.cabinet-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 18px 16px;
  border: 1px solid var(--red-200);
  transition: transform .3s, box-shadow .3s, border-color .3s;
  position: relative;
  overflow: hidden;
}

.price-card:hover,
.cabinet-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-red);
  border-color: var(--red-200);
}

.price-card-featured,
.cabinet-card-featured {
  border-color: var(--red-500);
  background: linear-gradient(145deg, #fff 0%, #fef9f9 100%);
}

.price-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, var(--red-600), var(--red-500));
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

.price-card-header {
  margin-bottom: 8px;
}

.price-card-name,
.cabinet-card-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-800);
  display: inline;
}

.price-card-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-left: 6px;
  vertical-align: middle;
}

.price-card-label-hot {
  background: rgba(220,38,38,.12);
  color: var(--red-600);
}

.price-card-label-premium {
  background: rgba(139,92,246,.12);
  color: #8b5cf6;
}

.price-card-label-popular {
  background: rgba(59,130,246,.12);
  color: #3b82f6;
}

.price-card-label-value {
  background: rgba(16,185,129,.12);
  color: #10b981;
}

.price-card-label-budget {
  background: rgba(245,158,11,.12);
  color: #f59e0b;
}

.price-card-label-classic {
  background: rgba(107,114,128,.12);
  color: #6b7280;
}

.price-card-price {
  text-align: left;
  font-size: 16px;
  font-weight: 700;
  color: var(--red-600);
  margin: 8px 0 6px;
}

.price-card-price small {
  font-size: 12px;
  font-weight: 500;
  color: #888;
}

.price-card-features {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.price-card-feature {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--gray-600);
}

.price-card-feature i {
  color: var(--red-600);
  font-size: 12px;
}

.price-card-stock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 11px;
  color: #888;
  border-top: 1px solid var(--gray-100);
}

.price-card-stock .gpu-stock {
  font-weight: 700;
  color: var(--red-600);
}

.price-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 9px 0;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  margin-top: 10px;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.price-card-btn-primary {
  background: linear-gradient(135deg, var(--red-600), var(--red-500));
  color: #fff;
  box-shadow: 0 4px 12px rgba(220,38,38,.15);
}

.price-card-btn-primary:hover {
  box-shadow: 0 6px 20px rgba(220,38,38,.3);
  transform: translateY(-1px);
}

.price-card-btn-secondary {
  border: 1.5px solid var(--red-600);
  color: var(--red-600);
  background: transparent;
}

.price-card-btn-secondary:hover {
  background: var(--red-50);
}

/* Cabinet Link */
.cabinet-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--red-600);
  font-weight: 600;
  font-size: 13px;
  margin-top: 12px;
  transition: var(--transition);
}

.cabinet-link:hover {
  gap: 8px;
}

.cabinet-link i {
  font-size: 11px;
}

/* ===== Network Cards ===== */
.network-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 1200px;
  margin: 0 auto;
}

.network-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 18px 16px;
  border: 1px solid var(--red-200);
  transition: transform .3s, box-shadow .3s;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

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

.network-card-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.network-card-bar-red {
  background: linear-gradient(90deg, var(--red-600), var(--red-500));
}

.network-card-bar-blue {
  background: linear-gradient(90deg, var(--blue-600), #42a5f5);
}

.network-card-bar-green {
  background: linear-gradient(90deg, var(--green-600), #34d399);
}

.network-card-bar-amber {
  background: linear-gradient(90deg, var(--amber-500), #fbbf24);
}

.network-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  font-size: 18px;
}

.network-card-icon-red {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  color: var(--red-600);
}

.network-card-icon-blue {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  color: var(--blue-600);
}

.network-card-icon-green {
  background: linear-gradient(135deg, #e6faf4, #d1fae5);
  color: var(--green-600);
}

.network-card-icon-amber {
  background: linear-gradient(135deg, #fefce8, #fef3c7);
  color: var(--amber-500);
}

.network-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 4px;
}

.network-card > p {
  font-size: 11px;
  color: var(--gray-500);
  line-height: 1.6;
  margin-bottom: 10px;
}

.network-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.network-card li {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #444;
}

.network-card li i {
  font-size: 11px;
}

.network-card-bar-red ~ * li i { color: var(--red-600); }
.network-card-bar-blue ~ * li i { color: var(--blue-600); }
.network-card-bar-green ~ * li i { color: var(--green-600); }
.network-card-bar-amber ~ * li i { color: var(--amber-500); }

.network-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  font-size: 12px;
  margin-top: 10px;
  transition: var(--transition);
}

.network-link:hover {
  gap: 8px;
}

.network-link i {
  font-size: 10px;
}

.network-link-red { color: var(--red-600); }
.network-link-blue { color: var(--blue-600); }
.network-link-green { color: var(--green-600); }
.network-link-amber { color: var(--amber-500); }

/* ===== FAQ Cards ===== */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 1200px;
  margin: 0 auto;
}

.faq-card {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--red-100);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.faq-card:hover {
  box-shadow: 0 8px 20px rgba(220,38,38,.1);
  transform: translateY(-2px);
  border-color: var(--red-200);
}

.faq-card-bar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--red-600), var(--red-500));
}

.faq-card-content {
  padding: 14px 16px 14px 22px;
}

.faq-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  color: var(--red-600);
  font-size: 13px;
}

.faq-card-content h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 6px;
}

.faq-card-content p {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.6;
}

/* ===== Partners ===== */
.partners-track-wrapper {
  overflow: hidden;
  margin-top: 16px;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.partners-track {
  display: flex;
  gap: 0;
  animation: partnerScroll 30s linear infinite;
  white-space: nowrap;
}

@keyframes partnerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.partners-track:hover {
  animation-play-state: paused;
}

.partner-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  height: 56px;
  padding: 8px 24px;
  margin: 0 8px;
  background: #fafafa;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
  white-space: nowrap;
}

.partner-item:hover {
  background: #fff;
  border-color: var(--red-200);
  color: var(--red-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-red);
}

/* ===== Footer ===== */
.footer {
  background: var(--gray-800);
  color: #fff;
  padding: 36px 0 20px;
}

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

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-logo-img {
  width: 24px;
  height: 24px;
}

.footer-brand p {
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.7;
}

.footer-links h4,
.footer-contact h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #fff;
}

.footer-links a {
  display: block;
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 8px;
  transition: var(--transition);
}

.footer-links a:hover {
  color: #fff;
}

.footer-contact p {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-contact i {
  color: var(--red-500);
  width: 14px;
  text-align: center;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 18px;
  text-align: center;
  font-size: 12px;
  color: #6b7280;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .network-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .faq-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .dash-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .dash-card {
    padding: 10px 12px;
  }
  .dash-card-value {
    font-size: 18px;
  }
  .dash-card-value-inline {
    font-size: 16px;
  }
  .chart-container {
    height: 200px;
  }
  .dash-tab {
    padding: 6px 14px;
    font-size: 11px;
  }
  .time-filter {
    padding: 4px 10px;
    font-size: 11px;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .cabinet-grid {
    grid-template-columns: 1fr;
  }
  .network-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .faq-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .faq-card-content {
    padding: 12px 14px 12px 20px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }
  .footer-logo {
    justify-content: center;
  }
  .footer-contact p {
    justify-content: center;
  }
  .partner-item {
    min-width: 110px;
    height: 44px;
    padding: 6px 14px;
    font-size: 12px;
  }
}
