/* CSS变量定义 - 支持明暗主题 */
:root {
    /* 明亮主题颜色 */
    --bg-gradient-start: #667eea;
    --bg-gradient-end: #764ba2;
    --card-bg: #ffffff;
    --card-shadow: rgba(0, 0, 0, 0.1);
    --text-primary: #000000;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    --border-color: #e9ecef;
    --input-bg: #ffffff;
    --input-border: #ced4da;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    
    /* 导航栏 */
    --navbar-bg: var(--primary-color);
    --navbar-text: #ffffff;
    
    /* 按钮 */
    --btn-primary-bg: var(--primary-color);
    --btn-primary-color: #ffffff;
    --btn-secondary-bg: var(--secondary-color);
    --btn-secondary-color: #ffffff;
    
    /* 进度条 */
    --progress-bg: #f8f9fa;
    --progress-bar-bg: var(--primary-color);
    
    /* 选项卡片 */
    --option-bg: #ffffff;
    --option-border: #e9ecef;
    --option-hover-bg: #f8f9fa;
    --option-selected-bg: #e3f2fd;
    --option-selected-border: var(--primary-color);
    --option-selected-text: #000000;
    
    /* 推荐卡片背景 */
    --recommendation-bg: #f8f9fa;
    --recommendation-border: #667eea;
    
    /* 分配条背景 */
    --allocation-bar-bg: #e9ecef;
}

/* 暗色主题 */
[data-theme="dark"] {
    --bg-gradient-start: #1a1a2e;
    --bg-gradient-end: #16213e;
    --card-bg: #2d3748;
    --card-shadow: rgba(0, 0, 0, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    --text-muted: #a0aec0;
    --border-color: #4a5568;
    --input-bg: #2d3748;
    --input-border: #4a5568;
    --success-color: #38a169;
    --warning-color: #d69e2e;
    --danger-color: #e53e3e;
    --info-color: #3182ce;
    --primary-color: #4299e1;
    --secondary-color: #718096;
    
    /* 导航栏 */
    --navbar-bg: #1a202c;
    --navbar-text: #ffffff;
    
    /* 按钮 */
    --btn-primary-bg: var(--primary-color);
    --btn-primary-color: #ffffff;
    --btn-secondary-bg: var(--secondary-color);
    --btn-secondary-color: #ffffff;
    
    /* 进度条 */
    --progress-bg: #4a5568;
    --progress-bar-bg: var(--primary-color);
    
    /* 选项卡片 */
    --option-bg: #2d3748;
    --option-border: #4a5568;
    --option-hover-bg: #4a5568;
    --option-selected-bg: #2b6cb0;
    --option-selected-border: var(--primary-color);
    --option-selected-text: #ffffff;
    
    /* 推荐卡片背景 */
    --recommendation-bg: #4a5568;
    --recommendation-border: #4299e1;
    
    /* 分配条背景 */
    --allocation-bar-bg: #4a5568;
}

/* 平滑的主题过渡 */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    height: 100vh;
    overflow: hidden; /* 防止页面滚动 */
    padding-top: 60px; /* 为固定头部预留空间 */
    padding-bottom: 90px; /* 为固定底部导航预留空间 */
    position: relative;
}

/* 全局文本颜色覆盖 */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
}

p {
    color: var(--text-primary);
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

/* Bootstrap文本类覆盖 */
.text-dark {
    color: var(--text-primary) !important;
}

.text-black {
    color: var(--text-primary) !important;
}

.text-body {
    color: var(--text-primary) !important;
}

/* 列表和链接颜色 */
li {
    color: var(--text-primary) !important;
}

a {
    color: var(--primary-color) !important;
}

/* 小号文本 */
small {
    color: var(--text-muted) !important;
}

/* 确保所有弹窗内容使用正确的颜色 */
.swal2-popup {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
}

.swal2-title {
    color: var(--text-primary) !important;
}

.swal2-content {
    color: var(--text-secondary) !important;
}

/* 导航栏 */
.navbar {
    background: var(--navbar-bg) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    z-index: 1040; /* 确保在所有内容之上 */
    height: 60px;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.navbar-header {
    flex: 1;
    min-width: 0; /* 允许收缩 */
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.3rem;
    color: var(--navbar-text) !important;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-decoration: none;
}

.navbar-brand:hover {
    color: var(--navbar-text) !important;
    text-decoration: none;
}

.brand-text {
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.navbar-actions {
    width: auto;
    min-width: 120px; /* 为按钮预留最小宽度 */
    justify-content: flex-end;
}

.navbar.fixed-top {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040; /* 确保在导航按钮之上 */
}

/* 主要内容区域 */
.container-fluid {
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 120px; /* 增加底部预留空间，确保所有内容都不被遮挡 */
}

.container {
    height: 100%;
    max-width: 100%;
    width: 100%; /* 确保默认充满宽度 */
    padding: 0 1rem; /* 添加默认内边距 */
}

/* 主题切换按钮样式 */
.theme-controls {
    flex-shrink: 0;
}

#theme-toggle {
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: var(--navbar-text);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
    color: var(--navbar-text);
}

#theme-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.25);
}

/* 主题模式指示器 */
#theme-mode-indicator {
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
    color: var(--navbar-text);
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

#theme-mode-indicator:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.4);
    opacity: 1 !important;
}

