:root { color-scheme: dark; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; background: #0d0e10; color: #f5f5f3; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; background: radial-gradient(circle at 85% 5%, rgba(255,122,26,.11), transparent 28%), #0d0e10; }
main { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 46px 0 30px; }
header { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; padding-bottom: 24px; border-bottom: 1px solid #2a2c30; }
.kicker { margin: 0 0 7px; color: #ff7a1a; font: 700 11px/1 ui-monospace, monospace; letter-spacing: .18em; }
h1 { margin: 0; font-size: clamp(34px, 5vw, 64px); line-height: .95; letter-spacing: -.055em; }
h2 { margin: 0 0 16px; font-size: 17px; letter-spacing: -.03em; }
.program { max-width: 64ch; margin: 14px 0 0; color: #777a81; font-size: 13px; }
.controls { display: grid; min-width: 280px; gap: 7px; }
.operator-tools { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 5px; }
.logout-form { display: flex; margin: 0; }
.logout-button { min-height: 32px; padding: 0 11px; border: 1px solid #34363b; background: transparent; color: #8d9097; font-size: 11px; }
.logout-button:hover { border-color: #575a61; color: #f1f1ef; }
.settings-toggle { min-height: 32px; padding: 0 11px; border: 1px solid rgba(255, 122, 26, .45); background: rgba(255, 122, 26, .08); color: #ff9a50; font-size: 11px; }
label, .controls label, .control-label { color: #777a81; font-size: 11px; }
select, input, textarea { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid #34363b; border-radius: 10px; background: #111214; color: #e7e7e5; font: inherit; font-size: 13px; outline: none; }
textarea { resize: vertical; line-height: 1.55; }
select:focus, input:focus, textarea:focus { border-color: #ff7a1a; box-shadow: 0 0 0 3px rgba(255, 122, 26, .12); }
.result-toggle { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border: 1px solid #34363b; border-radius: 10px; background: #111214; }
.result-toggle button { min-height: 37px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: #777a81; font-size: 13px; font-weight: 680; cursor: pointer; transition: background-color .16s ease, color .16s ease, transform .1s ease; }
.result-toggle button:hover:not(:disabled) { color: #f1f1ef; }
.result-toggle button.active { background: #2a211b; color: #ff9a50; box-shadow: inset 0 0 0 1px rgba(255, 122, 26, .34); }
.result-toggle button:focus-visible { outline: 2px solid #ff7a1a; outline-offset: 2px; }
.result-toggle button:disabled:not(.active) { opacity: .38; cursor: not-allowed; }
.live-state { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: #777a81; font-size: 12px; }
.live-state i { width: 8px; height: 8px; border-radius: 50%; background: #55585f; }
.live-state.active i { background: #ff7a1a; box-shadow: 0 0 0 6px rgba(255,122,26,.1); }
.command-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 24px 0; border-bottom: 1px solid #2a2c30; }
.panel, .side-panel, .log-panel { border: 1px solid #2a2c30; border-radius: 16px; background: rgba(17, 18, 20, .72); padding: 18px; }
.panel label { display: block; margin: 12px 0 7px; }
.precise-panel { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .8fr); gap: 28px; align-items: end; }
.panel-copy { margin: 0; max-width: 68ch; color: #888b92; font-size: 12px; line-height: 1.7; }
.panel-copy code { color: #d8d8d5; }
.doc-link { display: inline-block; margin-top: 12px; color: #ff9a50; font-size: 12px; text-decoration: none; }
.doc-link:hover { text-decoration: underline; }
.upload-form .primary { margin-top: 10px; }
button, .link-button { min-height: 41px; border: 0; border-radius: 10px; padding: 0 15px; font: inherit; font-size: 13px; font-weight: 680; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
button:active, .link-button:active { transform: translateY(1px); }
.primary { width: 100%; margin-top: 14px; background: #ff7a1a; color: #16100b; }
.secondary, .link-button { border: 1px solid #3b3d42; background: #25262a; color: #f1f1ef; }
.danger { background: #4a211f; border: 1px solid #a53e34; color: #ffd4ce; }
.ghost { background: transparent; border: 1px solid #34363b; color: #b8bac0; }
.disabled { opacity: .42; pointer-events: none; }
.button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.button-row.lower { margin-top: 12px; }
.inline-row { display: grid; grid-template-columns: 1fr 92px; gap: 9px; }
.settings-panel { margin: 24px 0 0; padding: 22px; border: 1px solid #34363b; border-radius: 18px; background: rgba(15, 16, 18, .96); box-shadow: 0 26px 70px rgba(0, 0, 0, .28); }
.settings-panel[hidden] { display: none; }
.settings-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid #292b30; }
.settings-heading h2 { margin-bottom: 8px; font-size: 24px; }
.settings-actions-top { display: flex; align-items: center; gap: 10px; }
.config-status { padding: 7px 10px; border-radius: 999px; background: #202226; color: #8d9097; font-size: 11px; white-space: nowrap; }
.config-status.ready { background: rgba(42, 123, 83, .18); color: #8fdbaf; }
.config-status.restart { background: rgba(255, 122, 26, .14); color: #ff9a50; }
.settings-form { display: grid; gap: 12px; padding-top: 16px; }
.settings-form details { border: 1px solid #292b30; border-radius: 14px; background: #111214; }
.settings-form summary { cursor: pointer; padding: 15px 16px; color: #d8d8d5; font-size: 13px; font-weight: 700; user-select: none; }
.settings-form details[open] summary { border-bottom: 1px solid #292b30; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; padding: 16px; }
.settings-grid label { display: grid; align-content: start; gap: 7px; }
.settings-grid .wide { grid-column: 1 / -1; }
.settings-grid .check-label { display: flex; align-items: center; gap: 9px; min-height: 43px; padding-top: 17px; color: #c1c2c4; }
.settings-grid .check-label input { width: 17px; min-height: 17px; margin: 0; accent-color: #ff7a1a; }
.settings-grid.update-grid > div { display: grid; gap: 7px; align-content: start; min-height: 44px; }
.field-label { color: #777a81; font-size: 11px; }
.update-grid code { overflow-wrap: anywhere; color: #d8d8d5; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.update-status { display: inline-flex; width: fit-content; padding: 5px 8px; border-radius: 999px; background: #202226; color: #8d9097; font-size: 11px; }
.update-status.ready { background: rgba(42, 123, 83, .18); color: #8fdbaf; }
.update-status.available { background: rgba(255, 122, 26, .14); color: #ff9a50; }
.update-status.blocked, .update-status.error { background: rgba(117, 52, 47, .2); color: #ffd4ce; }
.update-progress { margin: 0 16px 16px; padding: 13px; border: 1px solid #292b30; border-radius: 12px; background: rgba(15, 16, 18, .7); }
.update-progress[hidden] { display: none; }
.update-progress-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; color: #d8d8d5; font-size: 12px; font-weight: 680; }
.update-progress-track { height: 9px; overflow: hidden; border-radius: 999px; background: #24262a; }
.update-progress-bar { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff7a1a, #ffd08f); transition: width .28s ease; }
.update-progress-speed { margin: 8px 0 0; color: #666970; font-size: 11px; }
.update-progress-speed code { color: #d8d8d5; font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.update-progress-log { margin-top: 9px; max-height: 112px; border-top: 1px solid #24262a; padding-top: 9px; color: #8d9097; }
.settings-update-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 0 16px 16px; }
.settings-update-actions [hidden] { display: none; }
.secret-state { align-self: center; justify-self: end; color: #666970; font-size: 11px; }
.settings-warning { margin: 14px 16px 0; padding: 10px 12px; border: 1px solid #5e492c; border-radius: 10px; background: rgba(94, 73, 44, .15); color: #d6b983; font-size: 12px; line-height: 1.6; }
.settings-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 6px; }
.settings-footer .primary { width: auto; min-width: 190px; margin: 0; }
.settings-submit-actions { display: flex; gap: 9px; }
.settings-submit-actions [hidden] { display: none; }
.settings-submit-actions .danger { min-width: 150px; }
.settings-footer .error { color: #ff9287; }
.settings-footer .success { color: #8fdbaf; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid #2a2c30; }
.metrics div { padding: 22px 0; }
.metrics div + div { padding-left: 24px; border-left: 1px solid #2a2c30; }
.metrics span { display: block; color: #777a81; font-size: 12px; }
.metrics strong { display: block; margin-top: 5px; font: 700 clamp(24px, 3vw, 40px)/1 ui-monospace, monospace; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; padding: 30px 0; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.section-heading h2 { margin: 0; }
.section-heading span { color: #666970; font-size: 12px; }
.ranking { min-height: 320px; }
.row { display: grid; grid-template-columns: 44px minmax(120px, 1.1fr) 3fr 92px; align-items: center; gap: 18px; min-height: 70px; border-bottom: 1px solid #222428; }
.rank { color: #686b72; font: 500 13px/1 ui-monospace, monospace; }
.name { font-size: clamp(17px, 2vw, 24px); font-weight: 680; letter-spacing: -.03em; }
.track { height: 10px; overflow: hidden; background: #24262a; border-radius: 999px; }
.bar { height: 100%; min-width: 3px; border-radius: inherit; background: #ff7a1a; transition: width .45s cubic-bezier(.2,.8,.2,1); }
.count { text-align: right; font: 700 21px/1 ui-monospace, monospace; }
.empty { display: grid; min-height: 260px; place-items: center; color: #60636a; font-size: 14px; }
.round-list { display: grid; gap: 8px; }
.round-item { width: 100%; min-height: 56px; border: 1px solid #26282d; background: #121316; color: #e7e7e5; border-radius: 12px; padding: 11px 12px; text-align: left; }
.round-item.active { border-color: #ff7a1a; background: rgba(255, 122, 26, .08); }
.round-item strong { display: block; font-size: 13px; }
.round-item span { display: block; margin-top: 5px; color: #777a81; font-size: 11px; }
.log-panel { margin-bottom: 20px; }
pre { margin: 0; max-height: 180px; overflow: auto; white-space: pre-wrap; color: #b8bac0; font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
footer { display: flex; justify-content: space-between; gap: 20px; padding-top: 18px; border-top: 1px solid #222428; color: #666970; font-size: 12px; }
.login-page { display: grid; place-items: center; padding: 24px; }
.login-shell { width: min(100%, 430px); margin: 0; padding: 0; }
.login-card { position: relative; overflow: hidden; padding: 34px; border: 1px solid #2a2c30; border-radius: 20px; background: rgba(17, 18, 20, .92); box-shadow: 0 28px 80px rgba(0, 0, 0, .38); }
.login-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: #ff7a1a; }
.login-card h1 { font-size: clamp(36px, 10vw, 52px); }
.login-copy { margin: 18px 0 26px; color: #888b92; font-size: 13px; line-height: 1.7; }
.login-form label { display: block; margin-bottom: 8px; }
.login-form input { font-size: 16px; letter-spacing: .08em; }
.login-form .primary { min-height: 46px; }
.auth-error { margin: 0 0 18px; padding: 11px 12px; border: 1px solid #75342f; border-radius: 10px; background: rgba(117, 52, 47, .2); color: #ffd4ce; font-size: 12px; }
.login-note { margin: 18px 0 0; color: #5f6268; font-size: 11px; line-height: 1.6; }
@media (max-width: 860px) { main { width: min(100% - 28px, 1180px); padding-top: 24px; } header, footer, .settings-heading, .settings-footer { flex-direction: column; } .controls { width: 100%; min-width: 0; } .command-grid, .content-grid, .precise-panel, .settings-grid { grid-template-columns: 1fr; } .settings-grid .wide { grid-column: auto; } .settings-actions-top, .settings-submit-actions, .settings-update-actions { width: 100%; justify-content: space-between; } .settings-submit-actions, .settings-update-actions { flex-direction: column; } .settings-footer .primary, .settings-submit-actions .danger, .settings-update-actions button { width: 100%; } .metrics div + div { padding-left: 12px; } .row { grid-template-columns: 30px 1fr 70px; gap: 10px; } .track { grid-column: 2 / 4; grid-row: 2; margin-bottom: 12px; } }
@media (max-width: 520px) { .login-page { padding: 14px; } .login-shell { width: 100%; padding: 0; } .login-card { padding: 26px 22px; } }
