/* ========================================
   互联网废土首页 — 赛博极简废土风
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0B0F10;
  --bg-card: #121719;
  --text-primary: #E6E6E6;
  --text-secondary: #8A8F98;
  --text-dim: #4A4F58;
  --accent: #7CFF6B;
  --accent-glow: rgba(124, 255, 107, 0.15);
  --accent-dim: rgba(124, 255, 107, 0.08);
  --incident: #D4915E;
  --incident-glow: rgba(212, 145, 94, 0.2);
  --error-red: #8B4A4A;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
  --font-zh: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-mono);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* --- Overlays --- */

/* Scanline effect */
.scanline-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

/* Noise texture */
.noise-overlay {
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  animation: noise-drift 8s steps(10) infinite;
}

@keyframes noise-drift {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-5%, -10%); }
  20% { transform: translate(-15%, 5%); }
  30% { transform: translate(7%, -25%); }
  40% { transform: translate(-5%, 25%); }
  50% { transform: translate(-15%, 10%); }
  60% { transform: translate(15%, 0); }
  70% { transform: translate(0, 15%); }
  80% { transform: translate(3%, 35%); }
  90% { transform: translate(-10%, 10%); }
}

/* Ambient glow */
.ambient-glow {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 255, 107, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: glow-pulse 6s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

/* --- Container --- */
.container {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}

/* --- 1. Status Bar --- */
.status-bar {
  margin-bottom: 56px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(138, 143, 152, 0.12);
  animation: fade-in-down 0.8s ease-out both;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 4px;
}

.status-row:last-child {
  margin-bottom: 0;
}

.status-item {
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.8;
  white-space: nowrap;
}

.status-value {
  color: var(--text-secondary);
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 6px;
  vertical-align: middle;
  box-shadow: 0 0 6px var(--accent), 0 0 12px var(--accent-glow);
  animation: dot-blink 3s ease-in-out infinite;
}

@keyframes dot-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.mood-value {
  color: var(--accent);
}

.incident-value {
  color: var(--incident);
  text-shadow: 0 0 8px var(--incident-glow);
}

/* --- 2. Hero --- */
.hero {
  margin-bottom: 40px;
  animation: fade-in-up 1s ease-out 0.2s both;
}

.title-en {
  font-size: clamp(1.4rem, 4.5vw, 2.2rem);
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.title-line {
  display: block;
}

/* Blinking cursor */
.cursor {
  color: var(--accent);
  font-weight: 300;
  animation: blink 1s step-end infinite;
  text-shadow: 0 0 8px var(--accent), 0 0 20px var(--accent-glow);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.title-zh {
  font-family: var(--font-zh);
  font-size: clamp(0.85rem, 2.5vw, 1.05rem);
  color: var(--text-secondary);
  line-height: 1.8;
  letter-spacing: 0.03em;
}

.zh-line {
  display: block;
}

/* --- 3. Bio --- */
.bio {
  margin-bottom: 48px;
  animation: fade-in-up 1s ease-out 0.4s both;
}

.bio-text {
  font-family: var(--font-zh);
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 6px;
}

.bio-text-en {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 2px;
  align-items: center;
}

.tag {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  padding: 2px 6px;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.tag:hover {
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent-glow);
}

.tag-sep {
  font-size: 0.65rem;
  color: var(--text-dim);
  opacity: 0.4;
  user-select: none;
}

/* --- 4. Thought Section --- */
.thought-section {
  margin-bottom: 56px;
  animation: fade-in-up 1s ease-out 0.6s both;
}

.thought-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid rgba(124, 255, 107, 0.25);
  color: var(--accent);
  font-family: var(--font-zh);
  font-size: 0.85rem;
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
  position: relative;
  overflow: hidden;
}

.thought-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--accent-dim), transparent);
  transition: left 0.5s ease;
}

.thought-btn:hover::before {
  left: 100%;
}

.thought-btn:hover {
  border-color: rgba(124, 255, 107, 0.5);
  background: var(--accent-dim);
  box-shadow: 0 0 20px rgba(124, 255, 107, 0.1), inset 0 0 20px rgba(124, 255, 107, 0.04);
}

.thought-btn:active {
  transform: scale(0.98);
}

/* Pulse ping on button — draws attention */
.btn-ping {
  position: absolute;
  top: 50%;
  right: 16px;
  width: 6px;
  height: 6px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  animation: ping-dot 3s ease-in-out 2s infinite;
}

@keyframes ping-dot {
  0%, 100% { opacity: 0; transform: translateY(-50%) scale(1); box-shadow: none; }
  15% { opacity: 0.8; transform: translateY(-50%) scale(1); box-shadow: 0 0 4px var(--accent); }
  40% { opacity: 0; transform: translateY(-50%) scale(2.5); box-shadow: 0 0 12px transparent; }
}