#theme-mode-indicator:focus {
    box-shadow: 0 0 0 0.1rem rgba(255,255,255,0.2);
}

/* 主题状态提示 */
.theme-status-tooltip {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px var(--card-shadow);
    border: 1px solid var(--border-color);
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1050;
    margin-top: 0.25rem;
}

.theme-status-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 10px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--border-color);
}

.theme-status-tooltip::after {
    content: '';
    position: absolute;
    top: -5px;
    right: 10px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--card-bg);
}

/* 语言选择器样式 */
.language-selector {
    flex-shrink: 0;
    margin-left: 5px; /* 确保与主题按钮有3px间距 */
}

.language-selector .dropdown-toggle {
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: var(--navbar-text);
    font-size: 1rem;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    min-width: auto;
    width: auto;
}

.language-selector .dropdown-toggle::after {
    margin-left: 0.3rem;
}

.language-selector .dropdown-toggle:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
}

.language-selector .dropdown-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba(255,255,255,0.25);
}

.language-selector .dropdown-menu {
    min-width: 160px;
    border: none;
    box-shadow: 0 4px 15px var(--card-shadow);
    border-radius: 8px;
    overflow: hidden;
    background: var(--card-bg);
}

.language-selector .dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: none;
    background: none;
    color: var(--text-primary);
}

.language-selector .dropdown-item:hover {
    background: var(--option-hover-bg);
    color: var(--text-primary);
}

.language-selector .dropdown-item.active {
    background: linear-gradient(45deg, var(--bg-gradient-start), var(--bg-gradient-end));
    color: var(--navbar-text);
}

.language-selector .dropdown-item.active:hover {
    background: linear-gradient(45deg, var(--bg-gradient-start), var(--bg-gradient-end));
    opacity: 0.9;
}

/* 欢迎页面样式 */
.welcome-card {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 20px 40px var(--card-shadow);
    margin-top: 1rem;
    margin-bottom: 2rem; /* 增加底部边距保持一致 */
    color: var(--text-primary);
}

.welcome-icon i {
    font-size: 4rem;
    color: var(--primary-color);
    background: linear-gradient(45deg, var(--bg-gradient-start), var(--bg-gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.info-item i {
    font-size: 2rem;
}

.info-item h5 {
    margin-top: 1rem;
    font-weight: 600;
}

/* 问卷样式 */
.questionnaire-card {
    background: var(--card-bg);
    border-radius: 15px; /* 使用更适合长方形的圆角 */
    padding: 2rem; /* 增加内边距让卡片更大 */
    box-shadow: 0 20px 40px var(--card-shadow);
    margin-top: 0.5rem; /* 减少顶部边距 */
    margin-bottom: 5.5rem; /* PC端增加底部边距，确保不被底部菜单遮挡 */
    color: var(--text-primary);
}

.progress-container {
    background: var(--progress-bg);
    padding: 1rem; /* 增加进度条的内边距 */
    border-radius: 10px;
    flex-shrink: 0;
}

.question-card {
    min-height: auto;
    padding: 1.5rem; /* 增加内边距让问题区域更大 */
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.question-card h4 {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
    overflow-y: auto;
    max-height: calc(100vh - 165px); /* 再缩小15px预留空间 */
    padding-right: 5px;

}

.option-item {
    background: var(--option-bg);
    border: 2px solid var(--option-border);
    border-radius: 10px; /* 减小圆角，更适合紧凑布局 */
    padding: 1.25rem 1.5rem; /* 增加选项的内边距 */
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    color: var(--text-primary);
}

.option-item:hover {
    background: var(--option-hover-bg);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px var(--card-shadow);
    border-color: var(--primary-color);
}

.option-item.selected {
    background: var(--option-selected-bg);
    color: var(--option-selected-text);
    border-color: var(--option-selected-border);
    box-shadow: 0 3px 15px rgba(102, 126, 234, 0.3);
}

.option-item .option-text {
    font-weight: 500;
    margin-bottom: 0.5rem; /* 增加选项标题和描述之间的间距 */
    font-size: 0.95rem;
    line-height: 1.3; /* 改善行高 */
}

.option-item .option-description {
    font-size: 0.8rem;
    opacity: 0.8;
    line-height: 1.4; /* 改善描述文字的行高 */
    margin-bottom: 0; /* 确保底部没有多余间距 */
}

.navigation-buttons {
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px var(--card-shadow);
    padding: 1rem;
    z-index: 1030; /* 确保在内容之上，但低于导航栏 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    height: 80px; /* 固定高度 */
}

.navigation-buttons button {
    flex-shrink: 0;
}

/* 当只有一个按钮时，让它靠右显示 */
.navigation-buttons button:only-child {
    margin-left: auto;
}

/* 导航按钮隐藏状态 */
.navigation-buttons.hidden {
    display: none;
}

/* 结果页面特殊处理 - 确保内容不被底部菜单遮挡 */
#result-section {
    padding-bottom: 110px; /* 为底部菜单预留足够空间，增加10px */
}

#result-section .result-card {
    margin-bottom: 0; /* 重置结果卡片的底部边距，交给section处理 */
}

/* 结果页面底部操作按钮样式 */
#result-action-buttons {
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px var(--card-shadow);
    padding: 1rem;
    z-index: 1030; /* 确保在内容之上，但低于导航栏 */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    height: 80px; /* 固定高度 */
    flex-wrap: wrap;
}

#result-action-buttons button {
    flex: 0 1 auto;
    min-width: 100px;
    max-width: 200px;
    white-space: nowrap;
}

