/* 检察蓝 · 宣传站 */
:root {
  --blue-950: #041633;
  --blue-900: #0a2f6b;
  --blue-800: #0f4194;
  --blue-700: #1656b8;
  --blue-600: #1f6fd6;
  --blue-500: #3b88ea;
  --cyan: #5ec8ff;
  --orange: #f08a24;
  --orange-soft: #ffb45e;
  --white: #ffffff;
  --ink: #102445;
  --line: rgba(255, 255, 255, 0.2);
  --shadow: 0 30px 80px rgba(2, 18, 55, 0.55);
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC",
    "Hiragino Sans", "Noto Sans KR", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  position: relative;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 640px at 88% -8%, rgba(255, 176, 80, 0.22), transparent 52%),
    radial-gradient(900px 700px at 8% 18%, rgba(50, 180, 255, 0.18), transparent 48%),
    radial-gradient(1000px 700px at 50% 110%, rgba(8, 70, 170, 0.55), transparent 55%),
    linear-gradient(165deg, #031a3b 0%, #08357f 38%, #1463c4 72%, #1f7adf 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, select { font-family: inherit; }
button {
  appearance: none;
  border: 0;
  background: none;
  cursor: pointer;
  color: inherit;
}

/* ===== page transition ===== */
.page-veil {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 42%, rgba(40, 130, 230, 0.4), transparent 50%),
    rgba(3, 20, 55, 0.78);
  opacity: 0;
  transition: opacity 0.38s var(--ease);
}

body.page-enter-ready .site-header,
body.page-enter-ready .home-page,
body.page-enter-ready .detail-page {
  opacity: 0;
  transform: translateY(20px) scale(0.98);
}

body.page-enter .site-header,
body.page-enter .home-page,
body.page-enter .detail-page {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

body.page-leave .page-veil {
  opacity: 1;
  pointer-events: auto;
}

body.page-leave .site-header,
body.page-leave .home-page,
body.page-leave .detail-page {
  opacity: 0;
  transform: translateY(-12px) scale(0.985);
  transition: opacity 0.32s ease, transform 0.32s ease;
}

/* ===== atmospheric background ===== */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-aurora {
  position: absolute;
  inset: -10%;
  background:
    conic-gradient(from 210deg at 30% 20%, rgba(70, 170, 255, 0.18), transparent 28%, rgba(255, 170, 70, 0.12) 42%, transparent 58%, rgba(90, 200, 255, 0.14) 72%, transparent 88%),
    radial-gradient(ellipse at 70% 10%, rgba(120, 200, 255, 0.2), transparent 45%);
  filter: blur(8px);
  animation: auroraShift 16s ease-in-out infinite alternate;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 72%);
  opacity: 0.55;
}

.bg-foam {
  position: absolute;
  width: 160%;
  height: 42%;
  left: -30%;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at center, rgba(140, 210, 255, 0.28), transparent 66%);
  filter: blur(4px);
  animation: drift 20s ease-in-out infinite alternate;
}

.bg-foam-1 { top: 8%; }
.bg-foam-2 {
  top: 58%;
  opacity: 0.75;
  animation-duration: 26s;
  animation-direction: alternate-reverse;
}

