/* Resume Maker CSS */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.resume-maker-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.resume-header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.resume-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.resume-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.controls-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-group label {
    font-weight: 600;
    color: #333;
    min-width: 80px;
}

.control-group select,
.control-group input[type="color"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
}

.control-group select {
    min-width: 120px;
}

.control-group input[type="color"] {
    width: 50px;
    height: 40px;
    cursor: pointer;
    border: none;
}

.action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.download-btn {
    background: #27ae60;
    color: white;
}

.download-btn:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.image-btn {
    background: #e74c3c;
    color: white;
}

.image-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.print-btn {
    background: #3498db;
    color: white;
}

.print-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.preview-btn-mobile {
    display: none;
    padding: 10px 20px;
    background: #f39c12;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
}

.resume-maker-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

.form-section {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    max-height: 85vh;
    overflow-y: auto;
}

.preview-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    max-height: 85vh;
    overflow-y: auto;
}

.preview-container {
    width: 100%;
    max-width: 210mm;
    aspect-ratio: 210 / 297;
}

.form-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ecf0f1;
}

.form-group:last-child {
    border-bottom: none;
}

.form-title {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.add-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.add-btn:hover {
    background: #2980b9;
}

.form-input,
.skill-input,
.exp-job-title,
.exp-company,
.exp-description,
.exp-current,
.edu-degree,
.edu-field,
.edu-institution,
.edu-grade,
.cert-name,
.cert-issuer,
.cert-date,
.link-label,
.link-url {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #bdc3c7;
    border-radius: 5px;
    font-size: 14px;
    margin-bottom: 10px;
    font-family: inherit;
}

.form-input:focus,
.skill-input:focus,
.exp-job-title:focus,
.exp-company:focus,
.exp-description:focus,
.edu-degree:focus,
.edu-field:focus,
.edu-institution:focus,
.edu-grade:focus,
.cert-name:focus,
.cert-issuer:focus,
.cert-date:focus,
.link-label:focus,
.link-url:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.skill-input-group {
    margin-bottom: 10px;
}

.skill-input-group > div {
    position: relative;
}

.experience-item,
.education-item,
.cert-item,
.link-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 12px;
    position: relative;
}

.date-range {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.date-range input {
    flex: 1;
    padding: 8px;
    border: 1px solid #bdc3c7;
    border-radius: 3px;
    font-size: 14px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    cursor: pointer;
    white-space: nowrap;
}

.checkbox-label input {
    margin: 0;
    width: auto;
    padding: 0;
}

.delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #e74c3c;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.delete-btn:hover {
    background: #c0392b;
}

/* Resume Preview Styles */
.resume-preview {
    width: 100%;
    height: 100%;
    padding: 40px;
    background: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    page-break-after: always;
    font-size: 12px;
    line-height: 1.4;
}

.resume-header-section {
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 3px solid #333;
}

.resume-full-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.resume-job-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.resume-contact-info {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 11px;
}

.resume-contact-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.resume-section {
    margin-bottom: 12px;
}

.resume-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid #333;
}

.resume-section-content {
    font-size: 11px;
}

.resume-item {
    margin-bottom: 8px;
}

.resume-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 3px;
}

.resume-item-title {
    font-weight: 700;
}

.resume-item-subtitle {
    font-weight: 600;
    font-style: italic;
}

.resume-item-meta {
    font-size: 10px;
    color: #666;
}

.resume-item-description {
    margin-top: 3px;
    line-height: 1.3;
}

.resume-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    background: #ecf0f1;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
}

.resume-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 10px;
}

.resume-links a {
    color: #3498db;
    text-decoration: none;
}

.resume-links a:hover {
    text-decoration: underline;
}

/* Template Styles */
.resume-preview.modern {
    background: linear-gradient(to bottom, #f8f9fa 0%, white 20%);
}

.resume-preview.modern .resume-section-title {
    border-left: 4px solid #3498db;
    padding-left: 10px;
    border-bottom: none;
}

.resume-preview.classic {
    background: white;
}

.resume-preview.classic .resume-header-section {
    border-bottom: 2px solid #34495e;
}

.resume-preview.classic .resume-section-title {
    color: #34495e;
}

.resume-preview.creative {
    background: linear-gradient(to bottom, white 0%, #f0f4f8 100%);
}

.resume-preview.creative .resume-full-name {
    color: #e74c3c;
}

.resume-preview.creative .resume-section-title {
    border-left: 3px solid #e74c3c;
    padding-left: 8px;
    border-bottom: none;
}

.resume-preview.minimal {
    padding: 35px 30px;
}

.resume-preview.minimal .resume-header-section {
    border-bottom: 1px solid #ddd;
}

.resume-preview.minimal .resume-section-title {
    border-bottom: 1px solid #ddd;
    font-weight: 600;
}

.resume-preview.professional {
    background: white;
}

.resume-preview.professional .resume-header-section {
    background: #2c3e50;
    color: white;
    padding: 12px;
    margin: -40px -40px 15px -40px;
}

.resume-preview.professional .resume-full-name,
.resume-preview.professional .resume-job-title {
    color: white;
}

.resume-preview.professional .resume-contact-item {
    color: white;
}

.resume-preview.professional .resume-section-title {
    background: #34495e;
    color: white;
    padding: 8px 12px;
    margin-left: -40px;
    margin-right: -40px;
    padding-left: 50px;
    border: none;
}

/* Mobile Responsive */
.preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.preview-modal.active {
    display: flex;
}

.preview-modal-content {
    background: white;
    width: 95%;
    height: 95vh;
    border-radius: 10px;
    position: relative;
    overflow: auto;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #e74c3c;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
}

.close-btn:hover {
    background: #c0392b;
}

.modal-resume-preview {
    width: 100%;
    height: 100%;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.modal-resume-preview .resume-preview {
    box-shadow: none;
    max-width: 100%;
}

@media (max-width: 1200px) {
    .resume-maker-layout {
        grid-template-columns: 1fr;
    }

    .preview-btn-mobile {
        display: inline-block;
    }

    .preview-section {
        display: none;
    }
}

@media (max-width: 768px) {
    .resume-maker-container {
        padding: 10px;
    }

    .resume-header h1 {
        font-size: 1.8rem;
    }

    .controls-bar {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    .control-group {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .control-group select,
    .action-btn,
    .preview-btn-mobile {
        width: 100%;
    }

    .form-section {
        padding: 15px;
        max-height: none;
    }

    .resume-preview {
        padding: 25px;
        font-size: 11px;
    }

    .resume-full-name {
        font-size: 18px;
    }
}

/* Scrollbar Styling */
.form-section::-webkit-scrollbar,
.preview-section::-webkit-scrollbar,
.preview-modal-content::-webkit-scrollbar {
    width: 8px;
}

.form-section::-webkit-scrollbar-track,
.preview-section::-webkit-scrollbar-track,
.preview-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.form-section::-webkit-scrollbar-thumb,
.preview-section::-webkit-scrollbar-thumb,
.preview-modal-content::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 10px;
}

.form-section::-webkit-scrollbar-thumb:hover,
.preview-section::-webkit-scrollbar-thumb:hover,
.preview-modal-content::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* Print Styles */
@media print {
    .resume-maker-container {
        background: white;
        padding: 0;
    }

    .resume-header,
    .controls-bar {
        display: none;
    }

    .resume-maker-layout {
        display: block;
        max-width: 210mm;
        margin: 0;
    }

    .form-section,
    .preview-section {
        display: none;
    }

    .resume-preview {
        width: 210mm;
        height: 297mm;
        box-shadow: none;
        page-break-after: always;
    }
}
