:root {
  --bg: #0f1216;
  --card: #171b22;
  --line: #262c36;
  --fg: #e6e9ef;
  --muted: #8b93a1;
  --accent: #4f8cff;
  --danger: #ff5f56;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.6 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; font-size: 17px; color: var(--fg); }
.brand:hover { text-decoration: none; }
.nav nav a { margin-left: 18px; color: var(--muted); }
.nav nav a:hover { color: var(--fg); }

main { flex: 1; width: 100%; max-width: 980px; margin: 0 auto; padding: 26px 18px 60px; }

footer {
  text-align: center; color: var(--muted); font-size: 12px;
  padding: 18px; border-top: 1px solid var(--line);
}

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 22px; margin-bottom: 20px;
}
.card.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
h1 { font-size: 20px; margin: 0 0 8px; }
h2 { font-size: 16px; margin: 0; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row > label { flex: 1 1 200px; }

label { display: block; margin: 14px 0; color: var(--muted); font-size: 13px; }
input[type=text], input[type=password], input[type=file], select {
  display: block; width: 100%; margin-top: 6px;
  padding: 10px 12px; background: #0c0f13; color: var(--fg);
  border: 1px solid var(--line); border-radius: 8px;
  font: inherit; font-size: 14px;
}
input[type=file] { padding: 8px; }
input:focus, select:focus { outline: none; border-color: var(--accent); }

button, .btn {
  display: inline-block; cursor: pointer; font: inherit; font-size: 14px;
  padding: 10px 18px; border-radius: 8px; border: 1px solid var(--line);
  background: #21262f; color: var(--fg); margin-top: 8px;
}
button:hover, .btn:hover { border-color: var(--accent); text-decoration: none; }
button.primary, .btn.primary {
  background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600;
}
button.primary:disabled { opacity: .6; cursor: not-allowed; }
button.ghost, .btn.ghost { background: transparent; }
button.danger {
  background: transparent; border-color: var(--danger);
  color: var(--danger); margin: 0; padding: 5px 12px;
}
button.small { font-size: 13px; }
.block { display: block; text-align: center; margin-top: 16px; }

.alert { padding: 11px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert.error { background: #2a1416; border: 1px solid #5b2126; color: #ff9a94; }
.alert.warn { background: #2a2413; border: 1px solid #5b4a1c; color: #ffd479; }

.modebox {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; margin: 14px 0;
}
.modebox p { margin: 6px 0 10px; }

.progress {
  height: 6px; background: #0c0f13; border-radius: 4px;
  overflow: hidden; margin: 12px 0 6px;
}
.progress .bar {
  height: 100%; width: 0%; background: var(--accent);
  transition: width .15s linear;
}

.verdict-big {
  display: flex; gap: 26px; flex-wrap: wrap;
  margin: 18px 0 4px;
}
.verdict-big > div { flex: 1 1 140px; }
.bigpct {
  font: 700 34px/1.2 ui-monospace, Consolas, monospace;
  color: var(--accent); margin: 4px 0;
}

.tag {
  display: inline-block; padding: 2px 8px; border-radius: 5px;
  font-size: 12px; font-weight: 600;
}
.tag.ok   { background: #14301c; color: #7ee0a0; border: 1px solid #245c35; }
.tag.warn { background: #2a2413; color: #ffd479; border: 1px solid #5b4a1c; }
.tag.bad  { background: #2a1416; color: #ff9a94; border: 1px solid #5b2126; }

.code-banner { text-align: center; border-color: var(--accent); }
.bigcode {
  font: 700 42px/1.2 ui-monospace, Consolas, monospace;
  letter-spacing: 8px; color: var(--accent);
  margin: 12px 0; user-select: all;
}
.codeinput {
  font: 700 30px/1.2 ui-monospace, Consolas, monospace !important;
  letter-spacing: 8px; text-align: center; text-transform: uppercase;
}

.listhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tablewrap { overflow-x: auto; margin-top: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; }
td.name { max-width: 260px; overflow-wrap: anywhere; }
td .code {
  font: 600 14px ui-monospace, Consolas, monospace;
  letter-spacing: 1px; user-select: all;
}

dl.meta { margin: 16px 0; }
dl.meta dt { color: var(--muted); font-size: 12px; margin-top: 12px; }
dl.meta dd { margin: 2px 0 0; overflow-wrap: anywhere; }

@media (max-width: 560px) {
  .bigcode { font-size: 30px; letter-spacing: 5px; }
  main { padding: 16px 12px 40px; }
}