.bg-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.22) 1.2px, transparent 1.3px);
  background-size: 16px 16px;
  mask-image:
    radial-gradient(circle at 12% 8%, #000 0%, transparent 36%),
    radial-gradient(circle at 92% 12%, #000 0%, transparent 32%),
    radial-gradient(circle at 50% 95%, #000 0%, transparent 40%);
  -webkit-mask-image:
    radial-gradient(circle at 12% 8%, #000 0%, transparent 36%),
    radial-gradient(circle at 92% 12%, #000 0%, transparent 32%),
    radial-gradient(circle at 50% 95%, #000 0%, transparent 40%);
  opacity: 0.7;
}

.bg-rays {
  position: absolute;
  inset: -25%;
  background: repeating-conic-gradient(
    from 8deg at 78% -5%,
    rgba(255, 255, 255, 0.05) 0deg 5deg,
    transparent 5deg 16deg
  );
  opacity: 0.5;
  animation: raysSpin 52s linear infinite;
  mask-image: radial-gradient(circle at 78% -5%, #000 0%, transparent 52%);
  -webkit-mask-image: radial-gradient(circle at 78% -5%, #000 0%, transparent 52%);
}

.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
}

.bg-glow-a {
  width: 520px;
  height: 520px;
  top: -160px;
  right: -100px;
  background: rgba(255, 170, 70, 0.26);
  animation: pulse 7s ease-in-out infinite;
}

.bg-glow-b {
  width: 620px;
  height: 620px;
  bottom: -240px;
  left: -180px;
  background: rgba(60, 160, 255, 0.34);
}

.bg-seal {
  position: absolute;
  right: 4%;
  bottom: 8%;
  width: 160px;
  height: 160px;
  border: 2px solid rgba(255, 180, 94, 0.28);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 8px rgba(255, 180, 94, 0.08),
    0 0 40px rgba(255, 180, 94, 0.12);
  opacity: 0.55;
  transform: rotate(-12deg);
}

.bg-seal::before,
.bg-seal::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  border: 1px dashed rgba(255, 180, 94, 0.35);
}

.bg-seal::after {
  inset: 30%;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.12);
}

.bg-float {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.35), rgba(90, 180, 255, 0.05) 60%, transparent 70%);
  animation: floatY 9s ease-in-out infinite;
}

.bg-float-1 { width: 18px; height: 18px; left: 12%; top: 28%; }
.bg-float-2 { width: 12px; height: 12px; left: 78%; top: 42%; animation-delay: -2s; }
.bg-float-3 { width: 22px; height: 22px; left: 64%; top: 70%; animation-delay: -4s; }

/* ===== header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 12px clamp(12px, 3vw, 24px);
  background:
    linear-gradient(180deg, rgba(4, 24, 60, 0.92), rgba(8, 42, 105, 0.62)),
    linear-gradient(90deg, transparent, rgba(255, 180, 94, 0.08), transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 36px rgba(2, 16, 48, 0.28);
}

.home-header {
  display: flex;
  justify-content: flex-end;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 详情顶栏：返回 | 专题(撑满) | 语言 —— 专题右缘与语言右缘同一行对齐 */
.detail-header {
  padding-top: 10px;
  padding-bottom: 10px;
}

.detail-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.detail-toolbar .back-link {
  flex: 0 0 auto;
}

.topic-switcher-slot {
  flex: 1 1 auto;
  min-width: 0;
}

.lang-switcher-slot {
  flex: 0 0 auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
  color: #fff;
  font-size: 0.88rem;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.back-link:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateX(-2px);
}

.back-icon {
  width: 8px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

/* ===== selects ===== */
.lang-switcher,
.topic-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.topic-switcher {
  width: 100%;
}

.lang-switcher {
  width: auto;
}

.lang-switcher-label,
.topic-switcher-label {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.8rem;
  white-space: nowrap;
  flex: 0 0 auto;
}

.select-wrap {
  position: relative;
  min-width: 0;
}

.topic-select-wrap {
  flex: 1 1 auto;
  width: 100%;
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid rgba(255, 255, 255, 0.9);
  border-bottom: 2px solid rgba(255, 255, 255, 0.9);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.lang-select,
.topic-select {
  appearance: none;
  -webkit-appearance: none;
  height: 40px;
  padding: 0 36px 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.07));
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 8px 20px rgba(2, 20, 55, 0.18);
}

.lang-select {
  min-width: 128px;
  width: auto;
}

.topic-select {
  width: 100%;
  max-width: none;
}

.lang-select option,
.topic-select option {
  color: #123;
  background: #fff;
}

.lang-select:focus,
.topic-select:focus {
  border-color: rgba(255, 180, 94, 0.8);
  box-shadow: 0 0 0 3px rgba(240, 138, 36, 0.24);
}

/* ===== home ===== */
.page,
.home-page,
.detail-page {
  position: relative;
  z-index: 1;
}

.home-page {
  width: min(1220px, calc(100% - 28px));
  margin: 0 auto;
  padding: 8px 0 60px;
}

.home-stage {
  position: relative;
  padding: 18px 18px 28px;
  border-radius: 32px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)),
    linear-gradient(180deg, rgba(12, 56, 130, 0.35), rgba(6, 30, 75, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.home-stage::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ffb45e, #5ec8ff, transparent);
}

.home-stage::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 180, 94, 0.18), transparent 70%);
  pointer-events: none;
}

