/* ==================== 基础重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #1B4F8C;
    --primary-light: #2E6FB5;
    --primary-bg: #E8F0FA;
    --accent: #4FC3F7;
    --red: #E53935;
    --red-light: #FFEBEE;
    --green: #43A047;
    --green-light: #E8F5E9;
    --orange: #FB8C00;
    --orange-light: #FFF3E0;
    --text-main: #1A1A2E;
    --text-secondary: #6B7280;
    --text-hint: #9CA3AF;
    --bg: #F5F6FA;
    --card-bg: #FFFFFF;
    --border: #E5E7EB;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 30px rgba(27, 79, 140, 0.12);
    --radius: 14px;
    --radius-sm: 10px;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text-main);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    height: 100%;
}

#app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    background: var(--bg);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.04);
}

/* ==================== 屏幕切换 ==================== */
.screen {
    min-height: 100vh;
    animation: fadeIn 0.3s ease;
}

.hidden {
    display: none !important;
}

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

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== 登录/注册页 ==================== */
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 28px;
    background: linear-gradient(180deg, #FFFFFF 0%, #F5F6FA 100%);
}

.logo-area {
    text-align: center;
    margin-bottom: 36px;
    animation: slideUp 0.5s ease;
}

.logo-icon {
    margin-bottom: 16px;
}

.app-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.app-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.form-card {
    width: 100%;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: var(--shadow);
    animation: slideUp 0.5s ease 0.1s both;
}

.input-group {
    margin-bottom: 20px;
}

.input-label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.text-input {
    width: 100%;
    height: 48px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 16px;
    font-size: 16px;
    color: var(--text-main);
    background: #FAFBFC;
    transition: all 0.2s;
    outline: none;
}

.text-input:focus {
    border-color: var(--primary-light);
    background: #fff;
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.invite-input {
    letter-spacing: 6px;
    text-transform: uppercase;
    text-align: center;
    font-weight: 600;
    font-size: 20px;
}

.btn-primary {
    width: 100%;
    height: 48px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 4px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 4px;
}

.btn-primary:active {
    transform: scale(0.98);
    background: var(--primary-light);
}

.link-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 18px;
}

.link-text {
    font-size: 14px;
    color: var(--primary-light);
    cursor: pointer;
    transition: opacity 0.2s;
}

.link-text:active {
    opacity: 0.6;
}

.disclaimer-mini {
    margin-top: 32px;
    font-size: 12px;
    color: var(--text-hint);
    text-align: center;
}

.invite-hint {
    margin-top: 28px;
    padding: 16px;
    background: var(--primary-bg);
    border-radius: var(--radius-sm);
    text-align: center;
}

.invite-hint-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
}

.invite-hint-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==================== 主界面导航 ==================== */
.nav-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 52px;
    background: var(--primary);
    color: #fff;
}

.nav-title {
    font-size: 17px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.nav-right:active {
    opacity: 1;
}

/* ==================== 主内容区 ==================== */
.main-content {
    padding: 16px;
}

/* ==================== 分区 ==================== */
.section {
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 0 4px;
}

.section-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}

.toggle-detail {
    margin-left: auto;
    font-size: 13px;
    color: var(--primary-light);
    cursor: pointer;
    padding: 4px 8px;
}

/* ==================== 卡片 ==================== */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
}

.input-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.input-row-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}

.input-row-name {
    font-size: 15px;
    color: var(--text-main);
    font-weight: 500;
}

.input-row-unit {
    font-size: 12px;
    color: var(--text-hint);
}

.number-input {
    width: 110px;
    height: 40px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 0 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
    text-align: right;
    background: #FAFBFC;
    outline: none;
    transition: all 0.2s;
    -moz-appearance: textfield;
}

.number-input::-webkit-outer-spin-button,
.number-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.number-input:focus {
    border-color: var(--primary-light);
    background: #fff;
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.input-hint {
    font-size: 12px;
    color: var(--text-hint);
    margin-top: 8px;
    line-height: 1.4;
}

/* ==================== 滑块 ==================== */
.slider-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.slider {
    width: 120px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 3px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(27, 79, 140, 0.3);
    transition: transform 0.15s;
}

.slider::-webkit-slider-thumb:active {
    transform: scale(1.2);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(27, 79, 140, 0.3);
}

.slider-value {
    min-width: 42px;
    text-align: right;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

/* ==================== 合计折现率 ==================== */
.discount-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary-bg);
    border-radius: var(--radius);
    padding: 14px 20px;
    margin-bottom: 20px;
}

