/* 无量翻译 · 高端商务主题 —— 深藏青 × 香槟金 */
:root {
  --bg: #0a111e;
  --bg2: #0e1728;
  --card: rgba(255, 255, 255, .035);
  --line: rgba(201, 168, 106, .18);
  --line2: rgba(255, 255, 255, .08);
  --txt: #e8ecf3;
  --dim: #8b98ad;
  --gold: #d3b377;
  --gold-deep: #b08d4f;
  --gold-soft: rgba(211, 179, 119, .12);
  --blue: #7da2c9;
  --ok: #5fd3a1;
  --warn: #e6b45a;
  --err: #f08a8a;
  --serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 18px 45px rgba(0, 0, 0, .45);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(1100px 460px at 85% -8%, rgba(211, 179, 119, .09), transparent 62%),
    radial-gradient(900px 420px at 8% -4%, rgba(125, 162, 201, .08), transparent 58%),
    linear-gradient(180deg, #0a111e 0%, #0b1322 55%, #090f1a 100%);
  color: var(--txt);
  font-family: var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  letter-spacing: .01em;
}

/* ---------- header ---------- */
.site-head {
  padding: 34px 36px 0;
  max-width: 1140px;
  margin: 0 auto;
  width: 100%;
}
.brand { display: flex; align-items: center; gap: 18px; }
.brand-mark {
  font-family: var(--serif);
  font-size: 38px;
  width: 66px; height: 66px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(150deg, rgba(211,179,119,.16), rgba(211,179,119,.03) 60%);
  color: var(--gold);
  box-shadow: inset 0 0 22px rgba(211, 179, 119, .1), var(--shadow);
}
.brand h1 {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 10px;
  background: linear-gradient(100deg, #f0dcb4 10%, var(--gold) 45%, #9a7b45 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-sub {
  color: var(--dim);
  font-size: 11.5px;
  letter-spacing: 3.5px;
  margin-top: 6px;
  text-transform: uppercase;
}

#tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 26px 0 0;
  border-bottom: 1px solid var(--line2);
  padding-bottom: 14px;
}
#tabs button {
  background: transparent;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  color: var(--dim);
  padding: 9px 20px;
  border-radius: 10px 10px 0 0;
  font-size: 14.5px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all .22s ease;
  font-family: var(--sans);
}
#tabs button:hover { color: var(--txt); background: var(--gold-soft); }
#tabs button.active {
  color: var(--gold);
  font-weight: 600;
  background: linear-gradient(180deg, rgba(211,179,119,.14), transparent);
  border-bottom-color: var(--gold);
}

/* ---------- layout ---------- */
main { flex: 1; width: 100%; max-width: 1140px; margin: 28px auto; padding: 0 36px; }
.panel { display: none; animation: rise .3s ease; }
.panel.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; } }

.card {
  background: var(--card);
  border: 1px solid var(--line2);
  border-top: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}
.card h2 {
  font-family: var(--serif);
  font-size: 21px;
  margin-bottom: 6px;
  letter-spacing: 4px;
  color: var(--gold);
}
.card h2 + p { color: var(--dim); font-size: 13px; margin-bottom: 8px; }

.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0; }
.row.btns { margin: 16px 0; }
label {
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 2px;
  white-space: nowrap;
}

textarea, select {
  width: 100%;
  background: rgba(6, 10, 18, .7);
  border: 1px solid var(--line2);
  color: var(--txt);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: var(--sans);
  outline: none;
  transition: border .2s, box-shadow .2s;
}
textarea { resize: vertical; line-height: 1.8; }
textarea:focus, select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(211, 179, 119, .12);
}
select {
  width: auto;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% + 2px), calc(100% - 12px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
select option { background: var(--bg2); color: var(--txt); }
input[type="file"] {
  color: var(--dim);
  font-size: 13px;
  background: rgba(6,10,18,.7);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  max-width: 100%;
}
input[type="file"]::file-selector-button {
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 14px;
  margin-right: 12px;
  cursor: pointer;
  font-family: var(--sans);
  letter-spacing: 1px;
}

button {
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line2);
  color: var(--txt);
  padding: 10px 22px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  letter-spacing: 1px;
  transition: all .22s ease;
  font-family: var(--sans);
}
button:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); transform: translateY(-1px); }
button:active:not(:disabled) { transform: translateY(0); }
button:disabled { opacity: .4; cursor: not-allowed; }
button.primary {
  background: linear-gradient(135deg, #e3c891 0%, var(--gold) 40%, var(--gold-deep) 100%);
  color: #1a1206;
  border: none;
  font-weight: 700;
  letter-spacing: 3px;
  box-shadow: 0 6px 20px rgba(211, 179, 119, .25);
}
button.primary:hover:not(:disabled) {
  filter: brightness(1.08);
  color: #1a1206;
  box-shadow: 0 10px 28px rgba(211, 179, 119, .35);
}

.badge {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  color: var(--dim);
  white-space: nowrap;
  letter-spacing: 1px;
  background: rgba(6, 10, 18, .5);
}
.badge.ok { color: var(--ok); border-color: rgba(95, 211, 161, .4); }
.badge.warn { color: var(--warn); border-color: rgba(230, 180, 90, .4); }
.badge.err { color: var(--err); border-color: rgba(240, 138, 138, .4); }
.badge.live { color: var(--ok); border-color: rgba(95, 211, 161, .55); box-shadow: 0 0 12px rgba(95, 211, 161, .2); }

.hint { color: var(--dim); font-size: 12px; margin-top: 14px; line-height: 1.8; }
.hidden { display: none !important; }

.result, .doc pre {
  background: rgba(6, 10, 18, .65);
  border: 1px solid var(--line2);
  border-radius: 12px;
  padding: 16px;
  font-size: 13px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin-top: 14px;
  line-height: 1.7;
  color: #b6c2d4;
}
#img-preview { max-width: 340px; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); }

/* dict chips */
.dict { margin: 12px 0; }
.chip {
  display: inline-block;
  background: var(--gold-soft);
  border: 1px solid var(--line);
  color: var(--gold);
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 13px;
  margin: 3px 8px 3px 0;
}

/* interpret */
.int-lines {
  background: rgba(6, 10, 18, .65);
  border: 1px solid var(--line2);
  border-radius: 12px;
  min-height: 260px; max-height: 440px; overflow-y: auto;
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.int-line { border-left: 2px solid var(--line); padding-left: 12px; }
.int-line .orig { color: var(--dim); font-size: 13px; line-height: 1.6; }
.int-line .tran { color: var(--gold); font-size: 16.5px; font-family: var(--serif); line-height: 1.6; }

/* footer */
.site-foot {
  border-top: 1px solid var(--line2);
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 1.5px;
  padding: 20px 36px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  max-width: 1140px; margin: 28px auto 0; width: 100%;
}

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(211, 179, 119, .25); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(211, 179, 119, .4); }

@media (max-width: 720px) {
  .site-head, main { padding: 0 16px; }
  .card { padding: 18px; }
  .brand h1 { font-size: 26px; letter-spacing: 6px; }
}
