/* Copyright (c) 2026 喜欢电脑的猫咪 */

:root {
    --bg: #0f1117;
    --bg-card: #1a1d27;
    --bg-hover: #242836;
    --border: #2e3345;
    --text: #e6e8ef;
    --text-muted: #9aa3b5;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --success: #22c55e;
    --warning: #eab308;
    --danger: #ef4444;
    --info: #3b82f6;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(0,0,0,.35);
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

[data-theme="light"] {
    --bg: #f4f6fb;
    --bg-card: #ffffff;
    --bg-hover: #f0f2f8;
    --border: #e2e8f0;
    --text: #1e293b;
    --text-muted: #64748b;
    --shadow: 0 4px 20px rgba(0,0,0,.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    transition: background .3s, color .3s;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 4rem;
}

/* Header */
header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--accent), #a855f7);
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 1.4rem;
}

h1 {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -.02em;
}

.subtitle {
    font-size: .875rem;
    color: var(--text-muted);
    margin-top: .15rem;
}

.header-actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
}

button {
    font-family: inherit;
    font-size: .875rem;
    font-weight: 500;
    padding: .55rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

button:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

button.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

button.primary:hover {
    background: var(--accent-hover);
}

/* Summary Cards */
.summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.summary-card {
    text-align: center;
}

.summary-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin: .4rem 0;
    font-variant-numeric: tabular-nums;
}

.summary-label {
    font-size: .8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.score-ring {
    width: 80px;
    height: 80px;
    margin: 0 auto .5rem;
    position: relative;
}

.score-ring svg {
    transform: rotate(-90deg);
}

.score-ring circle {
    fill: none;
    stroke-width: 8;
}

.score-ring .bg { stroke: var(--border); }
.score-ring .fg {
    stroke: var(--success);
    stroke-linecap: round;
    transition: stroke-dashoffset .8s ease;
}

.score-text {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    font-weight: 700;
}

/* Tabs */
.tabs {
    display: flex;
    gap: .4rem;
    overflow-x: auto;
    padding-bottom: .5rem;
    margin-bottom: 1.5rem;
    scrollbar-width: thin;
}

.tab {
    flex-shrink: 0;
    padding: .55rem 1.1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: .875rem;
    cursor: pointer;
    transition: all .2s;
}

.tab:hover { color: var(--text); border-color: var(--accent); }
.tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* Sections */
.section {
    display: none;
    animation: fadeIn .35s ease;
}

.section.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* Tables */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-card);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

th, td {
    padding: .75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--bg-hover);
    font-weight: 600;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--text-muted);
    position: sticky;
    top: 0;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-hover); }

.status {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-weight: 500;
    font-size: .85rem;
    padding: .2rem .55rem;
    border-radius: 6px;
}

.status.pass {
    background: color-mix(in srgb, var(--success) 18%, transparent);
    color: var(--success);
}

.status.fail {
    background: color-mix(in srgb, var(--danger) 18%, transparent);
    color: var(--danger);
}

.status.partial {
    background: color-mix(in srgb, var(--warning) 18%, transparent);
    color: var(--warning);
}

.status.info {
    background: color-mix(in srgb, var(--info) 18%, transparent);
    color: var(--info);
}

.badge {
    display: inline-block;
    font-size: .75rem;
    padding: .15rem .45rem;
    border-radius: 4px;
    background: var(--bg-hover);
    color: var(--text-muted);
    font-family: var(--mono);
}

.value-mono {
    font-family: var(--mono);
    font-size: .85rem;
    word-break: break-all;
}

/* Grid for feature cards */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.15rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    transition: border-color .2s;
}

.feature-card:hover { border-color: var(--accent); }

.feature-name {
    font-weight: 500;
    font-size: .9rem;
}

.feature-desc {
    font-size: .75rem;
    color: var(--text-muted);
    margin-top: .15rem;
}

/* Progress bar */
.progress-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-top: .5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #a855f7);
    border-radius: 3px;
    transition: width .6s ease;
}

/* Footer */
footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: .8rem;
    color: var(--text-muted);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: .75rem 1.25rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    font-size: .9rem;
    opacity: 0;
    transition: all .3s;
    z-index: 100;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Responsive */
@media (max-width: 640px) {
    h1 { font-size: 1.25rem; }
    .summary { grid-template-columns: 1fr 1fr; }
    th, td { padding: .6rem .75rem; }
}

/* Print */
@media print {
    body { background: #fff; color: #000; }
    .header-actions, .tabs, button { display: none !important; }
    .section { display: block !important; page-break-inside: avoid; }
    .card, .table-wrap, .feature-card { box-shadow: none; border: 1px solid #ccc; }
}