﻿:root {
    --bg: #0b1020;
    --text: rgba(255,255,255,.92);
    --muted: rgba(255,255,255,.65);
    --line: rgba(255,255,255,.10);
    --shadow: 0 12px 30px rgba(0,0,0,.35);
    --radius: 8px;
    --up: #46e39a;
    --down: #ff6b6b;
    --flat: rgba(255,255,255,.55);
    --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --sans: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "PingFang SC","Hiragino Sans GB","Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--sans);
    color: var(--text);
    background: radial-gradient(900px 520px at 20% -10%, rgba(105,165,255,.25), transparent 60%), radial-gradient(900px 520px at 100% 10%, rgba(255,125,200,.18), transparent 55%), radial-gradient(700px 480px at 50% 110%, rgba(70,227,154,.12), transparent 55%), var(--bg);
    min-height: 100vh;
}

.wrap {
    max-width: 980px;
    margin: 0 auto;
    padding: 14px 14px 26px;
}

.topbar,
.analysis-panel,
.analysis-result {
    margin-top: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
    box-shadow: var(--shadow);
}

.topbar {
    display: flex;
    gap: 12px;
    align-items: stretch;
    flex-wrap: wrap;
    padding: 12px;
}

.analysis-panel,
.analysis-result {
    padding: 14px;
}

.brand {
    flex: 1;
    min-width: 220px;
}

.brand h1 {
    margin: 0;
    font-size: 16px;
    letter-spacing: .3px;
}

.brand p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.6;
}

.metaBox {
    flex: 1;
    min-width: 260px;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.pill,
.jump-btn {
    min-height: 40px;
    border-radius: var(--radius);
}

.pill {
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.06);
    font-size: 12.5px;
    color: rgba(255,255,255,.82);
    display: inline-flex;
    gap: 8px;
    align-items: center;
    white-space: nowrap;
}

.pill .k {
    color: rgba(255,255,255,.65);
}

.pill .v {
    font-family: var(--mono);
    color: rgba(255,255,255,.90);
}

.jump-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid rgba(111,208,255,.28);
    background: linear-gradient(135deg, rgba(77,124,255,.22), rgba(111,208,255,.18));
    color: rgba(238,244,255,.95);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.jump-btn-secondary {
    background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
    border-color: rgba(255,255,255,.14);
}

.jump-btn:hover {
    background: linear-gradient(135deg, rgba(77,124,255,.32), rgba(111,208,255,.26));
}

.jump-btn-secondary:hover {
    background: linear-gradient(135deg, rgba(255,255,255,.14), rgba(255,255,255,.08));
}

.section-title h2 {
    margin: 0;
    font-size: 15px;
}

.section-title p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.6;
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-label {
    font-size: 12px;
    color: rgba(255,255,255,.68);
}

.select-input,
.analyze-btn {
    min-height: 42px;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,.12);
    font-size: 13px;
}

.select-input {
    width: 100%;
    padding: 0 12px;
    background: rgba(0,0,0,.20);
    color: rgba(255,255,255,.92);
    outline: none;
}

.select-input option {
    color: #10131f;
}

.field-switch,
.field-action {
    justify-content: flex-end;
}

.switch-row {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.05);
}

.switch-row input {
    width: 16px;
    height: 16px;
}

.analyze-btn {
    width: 100%;
    border: 0;
    color: #eef4ff;
    cursor: pointer;
    font-weight: 700;
    letter-spacing: .3px;
    background: linear-gradient(135deg, #4d7cff, #6fd0ff);
    box-shadow: 0 10px 24px rgba(76,124,255,.25);
}

.analysis-error {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: var(--radius);
    border: 1px solid rgba(255,107,107,.28);
    background: rgba(255,107,107,.08);
    color: #ffb3b3;
    font-size: 12.5px;
}

.analysis-result.is-empty .result-cards {
    display: none;
}

.result-cards {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.result-card {
    min-height: 112px;
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,.10);
    background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
}

.result-card.wide {
    grid-column: span 3;
    min-height: auto;
}

.result-k {
    font-size: 12px;
    color: rgba(255,255,255,.66);
}

.result-v {
    margin-top: 8px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: .3px;
}

.result-desc {
    margin-top: 8px;
    color: rgba(255,255,255,.66);
    font-size: 12.5px;
    line-height: 1.6;
}

.prob-home .result-v {
    color: #6fd0ff;
}

.prob-draw .result-v {
    color: #ffd36f;
}

.prob-away .result-v {
    color: #ff9d7d;
}

.page-loading {
    position: fixed;
    inset: 0;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 8, 18, .56);
    backdrop-filter: blur(5px);
}

.loading-card {
    min-width: 180px;
    padding: 18px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(10,15,30,.92);
    box-shadow: var(--shadow);
    text-align: center;
}

.loading-spinner {
    width: 34px;
    height: 34px;
    margin: 0 auto 10px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,.14);
    border-top-color: #6fd0ff;
    animation: spin 1s linear infinite;
}

.loading-text {
    font-size: 12.5px;
    color: rgba(255,255,255,.82);
}

body.loading-active {
    overflow: hidden;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.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;
}

#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(14px);
    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;
}

@media (max-width: 620px) {
    .metaBox {
        justify-content: stretch;
    }

    .jump-btn,
    .pill {
        width: 100%;
    }

    .analysis-grid,
    .result-cards {
        grid-template-columns: 1fr;
    }

    .result-card.wide {
        grid-column: span 1;
    }

    .field-switch,
    .field-action {
        justify-content: stretch;
    }
}