.discount-label {
    font-size: 14px;
    color: var(--primary);
    font-weight: 500;
}

.discount-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}

/* ==================== 估值结果 ==================== */
.primary-result {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    text-align: center;
    padding: 28px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    margin-bottom: 10px;
}

.result-label {
    font-size: 14px;
    opacity: 0.85;
    margin-bottom: 8px;
}

.result-value {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.result-sub {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    opacity: 0.9;
}

.result-sub-value {
    font-weight: 600;
    font-size: 16px;
}

.result-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.result-card-mini {
    flex: 1;
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    padding: 14px;
    text-align: center;
    box-shadow: var(--shadow);
}

.mini-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.mini-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
}

/* ==================== 评价卡片 ==================== */
.evaluation-card {
    padding: 18px 16px;
}

.eval-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.eval-icon {
    font-size: 10px;
    flex-shrink: 0;
}

.eval-label {
    font-size: 15px;
    font-weight: 600;
}

.eval-divider {
    height: 1px;
    background: var(--border);
    margin: 12px 0;
}

.eval-advice {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--bg);
    margin-top: 4px;
}

/* 评价颜色 */
.eval-low { color: var(--red); }
.eval-low .eval-advice { background: var(--red-light); color: var(--red); }
.eval-reasonable { color: var(--orange); }
.eval-reasonable .eval-advice { background: var(--orange-light); color: var(--orange); }
.eval-high { color: var(--green); }
.eval-high .eval-advice { background: var(--green-light); color: var(--green); }

/* ==================== 价格区间表 ==================== */
.price-zone-card {
    padding: 16px;
    margin-top: 14px;
}

.price-zone-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 12px;
}

.price-zone-table {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    font-size: 13px;
}

.price-zone-header {
    display: flex;
    padding: 10px 12px;
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 600;
    font-size: 12px;
}

.price-zone-row {
    display: flex;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    background: var(--card-bg);
    align-items: center;
}

.price-zone-row:last-child {
    border-bottom: none;
}

.price-zone-row.current-row {
    background: #FFF8E1;
    border-left: 3px solid var(--orange);
}

.col-range {
    width: 90px;
    flex-shrink: 0;
    font-weight: 600;
    color: var(--text-main);
}

.col-judge {
    width: 100px;
    flex-shrink: 0;
    padding: 0 8px;
    font-weight: 600;
}

.col-action {
    flex: 1;
    color: var(--text-secondary);
    line-height: 1.5;
}

.price-zone-row .col-range .current-tag {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 5px;
    background: var(--orange);
    color: #fff;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    vertical-align: middle;
}

/* 区间颜色 */
.zone-kill-bottom .col-judge { color: var(--red); }
.zone-undervalued .col-judge { color: var(--primary-light); }
.zone-fair .col-judge { color: var(--orange); }
.zone-overvalued .col-judge { color: var(--green); }

/* ==================== 详情表格 ==================== */
.detail-table {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 4px 0;
    box-shadow: var(--shadow);
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.table-header {
    display: flex;
    padding: 12px 16px;
    background: var(--primary-bg);
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
}

.table-header span, .table-footer span {
    text-align: right;
}

.col-year { flex: 1; text-align: left !important; }
.col-profit { width: 90px; }
.col-factor { width: 80px; }
.col-pv { width: 90px; }

#detail-rows .detail-row {
    display: flex;
    padding: 10px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
}

#detail-rows .detail-row:last-child {
    border-bottom: none;
}

.table-footer {
    display: flex;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-bg);
    border-top: 1.5px solid var(--primary-light);
}

.perpetual-row {
    background: #FFF8E1;
    color: var(--orange);
    border-top: none;
}

