
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: #333;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

.app-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.upload-section, .preview-section {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    padding: 30px;
    flex: 1;
    min-width: 300px;
    max-width: 550px;
}

.section-title {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: #6a11cb;
}

.upload-area {
    border: 3px dashed #6a11cb;
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8f9ff;
    margin-bottom: 25px;
}

.upload-area:hover {
    background-color: #f0f4ff;
    border-color: #2575fc;
}

.upload-area i {
    font-size: 4rem;
    color: #6a11cb;
    margin-bottom: 20px;
}

.upload-area h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.upload-area p {
    color: #666;
    margin-bottom: 20px;
}

.upload-btn {
    display: inline-block;
    background: linear-gradient(to right, #6a11cb, #2575fc);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(106, 17, 203, 0.3);
}

.upload-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(106, 17, 203, 0.4);
}

#fileInput {
    display: none;
}

.file-info {
    margin-top: 20px;
    padding: 15px;
    background-color: #f0f4ff;
    border-radius: 10px;
    display: none;
}

.file-info.show {
    display: block;
}

.file-info p {
    margin: 8px 0;
}

.validation-section {
    margin-top: 25px;
}

.validation-result {
    padding: 20px;
    border-radius: 10px;
    margin-top: 15px;
    display: none;
}

.validation-result.show {
    display: block;
}

.validation-success {
    background-color: #e8f7ef;
    border-left: 5px solid #27ae60;
}

.validation-error {
    background-color: #fdeaea;
    border-left: 5px solid #e74c3c;
}

.validation-result h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.validation-result h4 i {
    font-size: 1.5rem;
}

.success-icon {
    color: #27ae60;
}

.error-icon {
    color: #e74c3c;
}

.preview-table-container {
    overflow-x: auto;
    max-height: 400px;
    border-radius: 10px;
    border: 1px solid #eee;
    margin-top: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background-color: #6a11cb;
    color: white;
    padding: 15px;
    text-align: left;
    position: sticky;
    top: 0;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f0f4ff;
}

.export-section {
    margin-top: 25px;
}

.export-btn {
    display: block;
    width: 100%;
    background: linear-gradient(to right, #27ae60, #2ecc71);
    color: white;
    padding: 16px;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.export-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.4);
}

.export-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.instructions {
    background-color: #fff9e6;
    border-left: 5px solid #f1c40f;
    padding: 20px;
    border-radius: 10px;
    margin-top: 30px;
}

.instructions h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.instructions ul {
    padding-left: 20px;
}

.instructions li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.footer {
    text-align: center;
    color: white;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .upload-section, .preview-section {
        max-width: 100%;
    }
    
    .header h1 {
        font-size: 2.2rem;
    }
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
