/* ===== 基础变量与重置 ===== */
:root {
    --primary: #1C5A56;
    --secondary: #3B9A8F;
    --accent: #F4C75B;
    --accent-glow: rgba(244, 199, 91, 0.4);
    --text-main: #FFFFFF;
    --text-muted: #D1E5E1;
    --bg-dark: #0D2D29;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans SC', -apple-system, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===== 页面切换逻辑 ===== */
.page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease;
    padding: 24px;
    padding-bottom: 80px;
    z-index: 1;
    background-color: var(--bg-dark);
}

.page.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    z-index: 10;
}

/* ===== 玻璃拟态卡片 ===== */
.card.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

/* ===== 通用按钮 ===== */
button {
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 12px;
    transition: all 0.25s ease;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: var(--accent);
    border: 1px solid var(--accent);
    width: 100%;
    padding: 16px;
    font-weight: 500;
}

.btn-primary:active,
.btn-glow:active {
    box-shadow: 0 0 18px var(--accent-glow);
    transform: scale(0.98);
}

.btn-secondary {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    width: 100%;
    padding: 16px;
}

/* ===== 首页 ===== */
#page-home {
    background: radial-gradient(ellipse at 80% 10%, #1C5A56 0%, var(--bg-dark) 55%);
}

.home-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 100px);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: var(--accent);
    color: var(--bg-dark);
    font-weight: 900;
    font-size: 26px;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(244, 199, 91, 0.35);
}

.brand-name {
    font-size: 38px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 30%, var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-slogan {
    font-size: 26px;
    font-weight: 300;
    margin-bottom: 10px;
    line-height: 1.35;
}

.brand-sub {
    color: var(--accent);
    font-size: 14px;
    margin-bottom: 44px;
    letter-spacing: 0.03em;
}

.home-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.home-buttons .btn-primary {
    display: flex;
    align-items: center;
    text-align: left;
    padding: 20px;
    gap: 0;
}

.btn-icon {
    font-size: 34px;
    margin-right: 16px;
    flex-shrink: 0;
}

.btn-text {
    display: flex;
    flex-direction: column;
}

.btn-text strong {
    font-size: 17px;
    margin-bottom: 4px;
    color: #fff;
}

.btn-text small {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
}

.home-footer {
    margin-top: 52px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.8;
}

/* ===== 表单页 ===== */
.form-header {
    text-align: center;
    margin-bottom: 28px;
    position: relative;
    padding-top: 4px;
}

.form-header h2 {
    font-size: 18px;
    margin-bottom: 12px;
}

.btn-back {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    padding: 4px 8px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    width: auto;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--glass-border);
    border-radius: 2px;
    margin-top: 12px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--secondary), var(--accent));
    width: 15%;
    transition: width 0.4s ease;
    border-radius: 2px;
}

.progress-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

.form-body {
    padding-bottom: 20px;
}

.step-container h3 {
    font-size: 16px;
    color: var(--accent);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--glass-border);
}

.form-group {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--text-main);
    font-weight: 500;
}

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.form-input:focus {
    border-color: var(--secondary);
    background: rgba(59, 154, 143, 0.12);
}

select.form-input option {
    background: #1C5A56;
    color: white;
}

.input-with-unit {
    position: relative;
}

.input-with-unit::after {
    content: attr(data-unit);
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 14px;
}

.input-with-unit input {
    padding-right: 52px;
}

.form-nav {
    display: flex;
    gap: 12px;
    padding-top: 10px;
}

/* ===== 加载页 ===== */
#page-loading {
    background: radial-gradient(ellipse at center, #1C5A56 0%, var(--bg-dark) 70%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    text-align: center;
    width: 100%;
}

.loading-spinner {
    width: 56px;
    height: 56px;
    border: 4px solid var(--glass-border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin: 0 auto 28px;
}

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

.loading-sub {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 8px;
}

.loading-steps {
    margin-top: 36px;
    text-align: left;
    display: inline-block;
    min-width: 240px;
}

.loading-step {
    padding: 10px 0;
    color: var(--text-muted);
    opacity: 0.4;
    font-size: 15px;
}

.loading-step.active {
    color: var(--accent);
    opacity: 1;
}

.loading-step.done {
    color: var(--secondary);
    opacity: 1;
}

/* ===== 结果报告页 ===== */
.result-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    position: relative;
}

.result-header h2 {
    flex: 1;
    text-align: center;
    font-size: 18px;
}

.score-hero {
    text-align: center;
    margin-bottom: 28px;
    padding: 16px 0;
}

.score-ring {
    position: relative;
    width: 130px;
    height: 130px;
    margin: 0 auto 16px;
}

.ring-bg {
    fill: none;
    stroke: var(--glass-border);
    stroke-width: 8;
}

.ring-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 8;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset 1.5s ease-out;
}

.score-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 34px;
    font-weight: 700;
    color: var(--accent);
}

.score-label {
    font-size: 17px;
    color: var(--text-main);
    font-weight: 500;
}

.gap-hero {
    text-align: center;
    margin-bottom: 28px;
    padding: 16px 0;
}

.gap-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.gap-number {
    font-size: 42px;
    font-weight: 700;
    color: #ff4d4f;
    margin-bottom: 8px;
}

.gap-sub {
    font-size: 13px;
    color: var(--text-muted);
}

.card.glass h3 {
    font-size: 15px;
    margin-bottom: 16px;
    color: var(--text-muted);
}

.compare-bar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.compare-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.compare-label {
    color: var(--text-muted);
    font-size: 14px;
}

.compare-value {
    font-weight: 700;
    font-size: 16px;
}

.compare-value.red {
    color: #ff4d4f;
}

.compare-value.green {
    color: #52c41a;
}

.funding-total {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--glass-border);
    margin-top: 8px;
    font-weight: 600;
}

.recommendation p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
}

.btn-cta {
    position: sticky;
    bottom: 20px;
    left: 0;
    width: 100%;
    margin-top: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    font-size: 16px;
}

/* ===== 联系引流页 ===== */
.contact-content {
    text-align: center;
    padding-top: 10px;
}

.contact-header {
    margin-bottom: 32px;
}

.contact-header h2 {
    font-size: 22px;
    font-weight: 600;
    background: linear-gradient(to right, #fff, var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.contact-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.qr-card {
    padding: 28px 20px !important;
}

.qr-image {
    width: 80%;
    max-width: 240px;
    display: block;
    margin: 0 auto;
    border-radius: 12px;
}

.qr-hint {
    margin-top: 16px;
    color: var(--accent);
    font-size: 14px;
}

.contact-info {
    text-align: left;
    margin: 20px 0;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 14px;
}

.info-icon {
    font-size: 20px;
}

.contact-buttons {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}