.thought-btn:hover .btn-ping {
  animation: none;
  opacity: 0;
}

.btn-icon {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.thought-btn:hover .btn-icon {
  transform: translateX(2px);
}

.btn-text-en {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(124, 255, 107, 0.5);
  letter-spacing: 0.03em;
}

.thought-display {
  margin-top: 24px;
  padding: 20px 24px;
  background: var(--bg-card);
  border-left: 2px solid rgba(124, 255, 107, 0.3);
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--text-secondary);
  font-family: var(--font-zh);
  position: relative;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.thought-display:hover {
  border-color: rgba(124, 255, 107, 0.5);
  background: #151a1d;
}

.thought-display.changing {
  opacity: 0;
  transform: translateY(4px);
}

.thought-prefix {
  color: var(--accent);
  margin-right: 8px;
  font-family: var(--font-mono);
  opacity: 0.6;
  user-select: none;
}

.thought-text {
  letter-spacing: 0.02em;
}

.thought-line-zh {
  margin-bottom: 8px;
}

.thought-line-en {
  opacity: 0.55;
}

.thought-text-en {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  font-style: italic;
}

/* --- 5. Footer --- */
.footer {
  padding-top: 24px;
  border-top: 1px solid rgba(138, 143, 152, 0.08);
  animation: fade-in-up 1s ease-out 0.8s both;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 20px;
}

.footer-link {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: all 0.3s ease;
  padding: 4px 0;
}

.footer-link:hover {
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent-glow);
}

.link-bracket {
  color: var(--text-dim);
  opacity: 0.5;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.footer-link:hover .link-bracket {
  color: var(--accent);
  opacity: 0.7;
}

.footer-note {
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  text-transform: lowercase;
}

/* --- Corner Status --- */
.corner-status {
  position: fixed;
  bottom: 20px;
  right: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 0.6rem;
  color: var(--text-dim);
  opacity: 0.35;
  letter-spacing: 0.1em;
  z-index: 2;
  transition: opacity 0.3s ease;
  font-family: var(--font-mono);
}

.corner-status:hover {
  opacity: 0.7;
}

/* --- Wasteland Runner Easter Egg --- */
.runner-entry {
  margin: -24px 0 56px;
  animation: fade-in-up 1s ease-out 0.72s both;
}

.runner-trigger {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 14px 18px;
  overflow: hidden;
  border: 1px solid rgba(124, 255, 107, 0.28);
  border-left: 2px solid rgba(212, 145, 94, 0.55);
  background: rgba(18, 23, 25, 0.74);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.runner-trigger::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(124, 255, 107, 0.08), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.runner-trigger:hover::before,
.runner-trigger:focus-visible::before {
  transform: translateX(100%);
}

.runner-trigger:hover,
.runner-trigger:focus-visible {
  border-color: rgba(124, 255, 107, 0.55);
  background: rgba(124, 255, 107, 0.06);
  box-shadow: 0 0 22px rgba(124, 255, 107, 0.1), inset 0 0 20px rgba(124, 255, 107, 0.035);
  outline: none;
}

.runner-trigger:active {
  transform: scale(0.99);
}

.runner-entry-icon {
  position: relative;
  color: var(--accent);
  font-size: 0.78rem;
  text-shadow: 0 0 8px var(--accent-glow);
}

.runner-entry-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.runner-entry-zh {
  color: var(--accent);
  font-family: var(--font-zh);
  font-size: 0.88rem;
  line-height: 1.65;
  letter-spacing: 0.05em;
  text-shadow: 0 0 8px rgba(124, 255, 107, 0.12);
}

.runner-entry-en {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-style: italic;
  line-height: 1.55;
  letter-spacing: 0.05em;
}

.runner-entry-status {
  position: relative;
  padding: 4px 7px;
  border: 1px solid rgba(212, 145, 94, 0.3);
  color: var(--incident);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-shadow: 0 0 8px var(--incident-glow);
  white-space: nowrap;
}

.runner-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(11, 15, 16, 0.88);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.runner-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.runner-shell {
  width: min(760px, 100%);
  padding: 18px;
  background: rgba(12, 17, 18, 0.96);
  border: 1px solid rgba(124, 255, 107, 0.28);
  box-shadow: 0 0 36px rgba(124, 255, 107, 0.12), inset 0 0 30px rgba(124, 255, 107, 0.025);
}

.runner-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(138, 143, 152, 0.12);
}

.runner-title {
  font-family: var(--font-zh);
  font-size: 0.98rem;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-shadow: 0 0 10px var(--accent-glow);
}

.runner-title-en {
  margin-top: 5px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-style: italic;
  line-height: 1.5;
}

.runner-close {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid rgba(212, 145, 94, 0.35);
  background: transparent;
  color: var(--incident);
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.runner-close:hover,
.runner-close:focus-visible {
  background: rgba(212, 145, 94, 0.08);
  box-shadow: 0 0 12px var(--incident-glow);
  outline: none;
}

.runner-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 32 / 11;
  min-height: 170px;
  background: #0B0F10;
  border: 1px solid rgba(124, 255, 107, 0.2);
  image-rendering: pixelated;
  box-shadow: inset 0 0 24px rgba(124, 255, 107, 0.04);
  touch-action: manipulation;
}

.runner-game-frame {
  position: relative;
  overflow: hidden;
  min-height: 340px;
  background: #f7f7f7;
  border: 1px solid rgba(124, 255, 107, 0.22);
  box-shadow: inset 0 0 24px rgba(124, 255, 107, 0.05);
}

.runner-iframe {
  display: block;
  width: 100%;
  height: 340px;
  border: 0;
  background: #f7f7f7;
}

.runner-hud {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
}

#runner-score {
  color: rgba(124, 255, 107, 0.7);
}

