:root {
  --bg: #0b1220;
  --surface: rgba(15, 23, 42, 0.92);
  --surface-strong: rgba(15, 23, 42, 0.96);
  --text: #e5edf8;
  --muted: #9fb2c8;
  --line: rgba(148, 163, 184, 0.16);
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.14);
  --warm: #60a5fa;
  --shadow: 0 26px 70px rgba(2, 6, 23, 0.35);
  --radius-xl: 14px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --font-ui: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 12% 10%, rgba(56, 189, 248, 0.16), transparent 24%),
    radial-gradient(circle at 88% 12%, rgba(99, 102, 241, 0.14), transparent 24%),
    radial-gradient(circle at 50% 90%, rgba(34, 197, 94, 0.08), transparent 26%),
    linear-gradient(160deg, #08101d 0%, #0b1220 42%, #111a2e 100%);
  color: var(--text);
  font-family: var(--font-ui);
}

body {
  padding: 22px;
}

.page-shell {
  max-width: 1320px;
  margin: 0 auto;
}

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    radial-gradient(circle at 14% 22%, rgba(56, 189, 248, 0.14), transparent 22%),
    radial-gradient(circle at 92% 18%, rgba(99, 102, 241, 0.12), transparent 20%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.88) 100%);
  color: var(--text);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.06), transparent 42%);
  pointer-events: none;
}

.hero__brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.hero__logo {
  width: min(150px, 28vw);
  height: auto;
  object-fit: contain;
  border-radius: 28px;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.2);
}

.hero__title p {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--muted);
  font-weight: 800;
}

.hero__note {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
}

.hero__title h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1;
}

.hero__tools {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hero__tools input,
.software-link,
.session-link,
.result-count {
  min-height: 48px;
  border-radius: var(--radius-md);
  font: inherit;
}

.hero__tools input {
  width: min(320px, 100%);
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.82);
  color: var(--text);
  padding: 0 18px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.hero__tools input::placeholder {
  color: var(--muted);
}

.result-count {
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.82);
  color: var(--muted);
}

.session-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.82);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.doc-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.28);
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.doc-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 50px rgba(18, 36, 33, 0.13);
  border-color: rgba(15, 108, 96, 0.18);
}

.doc-card[hidden] {
  display: none;
}

.doc-card__no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.doc-card__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  margin-top: 14px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  align-self: flex-start;
  background: rgba(15, 108, 96, 0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.doc-card--featured {
  background:
    radial-gradient(circle at right top, rgba(56, 189, 248, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.96));
}

.doc-card h2 {
  margin: 26px 0 18px;
  font-size: clamp(23px, 2.2vw, 30px);
  line-height: 1.25;
}

.doc-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.empty-state {
  margin: 28px 0 0;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 980px) {
  .hero {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__tools {
    justify-content: flex-start;
  }

  .doc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  body {
    padding: 14px;
  }

  .hero {
    padding: 24px;
  }

  .hero__logo {
    width: 110px;
  }

  .hero__tools input {
    width: 100%;
  }

  .doc-grid {
    grid-template-columns: 1fr;
  }
}