.home-ornament {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 4px 0 20px;
}

.ornament-line {
  width: min(140px, 22vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
}

.ornament-mark {
  color: var(--orange-soft);
  font-size: 0.95rem;
  text-shadow: 0 0 18px rgba(255, 180, 94, 0.55);
  animation: pulse 3.8s ease-in-out infinite;
}

.topic-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.topic-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 440px;
  min-height: 440px;
  border-radius: 26px;
  overflow: hidden;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow:
    0 22px 50px rgba(2, 18, 55, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  isolation: isolate;
  cursor: pointer;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.35s ease;
  animation: rise 0.85s var(--ease) both;
}

.topic-card-1 { animation-delay: 0.08s; }
.topic-card-2 { animation-delay: 0.18s; }
.topic-card-3 { animation-delay: 0.28s; }

.topic-card:focus-visible {
  outline: 2px solid var(--orange-soft);
  outline-offset: 3px;
}

.topic-cover {
  position: absolute;
  inset: 0;
  background-position: center top;
  background-size: cover;
  transform: scale(1.06);
  transition: transform 0.8s var(--ease);
  filter: saturate(1.08) contrast(1.04);
}

.topic-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 24, 60, 0.08) 0%, rgba(4, 24, 60, 0.28) 30%, rgba(3, 16, 42, 0.9) 72%, rgba(2, 12, 34, 0.98) 100%),
    linear-gradient(130deg, rgba(30, 120, 230, 0.32), transparent 46%),
    linear-gradient(310deg, rgba(240, 138, 36, 0.18), transparent 40%);
}

.topic-edge {
  position: absolute;
  inset: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 180, 94, 0.06);
  pointer-events: none;
  opacity: 0.75;
}

.topic-shine {
  position: absolute;
  z-index: 3;
  inset: 0;
  background: linear-gradient(118deg, transparent 28%, rgba(255, 255, 255, 0.22) 48%, transparent 64%);
  transform: translateX(-130%);
  transition: transform 0.85s var(--ease);
  pointer-events: none;
}

.topic-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  flex: 1;
  height: 100%;
  min-height: 0;
  padding: 24px 22px 22px;
}

.topic-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex: 0 0 auto;
}

.topic-index {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.06)),
    rgba(8, 48, 120, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
}