/* 当只有两个按钮时的布局调整 */
#result-action-buttons button:nth-child(2):last-child {
    margin-left: 0;
}

/* 当有三个按钮时，在小屏幕上调整布局 */
@media (max-width: 576px) {
    #result-action-buttons {
        flex-direction: row;
        justify-content: space-around;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }
    
    #result-action-buttons button {
        flex: 1;
        min-width: auto;
        max-width: none;
        font-size: 0.85rem;
        padding: 0.6rem 0.5rem;
    }
    
    /* 当创建投资账户按钮隐藏时，调整布局为两个按钮 */
    #result-action-buttons button:nth-child(1)[style*="display: none"] ~ button {
        flex: 1;
        max-width: 45%;
    }
}

/* 超小屏幕优化 */
@media (max-width: 380px) {
    #result-action-buttons {
        gap: 0.25rem;
        padding: 0.5rem;
    }
    
    #result-action-buttons button {
        font-size: 0.75rem;
        padding: 0.5rem 0.25rem;
    }
    
    /* 进一步缩小按钮文字，只显示图标和简化文字 */
    #result-action-buttons .d-none.d-sm-inline {
        display: none !important;
    }
    
    #result-action-buttons .d-inline.d-sm-none {
        display: inline !important;
    }
}

/* 结果页面样式 */
.result-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 3rem 2rem;
    box-shadow: 0 20px 40px var(--card-shadow);
    margin-top: 1rem;
    margin-bottom: 0; /* 移除底部边距，由section padding处理 */
    margin-left: auto; /* 基础居中支持 */
    margin-right: auto; /* 基础居中支持 */
    color: var(--text-primary);
    display: block; /* 确保块级元素 */
}

.result-icon i {
    font-size: 4rem;
    color: var(--success-color);
    background: linear-gradient(45deg, var(--success-color), #20c997);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-card {
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: var(--navbar-text);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.score-circle {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem auto;
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255,255,255,0.3);
}

.score-number {
    font-size: 3rem;
    font-weight: bold;
}

.score-total {
    font-size: 1.4rem;
    opacity: 0.8;
}

.chart-container {
    height: 300px;
    width: 300px;
    max-width: 100%;
    max-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.chart-container canvas {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
}

/* 投资建议样式 */
.recommendation-item {
    background: var(--recommendation-bg);
    border-left: 4px solid var(--recommendation-border);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    color: var(--text-primary);
}

.recommendation-item h5 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.recommendation-item p {
    margin-bottom: 0;
    color: var(--text-secondary);
}

/* 产品推荐样式 */
.product-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    color: var(--text-primary);
}

.product-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--card-shadow);
}

.product-card.recommended {
    border-color: var(--success-color);
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(32, 201, 151, 0.1) 100%);
}

.product-card .product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: white;
}

