/* 自定义样式 */
.dark {
    background-color: #1a202c;
    color: #e2e8f0;
}

.dark .bg-white {
    background-color: #2d3748;
}

.dark .text-gray-800 {
    color: #e2e8f0;
}

.dark .text-gray-600 {
    color: #cbd5e0;
}

.dark .border-gray-300 {
    border-color: #4a5568;
}

/* 图表容器样式 */
.plot-container {
    width: 100%;
    height: 500px;
    position: relative;
}

/* 动画效果 */
@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.twinkling {
    animation: twinkle 1s infinite alternate;
}

/* 3D图表样式 */
.js-plotly-plot {
    width: 100% !important;
    height: 100% !important;
}

/* 控制面板样式 */
.controls {
    margin-top: 20px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.dark .controls {
    background-color: #2d3748;
}

/* 数据编辑器样式 */
.data-editor {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.data-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.dark .data-input {
    background-color: #1a202c;
    border-color: #4a5568;
    color: #e2e8f0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .data-editor {
        grid-template-columns: 1fr;
    }
    
    .controls {
        grid-template-columns: 1fr;
    }
}

/* 过渡效果 */
.transition-all {
    transition: all 0.3s ease;
}

/* 悬停效果 */
.hover-scale:hover {
    transform: scale(1.05);
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.dark ::-webkit-scrollbar-track {
    background: #2d3748;
}

.dark ::-webkit-scrollbar-thumb {
    background: #4a5568;
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notification.show {
    opacity: 1;
}

.notification.success {
    background-color: #10b981;
}

.notification.error {
    background-color: #ef4444;
}

.notification.info {
    background-color: #3b82f6;
}