:root {
  --primary-color: #00609c;
  --secondary-color: #00a0e9;
  --accent-color: #f39c12;
  --text-color: #123047;
  --text-muted: rgba(18, 48, 71, 0.72);
  --line-color: rgba(0, 96, 156, 0.12);
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", sans-serif;
  color: var(--text-color);
  background: #f8f9fa;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
}

.container {
  width: min(calc(100% - 48px), var(--max-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  background: var(--primary-color);
}

.brand-text {
  font-size: 1.5rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.nav-links a,
.nav-links span {
  padding: 8px 0;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-links a.is-active {
  color: var(--primary-color);
}

.nav-links span[aria-disabled="true"] {
  cursor: default;
}

.hero-section {
  position: relative;
  margin-top: 0;
  padding: 88px 0 120px;
  background:
    linear-gradient(rgba(0, 40, 70, 0.7), rgba(0, 40, 70, 0.7)),
    linear-gradient(135deg, #1f78a8 0%, #0f5a86 50%, #0d486e 100%);
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.12), transparent 26%),
    radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.08), transparent 22%);
  pointer-events: none;
}

.hero-section::after {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #fff;
  padding: 32px 16px 0;
}

.hero-content h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2rem, 3.2vw, 3.1rem);
  line-height: 1.28;
  font-weight: 700;
  text-wrap: balance;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: min(760px, 100%);
  margin-top: 44px;
  padding: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.search-box input {
  width: 100%;
  min-width: 0;
  height: 64px;
  padding: 0 24px;
  border: none;
  outline: none;
  color: var(--text-color);
  background: transparent;
  font-size: 1rem;
}

.search-box input::placeholder {
  color: rgba(18, 48, 71, 0.5);
}

.search-box button {
  height: 64px;
  padding: 0 34px;
  border: none;
  border-radius: 0;
  color: #fff;
  font-weight: 700;
  background: #f3a316;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

.search-box button:hover {
  transform: none;
  box-shadow: none;
  filter: brightness(1.03);
}

.search-box button:active {
  transform: translateY(0);
}

.results-section {
  padding: 48px 0 72px;
  background: #f8f9fa;
}

.results-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.results-header h2 {
  margin: 0;
  font-size: 1.8rem;
  color: #1b3950;
}

.results-header p {
  margin: 8px 0 0;
  color: #5b7283;
}

.results-state {
  padding: 24px;
  border: 1px solid #dde7ee;
  border-radius: 16px;
  color: #5b7283;
  background: #fff;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.channel-section {
  padding: 24px;
  border: 1px solid #dde7ee;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(12, 54, 84, 0.05);
}

.channel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.channel-title {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.4;
  color: #16354b;
}

.channel-meta {
  margin: 8px 0 0;
  color: #667d8e;
  font-size: 0.95rem;
}

.channel-badge {
  flex-shrink: 0;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
}

.channel-badge-success {
  color: #0b6b43;
  background: #e6f6ee;
}

.channel-badge-error {
  color: #a23d2a;
  background: #fdece7;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.channel-state {
  padding: 18px 20px;
  border-radius: 14px;
  font-size: 0.96rem;
}

.channel-state-empty {
  color: #61798a;
  background: #f8fbfd;
  border: 1px solid #e6eef4;
}

.channel-state-error {
  color: #a23d2a;
  background: #fff4f1;
  border: 1px solid #f3d2c7;
}

.result-card {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid #dde7ee;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(12, 54, 84, 0.06);
}

.result-cover {
  width: 124px;
  height: 172px;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(135deg, #e4edf3, #f4f8fb);
}

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

.result-title {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.45;
  color: #16354b;
}

.result-meta {
  margin: 12px 0 0;
  color: #5b7283;
  font-size: 0.95rem;
  line-height: 1.8;
}

.result-description {
  display: -webkit-box;
  margin: 12px 0 0;
  overflow: hidden;
  color: #415a6b;
  font-size: 0.95rem;
  line-height: 1.75;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.result-link {
  display: inline-flex;
  align-items: center;
  margin-top: 14px;
  color: var(--primary-color);
  font-weight: 600;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 980px) {
  .site-nav {
    flex-wrap: wrap;
    justify-content: center;
    padding: 14px 0;
  }

  .hero-section {
    padding-top: 72px;
  }

  .channel-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(calc(100% - 28px), var(--max-width));
  }

  .brand {
    width: 100%;
    justify-content: center;
  }

  .brand-text {
    font-size: 1.12rem;
    white-space: normal;
    text-align: center;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }

  .hero-content {
    padding-top: 12px;
  }

  .hero-content h1 {
    max-width: 9em;
    font-size: clamp(2rem, 9vw, 2.8rem);
  }

  .search-box {
    grid-template-columns: 1fr;
    border-radius: 20px;
  }

  .search-box button {
    width: 100%;
    border-radius: 0 0 20px 20px;
  }

  .results-section {
    padding-top: 36px;
  }

  .channel-section {
    padding: 18px;
  }

  .channel-header {
    flex-direction: column;
  }

  .result-card {
    grid-template-columns: 1fr;
  }

  .result-cover {
    width: 100%;
    height: 220px;
  }
}
