/*/xloudread/static/style/datavisual.css*/

:root {
    --primary-color: #4a90e2;
    --secondary-color: #2c3e50;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
    --border-color: #ddd;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* 头部 */
.header {
    background: var(--secondary-color);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.header p {
    font-size: 1rem;
    opacity: 0.9;
}


/* 主要内容区 */
.main-content {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    padding: 30px;
    min-width: 0;
}

/* 面板 */
.panel {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
}

.panel h2 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-size: 1.4rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.panel h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

/* 上传区域 */
.upload-area {
    border: 3px dashed var(--primary-color);
    border-radius: var(--border-radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    margin-bottom: 20px;
}

.upload-area:hover {
    border-color: var(--success-color);
    background: #f0f9f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.upload-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 15px;
}

.upload-area p {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.upload-hint {
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* 调试信息样式 */
.debug-info {
    margin-top: 15px;
    padding: 12px;
    background-color: #f8f9fa;
    border-left: 4px solid #4a90e2;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #2c3e50;
    line-height: 1.6;
}

.debug-info::before {
    content: '🔧 提示信息: ';
    font-weight: bold;
    color: #4a90e2;
}

/* 进度条 */
.progress-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    width: 0%;
    transition: width 0.3s ease;
}

.progress-container p {
    text-align: center;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* 数据信息 */
.data-info {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

/* Sheet选择器 */
.sheet-selector {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.sheet-selector h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.sheet-selector .form-control {
    max-width: 100%;
}

/* AI数据探查样式 */
.ai-explore-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.ai-explore-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.ai-explore-section .alert {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 20px;
    color: #856404;
}

.ai-explore-section .alert strong {
    display: block;
    margin-bottom: 10px;
}

.ai-explore-section .alert ul {
    margin: 10px 0;
    padding-left: 20px;
}

.ai-explore-section .alert li {
    margin: 5px 0;
}

.ai-explore-section #aiLoading .progress-fill {
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    background-size: 200% 200%;
    animation: gradientMove 2s ease infinite;
}

.ai-explore-section #aiLoading .progress-fill.active {
    animation: progressPulse 1.5s ease-in-out infinite;
}

@keyframes progressPulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.ai-explore-section #aiResult {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
}

.ai-explore-section #aiResult h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.ai-explore-section #aiResultContent table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.ai-explore-section #aiResultContent th {
    background: var(--primary-color);
    color: white;
    padding: 10px;
    text-align: left;
}

.ai-explore-section #aiResultContent td {
    padding: 8px;
    border: 1px solid #ddd;
}

.ai-explore-section #aiResultContent .markdown-content {
    background: white;
    padding: 15px;
    border-radius: var(--border-radius);
    border: 1px solid #ddd;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.ai-explore-section .text-warning {
    color: var(--warning-color);
    margin-top: 10px;
}

.ai-explore-section .text-muted {
    color: #7f8c8d;
}

.ai-explore-section .text-sm {
    font-size: 0.85rem;
}

.ai-explore-section .mt-2 {
    margin-top: 10px;
}

.ai-explore-section .mt-3 {
    margin-top: 20px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item .label {
    font-weight: bold;
    color: var(--secondary-color);
}

.info-item span:last-child {
    color: var(--primary-color);
}

/* 包含按钮的info-item特殊样式 */
.info-item.ai-explore-trigger {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.info-item.ai-explore-trigger button {
    width: 100%;
}

.info-item.ai-explore-trigger .help-text {
    margin: 0;
    font-size: 0.85rem;
    color: #7f8c8d;
}

/* 表单控件 */
.form-group {
    margin-bottom: 20px;
}

/* ====== 绿色二值滑钮 ====== */
/* 滑钮容器 */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    display: inline-block;
}
/* 隐藏原生复选框 */
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
/* 滑钮背景 */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 26px;
    transition: .4s;
}
/* 滑钮圆点 */
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
}
/* 选中时背景变绿色 */
input:checked + .slider {
    background-color: #4caf50;
}
/* 选中时圆点右移 */
input:checked + .slider:before {
    transform: translateX(24px);
}

