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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    padding: 20px;
}

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

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #1da1f2 0%, #0a66c2 100%);
    color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    font-weight: 600;
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* 区块通用样式 */
.section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.section:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.section.hidden {
    display: none;
}

.section h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #2c3e50;
    padding-bottom: 15px;
    border-bottom: 3px solid #1da1f2;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 上传区域样式 */
.upload-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.drop-area {
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    background-color: #f8fafc;
}

.drop-area:hover,
.drop-area.drag-over {
    border-color: #1da1f2;
    background-color: #f0f9ff;
}

.drop-area-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.drop-area-content svg {
    color: #1da1f2;
}

.template-info {
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #34d399;
}

.template-info p {
    color: #4b5563;
    margin-bottom: 15px;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
}

.btn.primary {
    background: linear-gradient(135deg, #1da1f2 0%, #0a66c2 100%);
    color: white;
}

.btn.primary:hover {
    background: linear-gradient(135deg, #1a91da 0%, #095db2 100%);
}

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

.btn.secondary:hover {
    background-color: #5b6270;
}

/* 预览表格样式 */
.preview-container {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background-color: #f8fafc;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    color: #4b5563;
}

.data-table tr:hover {
    background-color: #f9fafb;
}

.data-table tr:nth-child(even) {
    background-color: #f8fafc;
}

/* 配置表单样式 */
.config-container,
.options-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: #374151;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group textarea {
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="url"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1da1f2;
}

.form-group small {
    color: #6b7280;
    font-size: 14px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* 操作区域样式 */
.actions-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 进度条样式 */
.progress-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1da1f2 0%, #0a66c2 100%);
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    text-align: center;
    font-weight: 500;
    color: #374151;
}

/* 结果区域样式 */
.results-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-item {
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid;
}

.result-item.success {
    background-color: #f0fdf4;
    border-left-color: #10b981;
}

.result-item.error {
    background-color: #fef2f2;
    border-left-color: #ef4444;
}

.result-item.info {
    background-color: #f0f9ff;
    border-left-color: #3b82f6;
}

.result-item h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

.result-item p {
    font-size: 14px;
    color: #4b5563;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background-color: #10b981;
}

.notification.error {
    background-color: #ef4444;
}

.notification.info {
    background-color: #3b82f6;
}

/* 页脚样式 */
footer {
    text-align: center;
    margin-top: 60px;
    padding: 30px;
    color: #6b7280;
    font-size: 14px;
    border-top: 1px solid #e5e7eb;
}

.disclaimer {
    margin-top: 10px;
    color: #f59e0b;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    header {
        padding: 30px 15px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .section {
        padding: 20px;
    }
    
    .section h2 {
        font-size: 1.5em;
    }
    
    .drop-area {
        padding: 30px 15px;
    }
    
    .config-container,
    .options-container {
        grid-template-columns: 1fr;
    }
    
    .actions-container {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8em;
    }
    
    header p {
        font-size: 1em;
    }
    
    .section h2 {
        font-size: 1.3em;
    }
}