
/* excel_visual_dashboard/frontend/css/style.css */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #0f172a;
    color: #f8fafc;
}

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

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
}

::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* 文件上传区域样式 */
.upload-area {
    transition: all 0.3s ease;
}

.upload-area.drag-over {
    background-color: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6 !important;
    transform: scale(1.01);
}

/* 文件列表样式 */
.file-item {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.file-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.15), transparent 70%);
    pointer-events: none;
}

.file-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.file-settings {
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    max-height: 0;
    opacity: 0;
}

.file-settings.open {
    max-height: 500px;
    opacity: 1;
    padding-top: 1rem;
}

/* 按钮样式 */
button {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

button:focus:not(:active)::after {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

.chart-type-btn {
    position: relative;
    transition: all 0.3s ease;
    transform: translateY(0);
}

.chart-type-btn:hover {
    transform: translateY(-2px);
}

.chart-type-btn.active {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.chart-type-btn.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}

/* 输入控件样式 */
input[type="date"], 
input[type="number"], 
select {
    transition: all 0.3s ease;
}

input[type="date"]:focus,
input[type="number"]:focus,
select:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

input[type="color"] {
    -webkit-appearance: none;
    cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

/* 图表容器样式 */
.chart-container {
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at bottom left, rgba(79, 70, 229, 0.1), transparent 70%);
    pointer-events: none;
}

/* 数据表格样式 */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

thead th {
    position: sticky;
    top: 0;
    background-color: #1f2937;
    z-index: 10;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

tbody td {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.2s;
}

tbody tr:hover td {
    background-color: rgba(59, 130, 246, 0.1);
}

/* 文件信息徽章 */
.file-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    margin-right: 0.5rem;
    background-color: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

/* 加载动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 微交互动效 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .file-settings .grid {
        grid-template-columns: 1fr !important;
    }
    
    .chart-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .chart-controls button {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* 文件列表区域中多文件显示样式 */
#file-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 错误提示样式 */
.error-message {
    background-color: rgba(239, 68, 68, 0.2);
    border-left: 4px solid #ef4444;
    padding: 0.75rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    color: #fca5a5;
}

/* 成功提示样式 */
.success-message {
    background-color: rgba(34, 197, 94, 0.2);
    border-left: 4px solid #22c55e;
    padding: 0.75rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    color: #86efac;
}

/* 进度条样式 */
.progress-bar {
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(to right, #3b82f6, #8b5cf6);
    transition: width 0.3s ease;
}

/* 提示工具样式 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: #1f2937;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* 开发中提示样式 */
.dev-badge {
    background-color: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}
