﻿:root {
    --bg0: #070b14;
    --bg1: #0b1220;
    --card: rgba(255,255,255,.06);
    --card2: rgba(255,255,255,.08);
    --stroke: rgba(255,255,255,.12);
    --text: #eaf0ff;
    --muted: rgba(234,240,255,.72);
    --muted2: rgba(234,240,255,.52);
    --brand: #7c5cff;
    --brand2: #30d5c8;
    --good: #37d67a;
    --warn: #ffb020;
    --danger: #ff5c7a;
    --shadow: 0 18px 40px rgba(0,0,0,.45);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "PingFang SC","Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top left, rgba(124,92,255,.08), transparent 28%), radial-gradient(circle at top right, rgba(48,213,200,.06), transparent 24%), var(--bg1);
    -webkit-font-smoothing: antialiased;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
}

a {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.wrap {
    max-width: 980px;
    margin: 0 auto;
    padding: 14px 14px 18px;
}

/* hero */
.hero {
    border: 1px solid var(--stroke);
    background: linear-gradient(135deg, rgba(124,92,255,.18), rgba(48,213,200,.10));
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 12% 18%, rgba(255,255,255,.10), transparent 18%), radial-gradient(circle at 88% 0%, rgba(255,255,255,.08), transparent 22%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    padding: 14px 14px 12px;
}

.brand {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.brand-left {
    min-width: 0;
}

.crumb {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(234,240,255,.68);
    font-size: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.crumb a:hover {
    color: rgba(234,240,255,.92);
}

.crumb .sep {
    opacity: .45;
}

.brand h1 {
    margin: 0;
    font-size: 18px;
    letter-spacing: .2px;
}

.brand p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.6;
}

.mini-chip {
    flex: 0 0 auto;
    padding: 8px 10px;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(0,0,0,.10);
    color: rgba(234,240,255,.82);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand2));
    box-shadow: 0 0 0 4px rgba(255,255,255,.06);
}

.common-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-btn {
    appearance: none;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.06);
    color: rgba(234,240,255,.92);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
    transition: .2s ease;
}

.action-btn:hover {
    background: rgba(255,255,255,.10);
    border-color: rgba(255,255,255,.20);
}

.action-btn.primary {
    background: linear-gradient(135deg, rgba(124,92,255,.28), rgba(48,213,200,.18));
    border-color: rgba(124,92,255,.40);
    box-shadow: 0 10px 24px rgba(124,92,255,.18);
}

.action-btn.primary:hover {
    background: linear-gradient(135deg, rgba(124,92,255,.36), rgba(48,213,200,.22));
}

/* summary */
.summary-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 12px;
}

.summary-card {
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,.12);
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.10));
    box-shadow: 0 12px 30px rgba(0,0,0,.26);
    padding: 12px 12px;
    min-width: 0;
}

.summary-card .k {
    color: rgba(234,240,255,.60);
    font-size: 12px;
}

.summary-card .v {
    margin-top: 6px;
    font-weight: 950;
    letter-spacing: .2px;
    font-size: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.summary-card .v.low {
    color: var(--good);
}

.summary-card .v.high {
    color: var(--danger);
}

.summary-card .tip {
    margin-top: 6px;
    color: rgba(234,240,255,.56);
    font-size: 11px;
    line-height: 1.55;
}

/* panel */
.panel {
    margin-top: 12px;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,.12);
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.10));
    box-shadow: 0 12px 30px rgba(0,0,0,.30);
    overflow: hidden;
}

.panel-head {
    padding: 12px 12px 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.panel-title {
    font-size: 14px;
    font-weight: 950;
    letter-spacing: .2px;
    color: rgba(234,240,255,.95);
}

.panel-sub {
    margin-top: 6px;
    font-size: 12px;
    color: rgba(234,240,255,.62);
    line-height: 1.6;
}

/* charts */
.chart-wrap {
    padding: 12px 12px 4px;
}

.chart-wrap canvas {
    width: 100%;
    display: block;
    border-radius: var(--radius);
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06);
}

/* tables */
.table-wrap {
    padding: 12px;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(255,255,255,.03);
}

.data-table th,
.data-table td {
    padding: 11px 10px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,.08);
    white-space: nowrap;
    font-size: 13px;
}

.data-table th {
    color: rgba(234,240,255,.74);
    font-weight: 850;
    background: rgba(255,255,255,.04);
}

.data-table td {
    color: rgba(234,240,255,.92);
}

.data-table tbody tr:hover {
    background: rgba(255,255,255,.04);
}

.data-table .low {
    color: var(--good);
    font-weight: 900;
}

.data-table .high {
    color: var(--danger);
    font-weight: 900;
}

/* distribution cards */
.dist-grid {
    padding: 0 12px 12px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 10px;
}

.dist-card {
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.04);
    padding: 10px 10px;
    min-width: 0;
}

.dist-card .k {
    color: rgba(234,240,255,.58);
    font-size: 12px;
}

.dist-card .v {
    margin-top: 6px;
    font-size: 18px;
    font-weight: 950;
    letter-spacing: .2px;
}

/* explain */
.explain-box {
    padding: 12px;
    color: rgba(234,240,255,.84);
    font-size: 13px;
    line-height: 1.8;
}

.explain-box p {
    margin: 0;
}

.explain-box p + p {
    margin-top: 10px;
}

/* footer */
.site-footer {
    margin-top: 22px;
    padding: 18px 12px calc(22px + env(safe-area-inset-bottom));
    text-align: center;
    font-size: 12px;
    color: rgba(234,240,255,.55);
}

.footer-inner {
    max-width: 980px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    line-height: 1.8;
}

.footer-links a {
    color: rgba(234,240,255,.70);
    text-decoration: none;
    padding: 2px 4px;
}

.footer-links a:hover {
    color: rgba(234,240,255,.95);
}

.footer-links .sep {
    opacity: .35;
}

.footer-meta {
    margin-top: 10px;
    line-height: 1.6;
}

.footer-meta .slogan {
    margin-top: 4px;
    font-size: 11px;
    opacity: .65;
}

/* back to top */
#backToTop {
    position: fixed;
    right: 24px;
    bottom: 32px;
    width: 44px;
    height: 44px;
    line-height: 44px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(120, 160, 255, 0.25);
    color: #9fb6ff;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), inset 0 0 0 rgba(255, 255, 255, 0);
    font-size: 20px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.25s ease, box-shadow 0.25s ease;
}

#backToTop.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#backToTop:hover {
    background: rgba(120, 160, 255, 0.18);
    box-shadow: 0 10px 28px rgba(80, 120, 255, 0.35), inset 0 0 12px rgba(120, 160, 255, 0.25);
    color: #dbe3ff;
}

/* responsive */
@media (min-width: 720px) {
    .wrap {
        padding: 18px 18px 22px;
    }

    .brand h1 {
        font-size: 20px;
    }
}

@media (max-width: 860px) {
    .summary-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .dist-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}

@media (max-width: 640px) {
    .brand {
        flex-direction: column;
        align-items: stretch;
    }

    .mini-chip {
        width: fit-content;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .dist-grid {
        grid-template-columns: 1fr;
    }

    .common-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .action-btn {
        text-align: center;
    }
}
