/**
 * @file
 * 火彩商城 - 大师团队页面样式
 * 参考 tea-garden.css 设计
 */

/* ========== 大师团队页面容器 ========== */
.master-team-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 136px 16px 100px;
}

/* ========== 页面头部 ========== */
.page-header {
  background: linear-gradient(135deg, #7B1FA2 0%, #4A148C 100%);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  color: white;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-subtitle {
  font-size: 14px;
  opacity: 0.9;
}

/* ========== 搜索区块 ========== */
.search-section-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.search-results-info {
  margin-top: 12px;
  font-size: 13px;
  color: #6E6E73;
}

.search-results-info #resultsCount {
  font-weight: 600;
  color: #7B1FA2;
}

.search-input-box {
  display: flex;
  gap: 8px;
}

.search-input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border: 1.5px solid rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: #7B1FA2;
}

.search-btn {
  padding: 11px 18px;
  background: #7B1FA2;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.search-btn:hover {
  background: #4A148C;
}

/* ========== 筛选区域 ========== */
.filter-section {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.filter-group {
  margin-bottom: 16px;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1D1D1F;
  margin-bottom: 12px;
}

.filter-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tag {
  padding: 8px 16px;
  background: white;
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: #6E6E73;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.filter-tag:hover {
  border-color: #7B1FA2;
  color: #7B1FA2;
}

.filter-tag.active {
  background: #7B1FA2;
  border-color: #7B1FA2;
  color: white;
}

/* ========== 大师列表 ========== */
.master-list {
  display: grid;
  gap: 16px;
}

.master-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.master-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.master-header {
  display: flex;
  padding: 20px;
  gap: 16px;
}

.master-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #CE93D8 0%, #AB47BC 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.master-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.master-info {
  flex: 1;
  min-width: 0;
}

.master-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #1D1D1F;
}

.master-title {
  font-size: 13px;
  color: #7B1FA2;
  font-weight: 500;
  margin-bottom: 8px;
}

.master-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.master-badge {
  padding: 4px 10px;
  background: #F3E5F5;
  color: #7B1FA2;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.master-badge.national {
  background: #FFF8E1;
  color: #F57C00;
}

.master-badge.provincial {
  background: #E8F5E9;
  color: #2E7D32;
}

.master-content {
  padding: 0 20px 20px;
}

.master-specialty {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.specialty-tag {
  padding: 4px 10px;
  background: #F5F5F7;
  color: #6E6E73;
  border-radius: 4px;
  font-size: 12px;
}

.master-description {
  font-size: 14px;
  color: #6E6E73;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.master-footer {
  display: flex;
  gap: 16px;
  padding: 12px 20px;
  border-top: 1px solid #F5F5F7;
  font-size: 13px;
  color: #6E6E73;
}

.master-footer-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.master-footer-item svg {
  width: 16px;
  height: 16px;
  color: #7B1FA2;
  flex-shrink: 0;
}

/* ========== 加载更多 ========== */
.master-list-footer {
  text-align: center;
  padding: 24px;
}

.load-more-btn {
  padding: 14px 40px;
  background: #7B1FA2;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.load-more-btn:hover:not(:disabled) {
  background: #4A148C;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(123, 31, 162, 0.3);
}

.load-more-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.load-more-btn .loading-icon {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ========== 空状态 ========== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: #6E6E73;
}

.empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  opacity: 0.5;
}

.empty-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1D1D1F;
}

.empty-text {
  font-size: 14px;
  color: #6E6E73;
}

/* ========== 响应式设计 ========== */
@media (min-width: 768px) {
  .master-team-container {
    padding: 136px 0 100px;
  }

  .search-section-card,
  .filter-section {
    padding: 24px;
  }

  .master-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* ========== 深色模式支持（已隐藏） ========== */
/*
@media (prefers-color-scheme: dark) {
  .search-section-card,
  .filter-section,
  .master-card {
    background: #1C1C1E;
  }

  .master-name {
    color: #F5F5F7;
  }

  .master-description {
    color: #86868B;
  }

  .master-footer {
    border-top-color: #2C2C2E;
  }

  .filter-tag {
    background: #1C1C1E;
    border-color: #38383A;
    color: #86868B;
  }

  .filter-tag:hover {
    border-color: #7B1FA2;
    color: #7B1FA2;
  }

  .filter-tag.active {
    background: #7B1FA2;
    border-color: #7B1FA2;
    color: white;
  }

  .search-input {
    background: #1C1C1E;
    border-color: #38383A;
    color: #F5F5F7;
  }

  .search-input:focus {
    border-color: #7B1FA2;
  }

  .search-input::placeholder {
    color: #86868B;
  }

  .search-results-info {
    color: #86868B;
  }

  .search-results-info #resultsCount {
    color: #CE93D8;
  }

  .specialty-tag {
    background: #2C2C2E;
    color: #86868B;
  }

  .filter-label {
    color: #F5F5F7;
  }

  .empty-title {
    color: #F5F5F7;
  }

  .empty-text {
    color: #86868B;
  }
}
*/

/* ========== 无障碍增强 ========== */
@media (prefers-reduced-motion: reduce) {
  .master-card,
  .filter-tag,
  .search-btn,
  .load-more-btn,
  .search-input {
    transition: none;
  }
}

.filter-tag:focus-visible,
.search-btn:focus-visible,
.load-more-btn:focus-visible,
.master-card:focus-visible {
  outline: 2px solid #0066CC;
  outline-offset: 2px;
}
