:root {
  --bg: #08283f;
  --panel: #08263b;
  --panel-strong: #0d3c5b;
  --text: #effaff;
  --muted: #b8d8e8;
  --line: rgba(154, 216, 245, 0.24);
  --gold: #f7c95f;
  --cyan: #67dff2;
  --orange: #ffb067;
  --green: #6ee7b7;
  --white: #ffffff;
  --shadow: 0 24px 60px rgba(0, 8, 18, 0.38);
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(102, 205, 255, 0.2), transparent 28%),
    radial-gradient(circle at 82% 72%, rgba(24, 122, 170, 0.28), transparent 32%),
    linear-gradient(135deg, #08253a 0%, #0d4667 52%, #071b2b 100%);
  line-height: 1.6;
}

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

button {
  font: inherit;
}

.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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(5, 22, 35, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #092534;
  background: linear-gradient(135deg, var(--gold), #fff1bd);
  border-radius: 8px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.site-nav a:hover {
  color: var(--white);
}

.site-nav .nav-home {
  padding: 7px 12px;
  border: 1px solid rgba(184, 216, 232, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  white-space: nowrap;
}

.site-nav .nav-home:hover {
  border-color: rgba(184, 216, 232, 0.4);
  background: rgba(255, 255, 255, 0.08);
}

.section-shell,
.stats-band,
.map-section {
  padding: clamp(52px, 7vw, 92px) clamp(18px, 5vw, 72px);
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 28px;
  text-align: center;
}

.section-heading.align-left {
  margin-left: 0;
  text-align: left;
}

.section-heading h2,
.hero h1,
.yangpu-content h2 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: 0;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.section-heading p,
.hero-text,
.yangpu-content p,
.map-note {
  color: var(--muted);
}

.eyebrow,
.panel-kicker {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero {
  min-height: calc(100vh - 65px);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  align-items: center;
  gap: clamp(28px, 5vw, 80px);
  background:
    radial-gradient(circle at 82% 72%, rgba(38, 130, 178, 0.24), transparent 28%),
    radial-gradient(circle at 16% 24%, rgba(103, 223, 242, 0.18), transparent 30%),
    linear-gradient(145deg, #08283f 0%, #0c4668 58%, #061c2f 100%);
}

.hero-copy {
  animation: heroCopyIn 0.9s var(--ease-out) both;
}

.hero h1 {
  max-width: 720px;
  font-size: clamp(42px, 7vw, 82px);
}

.hero-title-line {
  display: block;
}

.hero-text {
  max-width: 620px;
  margin: 22px 0 0;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.primary-action,
.secondary-action,
.filter-btn,
.type-btn,
.route-btn,
.label-toggle-btn,
.demo-bar button {
  border: 0;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 800;
}

.primary-action {
  color: #082431;
  background: linear-gradient(135deg, var(--gold), #ffe49c);
}

.secondary-action {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
}

.primary-action:hover,
.secondary-action:hover,
.filter-btn:hover,
.type-btn:hover,
.route-btn:hover,
.label-toggle-btn:hover,
.demo-bar button:hover {
  transform: translateY(-1px);
}

.demo-start {
  border: 0;
}

.inline-action {
  margin-top: 20px;
}

.hero-map {
  position: relative;
  perspective: 1100px;
  cursor: grab;
  min-height: 440px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 24% 18%, rgba(103, 223, 242, 0.18), transparent 28%),
    radial-gradient(circle at 72% 76%, rgba(43, 138, 190, 0.26), transparent 34%),
    linear-gradient(135deg, #0b3856 0%, #0e5578 54%, #08283f 100%);
  background-size: auto;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: mapCardIn 1s var(--ease-out) 0.12s both;
}

.hero-map::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 12%, rgba(204, 246, 255, 0.14) 46%, transparent 62%),
    radial-gradient(circle at 50% 50%, transparent 48%, rgba(3, 16, 27, 0.24));
  transform: translateX(-110%);
  animation: mapSweep 4.8s ease-in-out 1.2s infinite;
}

.map-hint {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 4;
  padding: 4px 8px;
  color: rgba(232, 250, 255, 0.9);
  border: 1px solid rgba(154, 216, 245, 0.34);
  border-radius: 8px;
  background: rgba(4, 21, 34, 0.62);
  font-size: 12px;
  pointer-events: none;
}

.hero-map:active,
.map-card:active {
  cursor: grabbing;
}

.hero-map svg {
  width: 100%;
  height: 100%;
}

.map-tilt-plane {
  width: 100%;
  height: 100%;
  min-height: inherit;
  opacity: 0;
  pointer-events: none;
  transform: rotateX(var(--rotate-x, 18deg)) rotateY(var(--rotate-y, -14deg));
  transform-origin: center;
  transform-style: preserve-3d;
  transition: transform 0.18s ease-out;
  will-change: transform;
}

.map-3d-stage:hover .map-tilt-plane {
  transition-duration: 0.08s;
}

.hero-tilt-plane {
  min-height: 440px;
}

.webgl-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
}

.webgl-map canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.webgl-map canvas:active {
  cursor: grabbing;
}

.webgl-ready .map-tilt-plane {
  display: none;
}

.hero-route {
  fill: none;
  stroke: rgba(244, 182, 74, 0.86);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 12 14;
  filter: url(#heroGlow);
  animation: routeDash 1.7s linear infinite;
  pointer-events: none;
}

.hero-route.south {
  stroke: rgba(255, 140, 58, 0.9);
  animation-duration: 2.2s;
}

.hero-province-shape {
  fill: rgba(64, 136, 121, 0.42);
  stroke: transparent;
  stroke-width: 0;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 18px 16px rgba(0, 0, 0, 0.18));
  pointer-events: none;
}

.hero-port-dot {
  fill: var(--gold);
  filter: drop-shadow(0 0 12px rgba(244, 182, 74, 0.8));
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation: dotIn 0.45s var(--ease-out) forwards, dotGlow 2.4s ease-in-out 1.4s infinite;
}

.hero-port-dot:nth-child(1) {
  animation-delay: 1.05s, 1.8s;
}

.hero-port-dot:nth-child(2) {
  animation-delay: 1.18s, 1.9s;
}

.hero-port-dot:nth-child(3) {
  animation-delay: 1.31s, 2s;
}

.hero-port-dot:nth-child(4) {
  animation-delay: 1.44s, 2.1s;
}

.hero-port-dot:nth-child(5) {
  animation-delay: 1.57s, 2.2s;
}

.hero-port-dot.yangpu-dot {
  fill: var(--orange);
}

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

@keyframes mapCardIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes drawHeroLine {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes routeDash {
  to {
    stroke-dashoffset: -52;
  }
}

@keyframes dotIn {
  from {
    opacity: 0;
    transform: scale(0.3);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes dotGlow {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.22);
  }
}

@keyframes mapSweep {
  0%, 42% {
    transform: translateX(-110%);
  }
  70%, 100% {
    transform: translateX(110%);
  }
}

.stats-band {
  background:
    linear-gradient(180deg, rgba(8, 39, 61, 0.72), rgba(10, 72, 104, 0.48)),
    #0b3856;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.stat-card,
.detail-panel,
.route-detail,
.task-card,
.type-section,
.sources-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 31, 48, 0.68);
  box-shadow: 0 16px 40px rgba(0, 10, 24, 0.26);
  backdrop-filter: blur(10px);
}

.stat-card {
  min-height: 176px;
  padding: 18px;
}

.stat-card strong {
  display: block;
  margin: 10px 0 4px;
  color: var(--white);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
}

.stat-card span {
  color: var(--gold);
  font-weight: 800;
}

.stat-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.type-section {
  margin: clamp(18px, 4vw, 48px);
}

.type-controls,
.map-controls,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.type-btn,
.filter-btn,
.label-toggle-btn {
  min-height: 38px;
  padding: 0 14px;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.type-btn.active,
.filter-btn.active,
.label-toggle-btn.active {
  color: #082431;
  border-color: transparent;
  background: var(--gold);
}

.type-lesson {
  min-height: 48px;
  margin: 18px 0 0;
  color: var(--muted);
}

.map-section {
  background:
    radial-gradient(circle at 18% 18%, rgba(103, 223, 242, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(12, 76, 111, 0.68), rgba(5, 24, 39, 0.82)),
    #0b3856;
}

.map-controls {
  justify-content: center;
  margin-bottom: 18px;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 18px;
  align-items: start;
}

.map-card {
  position: relative;
  perspective: 1200px;
  cursor: grab;
  height: clamp(560px, 45vw, 680px);
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 16%, rgba(103, 223, 242, 0.16), transparent 28%),
    radial-gradient(circle at 78% 72%, rgba(47, 142, 194, 0.26), transparent 34%),
    linear-gradient(135deg, #0a314d 0%, #0d5478 54%, #071f34 100%);
  box-shadow: var(--shadow);
}

.china-map {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.china-map > rect,
#routeLayer {
  pointer-events: none;
}

.province-shape {
  fill: rgba(55, 122, 108, 0.5);
  stroke: transparent;
  stroke-width: 0;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 20px 18px rgba(0, 0, 0, 0.2));
  pointer-events: none;
}

.sea-route {
  fill: none;
  stroke: rgba(191, 247, 255, 0.18);
  stroke-width: 2;
  stroke-dasharray: 7 13;
  animation: routeDash 3.4s linear infinite;
  pointer-events: none;
}

.sea-route.south {
  stroke: rgba(244, 182, 74, 0.16);
  animation-duration: 4.6s;
}

.waterway {
  fill: none;
  stroke: rgba(83, 215, 223, 0.62);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 10 14;
  pointer-events: none;
}

.waterway.major {
  stroke-width: 8;
}

.route-line {
  fill: none;
  stroke: var(--gold);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 24 14;
  filter: url(#glow);
  animation: routeFlow 1.35s linear infinite;
}

.route-line-glow {
  stroke: rgba(255, 219, 129, 0.42);
  stroke-width: 18;
  stroke-dasharray: none;
  opacity: 0.54;
  animation: routeGlow 1.8s ease-in-out infinite;
}

.route-vessel {
  fill: #ffffff;
  stroke: var(--orange);
  stroke-width: 3;
  filter: drop-shadow(0 0 12px rgba(255, 140, 58, 0.95));
}

@keyframes routeFlow {
  to {
    stroke-dashoffset: -60;
  }
}

@keyframes routeGlow {
  0%, 100% {
    opacity: 0.36;
  }
  50% {
    opacity: 0.7;
  }
}

.port-node {
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.port-node.dimmed {
  opacity: 0.22;
}

.port-node .halo {
  fill: transparent;
  stroke-width: 2;
  opacity: 0.52;
  transform-box: fill-box;
  transform-origin: center;
}

.port-node.coastal .halo {
  stroke: var(--gold);
}

.port-node.river .halo {
  stroke: var(--cyan);
}

.port-node.featured .halo {
  stroke: var(--orange);
  stroke-width: 4;
  animation: pulse 1.4s ease-in-out infinite;
}

.port-node .dot {
  stroke: rgba(255, 255, 255, 0.86);
  stroke-width: 2;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.22));
}

.hit-area {
  fill: transparent;
  pointer-events: all;
}

.port-node.coastal .dot {
  fill: var(--gold);
}

.port-node.river .dot {
  fill: var(--cyan);
}

.port-node.featured .dot {
  fill: var(--orange);
}

.port-node.active .dot,
.port-node.route-active .dot {
  fill: var(--green);
  filter: drop-shadow(0 0 13px rgba(95, 211, 141, 0.85));
}

.port-label {
  pointer-events: none;
  fill: rgba(239, 251, 252, 0.95);
  font-size: 13px;
  font-weight: 700;
  paint-order: stroke;
  stroke: rgba(5, 22, 31, 0.92);
  stroke-width: 5px;
}

.label-leader {
  pointer-events: none;
  stroke: rgba(226, 253, 255, 0.28);
  stroke-width: 1.2;
  stroke-dasharray: 3 4;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.9;
  }
}

.tooltip {
  position: absolute;
  z-index: 6;
  display: none;
  max-width: 280px;
  padding: 10px 12px;
  color: #062237;
  background: rgba(225, 248, 255, 0.96);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
  font-size: 14px;
}

.tooltip strong {
  display: block;
  margin-bottom: 4px;
}

.detail-panel,
.route-detail {
  padding: 22px;
}

.detail-panel {
  display: flex;
  flex-direction: column;
  height: clamp(560px, 45vw, 680px);
  min-height: 0;
  overflow: hidden;
}

.detail-panel > .panel-kicker,
.detail-panel > h3,
.detail-panel > p,
.detail-panel > ul {
  flex: 0 0 auto;
}

.detail-scroll {
  min-height: 0;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-gutter: stable;
}

.detail-scroll::-webkit-scrollbar {
  width: 8px;
}

.detail-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.detail-scroll::-webkit-scrollbar-thumb {
  background: rgba(139, 223, 244, 0.55);
  border-radius: 999px;
}

.detail-panel h3,
.route-detail h3,
.task-card h3 {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.2;
}

.detail-panel p,
.route-detail p,
.task-card p,
.source-list {
  color: var(--muted);
}

.detail-panel ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 16px 0;
  list-style: none;
}

.detail-panel li,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: #062237;
  border-radius: 8px;
  background: #d7f6ff;
  font-size: 13px;
  font-weight: 800;
}

.detail-question {
  padding: 14px;
  color: #f8e7b4;
  border: 1px solid rgba(247, 201, 95, 0.38);
  border-radius: 8px;
  background: rgba(247, 201, 95, 0.08);
}

.route-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 18px;
}

.route-list {
  display: grid;
  gap: 10px;
}

.route-btn {
  width: 100%;
  padding: 14px;
  color: var(--text);
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.route-btn.active {
  color: #082431;
  background: var(--gold);
}

.ideology-section {
  background:
    radial-gradient(circle at 15% 10%, rgba(103, 223, 242, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(7, 35, 55, 0.88), rgba(8, 71, 105, 0.62));
}

.deepseek-section {
  background:
    radial-gradient(circle at 82% 10%, rgba(103, 223, 242, 0.16), transparent 30%),
    radial-gradient(circle at 10% 86%, rgba(247, 201, 95, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(5, 24, 39, 0.9), rgba(9, 67, 101, 0.72));
}

.deepseek-chat {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
  max-width: 1220px;
  margin: 0 auto;
}

.deepseek-chat-main,
.deepseek-side {
  border: 1px solid rgba(154, 216, 245, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(14, 65, 96, 0.72), rgba(5, 24, 39, 0.82));
  box-shadow: 0 20px 54px rgba(0, 10, 24, 0.28);
}

.deepseek-chat-main {
  display: grid;
  grid-template-rows: auto minmax(260px, 42vh) auto;
  min-height: 560px;
  overflow: hidden;
}

.deepseek-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid rgba(154, 216, 245, 0.18);
  background: rgba(255, 255, 255, 0.05);
}

.deepseek-chat-header h3 {
  margin: 0;
  font-size: clamp(22px, 2vw, 30px);
}

.deepseek-chat-header > span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: #082431;
  border-radius: 999px;
  background: linear-gradient(135deg, #67dff2, #f7c95f);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.deepseek-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  overflow-y: auto;
  background:
    linear-gradient(rgba(154, 216, 245, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(154, 216, 245, 0.04) 1px, transparent 1px);
  background-size: 34px 34px;
}

.deepseek-message {
  max-width: min(780px, 92%);
  padding: 14px 16px 15px;
  border: 1px solid rgba(154, 216, 245, 0.18);
  border-radius: 8px;
  background: rgba(5, 24, 39, 0.78);
  box-shadow: 0 10px 24px rgba(0, 8, 18, 0.16);
}

.deepseek-message.user {
  align-self: flex-end;
  color: #082431;
  border-color: rgba(247, 201, 95, 0.46);
  background: linear-gradient(135deg, #fff0bd, #f7c95f);
}

.deepseek-message.assistant {
  align-self: flex-start;
}

.deepseek-message strong {
  display: block;
  margin-bottom: 6px;
  color: inherit;
  font-size: 14px;
}

.deepseek-message p {
  margin: 0;
  color: inherit;
  line-height: 1.75;
  white-space: pre-wrap;
}

.deepseek-form {
  display: grid;
  gap: 12px;
  padding: 18px 20px 20px;
  border-top: 1px solid rgba(154, 216, 245, 0.18);
  background: rgba(3, 18, 30, 0.42);
}

.deepseek-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 104px;
  max-height: 220px;
  padding: 15px 16px;
  color: var(--text);
  border: 1px solid rgba(154, 216, 245, 0.24);
  border-radius: 8px;
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.deepseek-form textarea:focus {
  border-color: rgba(103, 223, 242, 0.72);
  box-shadow: 0 0 0 3px rgba(103, 223, 242, 0.12);
}

.deepseek-form textarea:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.deepseek-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.deepseek-actions span {
  color: var(--muted);
  font-size: 14px;
}

.deepseek-actions button,
.deepseek-login-link,
.deepseek-suggestions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  color: #082431;
  border: 0;
  border-radius: 8px;
  background: var(--gold);
  font-weight: 800;
  cursor: pointer;
}

.deepseek-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.deepseek-side {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 18px;
}

.deepseek-status-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border: 1px solid rgba(103, 223, 242, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.deepseek-status-dot {
  width: 11px;
  height: 11px;
  margin-top: 7px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 0 6px rgba(247, 201, 95, 0.12), 0 0 18px rgba(247, 201, 95, 0.62);
}

.deepseek-status-card strong {
  display: block;
  color: #dff9ff;
}

.deepseek-status-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.deepseek-suggestions,
.deepseek-rules {
  padding: 16px;
  border: 1px solid rgba(154, 216, 245, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.deepseek-suggestions {
  display: grid;
  gap: 10px;
}

.deepseek-suggestions button {
  justify-content: flex-start;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--text);
  text-align: left;
  border: 1px solid rgba(154, 216, 245, 0.18);
  background: rgba(255, 255, 255, 0.07);
}

.deepseek-suggestions button:hover {
  color: #082431;
  border-color: transparent;
  background: var(--gold);
}

.deepseek-side ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.75;
}

.deepseek-login-link {
  width: 100%;
}

.deepseek-login-link[hidden] {
  display: none;
}

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

.ideology-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid rgba(103, 223, 242, 0.24);
  border-radius: 8px;
  background: rgba(7, 31, 48, 0.72);
  box-shadow: 0 16px 40px rgba(0, 10, 24, 0.26);
}

.ideology-card.featured {
  border-color: rgba(247, 201, 95, 0.42);
  background:
    linear-gradient(135deg, rgba(247, 201, 95, 0.12), transparent 34%),
    rgba(7, 31, 48, 0.76);
}

.ideology-card h3 {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.25;
}

.ideology-meta,
.ideology-data,
.ideology-question {
  padding: 14px;
  border: 1px solid rgba(154, 216, 245, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.ideology-meta strong,
.ideology-data strong {
  display: block;
  margin-bottom: 6px;
  color: #dff9ff;
}

.ideology-meta p,
.ideology-content {
  margin: 0;
  color: var(--muted);
}

.ideology-data ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.ideology-video {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
  align-items: stretch;
  width: 100%;
  padding: 0;
  color: inherit;
  text-align: left;
  border: 1px solid rgba(154, 216, 245, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  cursor: pointer;
}

.ideology-video:hover {
  transform: translateY(-1px);
  border-color: rgba(103, 223, 242, 0.5);
}

.video-thumb {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 112px;
  color: #082431;
  background:
    radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.78), transparent 26%),
    linear-gradient(135deg, #67dff2, #f7c95f);
  font-weight: 900;
  overflow: hidden;
}

.video-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 20, 32, 0.02), rgba(4, 20, 32, 0.38)),
    radial-gradient(circle at 50% 50%, transparent 0 42%, rgba(4, 20, 32, 0.22) 74%);
  pointer-events: none;
}

.video-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-mark {
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  color: #082431;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 28px rgba(0, 10, 24, 0.26);
}

.video-thumb > span:last-child {
  position: absolute;
  z-index: 1;
  right: 10px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.video-copy {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px 14px 14px 0;
}

.video-copy strong {
  color: #effcfe;
  line-height: 1.3;
}

.video-copy small {
  color: var(--muted);
  line-height: 1.5;
}

.ideology-question {
  color: #f8e7b4;
  border-color: rgba(247, 201, 95, 0.32);
  background: rgba(247, 201, 95, 0.08);
}

.ideology-article-link,
.ideology-map-link {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
}

.ideology-article-link {
  color: #effcfe;
  border: 1px solid rgba(103, 223, 242, 0.34);
  background: rgba(103, 223, 242, 0.12);
}

.ideology-article-link:hover {
  border-color: rgba(103, 223, 242, 0.62);
  background: rgba(103, 223, 242, 0.18);
}

.ideology-map-link {
  color: #082431;
  border: 0;
  background: linear-gradient(135deg, var(--gold), #ffe49c);
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 34px);
  background: rgba(0, 8, 18, 0.72);
  backdrop-filter: blur(10px);
}

.video-modal[hidden] {
  display: none;
}

.video-modal-panel {
  width: min(960px, 100%);
  overflow: hidden;
  border: 1px solid rgba(154, 216, 245, 0.28);
  border-radius: 8px;
  background: #061d31;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
}

.video-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  color: var(--text);
  background: #08283f;
}

.video-modal-header p {
  margin: 0;
  font-weight: 900;
}

.video-modal-close {
  width: 38px;
  height: 38px;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.video-player-wrap {
  aspect-ratio: 16 / 9;
  background: #0c3145;
}

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

.article-modal-panel {
  display: flex;
  flex-direction: column;
  width: min(900px, 100%);
  max-height: min(86vh, 900px);
}

.article-modal-body {
  overflow-y: auto;
  padding: 22px;
  color: var(--muted);
  line-height: 1.85;
}

.article-modal-body p {
  margin: 0 0 16px;
}

.article-modal-body p:last-child {
  margin-bottom: 0;
}

.article-kicker {
  color: #f7c95f;
  font-weight: 900;
}

.yangpu-section {
  padding: clamp(56px, 8vw, 104px) clamp(18px, 5vw, 72px);
  background:
    linear-gradient(115deg, rgba(103, 223, 242, 0.16), transparent 42%),
    linear-gradient(180deg, #0a314d, #0d4667);
}

.yangpu-content {
  max-width: 920px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(103, 223, 242, 0.24);
  border-radius: 8px;
  background: rgba(7, 31, 48, 0.68);
}

.yangpu-content h2 {
  font-size: clamp(30px, 5vw, 54px);
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.task-card {
  min-height: 220px;
  padding: 18px;
  text-align: left;
}

.task-card button {
  width: 100%;
  margin-top: 12px;
  min-height: 36px;
  color: #082431;
  border: 0;
  border-radius: 8px;
  background: var(--gold);
  font-weight: 800;
  cursor: pointer;
}

.task-answer {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.task-card.open .task-answer {
  display: block;
}

.demo-bar {
  position: fixed;
  right: clamp(14px, 3vw, 36px);
  bottom: clamp(14px, 3vw, 28px);
  left: clamp(14px, 3vw, 36px);
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 16px;
  border: 1px solid rgba(103, 223, 242, 0.34);
  border-radius: 8px;
  background: rgba(5, 22, 35, 0.94);
  box-shadow: 0 18px 48px rgba(0, 10, 24, 0.45);
  backdrop-filter: blur(18px);
}

.demo-bar[hidden] {
  display: none;
}

.demo-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--demo-progress, 0%);
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--orange));
  border-radius: 8px 8px 0 0;
  transition: width 0.28s ease;
}

.demo-meta {
  min-width: 0;
}

.demo-count {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-right: 10px;
  padding: 0 8px;
  color: #082431;
  border-radius: 8px;
  background: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.demo-meta strong {
  margin-right: 10px;
}

.demo-meta span:last-child {
  color: var(--muted);
}

.demo-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.demo-bar button {
  min-height: 34px;
  padding: 0 12px;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.demo-bar button:nth-child(2) {
  color: #082431;
  border-color: transparent;
  background: var(--gold);
  font-weight: 900;
}

.demo-highlight {
  outline: 2px solid rgba(244, 182, 74, 0.9);
  outline-offset: 5px;
  box-shadow: 0 0 0 8px rgba(244, 182, 74, 0.1);
}

.source-list {
  margin: 0;
  padding-left: 20px;
}

.source-list a {
  color: #bff7ff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.map-note {
  margin-top: 18px;
  font-size: 14px;
}

@media (max-width: 1100px) {
  .hero,
  .map-layout,
  .route-layout,
  .deepseek-chat {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .task-grid,
  .ideology-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    min-height: auto;
  }

  .hero-map,
  .map-card {
    height: 420px;
    min-height: 420px;
  }

  .china-map {
    min-height: 0;
  }

  .detail-panel {
    height: min(620px, 72vh);
  }

  .stats-grid,
  .task-grid,
  .ideology-grid {
    grid-template-columns: 1fr;
  }

  .ideology-video {
    grid-template-columns: 1fr;
  }

  .video-copy {
    padding: 0 14px 14px;
  }

  .port-label {
    font-size: 12px;
  }

  .demo-bar {
    grid-template-columns: 1fr;
  }

  .demo-controls {
    justify-content: flex-start;
  }
}
