/* 基础样式和重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    min-height: 100vh;
    transition: all 0.5s ease;
    overflow-x: hidden;
}

/* 应用容器布局 */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-left: 3px solid #3b82f6;
    border-right: 3px solid #3b82f6;
}

/* 顶部导航区域 */
.app-header {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #1e40af;
    box-shadow: 0 4px 30px rgba(59, 130, 246, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 25px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    gap: 15px;
    position: relative;
}

/* Logo区域 */
.logo-section {
    width: 100%;
    max-width: 800px;
}

.main-title {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(45deg, #3b82f6, #8b5cf6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

.main-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 2px;
}

.subtitle {
    font-size: 1rem;
    color: #94a3b8;
    font-weight: 400;
    margin-top: 12px;
    letter-spacing: 0.5px;
}

/* 主题控制 */
.theme-controls {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: flex;
    gap: 10px;
}

.theme-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    position: relative;
    overflow: hidden;
}

.theme-icon-btn {
    padding: 10px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon {
    width: 20px;
    height: 20px;
    display: block;
}

.theme-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.theme-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.3s ease;
}

.theme-btn:hover::after {
    transform: scale(1);
}

/* 主要内容区域 */
.app-main {
    flex: 1;
    padding: 20px;
}

.main-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 30px;
}

/* 内容布局 */
.content-layout {
    display: flex;
    gap: 20px;
    height: calc(100vh - 200px);
    min-height: 600px;
}

/* 左侧图表展示区域 */
.charts-section {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 10px;
}

/* 图表项 */
.chart-item {
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid #334155;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.chart-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

.chart-item.hidden {
    display: none;
}

.chart-title {
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid #334155;
    color: #f1f5f9;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
}

.chart-container {
    padding: 15px;
    background: rgba(15, 23, 42, 0.3);
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plotly-chart-wrapper {
    width: 100%;
    height: 300px;
    min-height: 300px;
}

/* 模块头部 */
.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: rgba(15, 23, 42, 0.6);
    border-bottom: 2px solid #334155;
}

.module-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #f1f5f9;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.module-controls {
    display: flex;
    gap: 8px;
}

.control-btn {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid #475569;
    border-radius: 6px;
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.control-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-1px);
}

.control-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

/* 模块描述 */
.module-description {
    padding: 15px 25px;
    background: rgba(30, 41, 59, 0.4);
    border-bottom: 1px solid #334155;
}

.module-description p {
    margin: 0;
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 模块内容 */
.module-content {
    padding: 20px;
    background: rgba(15, 23, 42, 0.3);
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-container .plotly-chart-wrapper {
    width: 100%;
    height: 400px;
}

/* 加载指示器 */
.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 15px;
}

.loading-text {
    color: #94a3b8;
    font-size: 1.1rem;
    font-weight: 500;
}

.loading-text::after {
    content: '';
    width: 32px;
    height: 32px;
    border: 3px solid #334155;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 12px;
    display: inline-block;
}

/* 右侧操作面板 */
.sidebar {
    width: 320px;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 20px;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.control-section {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 16px;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f1f5f9;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #334155;
}

/* 主题选项 */
.theme-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.theme-option {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid #3b82f6;
    border-radius: 6px;
    padding: 10px 8px;
    color: #60a5fa;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.theme-option:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #60a5fa;
    color: #93c5fd;
    transform: translateY(-1px);
}

.theme-option.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* 图表菜单 */
.chart-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 400px;
    overflow-y: auto;
}

.chart-menu-item {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid #475569;
    border-radius: 6px;
    padding: 10px 12px;
    color: #cbd5e1;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chart-menu-item:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #60a5fa;
    transform: translateX(2px);
}

.chart-menu-item.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    color: #3b82f6;
    font-weight: 600;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-btn {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid #3b82f6;
    border-radius: 6px;
    padding: 12px 16px;
    color: #60a5fa;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: center;
    justify-content: center;
}

.action-btn:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.action-btn .icon {
    width: 18px;
    height: 18px;
}

.chart-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.chart-card:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
}

