/* =========================
 BASE STYLES
========================= */
.hcc-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.hcc-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.hcc-header h2 {
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.hcc-header .subtitle {
    color: #7f8c8d;
    font-size: 16px;
    max-width: 800px;
    margin: 0 auto;
}

/* Upload Section */
.hcc-upload-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.upload-area {
    border: 3px dashed #3498db;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    background: #f8fafc;
    transition: all 0.3s ease;
    position: relative;
}

.upload-area.dragover {
    border-color: #27ae60;
    background: #e8f5e9;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 48px;
    color: #3498db;
    margin-bottom: 20px;
}

.upload-area h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.upload-hint {
    color: #7f8c8d;
    margin-bottom: 20px;
    font-size: 14px;
}

.hcc-browse-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s ease;
}

.hcc-browse-btn:hover {
    background: #2980b9;
}

.file-info {
    margin-top: 20px;
    text-align: left;
}

.file-preview {
    margin-bottom: 10px;
    text-align: center;
}

.file-preview img {
    max-width: 100%;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.file-icon {
    font-size: 48px;
    color: #e74c3c;
}

.file-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.remove-btn {
    background: #e74c3c;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-tips {
    background: #fff9e6;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #f39c12;
}

.upload-tips h4 {
    color: #d35400;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.upload-tips li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
}

.upload-tips li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

/* Options Section */
.hcc-options-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.hcc-options-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #34495e;
}

.option-group select,
.option-group input[type="checkbox"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

/* Action Buttons */
.hcc-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}

.hcc-convert-btn {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    min-width: 250px;
}

.hcc-convert-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.hcc-convert-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.hcc-clear-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s ease;
}

.hcc-clear-btn:hover {
    background: #c0392b;
}

/* Progress Tracker */
.hcc-progress {
    background: white;
    padding: 25px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    margin-bottom: 30px;
}

.hcc-progress h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 30px;
}

.progress-steps:before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #95a5a6;
    margin-bottom: 10px;
}

.progress-step.loading .step-number {
    border-color: #3498db;
    color: #3498db;
    animation: pulse 2s infinite;
}

.progress-step.complete .step-number {
    background: #27ae60;
    border-color: #27ae60;
    color: white;
}

.progress-step.error .step-number {
    background: #e74c3c;
    border-color: #e74c3c;
    color: white;
}

.step-text {
    font-size: 12px;
    text-align: center;
    color: #7f8c8d;
    max-width: 100px;
}

.step-status {
    margin-top: 5px;
    font-size: 14px;
}

.progress-messages {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

#hcc_progress_message {
    margin: 0 0 10px 0;
    font-weight: 600;
    color: #2c3e50;
}

.progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    width: 0%;
    transition: width 0.5s ease;
}

/* Error Message */
.hcc-error {
    background: #ffeaea;
    border-left: 4px solid #e74c3c;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.error-content {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #c0392b;
}

/* Results Section */
.hcc-results {
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.results-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.cv-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.cv-action-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    background: #ecf0f1;
    color: #34495e;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.cv-action-btn.primary {
    background: #3498db;
    color: white;
}

.cv-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cv-preview {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
}

.full-cv-preview pre {
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

.cv-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cv-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.cv-section h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.personal-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-label {
    font-weight: 600;
    color: #7f8c8d;
    font-size: 12px;
    text-transform: uppercase;
}

.detail-value {
    color: #2c3e50;
    font-size: 14px;
}

.experience-item,
.education-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 3px solid #3498db;
}

.exp-header,
.edu-header {
    margin-bottom: 10px;
}

.exp-header h5,
.edu-header h5 {
    margin: 0 0 5px 0;
    color: #2c3e50;
}

.exp-meta,
.edu-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #7f8c8d;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.skill-category h6 {
    margin: 0 0 10px 0;
    color: #34495e;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
}

.skill-tag.language {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Raw text preview */
.raw-text-preview {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.raw-text-preview h5 {
    color: #bdc3c7;
    margin-bottom: 10px;
}

.raw-text-preview pre {
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 12px;
    line-height: 1.4;
    margin: 0;
}

/* Animations */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(52, 152, 219, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hcc-upload-section {
        grid-template-columns: 1fr;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .hcc-actions {
        flex-direction: column;
    }
    
    .cv-controls {
        flex-direction: column;
    }
    
    .progress-steps {
        flex-direction: column;
        gap: 20px;
    }
    
    .progress-steps:before {
        display: none;
    }
    
    .progress-step {
        flex-direction: row;
        gap: 15px;
    }
    
    .step-text {
        text-align: left;
        max-width: none;
    }
}