.product-icon.stocks {
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.product-icon.bonds {
    background: linear-gradient(45deg, #f093fb, #f5576c);
}

.product-icon.funds {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
}

.product-icon.cash {
    background: linear-gradient(45deg, #43e97b, #38f9d7);
}

.allocation-bar {
    height: 8px;
    background: var(--allocation-bar-bg);
    border-radius: 4px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.allocation-fill {
    height: 100%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.8s ease;
}

/* 操作按钮样式 */
.action-buttons {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.action-buttons .btn {
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.action-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--card-shadow);
}

/* 风险等级颜色 */
.risk-conservative .result-icon i {
    background: linear-gradient(45deg, #28a745, #20c997);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.risk-moderate .result-icon i {
    background: linear-gradient(45deg, #ffc107, #fd7e14);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.risk-aggressive .result-icon i {
    background: linear-gradient(45deg, #dc3545, #e83e8c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 响应式设计 */

/* PC端专用优化 - 宽的居中卡片和两列选项布局 */
@media (min-width: 992px) {
    .container {
        max-width: none !important; /* 强制移除最大宽度限制 */
        width: 98% !important; /* 使用98%宽度，几乎占满整个屏幕 */
        margin: 0 auto !important; /* 居中对齐 */
        padding: 0 1rem !important; /* 保持边距 */
    }
    
    .questionnaire-card {
        margin-bottom: 1.5rem; /* 减少底部边距 */
        padding: 2rem 3rem; /* 调整内边距比例 */
        max-width: none; /* 移除最大宽度限制 */
        width: 100%; /* 充满容器宽度 */
        margin-left: auto;
        margin-right: auto;
        border-radius: 15px; /* 使用更适合长方形的圆角 */
        min-height: auto; /* 允许高度自适应 */
    }
    
    .result-card {
        margin-bottom: 1.5rem; /* PC端结果卡片底部边距 */
        max-width: none; /* 移除最大宽度限制 */
        width: 100%; /* 充满容器宽度 */
        margin-left: auto !important;
        margin-right: auto !important;
        border-radius: 15px; /* 统一圆角 */
        display: block; /* 确保块级元素 */
    }
    
    .question-card {
        padding: 1.5rem 2rem; /* 减少垂直内边距 */
        min-height: auto; /* 移除最小高度限制 */
    }
    
    .question-card h4 {
        font-size: 1.2rem;
        margin-bottom: 1.5rem; /* 减少问题标题下方间距 */
        line-height: 1.3; /* 紧凑的行高 */
    }
    
    .options-container {
        padding-bottom: 20px; /* 减少底部预留空间 */
        max-height: calc(100vh - 180px); /* 调整最大高度 */
        display: grid; /* 使用CSS Grid布局 */
        grid-template-columns: 1fr 1fr; /* 两列等宽布局 */
        grid-gap: 0.8rem; /* 减少选项间距 */
        overflow-y: auto;
    }
    
    .option-item {
        margin-bottom: 0; /* 移除底部边距，由grid-gap处理 */
        padding: 1rem 1.5rem; /* 减少内边距，降低高度 */
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 80px; /* 大幅降低最小高度 */
        max-height: 100px; /* 限制最大高度 */
        text-align: left; /* 确保文字左对齐 */
        border-radius: 10px; /* 更小的圆角 */
    }
    
    .option-item .option-text {
        font-size: 0.95rem; /* 稍微减小字体 */
        font-weight: 600;
        margin-bottom: 0.4rem; /* 减少间距 */
        line-height: 1.2; /* 紧凑行高 */
    }
    
    .option-item .option-description {
        font-size: 0.8rem;
        line-height: 1.3;
        flex-grow: 1; /* 让描述文字填充剩余空间 */
        margin-bottom: 0;
    }
    
    #result-section {
        padding-bottom: 120px; /* PC端结果页面底部预留空间 */
    }
    
    /* 强制PC端结果页面卡片水平居中 */
    #result-section {
        display: flex;
        justify-content: center;
    }
    #result-section .result-card {
        max-width: 1200px !important; /* 限制最大宽度并居中 */
        width: 100%;
        margin: 0 auto !important;
    }
}

/* 超大屏幕优化 (1400px+) */
@media (min-width: 1400px) {
    .container {
        max-width: none !important; /* 强制移除最大宽度限制 */
        width: 98% !important; /* 使用98%宽度 */
        padding: 0 1rem !important; /* 保持边距 */
    }
    
    .welcome-card {
        padding: 4rem 3rem;
        max-width: none; /* 移除宽度限制 */
        width: 100%; /* 充满容器宽度 */
        margin-left: auto;
        margin-right: auto;
    }
    
    .welcome-icon i {
        font-size: 5rem;
    }
    
    .questionnaire-card {
        padding: 2.5rem 4rem; /* 调整内边距比例，减少垂直内边距 */
        margin-bottom: 2rem; /* 减少底部边距 */
        max-width: none; /* 移除宽度限制 */
        width: 100%; /* 充满容器宽度 */
        margin-left: auto;
        margin-right: auto;
        border-radius: 15px; /* 统一圆角 */
    }
    
    .result-card {
        padding: 4rem 3rem;
        margin-bottom: 2rem; /* 超大屏幕结果卡片底部边距 */
        max-width: none; /* 移除宽度限制 */
        width: 100%; /* 充满容器宽度 */
        margin-left: auto !important;
        margin-right: auto !important;
        border-radius: 15px;
        display: block; /* 确保块级元素 */
    }
    
    .question-card {
        padding: 1.5rem 2.5rem; /* 减少垂直内边距 */
    }
    
    .question-card h4 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem; /* 减少问题标题下方间距 */
        line-height: 1.3;
    }
    
    .option-item {
        padding: 1.2rem 2rem; /* 减少垂直内边距 */
        font-size: 1rem;
        min-height: 85px; /* 降低最小高度 */
        max-height: 110px; /* 限制最大高度 */
        border-radius: 10px;
    }
    
    .option-item .option-text {
        font-size: 1rem;
        margin-bottom: 0.5rem; /* 减少间距 */
        line-height: 1.2;
    }
    
    .option-item .option-description {
        font-size: 0.85rem;
        line-height: 1.3;
    }
    
    .options-container {
        padding-bottom: 25px; /* 减少底部预留空间 */
        max-height: calc(100vh - 200px); /* 调整最大高度 */
        grid-gap: 1rem; /* 调整选项间距 */
        display: grid;
        grid-template-columns: 1fr 1fr; /* 两列网格布局 */
        overflow-y: auto;
    }
    
    #result-section {
        padding-bottom: 140px; /* 超大屏幕结果页面底部预留更多空间 */
    }
}

/* 大屏幕优化 (1200px - 1400px) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .container {
        max-width: none !important; /* 强制移除最大宽度限制 */
        width: 98% !important; /* 使用98%宽度 */
        margin: 0 auto;
        padding: 0 1rem !important; /* 保持边距 */
    }
    
    .welcome-card {
        padding: 3rem 2.5rem;
        max-width: none; /* 移除宽度限制 */
        width: 100%; /* 充满容器宽度 */
        margin-left: auto;
        margin-right: auto;
    }
    
    .questionnaire-card {
        padding: 2rem 3rem; /* 调整内边距比例 */
        margin-bottom: 1.5rem; /* 减少底部边距 */
        max-width: none; /* 移除宽度限制 */
        width: 100%; /* 充满容器宽度 */
        margin-left: auto;
        margin-right: auto;
        border-radius: 15px;
    }
    
    .result-card {
        padding: 3rem 2.5rem;
        margin-bottom: 1.75rem; /* 大屏幕结果卡片底部边距 */
        max-width: none; /* 移除宽度限制 */
        width: 100%; /* 充满容器宽度 */
        margin-left: auto !important;
        margin-right: auto !important;
        border-radius: 15px;
        display: block; /* 确保块级元素 */
    }
    
    .question-card {
        padding: 1.5rem 2rem; /* 减少垂直内边距 */
    }
    
    .question-card h4 {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
        line-height: 1.3;
    }
    
    .options-container {
        padding-bottom: 25px; /* 减少底部预留空间 */
        max-height: calc(100vh - 190px); /* 调整最大高度 */
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-gap: 0.9rem; /* 调整间距 */
        overflow-y: auto;
    }
    
    .option-item {
        padding: 1.1rem 1.75rem; /* 减少内边距 */
        min-height: 82px; /* 降低最小高度 */
        max-height: 105px; /* 限制最大高度 */
        margin-bottom: 0;
        border-radius: 10px;
    }
    
    .option-item .option-text {
        font-size: 0.95rem;
        margin-bottom: 0.4rem;
        line-height: 1.2;
    }
    
    .option-item .option-description {
        font-size: 0.8rem;
        line-height: 1.3;
    }
    
    .options-container {
        padding-bottom: 25px; /* 减少底部预留空间 */
        max-height: calc(100vh - 190px); /* 调整最大高度 */
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-gap: 0.9rem; /* 调整间距 */
        overflow-y: auto;
    }
    
    #result-section {
        padding-bottom: 130px; /* 大屏幕结果页面底部预留空间 */
    }
}

