/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  background: #0a0e1a;
  color: #e0e6f0;
  min-height: 100vh;
}

/* ── Header ── */
.header {
  background: linear-gradient(135deg, #1a1f35 0%, #0d1220 100%);
  border-bottom: 1px solid #1e2a4a;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 28px; }
.logo-text {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(90deg, #f97316, #fb923c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.logo-sub { font-size: 13px; color: #6b7a9a; margin-left: 4px; }
.stats-bar { font-size: 13px; color: #6b7a9a; }

/* ── Search Section ── */
.search-section {
  max-width: 1000px;
  margin: 40px auto 0;
  padding: 0 24px;
}
.search-box {
  display: flex;
  gap: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 30px rgba(249,115,22,0.15);
  border: 1px solid #2a3555;
}
.search-box input {
  flex: 1;
  padding: 16px 20px;
  font-size: 16px;
  background: #111827;
  border: none;
  color: #e0e6f0;
  outline: none;
}
.search-box input::placeholder { color: #4b5a7a; }
.search-box button {
  padding: 16px 32px;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: white;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.search-box button:hover { opacity: 0.9; }

.filter-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.filter-row select {
  padding: 8px 14px;
  background: #111827;
  border: 1px solid #2a3555;
  border-radius: 8px;
  color: #c0cce0;
  font-size: 14px;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7a9a' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}
.filter-row select:focus { border-color: #f97316; }

.hot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.hot-tag {
  padding: 4px 12px;
  background: #1a2035;
  border: 1px solid #2a3555;
  border-radius: 20px;
  font-size: 13px;
  color: #8a9ab8;
  cursor: pointer;
  transition: all 0.2s;
}
.hot-tag:hover {
  background: #f97316;
  border-color: #f97316;
  color: white;
}

/* ── Results ── */
.results-section {
  max-width: 1400px;
  margin: 30px auto;
  padding: 0 24px 60px;
}
.result-info {
  font-size: 14px;
  color: #6b7a9a;
  margin-bottom: 16px;
}
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* ── Video Card ── */
.video-card {
  background: #111827;
  border: 1px solid #1e2a4a;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(249,115,22,0.2);
  border-color: #f97316;
}
.card-thumb {
  width: 100%;
  height: 170px;
  background: linear-gradient(135deg, #1a2035, #0d1220);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
  overflow: hidden;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-thumb .play-icon {
  position: absolute;
  width: 48px;
  height: 48px;
  background: rgba(249,115,22,0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
}
.card-body { padding: 14px 16px; }
.card-title {
  font-size: 14px;
  font-weight: 600;
  color: #e0e6f0;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.meta-item {
  font-size: 12px;
  color: #6b7a9a;
  display: flex;
  align-items: center;
  gap: 4px;
}
.meta-item .icon { font-size: 11px; }
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.tag {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}
.tag-tech { background: #1e3a5f; color: #60a5fa; }
.tag-emotion { background: #3b1f1f; color: #f87171; }
.tag-event { background: #1f3b2a; color: #4ade80; }
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #1e2a4a;
}
.baidu-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  border-radius: 6px;
  font-size: 12px;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}
.baidu-link:hover { opacity: 0.85; }
.confidence-badge {
  font-size: 11px;
  color: #4b5a7a;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}
.page-btn {
  padding: 8px 16px;
  background: #111827;
  border: 1px solid #2a3555;
  border-radius: 8px;
  color: #c0cce0;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}
.page-btn:hover, .page-btn.active {
  background: #f97316;
  border-color: #f97316;
  color: white;
}
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: #4b5a7a;
}
.empty-state .empty-icon { font-size: 64px; margin-bottom: 16px; }
.empty-state p { font-size: 16px; }

/* ── Modal ── */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.open { display: flex; }
.modal-content {
  background: #111827;
  border: 1px solid #2a3555;
  border-radius: 16px;
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  padding: 28px;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #1e2a4a;
  border: none;
  color: #8a9ab8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: #f97316; color: white; }

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #e0e6f0;
  margin-bottom: 20px;
  padding-right: 40px;
  line-height: 1.4;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.detail-item label {
  display: block;
  font-size: 11px;
  color: #4b5a7a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.detail-item span {
  font-size: 14px;
  color: #c0cce0;
}
.detail-tags-section { margin-bottom: 20px; }
.detail-tags-section h4 {
  font-size: 12px;
  color: #4b5a7a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #1e2a4a;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.85; }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: #1e2a4a;
  color: #c0cce0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid #2a3555;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover { background: #2a3555; }
.path-display {
  background: #0a0e1a;
  border: 1px solid #1e2a4a;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #6b7a9a;
  font-family: monospace;
  word-break: break-all;
  margin-top: 12px;
}
.share-info {
  background: #1a2035;
  border: 1px solid #2a3555;
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 12px;
  font-size: 13px;
}
.share-info a { color: #60a5fa; text-decoration: none; }
.share-info a:hover { text-decoration: underline; }
.share-pwd {
  display: inline-block;
  background: #f97316;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  margin-left: 6px;
}

/* ── Loading ── */
.loading {
  text-align: center;
  padding: 60px;
  color: #4b5a7a;
  font-size: 16px;
}
.spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid #1e2a4a;
  border-top-color: #f97316;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ── */
@media (max-width: 768px) {
  .results-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; height: auto; padding: 12px 0; gap: 6px; }
  .logo-sub { display: none; }
}

/* ── Nav Tabs ── */
.nav-tabs {
  display: flex;
  gap: 0;
  border-top: 1px solid #1e2a4a;
  padding: 0 24px;
  max-width: 1400px;
  margin: 0 auto;
}
.nav-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  color: #6b7a9a;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  margin-bottom: -1px;
}
.nav-tab:hover { color: #c0cce0; }
.nav-tab.active {
  color: #f97316;
  border-bottom-color: #f97316;
}

/* ── Tab Panels ── */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Players Section ── */
.players-section {
  max-width: 1400px;
  margin: 30px auto;
  padding: 0 24px 60px;
}
.players-header {
  margin-bottom: 24px;
}
.players-title {
  font-size: 22px;
  font-weight: 700;
  color: #e0e6f0;
  margin-bottom: 6px;
}
.players-subtitle {
  font-size: 14px;
  color: #6b7a9a;
}
.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
}

/* ── Player Card ── */
.player-card {
  background: #111827;
  border: 1px solid #1e2a4a;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  text-align: center;
  padding-bottom: 14px;
}
.player-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(249,115,22,0.2);
  border-color: #f97316;
}
.player-avatar {
  width: 100%;
  height: 160px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1a2035, #0d1220);
}
.player-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.player-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
}
.photo-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(249,115,22,0.9);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.player-name {
  font-size: 13px;
  font-weight: 600;
  color: #e0e6f0;
  margin-top: 10px;
  padding: 0 10px;
  line-height: 1.3;
}
.player-video-count {
  font-size: 11px;
  color: #4b5a7a;
  margin-top: 4px;
}

/* ── Player Modal ── */
.player-modal-content {
  max-width: 800px;
}
.player-photos-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
  padding-right: 40px;
}
.player-photos-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: #e0e6f0;
}
.photo-count {
  font-size: 13px;
  color: #6b7a9a;
}
.photo-viewer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.photo-main {
  flex: 1;
  height: 380px;
  background: #0a0e1a;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-main img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}
.photo-nav {
  width: 44px;
  height: 44px;
  background: #1e2a4a;
  border: 1px solid #2a3555;
  border-radius: 50%;
  color: #c0cce0;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.photo-nav:hover {
  background: #f97316;
  border-color: #f97316;
  color: white;
}
.photo-thumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.photo-thumb {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
  background: #0a0e1a;
}
.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-thumb.active {
  border-color: #f97316;
}
.photo-thumb:hover {
  border-color: #fb923c;
}

/* ── Clickable meta items ── */
.meta-item.clickable {
  cursor: pointer;
  color: #60a5fa;
  transition: color 0.2s;
}
.meta-item.clickable:hover { color: #f97316; }
.clickable-player {
  color: #60a5fa;
  cursor: pointer;
  font-size: 14px;
}
.clickable-player:hover { color: #f97316; text-decoration: underline; }

/* ── Responsive updates ── */
@media (max-width: 768px) {
  .players-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
  .photo-main { height: 220px; }
  .photo-thumbs { gap: 6px; }
  .photo-thumb { width: 60px; height: 60px; }
  .nav-tabs { padding: 0 12px; }
  .nav-tab { padding: 10px 14px; font-size: 13px; }
}