.chart-card.active {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.card-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 8px;
    margin-top: 2px;
}

.card-content {
    flex: 1;
    min-width: 0;
}

.chart-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.2;
}

.chart-card p {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 6px;
    line-height: 1.2;
}

.card-description {
    font-size: 0.7rem;
    color: #999;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 图表显示区域 */
.chart-display-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.chart-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    flex: 1;
}

.chart-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

/* 按钮样式 */
.btn {
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #666;
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
    background: #f8f9fa;
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

/* 图表描述 */
.chart-description {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.chart-description p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

/* 图表容器 */
.chart-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    margin-bottom: 25px;
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 30px;
}

#plotly-chart {
    width: 100% !important;
    height: 600px !important;
}

/* 数据信息区域 */
.data-info-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
}

.data-info-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.data-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.info-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.info-value {
    font-size: 1rem;
    color: #333;
    font-weight: 600;
}

/* 底部版权信息 */
.app-footer {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid #e0e0e0;
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 0.85rem;
}

/* 主题变换样式 */
body[data-theme="light"] {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
}

body[data-theme="dark"] {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}

body[data-theme="future"] {
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 30%, #2d1b69 60%, #1e3a8a 100%);
}

body[data-theme="ancient"] {
    background: linear-gradient(135deg, #f5e6d3 0%, #e8d5b7 25%, #d4a574 50%, #b08968 75%, #8b5a3c 100%);
}

/* 白天模式样式 */
body[data-theme="light"] .app-container {
    background: rgba(255, 255, 255, 0.95);
    color: #111827;
    border-left-color: #3b82f6;
    border-right-color: #3b82f6;
}

body[data-theme="light"] .app-header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: #e5e7eb;
    box-shadow: 0 4px 30px rgba(59, 130, 246, 0.15);
}

body[data-theme="light"] .chart-module {
    background: rgba(255, 255, 255, 0.9);
    border-color: #e5e7eb;
}

body[data-theme="light"] .control-panel {
    background: rgba(255, 255, 255, 0.9);
    border-color: #e5e7eb;
}

body[data-theme="light"] .module-title,
body[data-theme="light"] .panel-title {
    color: #1f2937;
}

body[data-theme="light"] .module-description p {
    color: #6b7280;
}

body[data-theme="light"] .module-header {
    background: rgba(249, 250, 251, 0.8);
    border-bottom-color: #e5e7eb;
}

body[data-theme="light"] .module-description {
    background: rgba(249, 250, 251, 0.4);
    border-bottom-color: #e5e7eb;
}

body[data-theme="light"] .module-content {
    background: rgba(255, 255, 255, 0.3);
}

body[data-theme="light"] .main-title {
    background: linear-gradient(45deg, #3b82f6, #8b5cf6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body[data-theme="light"] .control-btn {
    background: rgba(249, 250, 251, 0.8);
    border-color: #d1d5db;
    color: #6b7280;
}

body[data-theme="light"] .control-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #3b82f6;
}

body[data-theme="light"] .global-btn {
    background: rgba(59, 130, 246, 0.05);
    border-color: #3b82f6;
    color: #3b82f6;
}

body[data-theme="light"] .loading-text {
    color: #6b7280;
}

body[data-theme="light"] .chart-container {
    background: #ffffff;
    border-color: #f0f0f0;
}

body[data-theme="light"] .chart-description {
    background: #f8f9fa;
    border-left-color: #667eea;
}

body[data-theme="light"] .info-card {
    background: #f8f9fa;
    border-left-color: #667eea;
}

body[data-theme="light"] .info-label {
    color: #666;
}

body[data-theme="light"] .info-value {
    color: #333;
}

