:root {
    --ink: #f4f6f1;
    --muted: #b6c2b9;
    --muted-2: #87958c;
    --canvas: #171a1b;
    --surface: #202625;
    --surface-2: #28312d;
    --surface-3: #303b35;
    --line: #405048;
    --line-soft: rgba(214, 221, 213, .16);
    --cyan: #d9f66d;
    --cyan-bright: #ecffa5;
    --amber: #e4ad59;
    --danger: #f38e8e;
    --white: #ffffff;
    --shadow: 0 22px 60px rgba(0, 0, 0, .28);
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--canvas); }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--canvas); font-size: 16px; line-height: 1.65; }
button, textarea, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.shell { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 20; top: -100px; left: 16px; padding: 8px 14px; color: var(--canvas); background: var(--cyan); border-radius: 4px; }
.skip-link:focus { top: 12px; }

.site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid rgba(148, 163, 184, .11); background: rgba(8, 15, 27, .92); backdrop-filter: blur(18px); }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; color: var(--canvas); background: var(--cyan); border-radius: 7px; font: 700 14px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; letter-spacing: .02em; }
.brand small { margin-top: 1px; color: var(--muted-2); font: 10px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .12em; }
.top-nav { display: flex; align-items: center; gap: 24px; color: var(--muted); font-size: 14px; }
.top-nav a { text-decoration: none; transition: color .2s ease; }
.top-nav a:hover, .top-nav a:focus-visible { color: var(--ink); }
.top-nav .nav-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; color: var(--ink); border: 1px solid var(--line); border-radius: 5px; }
.top-nav .nav-pill span { color: var(--cyan); font-size: 17px; line-height: 1; }

.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(330px, .9fr); align-items: end; gap: 64px; padding-top: 92px; padding-bottom: 88px; }
.eyebrow, .section-kicker, .panel-index, .sidebar-label { margin: 0; color: var(--cyan); font: 700 11px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .13em; }
.eyebrow { display: flex; align-items: center; gap: 9px; }
.status-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(85, 214, 196, .13); }
.hero h1 { max-width: 690px; margin: 19px 0 19px; font-size: 52px; line-height: 1.12; letter-spacing: 0; font-weight: 700; }
.hero h1 em { color: var(--cyan); font-style: normal; }
.hero-lead { max-width: 600px; margin: 0; color: var(--muted); font-size: 18px; line-height: 1.8; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 25px; margin-top: 31px; color: var(--muted-2); font-size: 12px; }
.hero-meta b { margin-right: 5px; color: var(--ink); font: 700 13px ui-monospace, SFMono-Regular, Consolas, monospace; }
.hero-console { align-self: center; padding: 21px 22px 16px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-3); box-shadow: var(--shadow); }
.console-top, .console-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted-2); font: 10px ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .09em; }
.live-label { color: var(--cyan); }
.live-label i, .console-lines i { display: inline-block; width: 5px; height: 5px; margin-right: 5px; vertical-align: 1px; border-radius: 50%; background: currentColor; }
.console-lines { display: grid; gap: 13px; margin: 25px 0 24px; }
.console-lines span { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; color: var(--muted); font: 12px ui-monospace, SFMono-Regular, Consolas, monospace; }
.console-lines b { color: var(--muted-2); font-weight: 400; }
.console-lines code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.console-lines i { width: auto; height: auto; margin: 0; color: var(--cyan); background: transparent; font-style: normal; font-size: 10px; }
.console-foot { padding-top: 14px; border-top: 1px solid var(--line-soft); letter-spacing: 0; }