.toggle-switch:hover .slider {
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.2);
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--secondary-color);
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* 按钮 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #357abd);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #1e8449);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}

.btn-secondary {
    background: var(--light-color);
    color: var(--dark-color);
}

.btn-secondary:hover {
    background: #d5d8dc;
}

/* 数据预览表 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-table th {
    background: var(--secondary-color);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: bold;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

.data-table tr:hover {
    background: #f8f9fa;
}

.data-table tr:nth-child(even) {
    background: #fafafa;
}

/* 数据预览样式 */
.data-preview {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    margin-top: 30px;
    box-shadow: var(--shadow);
}

.data-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.data-preview-title {
    color: var(--secondary-color);
    font-size: 1.3rem;
    margin-bottom: 0;
}

.data-preview-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.data-preview-stats span {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.data-preview-stats strong {
    color: var(--primary-color);
    font-weight: bold;
}

.data-preview-actions {
    display: flex;
    gap: 10px;
}

.table-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-bottom: 15px;
    -webkit-overflow-scrolling: touch;
}

#dataTable {
    border-collapse: collapse;
    background: white;
    min-width: max-content; /* 确保表格宽度根据内容自适应，触发横向滚动 */
}

#dataTable th {
    background: var(--secondary-color);
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: bold;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

#dataTable th.checkbox-column {
    width: 40px;
    text-align: center;
    padding: 8px;
}

#dataTable td {
    padding: 10px 15px;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s;
}

#dataTable td.checkbox-column {
    width: 40px;
    text-align: center;
    padding: 8px;
}

#dataTable td.row-number {
    width: 50px;
    text-align: center;
    font-weight: bold;
    color: #7f8c8d;
    background: #f8f9fa;
}

#dataTable tr:hover {
    background: #f0f9f0;
}

#dataTable tr.even {
    background: #fafafa;
}

#dataTable tr.even:hover {
    background: #f0f9f0;
}

#dataTable tr.selected {
    background: #e3f2fd;
}

#dataTable .editable {
    cursor: pointer;
    transition: all 0.2s;
}

#dataTable .editable:hover {
    background: #fff9c4;
    outline: 2px solid #ffeb3b;
}

#dataTable .numeric {
    text-align: right;
    font-family: 'Courier New', monospace;
}

#dataTable .string {
    text-align: left;
}

#dataTable .null {
    color: #bdc3c7;
    font-style: italic;
}

.table-footer {
    padding: 15px;
    background: #f8f9fa;
    border-top: 1px solid var(--border-color);
}