/* ==================== 免责声明 ==================== */
.disclaimer-section {
    padding: 16px;
    background: var(--card-bg);
    border-radius: var(--radius);
    margin-bottom: 10px;
    box-shadow: var(--shadow);
}

.disclaimer-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.disclaimer-text {
    font-size: 12px;
    color: var(--text-hint);
    line-height: 1.7;
}

/* ==================== Toast ==================== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 9999;
    max-width: 280px;
    text-align: center;
    line-height: 1.5;
    animation: toastIn 0.25s ease;
}

@keyframes toastIn {
    from { opacity: 0; transform: translate(-50%, -40%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

/* ==================== 响应式 ==================== */
@media (min-width: 481px) {
    body {
        background: #E8EAF0;
    }
}

@media (max-width: 480px) {
    .input-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .input-row-label {
        flex-shrink: 0;
    }
    .slider-group {
        width: 100%;
        gap: 10px;
    }
    .slider {
        flex: 1;
        width: auto;
        min-width: 0;
    }
    .slider-value {
        min-width: 42px;
        font-size: 15px;
    }
}

@media (max-width: 360px) {
    .slider { width: auto; }
    .slider-value { font-size: 14px; min-width: 36px; }
    .number-input { width: 90px; font-size: 16px; }
    .result-value { font-size: 34px; }
}

/* ==================== 导航操作区 ==================== */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-icon {
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}

.nav-icon:hover, .nav-icon:active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.22);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.nav-right:active {
    opacity: 1;
}

/* ==================== AI 分析区块 ==================== */
.section-icon {
    font-size: 18px;
}

.badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.badge-ai {
    background: #E8F0FA;
    color: var(--primary);
}

.ai-card {
    padding: 16px;
}

.ai-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ai-input {
    flex: 1;
    min-width: 0;
}

.btn-ai {
    height: 48px;
    padding: 0 20px;
    background: linear-gradient(135deg, #6C5CE7, #A29BFE);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-ai:active {
    transform: scale(0.97);
    opacity: 0.9;
}

.btn-ai:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* AI 加载动画 */
.ai-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 16px;
    gap: 16px;
}

.ai-loading-dots {
    display: flex;
    gap: 8px;
}

.ai-loading-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-light);
    animation: aiDot 1.4s infinite ease-in-out both;
}

.ai-loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.ai-loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.ai-loading-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes aiDot {
    0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}

.ai-loading-text {
    font-size: 13px;
    color: var(--text-hint);
}

/* AI 结果卡片 */
.ai-result {
    margin-top: 16px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
    animation: fadeIn 0.4s ease;
}

.ai-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.ai-company-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.ai-model-tag {
    font-size: 11px;
    padding: 3px 10px;
    background: linear-gradient(135deg, #6C5CE7, #A29BFE);
    color: #fff;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.ai-result-body {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-main);
    word-break: break-word;
}

/* AI 内容排版 */
.ai-h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin: 20px 0 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-bg);
}

.ai-h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    margin: 16px 0 8px;
}

.ai-p {
    margin-bottom: 8px;
    text-indent: 0;
}

.ai-ul, .ai-ol {
    margin: 8px 0 12px;
    padding-left: 20px;
}

.ai-ul li, .ai-ol li {
    margin-bottom: 6px;
    line-height: 1.7;
}

.ai-code {
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--red);
    font-family: "SF Mono", "Menlo", "Consolas", monospace;
}

.ai-emoji {
    font-size: 16px;
}

.ai-result-footer {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.ai-disclaimer {
    font-size: 12px;
    color: var(--text-hint);
    flex: 1;
    min-width: 0;
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary-light);
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    white-space: nowrap;
}

.btn-text:active {
    opacity: 0.7;
}

/* AI 错误状态 */
.ai-error {
    margin-top: 16px;
    padding: 16px;
    background: #FFF3E0;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

.ai-error-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.ai-error-msg {
    font-size: 13px;
    color: var(--orange);
    line-height: 1.6;
}

/* ==================== 快速查询结果 ==================== */
.search-result {
    margin-top: 12px;
    padding: 12px 16px;
    background: var(--green-light);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--green);
}

.search-result-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: var(--text-main);
}

