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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    flex: 1;
    text-align: center;
}

/* 语言切换按钮 */
.lang-switch {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 60px;
}

.lang-switch:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 卡片样式 */
.upload-section,
.status-section,
.preview-section,
.action-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

/* 文件上传区域 */
.upload-area {
    border: 2px dashed #007bff;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(0,123,255,0.05);
}

.upload-area:hover {
    border-color: #0056b3;
    background: rgba(0,123,255,0.1);
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #28a745;
    background: rgba(40,167,69,0.1);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.upload-area p {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 20px;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 120px;
    justify-content: center;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #1e7e34;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40,167,69,0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108,117,125,0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    font-size: 1.1rem;
}

/* 文件信息 */
.file-info {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0,123,255,0.1);
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.file-info p {
    margin-bottom: 5px;
    color: #495057;
}

.file-info span {
    font-weight: 600;
    color: #007bff;
}

/* 状态区域 */
.status-message {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: 500;
}

.status-message.success {
    background: rgba(40,167,69,0.1);
    color: #155724;
    border-left: 4px solid #28a745;
}

.status-message.error {
    background: rgba(220,53,69,0.1);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.status-message.info {
    background: rgba(0,123,255,0.1);
    color: #004085;
    border-left: 4px solid #007bff;
}

/* 进度条 */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

/* 数据预览区域 */
.preview-section h2 {
    color: #495057;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.data-summary {
    background: rgba(0,123,255,0.1);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #007bff;
}

.data-summary p {
    margin-bottom: 5px;
    color: #495057;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#dataTable {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.9rem;
}

#dataTable th {
    background: #007bff;
    color: white;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

#dataTable td {
    padding: 10px 8px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: top;
}

#dataTable tbody tr:hover {
    background: rgba(0,123,255,0.05);
}

#dataTable tbody tr:nth-child(even) {
    background: rgba(248,249,250,0.5);
}

/* 链接样式 */
#dataTable a {
    color: #007bff;
    text-decoration: none;
    word-break: break-all;
}

#dataTable a:hover {
    text-decoration: underline;
}

/* 操作按钮区域 */
.action-section {
    text-align: center;
}

.action-section .btn {
    margin: 0 10px;
}

/* 使用说明内容字体调整 */
[data-i18n="instructions-content"] {
    font-size: 0.8em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .upload-section,
    .status-section,
    .preview-section,
    .action-section {
        padding: 20px;
    }
    
    .upload-area {
        padding: 30px 15px;
    }
    
    .action-section .btn {
        display: block;
        margin: 10px auto;
        width: 200px;
    }
    
    #dataTable {
        font-size: 0.8rem;
    }
    
    #dataTable th,
    #dataTable td {
        padding: 8px 6px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .upload-area p {
        font-size: 1rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}