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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 40px auto;
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

h1 {
    color: #2d3748;
    font-size: 28px;
    margin-bottom: 8px;
    text-align: center;
}

.subtitle {
    color: #718096;
    text-align: center;
    margin-bottom: 30px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 600;
    font-size: 14px;
}

input[type="file"],
input[type="date"],
select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

input[type="file"]:focus,
input[type="date"]:focus,
select:focus {
    outline: none;
    border-color: #667eea;
}

small {
    display: block;
    margin-top: 5px;
    color: #a0aec0;
    font-size: 12px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    margin-top: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: #48bb78;
    color: white;
    margin: 10px 5px;
}

.btn-success:hover {
    background: #38a169;
}

.hidden {
    display: none;
}

#loading {
    text-align: center;
    padding: 40px 20px;
}

.spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

#loading p {
    color: #718096;
    font-size: 14px;
}

#result {
    text-align: center;
    padding: 30px 20px;
    background: #f0fff4;
    border-radius: 8px;
    margin-top: 20px;
}

#result h2 {
    color: #22543d;
    margin-bottom: 20px;
    font-size: 20px;
}

.download-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alert-error {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: 8px;
    padding: 16px;
    margin-top: 20px;
}

.alert-error strong {
    color: #c53030;
    display: block;
    margin-bottom: 5px;
}

.alert-error p {
    color: #742a2a;
    font-size: 14px;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}