:root {
    --bg: #f4f7fb;
    --card: #ffffff;
    --text: #162033;
    --muted: #667085;
    --line: #d8e2f0;
    --primary: #2563eb;
    --primary-deep: #1d4ed8;
    --primary-soft: #dbeafe;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(180deg, #eff4fb 0%, var(--bg) 100%);
    color: var(--text);
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.96) 0%, rgba(241, 246, 255, 0.92) 100%);
    border-bottom: 1px solid rgba(191, 219, 254, 0.85);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.06);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 78px;
    gap: 24px;
}

.brand {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 10px 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1;
    text-decoration: none;
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 55%, #2563eb 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 4px;
    width: 44px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #60a5fa 0%, #2563eb 100%);
    opacity: 0.9;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 10px;
    margin-left: auto;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    color: #5b6b8c;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.text-link:hover {
    color: var(--primary-deep);
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.page-content {
    padding: 32px 0 56px;
}

.card {
    background: var(--card);
    border: 1px solid rgba(216, 226, 240, 0.9);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.hero-grid,
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.hero-grid-enhanced {
    align-items: stretch;
}

.hero-card,
.chart-card,
.section-card,
.info-card,
.form-card {
    padding: 28px;
}

.hero-card-accent {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f6f9ff 45%, #eef4ff 100%);
}

.hero-card-accent::after {
    content: "";
    position: absolute;
    inset: auto -40px -40px auto;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, rgba(37, 99, 235, 0) 72%);
}

.hero-title {
    max-width: 640px;
    margin: 0 0 24px;
    font-size: 34px;
    line-height: 1.3;
}

.hero-main-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.hero-side-note {
    min-width: 120px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(216, 226, 240, 0.9);
}

.side-note-label,
.mini-stat-label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 13px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 14px;
}

.hero-value {
    font-size: 72px;
    line-height: 1;
    font-weight: 800;
    margin-bottom: 16px;
}

.hero-description {
    max-width: 720px;
    margin: 0 0 18px;
    color: #2f3b52;
    line-height: 1.8;
    font-size: 15px;
}

.hero-note {
    margin-top: 0;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.hero-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 20px 0 18px;
}

.mini-stat {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(216, 226, 240, 0.9);
}

.mini-stat strong {
    display: block;
    line-height: 1.6;
}

.hero-empty {
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 12px;
}

.meta-text,
.help-text,
.section-header p,
.prose-block p,
.prose-block li,
.feature-item p {
    color: var(--muted);
    line-height: 1.7;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
}

