* {
    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;
    padding: 20px;
}

.container {
    max-width: 1200px;
    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, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

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

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

form {
    padding: 40px;
}

.form-section {
    margin-bottom: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
    border-left: 5px solid #667eea;
}

.load-cv-section {
    margin: 20px 40px;
    background: #fff3cd;
    border-left: 5px solid #ffc107;
}

.contact-info-section {
    background: #d1ecf1;
    border-left: 5px solid #17a2b8;
}

.contact-info-section .info-note {
    background: white;
    border: 2px solid #17a2b8;
}

.form-section h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
}

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

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

.info-note {
    background: #e7f3ff;
    border: 2px solid #2196F3;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.info-note p {
    margin: 5px 0;
    color: #333;
    font-size: 14px;
}

.info-note strong {
    color: #2196F3;
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.skill-entry {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    position: relative;
    border: 1px solid #e0e0e0;
}

.experience-entry {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    position: relative;
    border: 2px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.experience-entry:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.experience-entry:first-child {
    margin-top: 0;
}

.experience-entry .form-row {
    margin-bottom: 15px;
}

.experience-entry .form-group label {
    color: #667eea;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.experience-entry textarea {
    min-height: 120px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

.experience-entry .btn-remove {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 20px;
}

.experience-entry hr {
    display: none;
}

.soft-skill-entry {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.soft-skill-entry input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}

.btn-add {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-add:hover {
    background: #218838;
}

.btn-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

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

.form-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 48px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 16px 48px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: background 0.3s;
}

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

.results-section {
    padding: 40px;
    background: #f8f9fa;
    border-top: 3px solid #667eea;
}

.results-section h2 {
    color: #28a745;
    margin-bottom: 30px;
    text-align: center;
}

.result-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
}

.btn-download {
    background: #007bff;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-download:hover {
    background: #0056b3;
}

.yaml-preview {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
}

.yaml-preview h3 {
    margin-bottom: 15px;
    color: #667eea;
}

.yaml-preview pre {
    background: #f4f4f4;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    max-height: 400px;
    overflow-y: auto;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #667eea;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    animation: spin 1s linear infinite;
}

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

.loading-overlay p {
    color: white;
    font-size: 20px;
    margin-top: 20px;
}

hr {
    border: none;
    border-top: 2px solid #e0e0e0;
    margin: 20px 0;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 2px solid #ffc107;
}

.divider span {
    padding: 0 15px;
    color: #856404;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1px;
}

/* File Upload Container */
.file-upload-container {
    position: relative;
    border: 3px dashed #ffc107;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: rgba(255, 193, 7, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-container:hover {
    border-color: #ff9800;
    background: rgba(255, 193, 7, 0.2);
    transform: translateY(-2px);
}

.file-upload-container input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-info p {
    margin: 8px 0;
    color: #856404;
}

.file-upload-info p:first-child {
    font-size: 18px;
    font-weight: 600;
}

.file-upload-note {
    font-size: 13px;
    opacity: 0.8;
}

/* Upload Status */
.upload-status {
    margin-top: 15px;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
}

.upload-status.success {
    background: rgba(76, 175, 80, 0.2);
    border: 2px solid rgba(76, 175, 80, 0.5);
    color: #2e7d32;
}

.upload-status.error {
    background: rgba(244, 67, 54, 0.2);
    border: 2px solid rgba(244, 67, 54, 0.5);
    color: #c62828;
}

.upload-status.processing {
    background: rgba(33, 150, 243, 0.2);
    border: 2px solid rgba(33, 150, 243, 0.5);
    color: #1565c0;
}

/* Searchable Select Container */
.searchable-select-container {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border: 2px solid #ffc107;
    border-radius: 8px 8px 0 0;
    font-size: 14px;
    background: white;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #ff9800;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

.searchable-select-container select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #ffc107;
    border-top: none;
    border-radius: 0 0 8px 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.searchable-select-container select:focus {
    outline: none;
    border-color: #ff9800;
}

.searchable-select-container select option {
    padding: 10px;
}

.searchable-select-container select option:hover {
    background: #fff3cd;
}

/* Highlight matching text */
.searchable-select-container select option[data-match="true"] {
    background: #fff3cd;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    .form-actions,
    .result-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-download {
        width: 100%;
    }
}