/* 中大屏幕 (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        max-width: none !important; /* 强制移除最大宽度限制 */
        width: 98% !important; /* 使用98%宽度 */
        margin: 0 auto;
        padding: 0 1rem !important; /* 保持边距 */
    }
    
    .welcome-card {
        padding: 2.5rem 2rem;
        max-width: 1000px; /* 增加宽度 */
        margin-left: auto;
        margin-right: auto;
    }
    
    .questionnaire-card {
        padding: 2rem 2.5rem; /* 调整内边距比例 */
        margin-bottom: 1.5rem; /* 减少底部边距 */
        max-width: 1000px; /* 增加宽度 */
        margin-left: auto;
        margin-right: auto;
        border-radius: 15px;
    }
    
    .result-card {
        padding: 2.5rem 2rem;
        margin-bottom: 1.5rem; /* 中大屏幕结果卡片底部边距 */
        max-width: none; /* 移除宽度限制 */
        width: 100%; /* 充满容器宽度 */
        margin-left: auto !important;
        margin-right: auto !important;
        border-radius: 15px;
        display: block; /* 确保块级元素 */
    }
    
    .score-circle {
        width: 160px;
        height: 160px;
    }
    
    .chart-container {
        height: 280px;
    }
    
    .question-card {
        padding: 1.25rem 1.75rem; /* 减少垂直内边距 */
    }
    
    .question-card h4 {
        font-size: 1.1rem;
        margin-bottom: 1.25rem;
        line-height: 1.3;
    }
    
    .options-container {
        padding-bottom: 20px; /* 减少底部预留空间 */
        max-height: calc(100vh - 185px); /* 调整最大高度 */
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-gap: 0.8rem;
        overflow-y: auto;
    }
    
    .option-item {
        padding: 1rem 1.5rem; /* 减少内边距 */
        min-height: 78px; /* 降低最小高度 */
        max-height: 100px; /* 限制最大高度 */
        margin-bottom: 0;
        border-radius: 10px;
    }
    
    .option-item .option-text {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
        line-height: 1.2;
    }
    
    .option-item .option-description {
        font-size: 0.75rem;
        line-height: 1.3;
    }
    
    #result-section {
        padding-bottom: 125px; /* 中大屏幕结果页面底部预留空间 */
    }
}

/* 平板端优化 (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .container {
        padding: 0 1rem;
    }
    
    .welcome-card {
        margin: 1.5rem 0;
        padding: 2.5rem 1.5rem;
    }
    
    .welcome-icon i {
        font-size: 3.5rem;
    }
    
    .questionnaire-card {
        margin: 1.5rem 0;
        padding: 1.5rem;
    }
    
    .result-card {
        margin: 1.5rem 0 0 0; /* 移除底部边距，由section padding处理 */
        padding: 2.5rem 1.5rem;
    }
    
    /* 平板端结果页面底部预留空间 */
    #result-section {
        padding-bottom: 120px; /* 增加10px预留空间 */
    }
    
    .question-card {
        min-height: 280px;
        padding: 1.5rem;
    }
    
    .option-item {
        padding: 1.2rem 1.5rem;
        font-size: 0.95rem;
        min-height: auto; /* 平板端重置最小高度 */
    }
    
    .options-container {
        display: flex; /* 平板端重置为flex布局 */
        flex-direction: column;
        gap: 0.75rem;
        grid-template-columns: none; /* 重置grid列 */
        grid-gap: 0; /* 重置grid间距 */
    }
    
    .score-circle {
        width: 150px;
        height: 150px;
    }
    
    .score-number {
        font-size: 2.6rem;
    }
    
    .chart-container {
        height: 260px;
        margin-top: 2rem;
    }
    
    .info-item {
        margin-bottom: 1.5rem;
    }
    
    .info-item i {
        font-size: 1.8rem;
    }
    
    .product-card {
        margin-bottom: 1rem;
    }
    
    .action-buttons .btn {
        margin: 0.25rem;
        padding: 0.6rem 1.5rem;
    }
}

