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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

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

main {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.form-section {
    margin-bottom: 40px;
    padding: 25px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #fafafa;
}

.form-section h2 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.4rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.file-upload-area {
    margin-top: 20px;
}

.upload-zone {
    border: 3px dashed #cbd5e0;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.upload-zone:hover {
    border-color: #667eea;
    background: #f7fafc;
}

.upload-zone.dragover {
    border-color: #667eea;
    background: #edf2f7;
    transform: scale(1.02);
}

.upload-zone i {
    font-size: 3rem;
    color: #a0aec0;
    margin-bottom: 15px;
}

.upload-zone p {
    color: #718096;
    font-size: 1.1rem;
}

.upload-zone input[type="file"] {
    display: none;
}

.file-list {
    margin-top: 20px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 10px;
}

.file-item .file-info {
    display: flex;
    align-items: center;
}

.file-item .file-info i {
    margin-right: 10px;
    color: #667eea;
}

.file-item .remove-btn {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.file-item .remove-btn:hover {
    background: #c53030;
}

.actions {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e2e8f0;
}

.btn-primary,
.btn-secondary {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin: 0 10px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

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

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

.btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin: 0 10px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-template {
    background: linear-gradient(135deg, #6f42c1, #5a2d91);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin: 5px;
    min-width: 150px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-body pre {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid #e9ecef;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 20px;
    }
    
    .form-section {
        padding: 15px;
    }
    
    .btn-primary,
    .btn-secondary {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Template Section */
.template-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #6f42c1;
}

.template-section h3 {
    color: #495057;
    margin-bottom: 10px;
}

.template-section p {
    color: #6c757d;
    margin-bottom: 15px;
}

.template-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* Validation Styles */
.validation-report {
    text-align: left;
}

.validation-success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.validation-error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.validation-section {
    margin-bottom: 20px;
}

.validation-section h4 {
    margin-bottom: 10px;
    color: #495057;
}

.validation-section ul {
    margin: 0;
    padding-left: 20px;
}

.error-item {
    color: #dc3545;
    margin-bottom: 5px;
}

.warning-item {
    color: #fd7e14;
    margin-bottom: 5px;
}

.info-item {
    color: #17a2b8;
    margin-bottom: 5px;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

/* Template Info */
.template-info {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 15px;
}

.template-info h4 {
    color: #495057;
    margin-bottom: 8px;
}

.template-info p {
    color: #6c757d;
    margin-bottom: 10px;
}

.template-files {
    background: white;
    padding: 10px;
    border-radius: 3px;
    border: 1px solid #dee2e6;
}

.template-files h5 {
    margin-bottom: 8px;
    color: #495057;
}

.template-files ul {
    margin: 0;
    padding-left: 20px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.template-files li {
    color: #6c757d;
    margin-bottom: 3px;
}

.success-message {
    background: #48bb78;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    font-weight: 600;
}

.error-message {
    background: #e53e3e;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    font-weight: 600;
}