:root {
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: #1c2840;
  background: #f5f7fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: #f5f7fb; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }

.topbar { height: 76px; background: #fff; border-bottom: 1px solid #e8ebf2; }
.topbar-inner { width: min(100% - 40px, 910px); height: 100%; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 7px; font-size: 21px; letter-spacing: -.35px; }
.brand-home-link { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; border-radius: 9px; }
.brand-home-link:hover .brand-company { color: #2845c8; }
.brand-home-link:focus-visible { outline: 3px solid #6678ec38; outline-offset: 4px; }
.brand-mark { width: 40px; height: 40px; flex: none; object-fit: contain; filter: drop-shadow(0 5px 8px #3158b329); }
.brand-title { display: inline-flex; align-items: baseline; white-space: nowrap; }
.brand-company { color: #4058d0; font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif; font-weight: 850; letter-spacing: -.7px; }
.brand-product { color: #59647b; font-family: STKaiti, KaiTi, serif; font-size: .9em; font-weight: 700; letter-spacing: .4px; }
.security-state { display: flex; align-items: center; gap: 7px; color: #8791a8; font-size: 12px; }
.security-state > span { width: 8px; height: 8px; border-radius: 50%; background: #34bd75; box-shadow: 0 0 0 4px #34bd7517; }

.content { width: min(100% - 40px, 910px); margin: 32px auto 80px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 20px; }
.page-heading h1 { margin: 0 0 5px; font-size: 23px; letter-spacing: -.5px; }
.page-heading p { margin: 0; color: #8a93aa; font-size: 13px; }
.standard-badge { padding: 7px 11px; color: #6373d8; background: #eef1ff; border: 1px solid #dce2ff; border-radius: 8px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; font-weight: 700; }

.generator-card { overflow: hidden; background: #fff; border: 1px solid #e7eaf1; border-radius: 13px; box-shadow: 0 14px 34px #28365f0d; }
.card-title { min-height: 56px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #edf0f5; }
.card-title > div { display: flex; align-items: center; gap: 9px; }
.card-title h2 { margin: 0; font-size: 15px; }
.card-title > span { color: #939bae; font-size: 11px; }
.title-icon { width: 27px; height: 27px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #7888f4, #586ce7); border-radius: 8px; font-size: 13px; font-weight: 800; box-shadow: 0 5px 12px #6375eb2b; }
.card-body { padding: 24px; }

form > label { display: block; margin-bottom: 8px; color: #48536a; font-size: 13px; font-weight: 700; }
.submission-row { display: flex; align-items: stretch; gap: 10px; }
.secret-field { position: relative; flex: 1; min-width: 0; }
.secret-field input { width: 100%; height: 50px; padding: 0 68px 0 15px; color: #26334e; background: #fbfcff; border: 1px solid #dce1ec; border-radius: 10px; outline: 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .4px; transition: border-color .18s, box-shadow .18s, background .18s; }
.secret-field input:focus { background: #fff; border-color: #7281ef; box-shadow: 0 0 0 4px #6879ec16; }
.secret-field input[aria-invalid="true"] { border-color: #db746c; box-shadow: 0 0 0 4px #db746c12; }
.secret-field input::placeholder { color: #adb4c4; font-family: inherit; letter-spacing: 0; }
.secret-field input::-ms-reveal, .secret-field input::-ms-clear { display: none; }
.field-button { position: absolute; top: 7px; right: 7px; height: 36px; padding: 0 10px; color: #6473d8; background: #f0f3ff; border: 0; border-radius: 8px; font-size: 12px; font-weight: 700; }
.field-button:hover { color: #4055cf; background: #e8edff; }
.field-button:focus-visible { outline: 3px solid #6879ec28; outline-offset: 2px; }
.submit-button { width: 78px; height: 50px; flex: none; color: #fff; background: #6374f4; border: 0; border-radius: 10px; font-size: 13px; font-weight: 700; box-shadow: 0 7px 16px #6374f42d; }
.submit-button:hover { background: #5365ec; transform: translateY(-1px); }
.submit-button:focus-visible { outline: 3px solid #6879ec28; outline-offset: 2px; }
.field-help { margin: 7px 0 0; color: #9aa2b2; font-size: 11px; }
.form-error { margin: 8px 0 0; color: #bd4a43; font-size: 12px; }

.advanced-options { margin-top: 17px; border-top: 1px solid #edf0f5; border-bottom: 1px solid #edf0f5; }
.advanced-options summary { padding: 12px 0; color: #6f7992; font-size: 12px; font-weight: 650; cursor: pointer; }
.option-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 0 14px; }
.option-grid label { display: grid; gap: 6px; color: #7c8599; font-size: 11px; }
.option-grid select { width: 100%; height: 38px; padding: 0 8px; color: #39445b; background: #fbfcff; border: 1px solid #dfe3ec; border-radius: 8px; outline: 0; }
.option-grid select:focus { border-color: #7281ef; }

.result-card { display: flex; align-items: center; justify-content: center; gap: 26px; min-height: 145px; margin: 22px 0 16px; padding: 20px 28px; background: #eef1ff; border: 1px solid #cad3ff; border-radius: 12px; transition: background .2s, border-color .2s; }
.result-card[hidden], .action-row[hidden] { display: none; }
.result-card.is-empty { filter: grayscale(.2); }
.result-card.is-expiring { background: #fff3f1; border-color: #ffd6d1; }
.result-card.is-expiring .timer-progress { stroke: #df6c61; }
.result-card.is-expiring .otp-code { color: #c8564d; }
.timer { position: relative; width: 72px; height: 72px; flex: none; display: grid; place-items: center; }
.timer svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 4; }
.timer-track { stroke: #d7def5; }
.timer-progress { stroke: #6173ec; stroke-linecap: round; transition: stroke-dashoffset .25s linear, stroke .2s; }
.timer strong { color: #5263cd; font-size: 17px; }
.code-panel { min-width: 255px; display: grid; gap: 5px; }
.account-label { overflow: hidden; color: #7e879c; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.code-row { display: flex; align-items: center; gap: 13px; }
.otp-code { width: fit-content; color: #273a91; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 38px; font-weight: 800; letter-spacing: 4px; line-height: 1.25; white-space: nowrap; }
.code-copy-button { height: 34px; display: inline-flex; align-items: center; gap: 5px; padding: 0 10px; color: #5669dc; background: #fff; border: 1px solid #ccd5fa; border-radius: 8px; font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: 0 3px 9px #485fc112; }
.code-copy-button:hover:not(:disabled) { color: #4056d0; background: #f8f9ff; border-color: #aebbf4; }
.copy-icon { font-size: 15px; line-height: 1; }
.expiry-label { color: #929aae; font-size: 11px; }

.action-row { display: flex; justify-content: flex-end; gap: 10px; }
.primary-button, .secondary-button { min-width: 132px; height: 42px; padding: 0 18px; border-radius: 9px; font-size: 13px; font-weight: 700; }
.primary-button { color: #fff; background: #6374f4; border: 0; box-shadow: 0 7px 16px #6374f42d; }
.primary-button:hover:not(:disabled) { background: #5365ec; transform: translateY(-1px); }
.secondary-button { color: #5b6dde; background: #fff; border: 1px solid #dbe1f4; }
.secondary-button:hover:not(:disabled) { background: #f3f5ff; border-color: #bbc5f8; }
.privacy-note { display: flex; justify-content: center; align-items: center; gap: 7px; margin: 20px 0 0; color: #858fa4; font-size: 11px; }
.privacy-note span { color: #38bb76; font-size: 8px; }
.link-warning { margin: 7px 0 0; color: #a1a8b7; text-align: center; font-size: 10px; line-height: 1.55; }

.toast { position: fixed; z-index: 10; left: 50%; bottom: 26px; padding: 10px 16px; color: #fff; background: #26324fe8; border-radius: 9px; box-shadow: 0 10px 28px #1f294339; font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: .2s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.clipboard-helper { position: fixed; left: -9999px; opacity: 0; }

@media (max-width: 700px) {
  .topbar { height: 66px; }
  .topbar-inner, .content { width: min(100% - 24px, 910px); }
  .brand { gap: 5px; font-size: 17px; }
  .brand-home-link { gap: 8px; }
  .brand-mark { width: 34px; height: 34px; }
  .security-state { display: none; }
  .content { margin: 22px auto 50px; }
  .page-heading { align-items: flex-start; }
  .page-heading h1 { font-size: 21px; }
  .page-heading p { font-size: 12px; }
  .standard-badge { padding: 6px 8px; }
  .card-title { padding: 0 14px; }
  .card-title > span { display: none; }
  .card-body { padding: 18px 14px; }
  .option-grid { grid-template-columns: 1fr; }
  .result-card { justify-content: flex-start; gap: 12px; min-height: 128px; padding: 18px 12px; }
  .timer { width: 56px; height: 56px; }
  .code-panel { min-width: 0; flex: 1; }
  .otp-code { font-size: 29px; letter-spacing: 1.5px; }
  .code-row { gap: 8px; }
  .code-copy-button { height: 32px; padding: 0 7px; font-size: 11px; }
  .action-row { display: grid; grid-template-columns: 1fr 1fr; }
  .primary-button, .secondary-button { min-width: 0; padding: 0 10px; }
}

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