.workspace { padding-bottom: 100px; }
.workspace-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 25px; }
.workspace-heading h2, .about h2, .seo-copy h2 { margin: 7px 0 0; font-size: 25px; line-height: 1.25; letter-spacing: 0; }
.workspace-hint { max-width: 380px; margin: 0; color: var(--muted-2); font-size: 13px; text-align: right; }
.server-message { margin: -8px 0 17px; padding: 9px 12px; border: 1px solid rgba(85, 214, 196, .28); border-radius: 4px; color: var(--cyan-bright); background: rgba(85, 214, 196, .07); font-size: 12px; }
.server-message.error { color: var(--danger); border-color: rgba(243, 142, 142, .32); background: rgba(243, 142, 142, .07); }
.workspace-layout { display: grid; grid-template-columns: 244px minmax(0, 1fr); align-items: start; gap: 16px; }
.tool-sidebar { position: sticky; top: 98px; padding: 17px 12px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.sidebar-label { padding: 0 10px 12px; color: var(--muted-2); font-size: 10px; }
.tool-tab { width: 100%; display: grid; grid-template-columns: 23px 1fr 14px; gap: 10px; align-items: center; padding: 13px 10px; color: var(--muted); text-align: left; border: 1px solid transparent; border-radius: 5px; background: transparent; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.tool-tab:hover, .tool-tab:focus-visible { color: var(--ink); background: var(--surface-2); }
.tool-tab.is-active { color: var(--ink); border-color: rgba(85, 214, 196, .45); background: rgba(85, 214, 196, .08); }
.tab-number { align-self: start; padding-top: 1px; color: var(--muted-2); font: 11px ui-monospace, SFMono-Regular, Consolas, monospace; }
.tool-tab.is-active .tab-number { color: var(--cyan); }
.tool-tab b, .tool-tab small { display: block; }
.tool-tab b { font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.tool-tab small { margin-top: 1px; color: var(--muted-2); font-size: 11px; }
.tool-tab.is-active small { color: var(--muted); }
.tab-arrow { color: var(--muted-2); font-size: 17px; opacity: 0; transition: opacity .2s ease, transform .2s ease; }
.tool-tab:hover .tab-arrow, .tool-tab.is-active .tab-arrow { opacity: 1; }
.tool-tab.is-active .tab-arrow { color: var(--cyan); }
.sidebar-note { display: flex; gap: 9px; margin: 27px 8px 3px; padding-top: 16px; border-top: 1px solid var(--line-soft); color: var(--muted-2); }
.sidebar-note span { color: var(--amber); font-size: 19px; line-height: 1; }
.sidebar-note p { margin: 0; font-size: 11px; line-height: 1.55; }

.tool-panels { min-width: 0; }
.tool-panel { min-width: 0; padding: 29px 30px 17px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: 0 18px 48px rgba(0, 0, 0, .15); }
.js .tool-panel:not(.is-active) { display: none; }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.panel-index { color: var(--muted-2); font-size: 10px; }
.panel-heading h3 { margin: 7px 0 3px; font-size: 23px; line-height: 1.25; letter-spacing: 0; }
.panel-heading p:not(.panel-index) { margin: 0; color: var(--muted); font-size: 13px; }
.panel-badge { flex: 0 0 auto; padding: 5px 8px; color: var(--cyan); border: 1px solid rgba(85, 214, 196, .3); border-radius: 4px; font: 10px ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .08em; }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 9px 13px; }
.editor-grid.single-output { grid-template-columns: minmax(0, 1fr); }
.field-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; color: var(--muted); font-size: 12px; }
.field-label span { overflow: hidden; color: var(--muted-2); font: 10px ui-monospace, SFMono-Regular, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.output-label { grid-column: 2; grid-row: 1; }
.code-input, .code-output { width: 100%; min-height: 222px; margin: 0; padding: 14px 15px; overflow: auto; border: 1px solid var(--line); border-radius: 5px; background: #101514; color: #e3ebe4; font: 13px/1.65 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; tab-size: 2; }
.code-input { resize: vertical; outline: none; }
.code-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(85, 214, 196, .1); }
.code-output { white-space: pre-wrap; word-break: break-word; }
.code-output.is-error { color: var(--danger); border-color: rgba(243, 142, 142, .45); }
.code-output:empty::before { content: "结果会显示在这里"; color: var(--muted-2); }
.editor-grid.single-output .output-label { grid-column: auto; grid-row: auto; }
.editor-grid.single-output .code-output { min-height: 135px; }
.compact-input { min-height: 138px; }
.tall-output { min-height: 148px !important; }
.hash-output { color: var(--cyan-bright); word-break: break-all; }
.form-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.action-group { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.button { min-height: 37px; padding: 7px 13px; color: var(--ink); border: 1px solid var(--line); border-radius: 4px; background: var(--surface-2); font-size: 12px; transition: border-color .2s ease, color .2s ease, background .2s ease, transform .2s ease; }
.button:hover, .button:focus-visible { border-color: var(--cyan); color: var(--white); }
.button:active { transform: translateY(1px); }
.button-primary { color: var(--canvas); border-color: var(--cyan); background: var(--cyan); font-weight: 700; }
.button-primary:hover, .button-primary:focus-visible { color: var(--canvas); background: var(--cyan-bright); }
.button-quiet { color: var(--muted); border-color: transparent; background: transparent; }
.button-outline { color: var(--cyan); border-color: rgba(85, 214, 196, .42); background: transparent; }
.button-submit { color: var(--amber); border-color: rgba(246, 184, 94, .32); background: transparent; }
html.js .no-js-only { display: none; }
.panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 19px; padding-top: 13px; border-top: 1px solid var(--line-soft); color: var(--muted-2); font-size: 11px; }
.time-options { display: grid; gap: 9px; margin-bottom: 14px; }
.time-input-row { display: grid; grid-template-columns: minmax(0, 1fr) 145px; gap: 9px; }
.text-input, .select-input { width: 100%; min-height: 43px; padding: 8px 12px; color: var(--ink); border: 1px solid var(--line); border-radius: 5px; outline: none; background: #101514; }
.text-input:focus, .select-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(85, 214, 196, .1); }
.select-input { color: var(--muted); font-size: 12px; }

.about { padding: 5px 0 91px; border-top: 1px solid var(--line-soft); }
.about > div:first-child { padding-top: 51px; }
.about h2 { margin-top: 9px; }
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 35px; }
.about-grid article { min-height: 175px; padding: 20px 21px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.about-number { color: var(--cyan); font: 11px ui-monospace, SFMono-Regular, Consolas, monospace; }
.about-grid h3 { margin: 20px 0 6px; font-size: 16px; }
.about-grid p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.seo-copy { padding-bottom: 78px; }
.seo-copy h2 { margin-bottom: 12px; font-size: 18px; }
.seo-copy p { max-width: 820px; margin: 0; color: var(--muted-2); font-size: 13px; line-height: 1.9; }

.site-footer { border-top: 1px solid var(--line-soft); background: #121615; }
.footer-inner { display: flex; align-items: start; justify-content: space-between; gap: 30px; padding-top: 38px; padding-bottom: 28px; }
.footer-brand { color: var(--ink); font: 700 15px ui-monospace, SFMono-Regular, Consolas, monospace; text-decoration: none; }
.footer-inner p { margin: 7px 0 0; color: var(--muted-2); font-size: 12px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: end; gap: 19px; color: var(--muted); font-size: 12px; }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--cyan); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 13px; padding-bottom: 22px; color: var(--muted-2); border-top: 1px solid var(--line-soft); font-size: 11px; }
.noscript-banner { padding: 13px 0; color: var(--canvas); background: var(--amber); font-size: 13px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 30; max-width: min(360px, calc(100% - 44px)); padding: 10px 14px; color: var(--canvas); border-radius: 4px; background: var(--cyan); box-shadow: var(--shadow); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(9px); transition: opacity .2s ease, transform .2s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.error-page { min-height: calc(100vh - 92px); display: grid; align-content: center; justify-items: start; padding-top: 70px; padding-bottom: 70px; }
.error-page h1 { margin: 16px 0 10px; font-size: 40px; line-height: 1.2; }
.error-page p:not(.eyebrow) { max-width: 560px; margin: 0 0 25px; color: var(--muted); }

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; gap: 38px; padding-top: 68px; padding-bottom: 68px; }
    .hero-console { max-width: 600px; }
    .workspace-layout { grid-template-columns: 1fr; }
    .tool-sidebar { position: static; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 10px; }
    .sidebar-label, .sidebar-note { display: none; }
    .tool-tab { display: block; min-height: 70px; padding: 10px 8px; text-align: center; }
    .tab-number, .tab-arrow { display: none; }
    .tool-tab b { font-size: 12px; }
    .tool-tab small { margin-top: 5px; font-size: 10px; }
    .tool-panel { padding: 25px 23px 16px; }
}