.status-极度恐惧 { background: #dbeafe; color: #1d4ed8; }
.status-恐惧 { background: #e0f2fe; color: #0369a1; }
.status-中性 { background: #e5e7eb; color: #374151; }
.status-贪婪 { background: #ffedd5; color: #c2410c; }
.status-极度贪婪 { background: #fee2e2; color: #b91c1c; }

.chart-card-highlight {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.panel-heading h2,
.panel-heading h3 {
    margin: 4px 0 0;
}

.compact-heading {
    margin-bottom: 18px;
}

.panel-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-deep);
    font-size: 13px;
    font-weight: 700;
}

.muted-badge {
    background: #eef2f7;
    color: #475467;
}

.panel-badge-admin {
    background: #dbeafe;
    color: #1d4ed8;
}

.panel-badge-vip {
    background: #fff7ed;
    color: #c2410c;
}

.chart-box {
    width: 100%;
    height: 320px;
}

.chart-wide {
    height: 360px;
}

.section-header,
.admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.section-header-rich {
    margin-bottom: 16px;
}

.section-header h1,
.section-header h2,
.hero-card h1,
.form-card h1,
.info-card h3,
.prose-block h1 {
    margin-top: 0;
}

.text-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.legend-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.legend-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.legend-list-rich li:nth-child(1) { background: #eff6ff; }
.legend-list-rich li:nth-child(2) { background: #f0f9ff; }
.legend-list-rich li:nth-child(3) { background: #f3f4f6; }
.legend-list-rich li:nth-child(4) { background: #fff7ed; }
.legend-list-rich li:nth-child(5) { background: #fef2f2; }

.feature-list {
    display: grid;
    gap: 16px;
}

.feature-item {
    padding: 16px 18px;
    border-radius: 16px;
    background: #f8fafc;
}

.feature-item strong {
    display: inline-block;
    margin-bottom: 6px;
}

.form-shell {
    display: flex;
    justify-content: center;
    padding-top: 24px;
}

.form-card {
    width: min(100%, 520px);
}

.form-card-wide {
    width: min(100%, 680px);
}

.stack-form {
    display: grid;
    gap: 16px;
}

.stack-form label {
    display: grid;
    gap: 8px;
    font-size: 14px;
    color: var(--text);
}

.input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font-size: 14px;
}

.field-error {
    color: #b91c1c;
    font-size: 13px;
    line-height: 1.5;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 12px;
    padding: 12px 18px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.2);
}

.btn-secondary {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--line);
}

.btn-danger {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.btn-sm {
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
}

.flash-list {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.flash-item {
    padding: 12px 14px;
    border-radius: 12px;
}

.flash-success { background: #dcfce7; color: #166534; }
.flash-danger { background: #fee2e2; color: #991b1b; }
.flash-warning { background: #fef3c7; color: #92400e; }
.flash-info { background: #dbeafe; color: #1d4ed8; }

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid #edf2f7;
    font-size: 14px;
    vertical-align: top;
}

.table-status {
    margin-bottom: 0;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.table-actions form {
    margin: 0;
}

.table-inline-tip {
    display: inline-flex;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef2f7;
    color: #475467;
    font-size: 12px;
    font-weight: 600;
}

.history-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
    gap: 24px;
    margin-bottom: 24px;
}

.history-hero-card h1 {
    margin: 0 0 14px;
    font-size: 32px;
    line-height: 1.35;
}

.history-stats-grid {
    margin-bottom: 0;
}

.history-info-card,
.admin-panel-card,
.history-table-card {
    overflow: hidden;
}

.compliance-note {
    display: grid;
    gap: 12px;
    margin: 24px 0 18px;
    padding: 18px 20px;
    border: 1px solid rgba(216, 226, 240, 0.9);
    border-radius: 18px;
    background: #f8fafc;
}

.compliance-note p {
    margin: 0;
    color: #475467;
    line-height: 1.75;
}

.form-card-elevated {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.preview-panel {
    padding: 16px 18px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid rgba(216, 226, 240, 0.9);
}

.preview-panel-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.preview-panel-row strong {
    font-size: 28px;
    line-height: 1.2;
}

.preview-description {
    margin: 14px 0 12px;
    color: #475467;
    line-height: 1.7;
}

.preview-risk {
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    background: #eff6ff;
    color: #1d4ed8;
}

.preview-risk-extreme-fear {
    background: #dbeafe;
    color: #1d4ed8;
}

.preview-risk-fear {
    background: #e0f2fe;
    color: #0369a1;
}

.preview-risk-neutral {
    background: #e5e7eb;
    color: #374151;
}

.preview-risk-greed {
    background: #ffedd5;
    color: #c2410c;
}

.preview-risk-extreme-greed {
    background: #fee2e2;
    color: #b91c1c;
}

.preview-risk-home {
    margin: 0 0 18px;
    border: 1px solid rgba(99, 102, 241, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.home-classic-grid {
    gap: 20px;
    margin-bottom: 20px;
}

.home-classic-hero,
.home-classic-info-card,
.home-classic-trend {
    padding: 24px;
}

.home-classic-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #fdfefe 0%, #eef4ff 55%, #e6ecff 100%);
    border-color: rgba(147, 197, 253, 0.45);
}

.home-classic-hero::before,
.home-classic-trend::before,
.home-classic-info-card::before {
    content: "";
    position: absolute;
    pointer-events: none;
    border-radius: 999px;
    filter: blur(2px);
}

.home-classic-hero::before {
    top: -56px;
    right: -36px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.3) 0%, rgba(96, 165, 250, 0) 72%);
}

.home-classic-title {
    max-width: 620px;
    margin: 0 0 18px;
    font-size: 28px;
    line-height: 1.45;
    font-weight: 700;
}

.home-classic-hero .eyebrow,
.home-classic-trend .eyebrow {
    color: #5b6b8c;
}

.home-classic-hero .hero-value {
    margin-bottom: 12px;
    font-size: 64px;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 45%, #7c3aed 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.home-classic-hero .status-chip {
    box-shadow: 0 10px 24px rgba(59, 130, 246, 0.12);
}

.home-classic-hero .hero-description {
    margin-bottom: 14px;
    color: #334155;
}

.home-classic-hero .meta-text {
    color: #60708f;
}

.home-classic-hero .hero-actions {
    margin-top: 18px;
}

.home-classic-trend {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
    border-color: rgba(191, 219, 254, 0.8);
}

.home-classic-trend::before {
    top: -42px;
    left: -28px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.16) 0%, rgba(56, 189, 248, 0) 72%);
}

.home-classic-info-grid {
    gap: 20px;
}

.home-classic-info-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.home-classic-info-card::before {
    top: -50px;
    right: -26px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.12) 0%, rgba(129, 140, 248, 0) 72%);
}

.home-classic-info-card:first-child {
    border-color: rgba(191, 219, 254, 0.9);
}

.home-classic-info-card:last-child {
    background: linear-gradient(180deg, #fffdf8 0%, #fff7ed 100%);
    border-color: rgba(253, 186, 116, 0.5);
}

.home-classic-info-card h3 {
    margin-bottom: 14px;
}

.home-classic-legend-list {
    gap: 10px;
}

.home-classic-legend-list li {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid transparent;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.home-classic-legend-list li:nth-child(1) {
    background: linear-gradient(90deg, #fff1f2 0%, #ffe4e6 100%);
    border-color: #fecdd3;
}

.home-classic-legend-list li:nth-child(2) {
    background: linear-gradient(90deg, #fff7ed 0%, #ffedd5 100%);
    border-color: #fdba74;
}

.home-classic-legend-list li:nth-child(3) {
    background: linear-gradient(90deg, #f8fafc 0%, #eef2f7 100%);
    border-color: #d7deea;
}

.home-classic-legend-list li:nth-child(4) {
    background: linear-gradient(90deg, #f0f9ff 0%, #e0f2fe 100%);
    border-color: #7dd3fc;
}

.home-classic-legend-list li:nth-child(5) {
    background: linear-gradient(90deg, #eef4ff 0%, #dbeafe 100%);
    border-color: #93c5fd;
}

.home-classic-legend-list strong {
    color: #1f2a44;
}

.home-classic-info-card p {
    margin: 0;
    color: #4b5565;
    line-height: 1.8;
}

.admin-actions {
    justify-content: flex-end;
}

.vip-admin-grid {
    align-items: start;
}

.vip-summary-list {
    display: grid;
    gap: 12px;
    color: #2f3b52;
    line-height: 1.7;
}

.audit-meta-block {
    margin-top: 8px;
    display: grid;
    gap: 4px;
    color: #667085;
    font-size: 13px;
    line-height: 1.6;
    word-break: break-all;
}

.audit-user-agent {
    max-width: 260px;
    color: #667085;
    word-break: break-all;
}

.about-preview-card {
    display: grid;
    gap: 18px;
}

.about-preview-card h1 {
    text-align: center;
}

.about-preview-card ul {
    margin: 0;
    padding-left: 30px;
}

.about-preview-card li {
    color: #51627f;
    line-height: 1.8;
}

.about-factor-block {
    display: grid;
    gap: 6px;
}

.about-factor-block p,
.about-factor-block ol {
    margin: 0;
}

.about-factor-block ol {
    padding-left: 28px;
}

.about-factor-block li {
    color: #17253f;
    line-height: 1.8;
}

.about-preview-tip {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 14px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
}

.about-reference-chart {
    margin-top: 24px;
}

.about-reference-chart-wide,
.about-reference-chart-secondary {
    overflow: hidden;
}

.about-reference-chart-wide img {
    width: min(100%, 640px);
    max-width: 100%;
    margin: 0 auto;
}

.about-reference-chart-secondary img {
    width: min(100%, 700px);
    max-width: 100%;
    margin: 0 auto;
}

.about-reference-chart img {
    display: block;
    width: 100%;
    max-width: 720px;
    border-radius: 18px;
    border: 1px solid rgba(216, 226, 240, 0.9);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.site-footer {
    padding: 24px 0 40px;
    color: var(--muted);
    text-align: center;
}

.site-footer-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
    line-height: 1.7;
}

.site-footer-contact {
    color: var(--primary-deep);
    font-weight: 600;
}

@media (max-width: 900px) {
    .hero-grid,
    .info-grid,
    .hero-stats-grid,
    .history-hero-grid {
        grid-template-columns: 1fr;
    }

    .nav-wrap,
    .section-header,
    .admin-head,
    .hero-main-row,
    .panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .brand {
        margin-right: 0;
    }

    .nav-wrap {
        gap: 14px;
    }

    .nav-links {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .hero-title,
    .history-hero-card h1 {
        font-size: 28px;
    }

    .hero-value {
        font-size: 58px;
    }

    .chart-box {
        height: 320px;
    }

    .chart-wide {
        height: 340px;
    }

    .section-card,
    .chart-card,
    .info-card,
    .hero-card,
    .form-card {
        padding: 22px;
    }
}