.search-result-code {
    font-size: 12px;
    color: var(--text-hint);
    padding: 2px 8px;
    background: #fff;
    border-radius: 10px;
}

/* ==================== 生意模式分析卡片 ==================== */
.bm-category-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.bm-badge {
    font-size: 16px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    color: #fff;
    letter-spacing: 1px;
}

.bm-badge.bm-top {
    background: linear-gradient(135deg, #43A047, #66BB6A);
    box-shadow: 0 2px 8px rgba(67, 160, 71, 0.3);
}

.bm-badge.bm-mid {
    background: linear-gradient(135deg, #FB8C00, #FFA726);
    box-shadow: 0 2px 8px rgba(251, 140, 0, 0.3);
}

.bm-badge.bm-hard {
    background: linear-gradient(135deg, #E53935, #EF5350);
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.3);
}

.bm-description {
    font-size: 13px;
    color: var(--text-secondary);
}

.bm-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.bm-metric {
    flex: 1 1 calc(33.333% - 8px);
    min-width: 70px;
    text-align: center;
    padding: 10px 6px;
    border-radius: var(--radius-sm);
    background: var(--bg);
}

.bm-metric-label {
    font-size: 11px;
    color: var(--text-hint);
    margin-bottom: 4px;
}

.bm-metric-value {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
}

.bm-metric-value.good { color: var(--green); }
.bm-metric-value.mid { color: var(--orange); }
.bm-metric-value.bad { color: var(--red); }

.bm-reasons {
    padding-top: 4px;
}

.bm-reason {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 6px;
}

.bm-reason-icon {
    flex-shrink: 0;
    margin-top: 1px;
}

.bm-reason-icon.good { color: var(--green); }
.bm-reason-icon.bad { color: var(--red); }
.bm-reason-icon.negative { color: var(--red); }
.bm-reason-icon.warning { color: var(--orange); }
.bm-reason-icon.info { color: var(--text-hint); }

/* ==================== 设置弹窗 ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal-card {
    background: #fff;
    border-radius: var(--radius);
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 0;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

.modal-close {
    font-size: 24px;
    color: var(--text-hint);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-close:hover {
    background: var(--bg);
}

.modal-body {
    padding: 20px;
}

.select-input {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%239CA3AF'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.modal-status {
    margin-top: 12px;
    text-align: center;
    font-size: 13px;
    padding: 8px;
    border-radius: 6px;
}

.modal-status-success {
    background: var(--green-light);
    color: var(--green);
}

.modal-status-error {
    background: var(--red-light);
    color: var(--red);
}

/* 云端模式提示 */
.ai-mode-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #E8F0FA, #F0F4FF);
    border-radius: var(--radius-sm);
    border: 1px solid #D0DFF0;
    margin-bottom: 4px;
}

.ai-mode-icon {
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.ai-mode-text strong {
    font-size: 14px;
    color: var(--primary);
    display: block;
    margin-bottom: 4px;
}

.ai-mode-text p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.modal-divider {
    text-align: center;
    margin: 20px 0 14px;
    position: relative;
}

.modal-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.modal-divider span {
    position: relative;
    background: #fff;
    padding: 0 12px;
    font-size: 12px;
    color: var(--text-hint);
}

/* ==================== 覆盖原 nav-right 样式 ==================== */
.nav-bar .nav-right {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.nav-bar .nav-right:active {
    opacity: 1;
}

/* ==================== 会员分级（Pro / Pro Max） ==================== */
.tier-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    vertical-align: middle;
    line-height: 16px;
}
.tier-badge-pro {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.45);
}
.tier-badge-max {
    background: linear-gradient(135deg, #F5B301, #E88A00);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 1px 4px rgba(232, 138, 0, 0.4);
}

.tier-auto-hint {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, #FFF8E1, #FFECB3);
    border: 1px solid #F5C64D;
    color: #7A5A00;
    font-size: 13px;
    line-height: 1.5;
}

.tier-pro-hint {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #F5F5F5;
    border: 1px solid #E0E0E0;
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

.tier-promax-hint {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, #FFF8E1, #FFECB3);
    border: 1px solid #F5C64D;
    color: #7A5A00;
    font-size: 13px;
    line-height: 1.5;
}
