/**
 * SmartLabel 样式表
 * 简洁现代的界面设计
 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
                 "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    max-width: 600px;
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

/* ================= 头部 ================= */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 32px;
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 16px;
    color: #7f8c8d;
}

/* ================= 上传区域 ================= */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 2px dashed #3498db;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.upload-area:hover {
    border-color: #2980b9;
    background: #eef5f9;
}

.upload-area.dragover {
    border-color: #27ae60;
    background: #e8f8f5;
    transform: scale(1.02);
}

.upload-icon {
    color: #3498db;
    margin-bottom: 16px;
}

.upload-text {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 14px;
    color: #95a5a6;
}

/* ================= 进度条 ================= */
.progress-container {
    padding: 20px;
}

.progress-bar {
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    margin-top: 12px;
    color: #7f8c8d;
    font-size: 14px;
}

/* ================= 文件信息 ================= */
.file-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #e8f8f5;
    border-radius: 8px;
    border: 1px solid #27ae60;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-icon {
    font-size: 24px;
}

.file-name {
    font-weight: 600;
    color: #2c3e50;
}

.file-size {
    color: #7f8c8d;
    font-size: 14px;
}

.btn-remove {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
}

.btn-remove:hover {
    background: #c0392b;
}

/* ================= 数据摘要 ================= */
.summary-section {
    margin-bottom: 20px;
}

.summary-section h2 {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 16px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.summary-item {
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
}

.summary-item .label {
    color: #7f8c8d;
    font-size: 14px;
}

.summary-item .value {
    color: #2c3e50;
    font-weight: 600;
}

.summary-item .value.highlight {
    color: #27ae60;
    font-size: 18px;
}

.columns-info {
    margin-top: 16px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
}

.columns-label {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 8px;
}

.columns-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.column-tag {
    background: #3498db;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.warning-text {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 12px;
}

/* ================= 操作按钮 ================= */
.action-section {
    text-align: center;
    margin-bottom: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9, #1f6dad);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-primary:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    font-size: 18px;
}

/* ================= 结果区域 ================= */
.result-section {
    margin-bottom: 20px;
}

.result-card {
    padding: 30px;
    border-radius: 12px;
    text-align: center;
}

.result-card.success {
    background: linear-gradient(135deg, #e8f8f5, #d5f5e3);
    border: 1px solid #27ae60;
}

.result-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.result-card h2 {
    color: #27ae60;
    margin-bottom: 16px;
}

.result-details p {
    color: #2c3e50;
    margin-bottom: 8px;
}

.result-details strong {
    color: #27ae60;
}

.result-time {
    color: #7f8c8d;
    font-size: 14px;
}

.result-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-download {
    background: #27ae60;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-download:hover {
    background: #219a52;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* ================= 错误区域 ================= */
.error-section {
    margin-bottom: 20px;
}

.error-card {
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    background: linear-gradient(135deg, #fce4ec, #f9d5d5);
    border: 1px solid #e74c3c;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.error-card h2 {
    color: #e74c3c;
    margin-bottom: 16px;
}

.error-message {
    color: #2c3e50;
    margin-bottom: 24px;
}

/* ================= 页脚 ================= */
.footer {
    text-align: center;
    color: #95a5a6;
    font-size: 14px;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

.footer p {
    margin-bottom: 4px;
}

/* ================= 响应式设计 ================= */
@media (max-width: 480px) {
    .container {
        padding: 24px;
    }

    .header h1 {
        font-size: 24px;
    }

    .upload-area {
        padding: 24px;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .result-actions {
        flex-direction: column;
    }
}