/* EngiCV - Main Stylesheet */

:root {
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --secondary-color: #764ba2;
    --success-color: #48bb78;
    --error-color: #f56565;
    --warning-color: #ed8936;
    --gray-50: #f7fafc;
    --gray-100: #edf2f7;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e0;
    --gray-700: #4a5568;
    --gray-800: #2d3748;
    --gray-900: #1a202c;
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
}

/* Utility Classes */
.gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card Components */
.cv-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.cv-card:hover {
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
    transform: translateY(-4px);
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-800);
    padding: 10px 24px;
    border-radius: 8px;
    border: 1px solid var(--gray-300);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--gray-200);
}

/* Form Inputs */
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-700);
    font-size: 14px;
}

/* CV Builder Specific */
.builder-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
}

.add-item-btn {
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-item-btn:hover {
    background: var(--primary-dark);
}

/* Timeline for Experience/Education */
.timeline-item {
    position: relative;
    padding-left: 32px;
    padding-bottom: 24px;
    border-left: 2px solid var(--gray-200);
}

.timeline-item:last-child {
    border-left-color: transparent;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--primary-color);
}

/* Skill Tags */
.skill-tag {
    display: inline-block;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    color: var(--primary-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-right: 8px;
    margin-bottom: 8px;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 32px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Template Gallery */
.template-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.template-card:hover {
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
    transform: translateY(-6px);
}

.template-preview {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.template-info {
    padding: 20px;
}

.template-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.template-description {
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.6;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: rgba(72, 187, 120, 0.1);
    color: var(--success-color);
}

.badge-warning {
    background: rgba(237, 137, 54, 0.1);
    color: var(--warning-color);
}

.badge-error {
    background: rgba(245, 101, 101, 0.1);
    color: var(--error-color);
}

/* Responsive */
@media (max-width: 768px) {
    .cv-card {
        padding: 16px;
    }
    
    .builder-section {
        padding: 16px;
    }
    
    .modal-content {
        padding: 24px;
        width: 95%;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
    }
}
