:root {
    --bg: #f4f5f6;
    --card: #ffffff;
    --ink: #14161a;
    --ink-soft: #2f343b;
    --muted: #6f7683;
    --muted-light: #8a909a;
    --line: #e9ebef;
    --line-soft: #f1f3f5;
    --panel-soft: #fafbfc;
    --radius: 20px;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.07), 0 2px 8px rgba(15, 23, 42, 0.04);
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background-color: var(--bg);
    background-image:
        radial-gradient(circle at 1px 1px, rgba(20, 22, 26, 0.075) 1px, transparent 1.1px),
        radial-gradient(900px 460px at 50% -140px, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0) 72%);
    background-size: 22px 22px, 100% 100%;
    background-repeat: repeat, no-repeat;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
}

::selection {
    background: rgba(20, 22, 26, 0.12);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.page {
    width: 100%;
    max-width: 912px;
    margin: 0 auto;
    padding: 48px 20px 64px;
}

.card {
    background: var(--card);
    border: 1px solid rgba(20, 22, 26, 0.05);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 38px 44px 30px;
}

/* 顶部品牌 */
.site-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
}

.brand-text {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.brand-name {
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.brand-sub {
    font-size: 12.5px;
    color: var(--muted-light);
}

.head-note {
    font-size: 11px;
    letter-spacing: 0.08em;
    color: #a0a6ae;
    white-space: nowrap;
}

/* 搜索 */
.search {
    display: flex;
    gap: 10px;
    margin-top: 28px;
}

.search input {
    flex: 1;
    min-width: 0;
    height: 54px;
    padding: 0 16px;
    border: 1px solid #dfe3e8;
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search input::placeholder {
    color: #a6acb5;
}

.search input:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 4px rgba(20, 22, 26, 0.06);
}

.search button {
    flex: none;
    min-width: 104px;
    height: 54px;
    padding: 0 26px;
    border: 0;
    border-radius: 12px;
    background: var(--ink);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.search button:hover {
    background: #23262c;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(20, 22, 26, 0.18);
}

.search button:active {
    transform: translateY(0);
    box-shadow: none;
}

.search button:focus-visible,
.copy-btn:focus-visible,
a:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

/* 提示与空状态 */
.alert {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.65;
}

.alert-error {
    background: #fff5f4;
    border: 1px solid #f6d3cf;
    color: #9f2d20;
}

.notice {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fffaf0;
    border: 1px solid #f3e3c3;
    color: #8a5a14;
    font-size: 13.5px;
    line-height: 1.65;
}

.hero {
    padding: 40px 2px 6px;
}

.hero h1 {
    margin: 0;
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.hero p {
    max-width: 620px;
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.8;
}

.chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.chips-label {
    font-size: 12.5px;
    color: var(--muted-light);
}

.chips a {
    padding: 5px 12px;
    border: 1px solid #e4e7eb;
    border-radius: 999px;
    background: var(--panel-soft);
    color: #3b4048;
    font-size: 12.5px;
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.chips a:hover {
    border-color: #c6cbd2;
    background: #fff;
    color: var(--ink);
}

/* 结果头部 */
.result {
    margin-top: 32px;
}

.title-line {
    display: flex;
    align-items: center;
    gap: 12px;
}

.result h1 {
    margin: 0;
    font-size: 29px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
    word-break: break-word;
}

.pill {
    flex: none;
    padding: 3px 8px;
    border: 1px solid #dfe3e8;
    border-radius: 6px;
    background: var(--panel-soft);
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.07em;
}

.result-meta {
    margin: 8px 0 0;
    color: var(--muted-light);
    font-size: 12.5px;
    word-break: break-word;
}

.result-meta strong {
    color: var(--ink-soft);
    font-weight: 600;
}

.result-meta .dot {
    margin: 0 4px;
    color: #c3c8cf;
}

/* 区块 */
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin: 28px 0 10px;
}

.section-head h2 {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
}

.sec-note {
    color: #9aa0a9;
    font-size: 11.5px;
    white-space: nowrap;
}

.panel {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

/* 结构化信息 */
.info-list {
    margin: 0;
    padding: 0;
}

.info-row {
    display: grid;
    grid-template-columns: 148px 1fr;
    gap: 18px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 14px;
}

.info-row:nth-child(even) {
    background: #fbfcfd;
}

.info-row:last-child {
    border-bottom: 0;
}

.info-row dt {
    color: var(--muted);
    font-size: 13.5px;
    padding-top: 1px;
}

.info-row dd {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.65;
    word-break: break-word;
}

.muted {
    color: #a6acb5;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

.badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.85;
}

.badge-ok {
    background: #ecfdf3;
    color: #067647;
}

.badge-warn {
    background: #fff6e6;
    color: #a15c00;
}

.badge-error {
    background: #fef3f2;
    color: #b42318;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.tag {
    padding: 2px 8px;
    border: 1px solid #eceef1;
    border-radius: 6px;
    background: #f4f5f7;
    color: #4b5563;
    font-size: 11.5px;
    line-height: 1.6;
}

.ns-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ns-list li {
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.8;
    word-break: break-all;
}

/* DNS 表格 */
.table-scroll {
    overflow-x: auto;
}

.dns-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.dns-table th {
    padding: 10px 18px;
    background: var(--panel-soft);
    border-bottom: 1px solid var(--line);
    color: var(--muted-light);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-align: left;
    white-space: nowrap;
}

.dns-table td {
    padding: 12px 18px;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: top;
}

.dns-table tr:last-child td {
    border-bottom: 0;
}

.dns-type {
    width: 82px;
    color: var(--ink);
    font-weight: 700;
    white-space: nowrap;
}

.dns-ttl {
    width: 102px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12.5px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.dns-value {
    color: var(--ink-soft);
    font-family: var(--mono);
    font-size: 13px;
    word-break: break-all;
}

.empty {
    margin: 0;
    padding: 16px 18px;
    color: var(--muted);
    font-size: 13.5px;
}

/* 原始数据 */
.raw-wrap {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.raw-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px 8px 16px;
    background: var(--panel-soft);
    border-bottom: 1px solid var(--line);
    color: var(--muted-light);
    font-size: 12px;
}

.raw-source {
    word-break: break-all;
}

.copy-btn {
    flex: none;
    padding: 4px 10px;
    border: 1px solid #e1e4e8;
    border-radius: 7px;
    background: #fff;
    color: #4b5563;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.copy-btn:hover {
    border-color: #c6cbd2;
    color: var(--ink);
}

.copy-btn.copied {
    border-color: #b7e4c7;
    color: #067647;
}

.raw {
    margin: 0;
    max-height: 380px;
    padding: 16px 18px;
    overflow: auto;
    background: #fcfcfd;
    color: #374151;
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    tab-size: 4;
}

.raw::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.raw::-webkit-scrollbar-thumb {
    background: #d9dde3;
    border: 3px solid #fcfcfd;
    border-radius: 999px;
}

.raw::-webkit-scrollbar-track {
    background: transparent;
}

/* 页脚 */
.site-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 36px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted-light);
    font-size: 12px;
}

.site-foot a {
    color: #5b6270;
    text-decoration: none;
}

.site-foot a:hover {
    color: var(--ink);
    text-decoration: underline;
}

@media (max-width: 720px) {
    .page {
        padding: 18px 12px 36px;
    }

    .card {
        padding: 22px 18px 20px;
        border-radius: 16px;
    }

    .head-note {
        display: none;
    }

    .search {
        margin-top: 22px;
        gap: 8px;
    }

    .search input,
    .search button {
        height: 50px;
    }

    .search input {
        font-size: 16px;
        padding: 0 14px;
    }

    .search button {
        min-width: 84px;
        padding: 0 18px;
        font-size: 14.5px;
    }

    .hero {
        padding-top: 28px;
    }

    .hero h1 {
        font-size: 22px;
    }

    .hero p {
        font-size: 13.5px;
    }

    .result {
        margin-top: 26px;
    }

    .result h1 {
        font-size: 22px;
    }

    .section-head {
        margin-top: 24px;
    }

    .info-row {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 12px 14px;
    }

    .info-row dt {
        font-size: 12px;
    }

    .dns-table th,
    .dns-table td {
        padding-left: 13px;
        padding-right: 13px;
    }

    .dns-type {
        width: 64px;
    }

    .dns-ttl {
        width: 76px;
    }

    .dns-table th,
    .dns-value {
        font-size: 12.5px;
    }

    .raw {
        max-height: 300px;
        padding: 14px;
        font-size: 12px;
    }

    .site-foot {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin-top: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0.01ms !important;
    }
}
