/* demo-style.css - Demo 页面专属样式（无图片依赖） */

/* ===== 3.2 顶部标签页 ===== */
.demo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.demo-tab {
  width: 180px;
  height: 40px;
  background: #F5F7FA;
  color: #666;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.demo-tab:hover:not(.active) {
  background: #E8F3FF;
  color: #165DFF;
  cursor: pointer;
}
.demo-tab.active {
  background: #165DFF;
  color: #fff;
}
/* 移动端：横向滚动，选中项底部红色下划线 */
@media (max-width: 768px) {
  .demo-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .demo-tab { flex-shrink: 0; }
  .demo-tab.active {
    background: #F5F7FA;
    color: #165DFF;
    border-bottom: 2px solid #F53F3F;
  }
}

/* ===== 加载动效 ===== */
.demo-loading {
  display: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #165DFF;
  border-top-color: transparent;
  animation: demoSpin 0.8s linear infinite;
  margin: 10px auto;
}
.demo-loading.show { display: block; }
@keyframes demoSpin { to { transform: rotate(360deg); } }

/* ===== 卡片基础 ===== */
.demo-card {
  background: #F5F7FA;
  border: 1px solid #E5E6EB;
  border-radius: 8px;
  padding: 20px;
}
.demo-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin-bottom: 12px;
}

/* ===== 需求概览网格 ===== */
.demo-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.demo-overview-full { grid-column: 1 / -1; }
.demo-label {
  font-size: 12px;
  color: #999;
  display: block;
  margin-bottom: 3px;
}
.demo-value {
  font-size: 14px;
  color: #333;
  line-height: 1.5;
}
@media (max-width: 768px) {
  .demo-overview-grid { grid-template-columns: 1fr; }
}

/* ===== 平台匹配3列布局 ===== */
.demo-platform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 768px) {
  .demo-platform-grid { grid-template-columns: 1fr; }
}
.demo-platform-card {
  border: 1px solid #E5E6EB;
  border-radius: 8px;
  padding: 16px;
  background: white;
  transition: box-shadow 0.2s;
}
.demo-platform-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.demo-platform-card.preferred {
  border: 2px solid #165DFF;
  box-shadow: 0 4px 16px rgba(22,93,255,0.12);
}
.demo-platform-card .p-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #165DFF;
  color: white;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
}
.demo-platform-card .p-badge.alt {
  background: #999;
}
.demo-platform-card .p-name {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin-bottom: 6px;
}
.demo-platform-card .p-desc {
  font-size: 12px;
  color: #666;
  line-height: 1.5;
}

/* ===== 3.4 转化按钮区域 ===== */
.demo-cta-wrap {
  background: #E8F3FF;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  text-align: center;
}
.demo-cta-wrap > div {
  margin-bottom: 10px;
}
.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 40px;
  background: #F5F7FA;
  color: #165DFF;
  border-radius: 8px;
  border: 1px solid #165DFF;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-back:hover { background: #E8F3FF; }
.btn-cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 40px;
  background: #165DFF;
  color: white;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}
.btn-cta-primary:hover { background: #0E42C1; color: white; }
.btn-cta-primary:active { background: #0A3391; }
.demo-cta-note {
  font-size: 12px;
  color: #666;
  margin: 0;
}

/* ===== 平台标签 / 星级 ===== */
.p-tag-wrap {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.p-tag {
  display: inline-block;
  padding: 2px 7px;
  background: #F0F5FF;
  color: #165DFF;
  border-radius: 4px;
  font-size: 11px;
}
.platform-stars {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 6px;
}
.star {
  font-size: 14px;
  line-height: 1;
}
.star-full  { color: #FAAD14; }
.star-half  { color: #FAAD14; opacity: 0.6; }
.star-empty { color: #DDD; }
.star-score {
  font-size: 12px;
  color: #999;
  margin-left: 4px;
}