.topic-index span {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--orange-soft);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.topic-chip {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.topic-title {
  flex: 0 0 auto;
  height: 4.35em;
  margin: 0;
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  font-weight: 780;
  line-height: 1.45;
  text-shadow: 0 3px 20px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  word-break: break-word;
}

.title-part {
  display: inline;
}

.title-accent {
  color: var(--orange-soft);
}

.topic-cta {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  align-self: flex-start;
  flex: 0 0 auto;
  height: 46px;
  padding: 0 8px 0 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 10px 24px rgba(2, 18, 55, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  transition:
    background 0.28s ease,
    border-color 0.28s ease,
    color 0.28s ease,
    box-shadow 0.28s ease,
    transform 0.28s ease,
    padding 0.28s ease;
}

.cta-text {
  line-height: 1;
}

.cta-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #ffc06e, #f08a24);
  box-shadow: 0 4px 12px rgba(240, 138, 36, 0.35);
  transition: transform 0.28s ease, background 0.28s ease, box-shadow 0.28s ease;
}

.cta-arrow {
  width: 7px;
  height: 7px;
  border-top: 2px solid #1a2a44;
  border-right: 2px solid #1a2a44;
  transform: rotate(45deg);
  margin-left: -1px;
  transition: transform 0.28s ease;
}

.topic-card:hover {
  transform: translateY(-14px) scale(1.01);
  border-color: rgba(255, 180, 94, 0.65);
  box-shadow:
    0 36px 90px rgba(2, 16, 48, 0.62),
    0 0 0 1px rgba(255, 180, 94, 0.2);
}

.topic-card:hover .topic-cover { transform: scale(1.14); }
.topic-card:hover .topic-shine { transform: translateX(120%); }

.topic-card:hover .topic-cta {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.95);
  color: #0d3d86;
  box-shadow:
    0 14px 28px rgba(2, 18, 55, 0.28),
    inset 0 1px 0 #fff;
  transform: translateY(-2px);
}

.topic-card:hover .cta-icon {
  background: linear-gradient(160deg, #3b88ea, #1656b8);
  box-shadow: 0 4px 14px rgba(22, 86, 184, 0.4);
  transform: translateX(2px);
}

.topic-card:hover .cta-arrow {
  border-color: #fff;
  transform: rotate(45deg) translate(1px, -1px);
}

/* ===== detail ===== */
.detail-page {
  width: min(960px, calc(100% - 20px));
  margin: 0 auto;
  padding: 18px 0 44px;
}

.detail-stage {
  padding: 14px;
  border-radius: 24px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)),
    linear-gradient(180deg, rgba(12, 56, 130, 0.28), rgba(6, 30, 75, 0.16));
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow);
}

.detail-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(8, 40, 100, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.14);
  min-height: 180px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.detail-frame::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 180, 94, 0.8), rgba(94, 200, 255, 0.8), transparent);
  z-index: 2;
}

.detail-frame img {
  width: 100%;
  height: auto;
  background: #0a2f6b;
}

.detail-loading {
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
  padding: 56px 16px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes drift {
  from { transform: translateX(-3%) rotate(-6deg); }
  to { transform: translateX(4%) rotate(-2deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.95; transform: scale(1.08); }
}

@keyframes raysSpin {
  to { transform: rotate(360deg); }
}

@keyframes auroraShift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(3%, 2%, 0) scale(1.05); }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50% { transform: translateY(-18px); opacity: 0.95; }
}

/* ===== responsive ===== */
@media (max-width: 980px) {
  .topic-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .topic-card,
  .topic-body {
    height: 280px;
    min-height: 280px;
  }

  .topic-title {
    height: 4.35em;
    font-size: 1.05rem;
  }

  .topic-cover {
    background-position: center 18%;
  }

  .home-stage {
    padding: 14px;
    border-radius: 22px;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 10px 12px;
  }

  .detail-toolbar {
    flex-wrap: wrap;
  }

  .back-link {
    order: 1;
  }

  .lang-switcher-slot {
    order: 2;
    margin-left: auto;
  }

  .topic-switcher-slot {
    order: 3;
    flex: 1 1 100%;
    width: 100%;
  }

  .topic-switcher,
  .topic-select-wrap,
  .topic-select {
    width: 100%;
    max-width: none;
  }

  .lang-switcher-label,
  .topic-switcher-label {
    display: none;
  }

  .lang-select {
    min-width: 110px;
  }

  .home-page {
    width: calc(100% - 16px);
  }

  .topic-card,
  .topic-body {
    height: 250px;
    min-height: 250px;
  }

  .detail-page {
    width: calc(100% - 12px);
    padding-top: 12px;
  }

  .detail-stage {
    padding: 8px;
    border-radius: 16px;
  }

  .detail-frame {
    border-radius: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  body.page-leave .page-veil { opacity: 1; }
}
