:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --accent: #06b6d4;
    --bg-gradient: linear-gradient(135deg, #eef2ff 0%, #e0f2fe 50%, #ecfeff 100%);
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(37, 99, 235, 0.12);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --red: #ef4444;
    --yellow: #f59e0b;
    --green: #22c55e;
    --shadow: 0 4px 24px rgba(37, 99, 235, 0.08);
    --shadow-hover: 0 8px 32px rgba(37, 99, 235, 0.15);
    --radius: 16px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg-gradient);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 820px;
    margin: 0 auto;
}

/* 导航 */
.nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
    position: sticky;
    top: 12px;
    z-index: 10;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
}

.nav-back {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white !important;
}

.nav-back:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
}

/* Header */
header {
    text-align: center;
    padding: 20px 20px 10px;
}

header h1 {
    font-size: 2em;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.95em;
}

/* Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    scroll-margin-top: 80px;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.section-header h2 {
    font-size: 1.35em;
    font-weight: 700;
    color: var(--text-primary);
}

.section-desc {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 20px;
}

/* 公式块 */
.formula {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(6, 182, 212, 0.06));
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 0.88em;
    color: var(--text-primary);
    margin: 12px 0 20px;
    font-family: "SF Mono", "Consolas", monospace;
    word-break: break-word;
}

.block-title {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--primary);
    margin: 24px 0 6px;
}

.block-note {
    font-size: 0.86em;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* 表格 */
.table-wrap {
    overflow-x: auto;
    margin: 12px 0;
}

.score-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em;
    min-width: 520px;
}

.score-table thead th {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.score-table thead th:first-child {
    border-top-left-radius: 8px;
}

.score-table thead th:last-child {
    border-top-right-radius: 8px;
}

.score-table tbody tr {
    border-bottom: 1px solid #eef2f7;
}

.score-table tbody tr:nth-child(even) {
    background: rgba(248, 250, 252, 0.6);
}

.score-table tbody td {
    padding: 10px 12px;
    vertical-align: top;
}

.score-table .weight {
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    white-space: nowrap;
}

.score-table .max {
    font-weight: 600;
    color: var(--accent);
    text-align: center;
    white-space: nowrap;
}

.score-table .opts {
    color: var(--text-secondary);
    line-height: 1.6;
}

.footnote {
    font-size: 0.78em;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Q&A 解释 */
.qa {
    background: rgba(248, 250, 252, 0.7);
    border-left: 4px solid var(--accent);
    border-radius: 0 10px 10px 0;
    padding: 16px 18px;
    margin-bottom: 16px;
}

.qa .q {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 0.95em;
}

.qa .a {
    font-size: 0.9em;
    color: var(--text-primary);
    line-height: 1.8;
}

/* 联系方式 */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin: 20px 0 12px;
}

.contact-item {
    background: rgba(248, 250, 252, 0.7);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 18px 14px;
    text-align: center;
    transition: all 0.2s ease;
}

.contact-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}

.contact-icon {
    font-size: 1.8em;
    margin-bottom: 8px;
}

.contact-label {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.contact-value {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
}

.contact-value.placeholder {
    color: var(--text-muted);
    font-weight: 400;
    font-style: italic;
}

.contact-tip {
    font-size: 0.8em;
    color: var(--text-muted);
    text-align: center;
    margin-top: 8px;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.82em;
}

footer p {
    margin-bottom: 4px;
}

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

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
    body { padding: 12px; }
    .card { padding: 20px; }
    header h1 { font-size: 1.6em; }
    .nav { padding: 8px; gap: 4px; }
    .nav-link { padding: 6px 12px; font-size: 0.82em; }
    .formula { font-size: 0.8em; }
}