#runner-state {
  color: var(--incident);
  text-shadow: 0 0 8px var(--incident-glow);
}

.runner-board {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(124, 255, 107, 0.2);
  border-left: 2px solid rgba(212, 145, 94, 0.58);
  background: rgba(18, 23, 25, 0.72);
}

.runner-board[hidden] {
  display: none;
}

.runner-board-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.runner-board-title {
  color: var(--accent);
  font-family: var(--font-zh);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.runner-board-title-en {
  margin-top: 3px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-style: italic;
}

.runner-final-score {
  color: var(--incident);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-shadow: 0 0 10px var(--incident-glow);
}

.runner-name-form {
  margin-bottom: 14px;
}

.runner-name-label {
  display: block;
  margin-bottom: 7px;
  color: var(--text-dim);
  font-family: var(--font-zh);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.runner-name-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.runner-name-input {
  min-width: 0;
  border: 1px solid rgba(124, 255, 107, 0.24);
  background: rgba(11, 15, 16, 0.82);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 9px 10px;
  outline: none;
}

.runner-name-input:focus {
  border-color: rgba(124, 255, 107, 0.55);
  box-shadow: 0 0 12px rgba(124, 255, 107, 0.08);
}

.runner-submit {
  border: 1px solid rgba(124, 255, 107, 0.32);
  background: transparent;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  padding: 0 12px;
  cursor: pointer;
}

.runner-submit:hover,
.runner-submit:focus-visible {
  background: rgba(124, 255, 107, 0.08);
  outline: none;
}

.runner-leave-confirm {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(212, 145, 94, 0.38);
  background: rgba(212, 145, 94, 0.07);
  box-shadow: inset 0 0 18px rgba(212, 145, 94, 0.035);
}

.runner-leave-confirm[hidden] {
  display: none;
}

.runner-leave-zh {
  color: var(--incident);
  font-family: var(--font-zh);
  font-size: 0.78rem;
  line-height: 1.7;
  letter-spacing: 0.05em;
  text-shadow: 0 0 8px var(--incident-glow);
}

.runner-leave-en {
  margin-top: 4px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-style: italic;
  line-height: 1.55;
}

.runner-leave-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.runner-leave-actions button {
  min-height: 32px;
  border: 1px solid rgba(124, 255, 107, 0.28);
  background: transparent;
  color: var(--accent);
  font-family: var(--font-zh);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 0 12px;
  cursor: pointer;
}

.runner-leave-actions button:hover,
.runner-leave-actions button:focus-visible {
  background: rgba(124, 255, 107, 0.08);
  outline: none;
}

.runner-leave-exit {
  border-color: rgba(212, 145, 94, 0.38) !important;
  color: var(--incident) !important;
}

.runner-ranking-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
}

.runner-ranking-list {
  display: grid;
  gap: 7px;
  list-style: none;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.runner-ranking-list li {
  display: grid;
  grid-template-columns: 32px 58px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid rgba(138, 143, 152, 0.08);
  background: rgba(11, 15, 16, 0.34);
}

.runner-rank-item {
  position: relative;
  overflow: hidden;
}

.runner-rank-number {
  color: var(--text-dim);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}

.runner-rank-badge {
  color: var(--text-dim);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
}

.runner-rank-name {
  min-width: 0;
  color: var(--text-primary);
  font-family: var(--font-zh);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runner-rank-score {
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.runner-rank-1 {
  min-height: 48px;
  border-color: rgba(212, 145, 94, 0.58);
  background: linear-gradient(90deg, rgba(212, 145, 94, 0.13), rgba(124, 255, 107, 0.055), rgba(11, 15, 16, 0.36));
  box-shadow: 0 0 20px rgba(212, 145, 94, 0.12), inset 0 0 22px rgba(212, 145, 94, 0.04);
}

.runner-rank-1::before {
  content: 'CURRENT KING';
  position: absolute;
  top: 5px;
  right: 8px;
  color: rgba(212, 145, 94, 0.38);
  font-size: 0.5rem;
  letter-spacing: 0.14em;
}

.runner-rank-1 .runner-rank-number,
.runner-rank-1 .runner-rank-badge {
  color: var(--incident);
  text-shadow: 0 0 8px var(--incident-glow);
}

.runner-rank-1 .runner-rank-name {
  color: var(--accent);
  font-size: 1rem;
  text-shadow: 0 0 10px rgba(124, 255, 107, 0.22);
}

.runner-rank-1 .runner-rank-score {
  color: var(--incident);
  font-size: 1rem;
  text-shadow: 0 0 10px var(--incident-glow);
}

.runner-rank-2,
.runner-rank-3 {
  border-color: rgba(124, 255, 107, 0.22);
  background: rgba(124, 255, 107, 0.04);
}

.runner-rank-2 .runner-rank-name,
.runner-rank-3 .runner-rank-name {
  color: rgba(230, 230, 230, 0.92);
  font-size: 0.94rem;
}

.runner-rank-2 .runner-rank-score,
.runner-rank-3 .runner-rank-score {
  font-size: 0.9rem;
}

.runner-rank-2 .runner-rank-badge {
  color: rgba(124, 255, 107, 0.72);
}

.runner-rank-3 .runner-rank-badge {
  color: rgba(212, 145, 94, 0.72);
}

.runner-rank-empty {
  color: var(--text-dim);
  font-style: italic;
}

.runner-board-note {
  margin-top: 10px;
  color: var(--text-dim);
  font-family: var(--font-zh);
  font-size: 0.68rem;
  line-height: 1.7;
  letter-spacing: 0.04em;
}

/* --- Animations --- */
@keyframes fade-in-down {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Selection --- */
::selection {
  background: rgba(124, 255, 107, 0.2);
  color: var(--text-primary);
}

::-moz-selection {
  background: rgba(124, 255, 107, 0.2);
  color: var(--text-primary);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--text-dim);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .container {
    padding: 24px 20px 40px;
  }

  .status-bar {
    margin-bottom: 40px;
  }

  .status-row {
    flex-direction: column;
    gap: 2px;
  }

  .hero {
    margin-bottom: 32px;
  }

  .bio {
    margin-bottom: 40px;
  }

  .thought-section {
    margin-bottom: 48px;
  }

  .thought-display {
    padding: 16px 18px;
  }

  .runner-entry {
    margin: -20px 0 48px;
  }

  .runner-trigger {
    grid-template-columns: auto 1fr;
    gap: 12px;
    padding: 14px 16px;
  }

  .runner-entry-status {
    grid-column: 2;
    justify-self: start;
  }

  .corner-status {
    bottom: 12px;
    right: 16px;
    font-size: 0.55rem;
  }

  .runner-modal {
    place-items: start center;
    padding: 14px 14px max(92px, env(safe-area-inset-bottom));
  }

  .runner-shell {
    padding: 14px;
  }

  .runner-modal.is-score-open .runner-game-frame {
    min-height: 170px;
  }

  .runner-modal.is-score-open .runner-iframe {
    height: 170px;
    pointer-events: none;
  }

  .runner-modal.is-score-open .runner-board {
    max-height: 54vh;
    max-height: 54dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .runner-canvas {
    min-height: 150px;
  }

  .runner-hud {
    flex-wrap: wrap;
    font-size: 0.58rem;
  }

  .runner-board-head {
    flex-direction: column;
    gap: 8px;
  }

  .runner-name-row {
    grid-template-columns: 1fr;
  }

  .runner-submit {
    min-height: 36px;
  }

  .runner-ranking-list li {
    grid-template-columns: 30px 52px minmax(0, 1fr);
    gap: 8px;
  }

  .runner-rank-score {
    grid-column: 3;
    justify-self: start;
  }

  .runner-rank-1::before {
    display: none;
  }
}

@media (max-width: 380px) {
  .title-en {
    font-size: 1.2rem;
  }
  
  .tags {
    gap: 2px 0;
  }
}

/* --- Accessibility: reduce motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .noise-overlay {
    display: none;
  }
}