/* 黑夜模式样式 */
body[data-theme="dark"] .app-container {
    background: rgba(15, 23, 42, 0.95);
    color: #f9fafb;
    border-left-color: #1e40af;
    border-right-color: #1e40af;
}

body[data-theme="dark"] .app-header {
    background: rgba(15, 23, 42, 0.9);
    border-bottom-color: #1e40af;
    box-shadow: 0 4px 30px rgba(30, 64, 175, 0.4);
}

/* 未来风主题样式 */
body[data-theme="future"] .app-container {
    background: rgba(10, 14, 39, 0.95);
    color: #e0e7ff;
    border-left-color: #7c3aed;
    border-right-color: #7c3aed;
}

body[data-theme="future"] .app-header {
    background: rgba(10, 14, 39, 0.9);
    border-bottom-color: #7c3aed;
    box-shadow: 0 4px 30px rgba(124, 58, 237, 0.4);
}

body[data-theme="future"] .main-title {
    background: linear-gradient(45deg, #7c3aed, #a78bfa, #c084fc, #e879f9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body[data-theme="future"] .subtitle {
    color: #c7d2fe;
}

body[data-theme="future"] .chart-item {
    background: rgba(26, 31, 58, 0.9);
    border-color: #7c3aed;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

body[data-theme="future"] .chart-item:hover {
    border-color: #a78bfa;
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.5);
}

body[data-theme="future"] .chart-title {
    background: rgba(26, 31, 58, 0.8);
    border-bottom-color: #7c3aed;
    color: #e0e7ff;
}

body[data-theme="future"] .chart-container {
    background: rgba(10, 14, 39, 0.3);
}

body[data-theme="future"] .sidebar {
    background: rgba(26, 31, 58, 0.9);
    border-color: #7c3aed;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

body[data-theme="future"] .control-section {
    background: rgba(10, 14, 39, 0.5);
    border-color: #7c3aed;
}

body[data-theme="future"] .section-title {
    color: #e0e7ff;
    border-bottom-color: #7c3aed;
}

body[data-theme="future"] .theme-option,
body[data-theme="future"] .chart-menu-item,
body[data-theme="future"] .action-btn {
    border-color: #7c3aed;
    color: #c7d2fe;
}

body[data-theme="future"] .theme-option:hover,
body[data-theme="future"] .chart-menu-item:hover,
body[data-theme="future"] .action-btn:hover {
    background: rgba(124, 58, 237, 0.2);
    border-color: #a78bfa;
    color: #e0e7ff;
}

body[data-theme="future"] .theme-option.active,
body[data-theme="future"] .chart-menu-item.active,
body[data-theme="future"] .action-btn:hover {
    background: #7c3aed;
    border-color: #7c3aed;
    color: white;
}

/* 古风主题样式 */
body[data-theme="ancient"] .app-container {
    background: rgba(245, 230, 211, 0.95);
    color: #5d4037;
    border-left-color: #8b4513;
    border-right-color: #8b4513;
}

body[data-theme="ancient"] .app-header {
    background: rgba(245, 230, 211, 0.95);
    border-bottom-color: #8b4513;
    box-shadow: 0 4px 30px rgba(139, 69, 19, 0.2);
}

body[data-theme="ancient"] .main-title {
    background: linear-gradient(45deg, #8b4513, #a0522d, #cd853f, #daa520);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'SimSun', '宋体', serif;
}

body[data-theme="ancient"] .subtitle {
    color: #6b4423;
    font-family: 'SimSun', '宋体', serif;
}

body[data-theme="ancient"] .chart-item {
    background: rgba(232, 213, 183, 0.9);
    border-color: #8b4513;
    box-shadow: 0 4px 20px rgba(139, 69, 19, 0.2);
}

body[data-theme="ancient"] .chart-item:hover {
    border-color: #a0522d;
    box-shadow: 0 8px 30px rgba(139, 69, 19, 0.3);
}

body[data-theme="ancient"] .chart-title {
    background: rgba(212, 165, 116, 0.8);
    border-bottom-color: #8b4513;
    color: #5d4037;
    font-family: 'SimSun', '宋体', serif;
    font-weight: 700;
}

body[data-theme="ancient"] .chart-container {
    background: rgba(245, 230, 211, 0.3);
}

body[data-theme="ancient"] .sidebar {
    background: rgba(232, 213, 183, 0.9);
    border-color: #8b4513;
    box-shadow: 0 4px 20px rgba(139, 69, 19, 0.2);
}

body[data-theme="ancient"] .control-section {
    background: rgba(245, 230, 211, 0.5);
    border-color: #8b4513;
}

body[data-theme="ancient"] .section-title {
    color: #5d4037;
    border-bottom-color: #8b4513;
    font-family: 'SimSun', '宋体', serif;
    font-weight: 700;
}

body[data-theme="ancient"] .theme-option,
body[data-theme="ancient"] .chart-menu-item,
body[data-theme="ancient"] .action-btn {
    background: rgba(212, 165, 116, 0.2);
    border-color: #8b4513;
    color: #6b4423;
    font-family: 'SimSun', '宋体', serif;
}

body[data-theme="ancient"] .theme-option:hover,
body[data-theme="ancient"] .chart-menu-item:hover,
body[data-theme="ancient"] .action-btn:hover {
    background: rgba(212, 165, 116, 0.4);
    border-color: #a0522d;
    color: #5d4037;
}

body[data-theme="ancient"] .theme-option.active,
body[data-theme="ancient"] .chart-menu-item.active,
body[data-theme="ancient"] .action-btn:hover {
    background: #8b4513;
    border-color: #8b4513;
    color: #f5e6d3;
}

body[data-theme="dark"] .chart-module {
    background: rgba(30, 41, 59, 0.9);
    border-color: #475569;
    color: #f9fafb;
}

body[data-theme="dark"] .control-panel {
    background: rgba(30, 41, 59, 0.9);
    border-color: #475569;
}

body[data-theme="dark"] .module-title,
body[data-theme="dark"] .panel-title {
    color: #f1f5f9;
}

body[data-theme="dark"] .module-description p {
    color: #cbd5e1;
}

body[data-theme="dark"] .module-header {
    background: rgba(15, 23, 42, 0.8);
    border-bottom-color: #475569;
}

body[data-theme="dark"] .module-description {
    background: rgba(30, 41, 59, 0.4);
    border-bottom-color: #475569;
}

body[data-theme="dark"] .module-content {
    background: rgba(15, 23, 42, 0.3);
}

body[data-theme="dark"] .main-title {
    background: linear-gradient(45deg, #60a5fa, #a78bfa, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body[data-theme="dark"] .subtitle {
    color: #94a3b8;
}

body[data-theme="dark"] .control-btn {
    background: rgba(30, 41, 59, 0.8);
    border-color: #475569;
    color: #94a3b8;
}

body[data-theme="dark"] .control-btn:hover {
    background: rgba(96, 165, 250, 0.2);
    border-color: #60a5fa;
    color: #60a5fa;
}

body[data-theme="dark"] .global-btn {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #60a5fa;
}

body[data-theme="dark"] .loading-text {
    color: #94a3b8;
}

body[data-theme="dark"] .chart-container {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

body[data-theme="dark"] .chart-description {
    background: #374151;
    border-left-color: #9ca3af;
}

body[data-theme="dark"] .chart-description p {
    color: #d1d5db;
}

body[data-theme="dark"] .chart-header {
    border-bottom-color: #4b5563;
}

body[data-theme="dark"] .info-card {
    background: #374151;
    border-left-color: #9ca3af;
}

body[data-theme="dark"] .info-label {
    color: #9ca3af;
}

body[data-theme="dark"] .info-value {
    color: #f9fafb;
}

body[data-theme="dark"] .btn-secondary {
    background: #374151;
    color: #f9fafb;
    border-color: #4b5563;
}

body[data-theme="dark"] .btn-secondary:hover {
    background: #4b5563;
    border-color: #9ca3af;
    color: #f9fafb;
}

body[data-theme="dark"] .app-footer {
    background: rgba(31, 41, 55, 0.9);
    border-top-color: #374151;
    color: #9ca3af;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* 深色滚动条 */
body[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #374151;
}

body[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #6b7280;
}

body[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        padding: 20px 15px;
    }

    .header-content {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        padding: 20px 15px;
    }

    .logo-section {
        text-align: center;
        width: 100%;
    }

    .main-title {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }

    .main-title::after {
        width: 80px;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .theme-controls {
        position: static;
        transform: none;
        justify-content: center;
        margin-top: 10px;
    }

    .chart-modules-container {
        gap: 15px;
    }

    .chart-module {
        margin-bottom: 15px;
    }

    .module-header {
        flex-direction: column;
        gap: 12px;
        padding: 15px 20px;
        align-items: stretch;
    }

    .module-title {
        font-size: 1.1rem;
        text-align: center;
    }

    .module-controls {
        justify-content: center;
    }

    .module-description {
        padding: 12px 20px;
    }

    .module-description p {
        font-size: 0.9rem;
    }

    .module-content {
        padding: 15px;
        min-height: 350px;
    }

    .chart-container .plotly-chart-wrapper {
        height: 350px;
    }

    .control-panel {
        padding: 20px;
    }

    .panel-title {
        font-size: 1.1rem;
        justify-content: center;
    }

    .panel-content {
        gap: 15px;
    }

    .theme-selector {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }

    .global-controls {
        justify-content: center;
        gap: 8px;
    }

    .global-btn {
        flex: 1;
        min-width: 100px;
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .app-main {
        padding: 15px;
    }

    .control-btn {
        padding: 6px 8px;
    }

    .control-btn .icon {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 15px 10px;
    }

    .main-title {
        font-size: 1.5rem;
        letter-spacing: 0.5px;
    }

    .main-title::after {
        width: 60px;
        height: 2px;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    .module-header {
        padding: 12px 15px;
    }

    .module-title {
        font-size: 1rem;
        line-height: 1.3;
    }

    .module-controls {
        gap: 6px;
    }

    .control-btn {
        padding: 5px 6px;
    }

    .control-btn .icon {
        width: 16px;
        height: 16px;
    }

    .module-description {
        padding: 10px 15px;
    }

    .module-description p {
        font-size: 0.85rem;
    }

    .module-content {
        padding: 10px;
        min-height: 300px;
    }

    .chart-container .plotly-chart-wrapper {
        height: 300px;
    }

    .control-panel {
        padding: 15px;
    }

    .panel-title {
        font-size: 1rem;
    }

    .global-controls {
        flex-direction: column;
        gap: 6px;
    }

    .global-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
        min-width: 80px;
    }

    .theme-controls {
        flex-direction: row;
        gap: 8px;
        position: static;
        transform: none;
        margin-top: 0;
    }

    .theme-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .theme-icon-btn {
        width: 36px;
        height: 36px;
    }

    .app-main {
        padding: 10px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chart-selector-section,
.chart-display-section {
    animation: fadeIn 0.6s ease;
}

.chart-card {
    transition: all 0.3s ease;
}

.info-card {
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

/* 全屏模式样式 */
.chart-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    border-radius: 0;
    padding: 40px;
}

.chart-container.fullscreen #plotly-chart {
    height: calc(100vh - 80px) !important;
}

/* 加载状态 */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #666;
    font-size: 1.1rem;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 15px;
}

/* 错误状态 */
.error {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #ef4444;
    font-size: 1.1rem;
    background: rgba(239, 68, 68, 0.05);
    border: 2px dashed #ef4444;
    border-radius: 8px;
    margin: 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}