/* 手机端优化 (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    body {
        padding-top: 70px; /* 导航栏高度 + 间距 */
        padding-bottom: 90px; /* 底部按钮高度 + 间距 */
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .navbar {
        height: 60px;
        padding: 0.5rem 0;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar-actions {
        min-width: 100px;
    }
    
    .language-selector .dropdown-toggle {
        padding: 0.35rem 0.55rem;
        font-size: 0.9rem;
    }
    
    .welcome-card {
        margin: 0.75rem 0;
        padding: 1.5rem 1rem;
    }
    
    .welcome-icon i {
        font-size: 2.5rem;
    }
    
    .display-4 {
        font-size: 1.8rem;
    }
    
    .lead {
        font-size: 0.95rem;
    }
    
    .questionnaire-card {
        margin: 0.5rem 0;
        padding: 1rem;
        max-height: calc(100vh - 70px);
    }
    
    .options-container {
        max-height: calc(100vh - 265px); /* 再缩小15px预留空间 */
    }
    
    .result-card {
        margin: 0.5rem 0 0 0; /* 移除底部边距，由section padding处理 */
        padding: 1.5rem 1rem;
    }
    
    /* 手机端结果页面底部预留空间 */
    #result-section {
        padding-bottom: 130px; /* 手机端需要更多空间，增加10px */
    }
    
    .progress-container {
        padding: 0.6rem;
        margin-bottom: 0.75rem;
    }
    
    .question-card {
        padding: 0.5rem;
    }
    
    .question-card h4 {
        font-size: 1rem;
        line-height: 1.4;
        margin-bottom: 0.75rem;
    }
    
    .options-container {
        gap: 0.6rem;
    }
    
    .option-item {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
    .option-text {
        font-size: 0.9rem;
        font-weight: 600;
        margin-bottom: 0.2rem;
    }
    
    .option-description {
        font-size: 0.75rem;
    }
    
    .score-circle {
        width: 120px;
        height: 120px;
    }
    
    .score-number {
        font-size: 2rem;
    }
    
    .chart-container {
        height: 220px;
        width: 220px;
        margin: 0 auto;
    }
    
    .chart-container canvas {
        width: 200px !important;
        height: 200px !important;
    }
    
    .info-item {
        margin-bottom: 1rem;
    }
    
    .info-item i {
        font-size: 1.4rem;
    }
    
    .info-item h5 {
        font-size: 0.95rem;
    }
    
    .navigation-buttons {
        flex-direction: column;
        gap: 0.5rem;
        padding-top: 0.6rem;
    }
    
    .navigation-buttons button {
        flex: 1;
        max-width: 47%;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .product-card {
        margin-bottom: 0.75rem;
        padding: 1rem;
    }
    
    .product-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .recommendation-item {
        padding: 1rem;
        margin-bottom: 0.6rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.4rem;
    }
    
    .action-buttons .btn {
        width: 100%;
        margin: 0;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* 小屏手机端优化 (最大 575px) */
@media (max-width: 575px) {
    body {
        font-size: 14px;
        padding-top: 70px; /* 导航栏高度 + 间距 */
        padding-bottom: 90px; /* 底部按钮高度 + 间距 */
    }
    
    .container-fluid {
        padding: 0;
    }
    
    .container {
        padding: 0 0.5rem;
    }
    
    .navbar {
        padding: 0.4rem 0.75rem;
        height: auto; /* 允许高度自适应 */
        min-height: 60px;
    }
    
    .navbar .container {
        flex-wrap: wrap;
    }
    
    .navbar-header {
        flex: 1;
        min-width: 0;
    }
    
    .navbar-brand {
        font-size: 0.95rem;
        white-space: normal; /* 允许换行 */
        line-height: 1.2;
        max-width: calc(100vw - 140px); /* 为按钮预留空间 */
    }
    
    .brand-text {
        word-break: keep-all;
        overflow-wrap: break-word;
    }
    
    .navbar-actions {
        min-width: 80px;
        flex-shrink: 0;
    }
    
    #theme-toggle {
        padding: 0.3rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .language-selector .dropdown-toggle {
        padding: 0.3rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .welcome-card {
        margin: 0.25rem;
        padding: 1.25rem 0.75rem;
        border-radius: 15px;
    }
    
    .welcome-icon i {
        font-size: 2rem;
    }
    
    .display-4 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .lead {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .questionnaire-card {
        margin: 0.25rem;
        padding: 0.75rem;
        border-radius: 15px;
        max-height: calc(100vh - 70px);
    }
    
    .options-container {
        max-height: calc(100vh - 365px); /* 再缩小15px预留空间 */
    }
    
    .result-card {
        margin: 0.25rem 0.25rem 0 0.25rem; /* 移除底部边距，由section padding处理 */
        padding: 1rem 0.75rem;
        border-radius: 15px;
    }
    
    /* 小屏手机端结果页面底部预留空间 */
    #result-section {
        padding-bottom: 140px; /* 小屏需要更多空间，增加10px */
    }
    
    .progress-container {
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .question-card {
        padding: 0.25rem;
    }
    
    .question-card h4 {
        font-size: 0.95rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
    }
    
    .options-container {
        gap: 0.4rem;
    }
    
    .option-item {
        padding: 0.6rem 0.75rem;
        margin-bottom: 0;
        border-radius: 8px;
        font-size: 0.8rem;
    }
    
    .option-text {
        font-size: 0.85rem;
        font-weight: 600;
        margin-bottom: 0.15rem;
    }
    
    .option-description {
        font-size: 0.7rem;
        line-height: 1.2;
    }
    
    .score-circle {
        width: 100px;
        height: 100px;
    }
    
    .score-number {
        font-size: 1.6rem;
    }
    
    .score-total {
        font-size: 0.85rem;
    }
    
    .chart-container {
        height: 180px;
        width: 180px;
        margin: 0 auto;
    }
    
    .chart-container canvas {
        width: 160px !important;
        height: 160px !important;
    }
    
    .info-item {
        margin-bottom: 0.75rem;
    }
    
    .info-item i {
        font-size: 1.2rem;
    }
    
    .info-item h5 {
        font-size: 0.85rem;
        margin-top: 0.5rem;
    }
    
    .info-item p {
        font-size: 0.75rem;
    }
    
    .navigation-buttons {
        flex-direction: row;
        gap: 0.5rem;
        margin-top: 0.5rem;
        padding: 0.75rem 1rem;
    }
    
    .navigation-buttons button {
        flex: 1;
        max-width: 47%;
        padding: 0.6rem;
        font-size: 0.85rem;
    }
    
    .product-card {
        margin-bottom: 0.5rem;
        padding: 0.75rem;
        border-radius: 8px;
    }
    
    .product-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .recommendation-item {
        padding: 0.75rem;
        margin-bottom: 0.4rem;
        border-radius: 6px;
    }
    
    .recommendation-item h5 {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    
    .recommendation-item p {
        font-size: 0.8rem;
        line-height: 1.3;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.3rem;
        padding-top: 1rem;
    }
    
    .action-buttons .btn {
        width: 100%;
        margin: 0;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        border-radius: 15px;
    }
}

/* 小屏手机端优化 (最大 380px) */
@media (max-width: 380px) {
    body {
        padding-top: 75px; /* 为可能的多行标题预留更多空间 */
    }
    
    .navbar {
        padding: 0.3rem 0.5rem;
        min-height: 65px; /* 允许稍微增高 */
    }
    
    .navbar-brand {
        font-size: 0.8rem;
        max-width: calc(100vw - 90px); /* 进一步缩小以适应极小屏幕 */
        white-space: normal;
        line-height: 1.1;
        display: flex;
        align-items: flex-start;
        flex-wrap: wrap;
    }
    
    .brand-text {
        display: inline-block;
        line-height: 1.1;
        word-break: keep-all;
        overflow-wrap: break-word;
        max-width: 100%;
    }
    
    .navbar-brand .fas.fa-chart-line {
        font-size: 0.8rem;
        margin-right: 0.2rem !important;
        margin-top: 0.05rem;
        flex-shrink: 0;
    }
    
    .navbar-actions {
        min-width: 65px;
        flex-shrink: 0;
    }
    
    #theme-toggle {
        padding: 0.2rem 0.35rem;
        font-size: 0.7rem;
    }
    
    .language-selector .dropdown-toggle {
        padding: 0.2rem 0.35rem;
        font-size: 0.7rem;
        min-width: auto;
    }
    
    .language-selector .dropdown-toggle .d-none {
        display: none !important;
    }
    
    .container {
        padding: 0 0.25rem;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .option-item {
        padding: 1.2rem 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .option-item:hover {
        transform: none;
        box-shadow: none;
    }
    
    .option-item:active {
        transform: scale(0.98);
        background: #e9ecef;
    }
    
    .option-item.selected:active {
        background: linear-gradient(45deg, #5a67d8, #6b46a3);
    }
    
    .btn:hover {
        transform: none;
        box-shadow: none;
    }
    
    .btn:active {
        transform: scale(0.98);
    }
    
    .product-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    .product-card:active {
        transform: scale(0.98);
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #5a67d8, #6b46a3);
}

/* 选项容器滚动条 */
.options-container::-webkit-scrollbar {
    width: 4px;
}

.options-container::-webkit-scrollbar-track {
    background: transparent;
}

.options-container::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 10px;
}

.options-container::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

/* 移动端滚动条隐藏 */
@media (max-width: 767px) {
    ::-webkit-scrollbar {
        width: 0px;
        background: transparent;
    }
    
    .options-container::-webkit-scrollbar {
        width: 2px;
    }
}

/* 提升触摸体验 */
.btn, .option-item, .product-card {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* 安全区域适配 (iPhone X等) */
/* 安全区域支持 */
@supports (padding: max(0px)) {
    body {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    .navbar {
        padding-left: calc(1rem + env(safe-area-inset-left));
        padding-right: calc(1rem + env(safe-area-inset-right));
    }
}

/* 打印样式 */
@media print {
    body {
        background: white !important;
    }
    
    .navbar, .navigation-buttons, .action-buttons, #result-action-buttons {
        display: none !important;
    }
    
    .welcome-card, .questionnaire-card, .result-card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
        break-inside: avoid;
    }
    
    .container {
        max-width: 100% !important;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .option-item {
        border: 2px solid #000000;
    }
    
    .option-item.selected {
        background: #000000;
        color: #ffffff;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* 减少动画效果 (用户偏好) */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .fade-in-up {
        animation: none;
    }
    
    .pulse {
        animation: none;
    }
}

/* 横屏模式优化 */
@media (max-height: 500px) and (orientation: landscape) {
    .welcome-card, .questionnaire-card, .result-card {
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .question-card {
        min-height: auto;
    }
    
    .score-circle {
        width: 80px;
        height: 80px;
    }
    
    .score-number {
        font-size: 1.4rem;
    }
    
    .chart-container {
        height: 150px;
    }
}

/* 键盘导航优化 */
.btn:focus-visible, .option-item:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* 加载状态 */
.loading {
    pointer-events: none;
    opacity: 0.6;
    cursor: wait;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 主题选项弹窗样式 */
.theme-options-modal .swal2-popup {
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2) !important;
    max-width: 400px !important;
    width: 90% !important;
    background: var(--card-bg) !important;
}

.theme-options-modal .swal2-title {
    color: var(--text-primary) !important;
    font-size: 1.3rem !important;
    font-weight: 600 !important;
    margin-bottom: 1rem !important;
}

.theme-options-modal .swal2-html-container {
    color: var(--text-primary) !important;
    line-height: 1.5 !important;
}

.theme-options-modal .btn {
    border-radius: 8px !important;
    padding: 0.6rem 1rem !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

.theme-options-modal .btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
}

.theme-options-modal .swal2-cancel {
    background-color: var(--secondary-color) !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0.6rem 1.5rem !important;
    font-weight: 500 !important;
    color: white !important;
}

/* 投资账户弹窗样式 */
.investment-modal {
    border-radius: 15px !important;
}

.investment-modal .swal2-title {
    font-size: 1.3rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
}

.investment-modal .swal2-html-container {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
}

.investment-modal .swal2-html-container ul {
    margin: 0;
    padding-left: 0;
}

.investment-modal .swal2-html-container li {
    font-size: 0.9rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.investment-modal .swal2-html-container li:last-child {
    border-bottom: none;
}

.investment-modal .swal2-confirm {
    font-weight: 600 !important;
    padding: 0.6rem 1.5rem !important;
    border-radius: 8px !important;
}

.investment-modal .swal2-cancel {
    padding: 0.6rem 1.5rem !important;
    border-radius: 8px !important;
}

/* SweetAlert2 按钮间距调整 */
.swal2-actions {
    gap: 0.8rem !important;
}

/* 咨询弹窗样式 */
.consulting-modal .swal2-popup {
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2) !important;
    max-width: 500px !important;
    width: 90% !important;
}

.consulting-modal .consulting-title {
    color: var(--text-primary) !important;
    font-size: 1.4rem !important;
    font-weight: 600 !important;
    margin-bottom: 1rem !important;
}

.consulting-modal .consulting-content {
    text-align: left !important;
    color: var(--text-secondary) !important;
    line-height: 1.6 !important;
}

.consulting-modal .consulting-content h6 {
    color: var(--success-color) !important;
    font-weight: 600 !important;
    margin-top: 1rem !important;
    margin-bottom: 0.8rem !important;
}

.consulting-modal .consulting-content ul {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.consulting-modal .consulting-content li {
    padding: 0.5rem 0 !important;
    font-size: 0.95rem !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
}

.consulting-modal .consulting-content li:last-child {
    border-bottom: none !important;
}

.consulting-modal .swal2-confirm {
    background-color: var(--success-color) !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0.7rem 1.8rem !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
}

.consulting-modal .swal2-confirm:hover {
    background-color: var(--success-color) !important;
    opacity: 0.9 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3) !important;
}

.consulting-modal .swal2-cancel {
    background-color: var(--secondary-color) !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0.7rem 1.8rem !important;
    font-weight: 500 !important;
    color: white !important;
}

.consulting-modal .swal2-cancel:hover {
    background-color: var(--secondary-color) !important;
    opacity: 0.8 !important;
}

/* 低分用户专属咨询弹窗样式 */
.consulting-modal .swal2-icon.swal2-info {
    border-color: var(--success-color) !important;
    color: var(--success-color) !important;
}

/* 缓存通知样式 */
.cache-notification {
    background: var(--card-bg) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px var(--card-shadow) !important;
    border: 1px solid var(--border-color) !important;
}

.cache-notification .swal2-title {
    color: var(--text-primary) !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
}

.cache-notification .swal2-content {
    color: var(--text-secondary) !important;
    font-size: 0.9rem !important;
}

.cache-notification .swal2-timer-progress-bar {
    background: var(--primary-color) !important;
}

/* 投资账户弹窗样式 */
.investment-modal {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
}

.investment-modal .swal2-title {
    color: var(--success-color) !important;
}

.investment-modal .swal2-content {
    color: var(--text-primary) !important;
}

.investment-modal .swal2-content h6 {
    color: var(--text-primary) !important;
}

.investment-modal .swal2-content ul li {
    color: var(--text-secondary) !important;
}

.investment-modal .swal2-confirm {
    background-color: var(--success-color) !important;
}

.investment-modal .swal2-cancel {
    background-color: var(--secondary-color) !important;
}
