* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #4472C4 0%, #5e7dd3 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.95;
}

main {
    padding: 40px 30px;
}

.upload-section {
    margin-bottom: 30px;
}

.upload-box {
    border: 3px dashed #ddd;
    border-radius: 15px;
    padding: 50px 30px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-box:hover {
    border-color: #4472C4;
    background: #f0f4ff;
}

.upload-box.dragover {
    border-color: #4472C4;
    background: #e8f0ff;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4em;
    margin-bottom: 15px;
}

.upload-box h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.upload-box p {
    color: #666;
    margin-bottom: 10px;
}

.file-hint {
    font-size: 0.9em;
    color: #999;
    margin-bottom: 20px !important;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

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

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

.btn-primary {
    background: #4472C4;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #3661b3;
}

.btn-success {
    background: #28a745;
    color: white;
    font-size: 1.2em;
    padding: 15px 40px;
    width: 100%;
    max-width: 300px;
}

.btn-success:hover:not(:disabled) {
    background: #218838;
}

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

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

.btn-download {
    background: #17a2b8;
    color: white;
    font-size: 1.1em;
}

.btn-download:hover {
    background: #138496;
}

.file-info {
    background: #e8f5e9;
    border: 2px solid #4caf50;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.file-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #2e7d32;
}

.file-icon {
    font-size: 1.5em;
}

.action-section {
    text-align: center;
    margin: 30px 0;
}

.loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4472C4;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.result-section {
    margin: 30px 0;
}

.result-box {
    border-radius: 15px;
    padding: 40px;
    text-align: center;
}

.result-box.success {
    background: #d4edda;
    border: 2px solid #28a745;
}

.result-box.error {
    background: #f8d7da;
    border: 2px solid #dc3545;
}

.result-icon {
    font-size: 4em;
    margin-bottom: 15px;
}

.result-box h3 {
    margin-bottom: 15px;
    font-size: 1.8em;
}

.result-box p {
    margin-bottom: 20px;
    font-size: 1.1em;
    color: #555;
}

.info-section {
    margin-top: 50px;
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
}

.info-section h3 {
    color: #4472C4;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.info-content {
    display: grid;
    gap: 20px;
}

.info-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #4472C4;
}

.info-item strong {
    display: block;
    color: #4472C4;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.info-item p {
    color: #666;
    margin-bottom: 10px;
}

.info-item code {
    background: #f1f3f5;
    padding: 8px 12px;
    border-radius: 5px;
    display: inline-block;
    font-family: 'Courier New', monospace;
    color: #e83e8c;
    font-size: 0.9em;
}

.template-section {
    margin-top: 30px;
}

.template-section h4 {
    color: #4472C4;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.template-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.template-table thead {
    background: #4472C4;
    color: white;
}

.template-table th,
.template-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.template-table th {
    font-weight: 600;
}

.template-table .placeholder {
    text-align: center;
    color: #999;
    font-style: italic;
}

footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    color: #666;
    border-top: 1px solid #e9ecef;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    
    .container {
        border-radius: 0;
    }
    
    main {
        padding: 30px 20px;
    }
    
    .upload-box {
        padding: 40px 20px;
    }
    
    .file-info {
        flex-direction: column;
        gap: 15px;
    }
}