@media (max-width: 640px) {
    .shell { width: min(100% - 28px, 1180px); }
    .header-inner { min-height: 65px; }
    .top-nav { gap: 11px; font-size: 12px; }
    .top-nav > a:not(.nav-pill) { display: none; }
    .top-nav .nav-pill { padding: 6px 9px; }
    .hero { padding-top: 53px; padding-bottom: 54px; }
    .hero h1 { margin-top: 16px; font-size: 36px; }
    .hero-lead { font-size: 15px; line-height: 1.75; }
    .hero-meta { gap: 13px 19px; margin-top: 24px; }
    .hero-console { padding: 17px 14px 13px; }
    .console-lines { gap: 11px; margin: 20px 0; }
    .console-lines span { gap: 7px; font-size: 10px; }
    .workspace { padding-bottom: 65px; }
    .workspace-heading { display: block; margin-bottom: 18px; }
    .workspace-heading h2 { font-size: 22px; }
    .workspace-hint { margin-top: 9px; text-align: left; font-size: 12px; }
    .tool-sidebar { overflow-x: auto; grid-template-columns: repeat(5, minmax(83px, 1fr)); }
    .tool-panel { padding: 21px 15px 14px; }
    .panel-heading { display: block; margin-bottom: 18px; }
    .panel-badge { display: inline-block; margin-top: 13px; }
    .panel-heading h3 { font-size: 20px; }
    .panel-heading p:not(.panel-index) { font-size: 12px; }
    .editor-grid { grid-template-columns: 1fr; }
    .output-label { grid-column: auto; grid-row: auto; }
    .code-input, .code-output { min-height: 180px; font-size: 12px; }
    .form-actions { align-items: stretch; }
    .action-group { width: 100%; }
    .action-group .button { flex: 1 1 auto; }
    .button-outline { flex: 1 1 auto; }
    .panel-foot { align-items: start; flex-direction: column; gap: 3px; }
    .time-input-row { grid-template-columns: 1fr; }
    .about { padding-bottom: 60px; }
    .about > div:first-child { padding-top: 37px; }
    .about-grid { grid-template-columns: 1fr; gap: 9px; margin-top: 24px; }
    .about-grid article { min-height: 0; padding: 17px; }
    .about-grid h3 { margin-top: 12px; }
    .seo-copy { padding-bottom: 55px; }
    .footer-inner, .footer-bottom { display: block; }
    .footer-links { justify-content: start; margin-top: 19px; }
    .footer-bottom span + span { display: block; margin-top: 5px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