.table-footer-text {
    margin: 0;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* 辅助按钮样式 */
.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-info {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #c0392b);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 分页样式 */
.pagination-wrapper {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 15px 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.pagination-info {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.pagination-info strong {
    color: var(--primary-color);
    font-weight: bold;
}

.pagination-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination-controls .btn-sm {
    padding: 6px 12px;
}

.page-number {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8f9fa;
    color: #2c3e50;
}

.page-number:hover {
    background: var(--primary-color);
    color: white;
}

.page-number.active {
    background: var(--primary-color);
    color: white;
    font-weight: bold;
    cursor: default;
}

.pagination-size {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.form-control-sm {
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
}

/* 编辑历史面板样式 */
.history-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 450px;
    height: 100%;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.history-header {
    background: var(--secondary-color);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.history-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.history-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.history-time {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 8px;
}

.history-action {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--primary-color);
    color: white;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.history-detail {
    font-size: 0.9rem;
    color: #2c3e50;
    line-height: 1.6;
    margin-bottom: 10px;
}

.history-item .old-value {
    color: #e74c3c;
    text-decoration: line-through;
    margin: 0 4px;
}

.history-item .new-value {
    color: #27ae60;
    font-weight: bold;
    margin: 0 4px;
}

.history-item strong {
    color: var(--primary-color);
}

.history-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background: white;
}

.empty-history {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
    font-size: 1rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .history-panel {
        width: 100%;
        max-width: 100%;
    }

    .pagination-wrapper {
        flex-direction: column;
        gap: 10px;
    }

    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* 右侧面板 */
.right-panel {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.right-panel .panel {
    width: 100%;
}

/* 图表容器 */
.chart-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.chart-container h2 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

#chart {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-card .stat-label {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* 提示框 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: linear-gradient(135deg, var(--success-color), #1e8449);
}

.toast.error {
    background: linear-gradient(135deg, var(--danger-color), #c0392b);
}

.toast.warning {
    background: linear-gradient(135deg, var(--warning-color), #d68910);
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.hidden {
    display: none !important;
}

/* 闪烁动画 - 用于提示用户 */
@keyframes blink-warning {
    0%, 100% {
        background-color: rgba(243, 156, 18, 0.1);
        border-color: #f39c12;
    }
    50% {
        background-color: rgba(243, 156, 18, 0.3);
        border-color: #e67e22;
    }
}

.blink-warning {
    animation: blink-warning 0.6s ease-in-out 3;
}

@keyframes blink-text {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.blink-text {
    animation: blink-text 0.5s ease-in-out 3;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }

    .panel {
        padding: 15px;
    }

    .upload-area {
        padding: 30px 15px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .chart-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-group {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    .data-preview-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .data-preview-actions {
        flex-wrap: wrap;
    }

    .chart-display {
        padding: 10px;
    }

    /* 确保表格在小屏幕上也能滚动 */
    .table-wrapper {
        max-width: 100%;
        overflow-x: scroll;
    }
}

/* 天气数据采集表单样式 */
.layout-col {
    margin-top: 20px;
}

.card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-top: 15px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

/* 地区输入组 */
.area-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.area-group .form-input {
    width: 100%;
}

@media (min-width: 768px) {
    .area-group {
        flex-direction: row;
    }

    .area-group .form-input {
        flex: 1;
    }
}

/* 表单样式优化 */
.layout-col .form-group {
    margin-bottom: 15px;
}

.layout-col .form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary-color);
    font-size: 0.95rem;
}

.layout-col .form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.layout-col .form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.layout-col .form-input::placeholder {
    color: #999;
    font-size: 0.9rem;
}

/* 按钮组 */
.layout-col .btn {
    margin-right: 10px;
    margin-bottom: 10px;
}

.layout-col .btn:last-child {
    margin-right: 0;
}

/* 消息提示 */
.layout-col .msg {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

.layout-col .msg-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.layout-col .msg-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.layout-col .msg-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.layout-col .msg-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* X轴刻度设置容器 */
.x-tick-settings-container {
    margin-top: 15px;
}

/* 单位提取预览 */
.unit-extract-preview {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.unit-extract-preview.hidden {
    display: none;
}

.unit-extract-preview-content {
    margin-top: 10px;
}

.unit-extract-preview-item {
    padding: 8px 12px;
    background: white;
    border-radius: 4px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.unit-extract-preview-item .column-name {
    font-weight: bold;
    color: var(--secondary-color);
}

.unit-extract-preview-item .unit-info {
    color: var(--success-color);
}

.unit-extract-preview-item .unit-info .unit {
    font-weight: bold;
}

/* 单选框组样式 */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

/* 弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    color: var(--secondary-color);
    font-size: 1.3rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #7f8c8d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    color: var(--danger-color);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 视图切换按钮 */
.view-type-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    padding: 0 20px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
}

.view-type-toggle button {
    flex: 1;
    transition: all 0.3s ease;
}

.view-type-toggle button.active {
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

/* 地图显示样式 */
.map-display {
    margin-top: 20px;
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.map-display h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.map-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
}

.map-toolbar .toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.map-toolbar label {
    font-weight: 500;
    color: var(--secondary-color);
}

.map-toolbar select {
    min-width: 120px;
}

.map-container {
    width: 100%;
    height: 500px;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.map-display.hidden {
    display: none;
}
