:root {
    color-scheme: dark;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    color: #eaf2f8;
    background:
        radial-gradient(circle at 18% 0%, rgba(49, 142, 158, .18), transparent 34rem),
        radial-gradient(circle at 88% 84%, rgba(39, 102, 149, .14), transparent 32rem),
        #0a111c;
}

button, input { font: inherit; }
button { cursor: pointer; }

.shell {
    width: min(100% - 36px, 540px);
    margin: 0 auto;
    padding: 32px 0 46px;
}

.masthead { margin-bottom: 28px; }
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #cbd9e4;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .12em;
}
.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(75, 213, 198, .55);
    border-radius: 10px;
    color: #65e1d1;
    background: rgba(49, 154, 149, .12);
    font-size: 16px;
    letter-spacing: 0;
}
.eyebrow {
    margin: 43px 0 9px;
    color: #63d7c9;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .22em;
}
h1 { margin: 0; font-size: clamp(30px, 7vw, 42px); line-height: 1.2; letter-spacing: -.03em; }
.subtitle { margin: 13px 0 0; color: #98aabb; font-size: 14px; line-height: 1.7; }

.card {
    padding: 28px;
    border: 1px solid #293c4f;
    border-radius: 22px;
    background: linear-gradient(150deg, #172536, #121e2c 70%);
    box-shadow: 0 20px 56px rgba(0, 0, 0, .25);
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 27px; }
.section-kicker { color: #6bdfd1; font-size: 11px; font-weight: 800; letter-spacing: .17em; }
h2 { margin: 8px 0 0; font-size: 19px; font-weight: 700; }
.badge {
    flex: none;
    padding: 7px 10px;
    border: 1px solid #315b59;
    border-radius: 999px;
    color: #85dfd0;
    background: rgba(50, 142, 130, .12);
    font-size: 11px;
    font-weight: 700;
}

.input-group { margin-bottom: 20px; }
.input-group label { display: block; margin-bottom: 9px; color: #cbd9e4; font-size: 13px; font-weight: 650; }
.input-group input {
    display: block;
    width: 100%;
    height: 52px;
    padding: 0 15px;
    outline: none;
    border: 1px solid #3b5063;
    border-radius: 12px;
    color: #f5fbff;
    background: #0e1927;
    font-size: 16px;
    transition: border-color .18s, box-shadow .18s;
}
.input-group input::placeholder { color: #74889b; }
.input-group input:focus { border-color: #65ddcd; box-shadow: 0 0 0 3px rgba(101, 221, 205, .13); }
.saved-code { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -8px 0 21px; color: #8499aa; font-size: 12px; line-height: 1.5; }
.text-button { padding: 0; border: 0; color: #85dfd0; background: none; font-size: 12px; font-weight: 700; white-space: nowrap; }
.text-button:hover, .footer a:hover { color: #b6f5eb; }

.btn {
    width: 100%;
    min-height: 52px;
    padding: 12px 16px;
    border: 0;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    transition: transform .18s, opacity .18s, box-shadow .18s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { cursor: wait; opacity: .65; transform: none; }
.btn-primary { color: #08232a; background: linear-gradient(110deg, #73e2d2, #42bfc3); box-shadow: 0 10px 24px rgba(45, 187, 181, .16); }
.btn-secondary { margin-top: 16px; border: 1px solid #38596c; color: #c9eff0; background: #203348; }

.loading { display: none; margin: 18px 0 0; color: #a3bac8; font-size: 13px; text-align: center; }
.loading.show { display: block; }
.msg { display: none; margin-top: 18px; padding: 13px 15px; border-radius: 11px; font-size: 13px; line-height: 1.5; word-break: break-word; }
.msg.error { display: block; border: 1px solid #765054; color: #ffc4c4; background: #36242c; }
.msg.info { display: block; border: 1px solid #365a70; color: #b1ddf6; background: #203548; }

.result { display: none; margin-top: 22px; }
.result.show { display: block; }
.result-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 13px 0;
    border-top: 1px solid #2b4052;
}
.result-item .label { flex: none; color: #90a4b5; font-size: 13px; }
.result-item .value { color: #eaf8f5; font-size: 14px; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.btn-copy { display: none; }
.btn-copy.show { display: block; }

.summary { display: none; margin-top: 22px; padding: 15px; border: 1px solid #2c5d5e; border-radius: 12px; color: #c7ebe8; background: rgba(44, 136, 134, .14); font-size: 13px; line-height: 1.7; }
.summary.show { display: block; }
.records { margin-top: 16px; }
.record-item { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 2px; border-top: 1px solid #2b4052; }
.record-item .nid { color: #f2f8fb; font-size: 17px; font-weight: 800; }
.record-item .price { color: #74ded0; font-size: 15px; font-weight: 800; white-space: nowrap; }
.record-item .time { margin-top: 5px; color: #8fa4b5; font-size: 12px; }
.btn-more { display: none; }
.btn-more.show { display: block; }

.footer { margin-top: 24px; text-align: center; }
.footer a { color: #74ded0; font-size: 13px; font-weight: 700; text-decoration: none; }
.footer-note { margin-top: 26px; color: #5c7283; font-size: 11px; text-align: center; }

@media (max-width: 560px) {
    .shell { width: min(100% - 28px, 540px); padding-top: 20px; }
    .eyebrow { margin-top: 35px; }
    .card { padding: 22px 19px; border-radius: 18px; }
    .card-head { margin-bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    .btn, .input-group input { transition: none; }
}
