/* 及简乐享 Demo - 组件样式 */

/* 统计卡片 */
.stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  min-width: 0;
}

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

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-info { min-width: 0; }
.stat-value { font-size: 22px; font-weight: 700; line-height: 1.3; }
.stat-label { font-size: 13px; color: var(--text-muted); }
.stat-trend { font-size: 12px; margin-left: auto; font-weight: 500; }
.stat-trend.up { color: var(--success-color); }
.stat-trend.down { color: var(--danger-color); }

/* 列表项 */
.list-container {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.list-item:last-child { border-bottom: none; }
.list-item.clickable { cursor: pointer; }
.list-item.clickable:hover { background: var(--bg-hover); }

.list-item-avatar { flex-shrink: 0; }

.list-item-content { flex: 1; min-width: 0; }

.list-item-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.list-item-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.list-item-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.list-item-extra {
  flex-shrink: 0;
  text-align: right;
  font-size: 13px;
  color: var(--text-secondary);
}

.pin-badge {
  display: inline-block;
  padding: 1px 6px;
  background: #ff7a00;
  color: #fff;
  font-size: 11px;
  border-radius: 3px;
  font-weight: 500;
  flex-shrink: 0;
}

/* 标签栏 */
.tab-bar {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  flex-wrap: nowrap;
}

.tab-btn {
  padding: 8px 18px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
  font-family: inherit;
}

.tab-btn:hover { color: var(--primary-color); background: var(--bg-hover); }
.tab-btn.active { color: #fff; background: var(--primary-color); font-weight: 500; }

/* 工具栏 */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.toolbar-left { display: flex; align-items: center; gap: 12px; flex: 1; }
.toolbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* 搜索框 */
.search-box {
  position: relative;
  max-width: 320px;
  flex: 1;
}

.search-input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(24,144,255,0.2);
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
}

/* 柱状图 */
.bar-chart {
  position: relative;
}

.bar-chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 100%;
  padding: 20px 0 24px;
  gap: 8px;
}

.bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.bar-value {
  font-size: 11px;
  color: var(--text-muted);
}

.bar {
  width: 100%;
  max-width: 48px;
  border-radius: 4px 4px 0 0;
  transition: height 0.5s ease;
  min-height: 4px;
}

.bar-label {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* 环形进度 */
.circle-progress { vertical-align: middle; }

/* 分页器 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
}

.page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition);
}

.page-btn:hover:not(:disabled) { border-color: var(--primary-color); color: var(--primary-color); }
.page-btn.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-ellipsis { color: var(--text-muted); }

/* 数据表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-hover); }

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.status-dot.active { background: var(--success-color); }
.status-dot.inactive { background: var(--text-muted); }

/* 功能特性卡片 */
.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

.feature-list li:last-child { border-bottom: none; }

.feature-cards {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.feature-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: var(--transition);
}

.feature-card:hover {
  border-color: var(--primary-color);
  background: var(--primary-light);
}

.feature-icon { font-size: 18px; }

/* 评分星星 */
.rating-input {
  display: flex;
  gap: 4px;
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.rating-star {
  cursor: pointer;
  font-size: 24px;
}

.rating-star span {
  color: #ddd;
  transition: var(--transition);
}

.rating-star input { display: none; }
.rating-star input:checked ~ span,
.rating-star:hover span,
.rating-star:hover ~ .rating-star span {
  color: #faad14;
}

/* 标签选择器 */
.tag-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-option {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition);
}

.tag-option:hover { border-color: var(--primary-color); }
.tag-option input:checked + .tag-option,
.tag-option:has(input:checked) {
  background: var(--primary-light);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}

/* 详情表 */
.detail-table {
  width: 100%;
  border-collapse: collapse;
}

.detail-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.detail-table td:first-child {
  font-weight: 500;
  color: var(--text-secondary);
  width: 120px;
}

/* 热门排名 */
.hot-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  color: #fff;
}

.rank-1 { background: #f5222d; }
.rank-2 { background: #fa8c16; }
.rank-3 { background: #faad14; }
