:root {
  --bg: #0b1220;
  --panel: #111a2e;
  --panel-2: #0f1830;
  --text: #eaf0ff;
  --muted: #b8c3e6;
  --accent: #6ee7ff;
  --accent-2: #a6ff9a;
  --danger: #ff6b6b;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: rgba(0, 0, 0, 0.35);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans TC", "PingFang TC",
    "Microsoft JhengHei", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(1200px 600px at 10% 0%, rgba(110, 231, 255, 0.18), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(166, 255, 154, 0.12), transparent 55%), var(--bg);
  color: var(--text);
  line-height: 1.5;
}

h1,
h2 {
  margin: 0 0 12px;
}

h1 {
  font-size: 1.55rem;
  letter-spacing: 0.2px;
}

h2 {
  font-size: 1.15rem;
  letter-spacing: 0.2px;
}

.container {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

header.container {
  padding: 28px 0 8px;
}

.subtitle {
  margin: 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
  padding: 14px 0;
}

@media (min-width: 920px) {
  .grid {
    grid-template-columns: 420px 1fr;
    align-items: start;
  }
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 35%), var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 18px 50px var(--shadow);
}

.field {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}

label {
  color: var(--muted);
  font-size: 0.95rem;
}

input,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: var(--panel-2);
  color: var(--text);
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(110, 231, 255, 0.6);
  box-shadow: 0 0 0 4px rgba(110, 231, 255, 0.14);
}

hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 14px 0;
}

.hint {
  color: rgba(184, 195, 230, 0.9);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

button {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}

button.primary {
  border-color: rgba(110, 231, 255, 0.6);
  background: linear-gradient(180deg, rgba(110, 231, 255, 0.22), rgba(110, 231, 255, 0.06));
}

button.ghost {
  background: transparent;
}

button:active {
  transform: translateY(1px);
}

.results {
  display: grid;
  gap: 10px;
}

.results.empty {
  padding: 8px 0;
}

.muted {
  color: var(--muted);
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.result-grid .pill {
  display: grid;
  grid-template-rows: minmax(2.4em, auto) auto auto;
  align-content: start;
}

@media (min-width: 640px) {
  .result-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.pill {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.pill .k {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.25;
  letter-spacing: 0.2px;
}

.pill .v {
  font-size: 1.25rem;
  font-weight: 650;
  margin-top: 4px;
}

.pill .sub {
  margin-top: 2px;
  color: rgba(184, 195, 230, 0.95);
  font-size: 0.85rem;
  line-height: 1.3;
}

.pill {
  min-height: 92px;
}

.footer {
  padding: 10px 0 30px;
  color: rgba(184, 195, 230, 0.9);
}

.error {
  color: var(--danger);
  font-weight: 600;
}
