:root {
  --bg: #0e1110;
  --panel: #f5f1e8;
  --ink: #111111;
  --muted: #5f5f5f;
  --accent: #ff4d2e;
  --accent-2: #18b9ff;
  --accent-3: #c6ff4b;
  --outline: #141414;
  --shadow: 10px 10px 0 rgba(10, 10, 10, 0.85);
  --font-title: "STKaiti", "KaiTi", "FangSong", "STSong", "SimHei", "Microsoft YaHei", serif;
  --font-body: "PingFang SC", "Microsoft YaHei", "Heiti SC", "Noto Sans CJK SC", sans-serif;
  --font-label: "Menlo", "Consolas", "SFMono-Regular", monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: radial-gradient(circle at 20% 20%, rgba(255, 77, 46, 0.25), transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(24, 185, 255, 0.25), transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(198, 255, 75, 0.2), transparent 50%),
    #0f1211;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.bg-orb {
  position: fixed;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  filter: blur(8px);
  opacity: 0.35;
  z-index: 0;
}

.orb-a {
  top: -80px;
  right: 8%;
  background: radial-gradient(circle, rgba(255, 77, 46, 0.9), transparent 60%);
}

.orb-b {
  bottom: -100px;
  left: 10%;
  background: radial-gradient(circle, rgba(24, 185, 255, 0.9), transparent 65%);
}

.noise {
  position: fixed;
  inset: 0;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="2" stitchTiles="stitch"/></filter><rect width="200" height="200" filter="url(%23n)" opacity="0.35"/></svg>');
  opacity: 0.18;
  pointer-events: none;
  z-index: 1;
}

.shell {
  position: relative;
  z-index: 2;
  width: min(720px, 92vw);
  margin: 0 auto;
  padding: 28px;
  display: grid;
  gap: 18px;
  background: var(--panel);
  border: 3px solid var(--outline);
  box-shadow: var(--shadow);
}

.hero {
  background: transparent;
  border: none;
  padding: 0 0 16px;
  box-shadow: none;
  display: grid;
  gap: 10px;
  border-bottom: 2px dashed rgba(17, 17, 17, 0.4);
}

.badge {
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ffffff;
  background: #111111;
  width: fit-content;
  padding: 6px 10px;
  border: 2px solid #111111;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: 0.06em;
}

.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  text-transform: uppercase;
  font-family: var(--font-label);
}

.mode {
  font-family: var(--font-body);
  text-transform: none;
  font-weight: 700;
}

.signal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0e6d4b;
  font-weight: 700;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 0 0 rgba(198, 255, 75, 0.6);
  animation: pulse 1.6s infinite;
}

.console {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.output-wrap {
  background: #ffffff;
  border: 3px solid var(--outline);
  padding: 14px;
  box-shadow: 6px 6px 0 rgba(10, 10, 10, 0.75);
  display: grid;
  gap: 10px;
}

.output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #202020;
}

.label {
  background: #111111;
  color: #ffffff;
  padding: 4px 8px;
}

.hint {
  color: #5a5a5a;
  letter-spacing: 0.08em;
}

.output-shell {
  border: 3px solid #111111;
  background: #ffffff;
  height: 210px;
  min-height: 210px;
  max-height: 210px;
  overflow: hidden;
}

.output {
  padding: 16px 14px;
  height: 100%;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.7;
  font-family: var(--font-body);
  overflow-y: auto;
  scrollbar-gutter: stable both-edges;
}

.controls {
  background: #111111;
  color: #ffffff;
  border: 3px solid #111111;
  box-shadow: 6px 6px 0 rgba(10, 10, 10, 0.75);
  padding: 14px;
  position: static;
  display: grid;
  gap: 12px;
}

.group {
  display: grid;
  gap: 10px;
}

.group-title {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-label);
}

.controls-row {
  display: grid;
  gap: 10px;
}

.controls-row.primary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.controls-row.secondary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.btn {
  border: 2px solid #111111;
  background: #ffffff;
  color: #111111;
  padding: 10px 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.7);
}

.btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.7);
}

.btn:active {
  transform: translate(0, 0);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.7);
}

.btn.active {
  filter: brightness(0.95);
  box-shadow: inset 0 0 0 2px #111111;
}

.btn.blast {
  background: linear-gradient(180deg, #ff7a5f, var(--accent));
  color: #ffffff;
}

.btn.lotus {
  background: linear-gradient(180deg, #7fd6ff, var(--accent-2));
  color: #ffffff;
}

.btn.copy {
  background: linear-gradient(180deg, #d4ff6a, var(--accent-3));
  color: #1a1a1a;
}

.btn.mini {
  font-size: 13px;
}

.btn.mini .check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4em;
  height: 1.4em;
  font-family: var(--font-label);
  font-size: 14px;
  margin-right: 4px;
}

.icon {
  font-size: 16px;
}

.keyword {
  display: grid;
  gap: 6px;
}

.keyword label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-label);
}

.keyword input {
  border: 2px solid #111111;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: var(--font-body);
  background: #ffffff;
  color: #111111;
}

.keyword input::placeholder {
  color: #9a9a9a;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 16px);
  padding: 10px 16px;
  border: 2px solid #111111;
  background: #ffffff;
  color: #111111;
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 999;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}


.footer-note {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.notice,
.contact {
  background: #ffffff;
  border: 3px solid var(--outline);
  padding: 14px;
  box-shadow: 6px 6px 0 rgba(10, 10, 10, 0.75);
}

.notice-title,
.contact-title {
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.notice p {
  margin: 0;
  color: #444444;
  font-size: 14px;
}

.contact a {
  display: inline-flex;
  margin-top: 4px;
  color: #111111;
  font-weight: 800;
  text-decoration: none;
  padding: 6px 10px;
  border: 2px solid #111111;
  background: #ffffff;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.6);
}

.contact a:hover {
  transform: translate(-1px, -1px);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(198, 255, 75, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(198, 255, 75, 0); }
  100% { box-shadow: 0 0 0 0 rgba(198, 255, 75, 0); }
}

@media (max-width: 900px) {
  .controls-row.primary {
    grid-template-columns: 1fr;
  }

  .controls-row.secondary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body {
    padding: 28px 12px;
  }

  .shell {
    padding: 20px;
    max-height: 92vh;
    overflow-y: auto;
  }

  .status-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .output-shell {
    height: 190px;
    min-height: 190px;
    max-height: 190px;
  }

  .controls {
    padding: 12px;
    position: static;
  }

  .keyword input {
    font-size: 14px;
  }

}

@media (max-width: 520px) {
  .hint {
    display: none;
  }

  .output-shell {
    height: 180px;
    min-height: 180px;
    max-height: 180px;
  }

  .output {
    font-size: 15px;
  }

  .btn {
    padding: 12px 14px;
  }

  .btn.mini {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dot {
    animation: none;
  }
}
