:root {
  --bg-color: #08111f;
  --bg-accent: #0f1b31;
  --panel-bg: rgba(10, 18, 33, 0.88);
  --panel-strong: #101a2d;
  --border-color: rgba(148, 163, 184, 0.18);
  --border-strong: rgba(96, 165, 250, 0.35);
  --text-main: #e5eefc;
  --text-muted: #92a4c3;
  --text-soft: #6f84a7;
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --success-color: #34d399;
  --warning-color: #fbbf24;
  --error-color: #f87171;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-display: 'Orbitron', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 32%),
    radial-gradient(circle at top right, rgba(52, 211, 153, 0.08), transparent 24%),
    linear-gradient(180deg, #09101d 0%, #050a13 100%);
  overflow-x: hidden;
}

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

.hero-panel {
  position: relative;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--border-strong);
  color: #bfdbfe;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.pulse-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--success-color);
  box-shadow: 0 0 0.75rem rgba(52, 211, 153, 0.75);
  animation: pulse 1.6s infinite alternate;
}

@keyframes pulse {
  from { transform: scale(0.9); opacity: 0.75; }
  to { transform: scale(1.1); opacity: 1; }
}

.glitch-title {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f8fbff;
}

.hero-copy {
  color: var(--text-muted);
}

.main-panel {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(16px);
}

.search-label,
.section-title,
.thinking-title {
  color: var(--text-main);
}

.form-control,
.form-control:focus {
  background: rgba(15, 23, 42, 0.86);
  border-color: rgba(96, 165, 250, 0.25);
  color: var(--text-main);
  box-shadow: none;
}

.form-control::placeholder {
  color: #64748b;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15);
}

.racon-btn {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.translation-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(96, 165, 250, 0.2);
  color: var(--text-main);
}

.box-label {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.chinese-text {
  font-size: 1.1rem;
  font-weight: 700;
}

.progress-track {
  height: 0.55rem;
  background: rgba(15, 23, 42, 0.8);
}

.progress-bar-fill {
  background: linear-gradient(90deg, #2563eb 0%, #34d399 100%);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.thinking-section {
  background: rgba(8, 15, 28, 0.9);
  border: 1px solid var(--border-color);
}

.thinking-header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid transparent;
}

.thinking-header:hover {
  background: rgba(20, 31, 54, 0.92);
}

.thinking-icon {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.spinner-ring {
  width: 1rem;
  height: 1rem;
  display: inline-block;
  border-radius: 50%;
  border: 2px solid rgba(148, 163, 184, 0.35);
  border-top-color: var(--primary-color);
  animation: spin 0.8s linear infinite;
}

.spinner-ring.done {
  border-color: var(--success-color);
  animation: none;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

.thinking-toggle {
  margin-left: auto;
  color: var(--text-soft);
  transition: transform 0.2s ease;
}

.thinking-toggle.open {
  transform: rotate(180deg);
}

.thinking-content {
  display: none;
}

.thinking-content.open {
  display: block;
}

.console-output {
  max-height: 32rem;
  min-height: 18rem;
  overflow-y: auto;
  padding: 1rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: #050a13;
  font-family: var(--font-mono);
  font-size: 0.83rem;
  line-height: 1.6;
}

.console-line {
  margin-bottom: 0.45rem;
  white-space: pre-wrap;
}

.system-line { color: #93c5fd; }
.warning-line { color: var(--warning-color); }
.error-line { color: var(--error-color); }
.success-line { color: var(--success-color); }

.results-header {
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.result-release-note {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.result-card {
  background: linear-gradient(180deg, rgba(16, 26, 45, 0.96) 0%, rgba(10, 18, 33, 0.96) 100%);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.result-card:hover {
  transform: translateY(-2px);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 1rem 2.5rem rgba(2, 8, 23, 0.32);
}

.result-forum-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.14);
  color: #bfdbfe;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.empty-state-badge {
  background: rgba(248, 113, 113, 0.18);
  color: #fecaca;
}

.result-title {
  color: #f8fbff;
  line-height: 1.45;
  word-break: break-word;
}

.result-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  word-break: break-word;
}

.result-action-btn {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hud-footer {
  color: var(--text-soft);
  font-size: 0.82rem;
}

@media (min-width: 1200px) {
  .results-grid {
    max-height: 34rem;
    overflow-y: auto;
    padding-right: 0.25rem;
  }
}

@media (max-width: 991.98px) {
  .translation-box {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 767.98px) {
  .console-output {
    min-height: 14rem;
    max-height: 20rem;
  }

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