:root {
  --bg: #f3f6fb;
  --card: #ffffff;
  --text: #1c2536;
  --muted: #5e6b83;
  --line: #d8e0ef;
  --brand: #1f7ae0;
  --tag-scene-bg: #e8f2ff;
  --tag-scene-text: #0f4e9b;
  --tag-mood-bg: #ffeedd;
  --tag-mood-text: #9b4d0f;
  --shadow: 0 10px 30px rgba(26, 42, 74, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 8%, #eaf4ff 0%, transparent 36%),
    radial-gradient(circle at 86% 3%, #fff4e8 0%, transparent 30%),
    var(--bg);
  min-height: 100vh;
  padding: 28px 14px;
}

.container {
  max-width: 1500px;
  margin: 0 auto;
  display: block;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.top-nav-link {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #38506f;
  background: #fff;
}

.top-nav-link.active {
  color: #0f4e9b;
  border-color: #cfe4ff;
  background: #eaf3ff;
}

.main-content {
  min-width: 0;
}

.title {
  margin: 0;
  font-size: clamp(26px, 4.8vw, 38px);
  letter-spacing: 0.02em;
  max-width: none;
}

.desc {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 15px;
  max-width: none;
}

.search-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 14px;
  max-width: none;
}

.search-mode {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  max-width: none;
}

.search-mode .mode-btn {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  background: #fff;
  color: #39506e;
  cursor: pointer;
  box-shadow: none;
}

.search-mode .mode-btn.active {
  border-color: #2f8fff;
  color: #0f4e9b;
  background: #eaf3ff;
}

input[type="search"] {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 0 14px;
  font-size: 16px;
  box-shadow: var(--shadow);
  outline: none;
}

input[type="search"]:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 122, 224, 0.14);
}

button {
  height: 48px;
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  font-weight: 700;
  font-size: 15px;
  background: linear-gradient(120deg, #2f8fff, #1f7ae0);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 10px;
  max-width: none;
}

.examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  max-width: none;
}

.column-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.column-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #38506f;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.column-toggle input {
  margin: 0;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  background: #fff;
  color: #39506e;
  font-size: 13px;
  cursor: pointer;
}

.results-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #e2e9f5;
  border-radius: 14px;
  box-shadow: var(--shadow);
  background: #fff;
  padding-bottom: 4px;
}

.results {
  min-width: var(--results-min-width, 1220px);
  display: grid;
  gap: 0;
}

.row {
  display: grid;
  grid-template-columns: var(--grid-columns, 1.2fr 1.5fr 1.4fr 0.9fr 0.9fr 280px);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid #eef2fa;
}

.row.head {
  border-top: 0;
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fbff;
}

.col {
  min-width: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}

.row.head .col {
  font-size: 12px;
  font-weight: 700;
  color: #3e5676;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.col.text {
  white-space: normal;
  word-break: break-word;
}

.score-pill {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #0f4e9b;
  background: #eaf3ff;
  border: 1px solid #cfe4ff;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}

.tag.scene {
  background: var(--tag-scene-bg);
  color: var(--tag-scene-text);
}

.tag.synonym {
  background: #eef7ea;
  color: #2f6a2f;
}

.tag.mood {
  background: var(--tag-mood-bg);
  color: var(--tag-mood-text);
}

.tag.meta {
  background: #f0f4f8;
  color: #41556f;
}

.video-wrap {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
  aspect-ratio: 16 / 9;
  max-width: 280px;
}

.video-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.video-download-wrap {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.video-download-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #cfe4ff;
  background: #eaf3ff;
  color: #0f4e9b;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.empty {
  text-align: center;
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 24px 12px;
  margin: 12px;
}

@media (max-width: 640px) {
  .search-bar {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }

  .meta-row {
    flex-direction: column;
  }

  .results {
    min-width: 980px;
  }
}
