:root {
    color-scheme: dark;
    --background: #080c0a;
    --surface: #0c120f;
    --surface-raised: #111a15;
    --border: #24372b;
    --border-subtle: #1b2921;
    --text: #e7f0e9;
    --muted: #8d9e92;
    --dim: #6b8172;
    --green: #a5f766;
    --green-soft: #8fd75c;
    --mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; color: var(--text); background: var(--background); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body::before { position: fixed; inset: 0; z-index: -1; content: ""; pointer-events: none; background-image: linear-gradient(#41614b0d 1px, transparent 1px), linear-gradient(90deg, #41614b0d 1px, transparent 1px); background-size: 64px 64px; mask-image: linear-gradient(#000, #000 40%, transparent); }
::selection { color: #080c0a; background: var(--green); }
a { color: inherit; text-decoration: none; }
a, button, input, select { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button { border: 0; }
.ambient { position: fixed; top: -220px; right: -150px; width: 720px; height: 720px; z-index: -1; pointer-events: none; background: radial-gradient(ellipse, #53873816, transparent 67%); }
.site-shell { max-width: 1120px; margin: 0 auto; padding: 0 40px; }
.site-header { height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--border-subtle); }
.brand { display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: 1.2px; white-space: nowrap; }
.brand-divider { color: var(--dim); padding: 0 9px; font-weight: 400; }
.brand-mark { position: relative; width: 21px; height: 22px; display: block; flex: 0 0 auto; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; background: var(--green); width: 13px; height: 1px; transform-origin: left center; left: 5px; top: 6px; opacity: .6; }
.brand-mark::before { transform: rotate(45deg); }
.brand-mark::after { transform: rotate(90deg); }
.brand-mark span { position: absolute; width: 5px; height: 5px; background: var(--green); }
.brand-mark span:nth-child(1) { left: 2px; top: 2px; }
.brand-mark span:nth-child(2) { left: 15px; top: 15px; }
.brand-mark span:nth-child(3) { left: 2px; top: 15px; }
.status { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; letter-spacing: .4px; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px #a5f76655; }
.home-main { padding: 64px 0 60px; }
.eyebrow { display: flex; align-items: center; gap: 11px; margin: 0 0 23px; color: var(--green-soft); font-family: var(--mono); font-size: 11px; letter-spacing: 1.7px; line-height: 1.5; }
.eyebrow-line { width: 24px; height: 1px; background: var(--green-soft); }
h1 { margin: 0; font-size: 53px; font-weight: 650; letter-spacing: -2px; line-height: 1.3; }
.accent { color: var(--green); }
.intro-copy { margin: 20px 0 0; font-size: 14px; line-height: 1.8; color: var(--muted); }
.detection-panel { margin-top: 40px; border: 1px solid var(--border); background: #0c120fe8; box-shadow: 0 20px 60px #00000025; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 24px; border-bottom: 1px solid var(--border); }
.panel-label { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.terminal-prompt { color: var(--green); font-family: var(--mono); font-size: 14px; font-weight: 600; }
.panel-code { color: var(--dim); font-family: var(--mono); font-size: 10px; letter-spacing: 1px; }
.detection-grid { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); }
.info-card { min-width: 0; padding: 27px 28px 30px; }
.ip-card { grid-row: span 2; border-right: 1px solid var(--border); display: flex; flex-direction: column; background: linear-gradient(150deg, #a5f76605, transparent 80%); }
.ua-card { border-bottom: 1px solid var(--border); }
.info-label { display: flex; align-items: center; gap: 9px; }
.item-number { color: var(--dim); font-family: var(--mono); font-size: 10px; }
.info-label h2 { margin: 0; font-size: 12px; font-weight: 500; color: var(--muted); }
.info-type { margin-left: auto; color: var(--dim); font-family: var(--mono); font-size: 9px; letter-spacing: .7px; }
.info-value { margin: 18px 0 0; font-family: var(--mono); font-size: 13px; line-height: 1.85; overflow-wrap: anywhere; white-space: pre-wrap; }
.ip-value { margin: 31px 0 34px; color: var(--green); font-size: clamp(23px, 3.2vw, 36px); line-height: 1.5; letter-spacing: -1.4px; }
.ua-value { color: #ccd9cf; }
.referer-value { color: #d0dfd3; }
.empty-value { color: var(--dim); font-family: var(--sans); }
.ip-decoration { margin-top: auto; display: flex; align-items: end; gap: 5px; height: 42px; max-width: 250px; opacity: .55; }
.ip-decoration span { width: 7px; height: 15px; background: #a5f76625; border-top: 1px solid var(--green); }
.ip-decoration span:nth-child(4n + 2) { height: 24px; }
.ip-decoration span:nth-child(3n) { height: 34px; }
.ip-decoration span:nth-child(7n) { height: 42px; background: #a5f76635; }
.ip-decoration span:nth-child(5n + 1) { height: 11px; }
.panel-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 24px; border-top: 1px solid var(--border); color: var(--dim); font-family: var(--mono); font-size: 10px; letter-spacing: .2px; }
.panel-footer > span:first-child { display: flex; align-items: center; gap: 7px; font-family: var(--sans); font-size: 11px; }
.small-dot { width: 4px; height: 4px; background: var(--green-soft); }
.block-cursor { margin-left: 5px; color: var(--green-soft); animation: cursor-blink 2s step-end infinite; }
.site-footer { padding: 23px 0 27px; border-top: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--dim); font-family: var(--mono); font-size: 10px; line-height: 1.6; letter-spacing: .7px; }
.footer-note { font-size: 9px; letter-spacing: .6px; }
.footer-note span { margin: 0 7px; }

/* Archive page */
.data-shell { max-width: 1480px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; padding: 8px 0; transition: color .15s; white-space: nowrap; }
.back-link:hover { color: var(--green); }
.data-main { padding: 52px 0 56px; }
.data-intro { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 36px; }
.data-intro .eyebrow { margin-bottom: 19px; }
.data-intro h1 { font-size: 42px; letter-spacing: -1.6px; }
.data-intro .intro-copy { margin-top: 13px; font-size: 13px; }
.record-counter { border-left: 1px solid var(--border); padding: 4px 0 4px 28px; min-width: 148px; }
.counter-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; }
.counter-value { color: var(--green); font-family: var(--mono); font-size: 34px; line-height: 1.1; letter-spacing: -1px; }
.counter-unit { color: var(--dim); font-family: var(--sans); font-size: 11px; letter-spacing: 0; margin-left: 10px; }
.records-panel { border: 1px solid var(--border); background: #0c120fed; }
.filter-form { display: flex; align-items: end; flex-wrap: wrap; gap: 14px; padding: 24px; border-bottom: 1px solid var(--border); background: #10181180; }
.filter-field label { display: block; margin-bottom: 9px; color: var(--muted); font-size: 11px; }
.ip-filter { flex: 1.2; min-width: 180px; }
.user-id-filter { flex: 1; min-width: 160px; }
.filter-note { margin: 14px 24px 0; color: var(--dim); font-size: 11px; line-height: 1.8; }
.input-wrap { position: relative; }
.search-icon { position: absolute; left: 13px; top: 12px; width: 17px; height: 17px; stroke: var(--dim); stroke-width: 1.5; fill: none; pointer-events: none; }
input[type="search"], select { height: 42px; width: 100%; border: 1px solid #304335; border-radius: 3px; color: var(--text); background: var(--background); font-size: 12px; }
input[type="search"] { padding: 0 13px 0 39px; font-family: var(--mono); }
input[type="search"]::placeholder { color: var(--dim); font-family: var(--sans); opacity: 1; }
input[aria-invalid="true"] { border-color: #b59455; }
select { padding: 0 34px 0 12px; min-width: 112px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m3 4 3 3 3-3' fill='none' stroke='%238d9e92' stroke-width='1.3'/%3E%3C/svg%3E"); background-size: 12px; background-repeat: no-repeat; background-position: right 12px center; }
.primary-button { height: 42px; min-width: 97px; border: 1px solid var(--green); padding: 0 19px; border-radius: 3px; color: #13200d; background: var(--green); font-size: 12px; font-weight: 650; transition: background .15s; }
.primary-button span { margin-left: 10px; font-size: 15px; }
.primary-button:hover { background: #bdff8b; }
.reset-link { display: flex; align-items: center; min-height: 42px; color: var(--muted); font-size: 11px; white-space: nowrap; padding: 0 4px; }
.reset-link:hover { color: var(--green); }
.records-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px; }
.records-heading h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 12px; font-weight: 500; }
.table-timezone { color: var(--dim); font-size: 10px; }
.records-table { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: left; }
.records-table th { padding: 12px 18px; background: #14201888; border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border); color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.7; }
.records-table th:first-child, .records-table td:first-child { padding-left: 24px; }
.records-table th:last-child, .records-table td:last-child { padding-right: 24px; }
.time-column { width: 171px; }
.ip-column { width: 176px; }
.user-id-column { width: 122px; }
.ua-column { width: 36%; }
.records-table td { padding: 21px 18px; border-bottom: 1px solid var(--border-subtle); vertical-align: top; font-family: var(--mono); font-size: 11px; line-height: 1.8; overflow-wrap: anywhere; white-space: pre-wrap; }
.records-table tbody tr:last-child td { border-bottom: 0; }
.records-table tbody tr:hover { background: #a5f76603; }
.records-table .time-cell { color: var(--muted); font-size: 10px; white-space: normal; }
.time-cell time { display: inline-block; }
.records-table .ip-cell { color: var(--green-soft); }
.records-table .user-id-cell { color: #d2eac5; }
.records-table .ua-cell { color: #b9c8bd; }
.records-table .referer-cell { color: #91a397; }
.records-table .empty-value { color: var(--dim); font-family: var(--sans); }
.notice { display: flex; align-items: baseline; gap: 10px; margin: 18px 24px 0; padding: 12px 14px; border: 1px solid #6d5734; color: #dfc694; background: #68511a1a; border-radius: 3px; font-size: 12px; line-height: 1.8; }
.notice > span { flex: 0 0 auto; border: 1px solid currentColor; width: 15px; height: 15px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 10px; border-radius: 50%; line-height: 1; }
.notice-error { border-color: #75423f; color: #e1aaa3; background: #782e2415; }
.empty-state { min-height: 238px; padding: 38px 24px 47px; border-top: 1px solid var(--border-subtle); text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.empty-symbol { color: var(--dim); font-family: var(--mono); font-size: 31px; line-height: 1.5; letter-spacing: 5px; }
.empty-state p { margin: 18px 0 8px; font-size: 14px; color: #b9c8bd; }
.empty-state > span:last-child:not(.empty-symbol) { color: var(--dim); font-size: 12px; line-height: 1.8; }
.pagination-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 24px; border-top: 1px solid var(--border); }
.range-summary { color: var(--muted); font-size: 11px; line-height: 1.8; margin: 0; }
.range-total { color: var(--dim); }
.pagination { display: flex; align-items: center; flex-wrap: wrap; justify-content: end; gap: 5px; }
.page-link { min-width: 32px; height: 32px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 2px; font-family: var(--mono); font-size: 11px; color: var(--muted); transition: color .15s, border-color .15s; }
a.page-link:hover { color: var(--green); border-color: #617b43; }
.page-link.is-current { color: var(--green); border-color: #5c783f; background: #a5f7660a; }
.page-link.is-disabled { color: #3e5244; border-color: var(--border-subtle); }
.page-ellipsis { color: var(--dim); font-size: 11px; padding: 0 3px; }
.usage-panel { margin-top: 24px; border: 1px solid var(--border); background: #0c120fc7; }
.usage-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--border-subtle); }
.usage-heading h2 { display: flex; align-items: center; gap: 11px; margin: 0; font-size: 13px; font-weight: 500; }
.usage-content { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 34px; padding: 24px; }
.usage-panel code { color: #c3dfb0; font-family: var(--mono); font-size: 11px; overflow-wrap: anywhere; }
.usage-intro { margin: 0 0 17px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.example-link { display: grid; grid-template-columns: 28px minmax(0, 1fr) 12px; align-items: start; gap: 12px; padding: 13px 14px; border: 1px solid var(--border-subtle); background: #080c0a80; transition: border-color .15s; }
.example-link + .example-link { margin-top: 9px; }
.example-link > span:first-child { color: var(--dim); font-size: 10px; line-height: 1.9; }
.example-link code { line-height: 1.7; }
.example-arrow { color: var(--green-soft); font-size: 13px; }
.example-link:hover { border-color: #5c783f; }
.usage-rules p { display: flex; align-items: baseline; gap: 13px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.9; }
.usage-rules p + p { margin-top: 17px; }
.usage-rules p > span:last-child { min-width: 0; }
.usage-step { flex: 0 0 auto; color: var(--green-soft); font-family: var(--mono); font-size: 10px; }
.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; }
@keyframes cursor-blink { 50% { opacity: .15; } }

@media (min-width: 1600px) { .home-main { padding-top: 80px; padding-bottom: 80px; } }
@media (max-width: 1050px) {
    .data-shell { padding-right: 28px; padding-left: 28px; }
    .time-column { width: 137px; }
    .ip-column { width: 143px; }
    .user-id-column { width: 104px; }
    .ua-column { width: 33%; }
    .records-table th, .records-table td { padding-right: 13px; padding-left: 13px; }
    .records-table th:first-child, .records-table td:first-child { padding-left: 20px; }
    .records-table th:last-child, .records-table td:last-child { padding-right: 20px; }
}
@media (max-width: 760px) {
    .site-shell { padding: 0 24px; }
    .site-header { height: 88px; }
    .brand { gap: 11px; font-size: 11px; letter-spacing: .7px; }
    .brand-divider { padding: 0 6px; }
    .status { font-size: 10px; gap: 7px; }
    .home-main { padding: 42px 0 42px; }
    h1 { font-size: 43px; letter-spacing: -1.5px; }
    .eyebrow { font-size: 10px; letter-spacing: 1.3px; margin-bottom: 20px; }
    .intro-copy { font-size: 12px; margin-top: 16px; }
    .detection-panel { margin-top: 30px; }
    .detection-grid { grid-template-columns: minmax(0, 1fr); }
    .ip-card { grid-row: auto; border-right: 0; border-bottom: 1px solid var(--border); }
    .ip-value { font-size: 30px; margin: 23px 0 24px; }
    .ip-decoration { height: 27px; }
    .ip-decoration span { max-height: 27px; }
    .info-card { padding: 23px 22px 26px; }
    .info-value { font-size: 12px; }
    .info-value.ip-value { font-size: 30px; }
    .panel-heading { padding: 16px 22px; }
    .panel-footer { padding: 13px 22px; font-size: 9px; }
    .site-footer { font-size: 9px; }
    .footer-note { font-size: 8px; }
    .data-main { padding: 38px 0 40px; }
    .data-intro { gap: 20px; margin-bottom: 28px; }
    .data-intro h1 { font-size: 34px; }
    .data-intro .intro-copy { max-width: 310px; font-size: 12px; }
    .record-counter { padding-left: 18px; min-width: 95px; }
    .counter-value { font-size: 26px; }
    .counter-unit { margin-left: 6px; font-size: 10px; }
    .back-link { font-size: 11px; }
    .filter-form { padding: 20px; gap: 12px; flex-wrap: wrap; }
    .ip-filter, .user-id-filter { min-width: 0; flex-basis: 100%; }
    .page-size-filter { flex: 1; }
    .primary-button { min-width: 106px; }
    .reset-link { margin-left: auto; min-height: 34px; }
    .records-heading { padding: 20px; }
    .records-table, .records-table tbody { display: block; }
    .records-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    .records-table tbody tr { display: block; padding: 18px 20px; border-top: 1px solid var(--border-subtle); }
    .records-table td, .records-table th:first-child, .records-table td:first-child, .records-table th:last-child, .records-table td:last-child { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 10px; width: auto; padding: 7px 0; border: 0; font-size: 11px; }
    .records-table td::before { content: attr(data-label); color: var(--dim); font-family: var(--sans); font-size: 10px; white-space: normal; }
    .records-table .time-cell { font-size: 11px; }
    .pagination-footer { align-items: center; flex-direction: column; gap: 13px; padding: 19px 15px; }
    .pagination { justify-content: center; }
    .page-link { min-width: 31px; height: 33px; padding: 0 7px; }
    .notice { margin: 16px 20px 0; }
    .filter-note { margin: 13px 20px 0; }
    .usage-panel { margin-top: 20px; }
    .usage-heading { padding: 18px 20px; gap: 12px; }
    .usage-heading h2 { font-size: 12px; }
    .usage-content { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 20px; }
}
@media (max-width: 420px) {
    .site-shell { padding: 0 17px; }
    .site-header { gap: 10px; height: 78px; }
    .brand { font-size: 10px; gap: 8px; letter-spacing: .3px; }
    .brand-divider { padding: 0 4px; }
    .brand-mark { transform: scale(.9); }
    .status { font-size: 9px; }
    h1 { font-size: 38px; }
    .home-main { padding-top: 36px; }
    .intro-copy { font-size: 11px; }
    .panel-code { font-size: 8px; }
    .panel-heading, .panel-footer { padding-left: 18px; padding-right: 18px; }
    .info-card { padding-left: 18px; padding-right: 18px; }
    .site-footer { gap: 12px; font-size: 8px; letter-spacing: .3px; }
    .footer-note { font-size: 7px; letter-spacing: 0; }
    .footer-note span { margin: 0 4px; }
    .data-intro { align-items: start; }
    .data-intro .eyebrow { font-size: 8px; letter-spacing: .8px; }
    .data-intro h1 { font-size: 30px; }
    .data-intro .intro-copy { font-size: 11px; max-width: 205px; }
    .record-counter { min-width: 78px; padding-left: 14px; margin-top: 31px; }
    .counter-value { font-size: 23px; }
    .counter-label { font-size: 10px; }
    .filter-form, .records-heading { padding: 18px; }
    .table-timezone { font-size: 9px; }
    .records-table tbody tr { padding: 16px 18px; }
    .records-table td, .records-table td:first-child, .records-table td:last-child { grid-template-columns: 67px minmax(0, 1fr); gap: 8px; font-size: 10px; }
    .records-table td::before { font-size: 9px; }
    .page-link { min-width: 28px; padding: 0 5px; font-size: 10px; }
    .pagination { gap: 4px; }
    .page-ellipsis { padding: 0 1px; }
    .notice { margin-left: 18px; margin-right: 18px; }
    .filter-note { margin-left: 18px; margin-right: 18px; font-size: 10px; }
    .usage-heading { padding: 17px 18px; }
    .usage-heading h2 { gap: 8px; font-size: 11px; }
    .usage-heading .panel-code { font-size: 7px; letter-spacing: .2px; }
    .usage-content { padding: 18px; }
    .usage-intro, .usage-rules p { font-size: 11px; }
    .usage-panel code { font-size: 10px; }
    .example-link { grid-template-columns: 24px minmax(0, 1fr) 10px; gap: 8px; padding: 12px 10px; }
    .usage-rules p { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
