/* ========================================
   Clean Professional Resume Template CSS
   Inspired by Olivia Wilson Design
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Helvetica Neue', sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    padding: 20px;
    margin: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   Main Container
   ======================================== */
.resume-builder-container {
    max-width: 1400px;
    width: 95vw;
    height: 92vh;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    gap: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ========================================
   Form Section (Left Panel)
   ======================================== */
.form-section {
    width: 450px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    padding: 32px 28px;
    overflow-y: auto;
    border-right: 2px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.form-section h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 24px;
    text-align: center;
}

.form-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #475569;
    margin-top: 28px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   Form Groups & Inputs
   ======================================== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 7px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s;
    font-family: inherit;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-top: 5px;
}

/* ========================================
   Color Picker
   ======================================== */
.theme-color-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.theme-color-section label {
    color: white !important;
    font-size: 14px;
    margin-bottom: 12px;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 8px;
}

.color-input {
    width: 60px;
    height: 40px;
    border: 3px solid white;
    border-radius: 8px;
    cursor: pointer;
}

.color-label {
    flex: 1;
    color: white;
    font-size: 13px;
    font-weight: 500;
}

.reset-color-btn {
    padding: 6px 14px;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.reset-color-btn:hover {
    background: #f1f5f9;
    transform: scale(1.05);
}

/* ========================================
   Dynamic Item Containers
   ======================================== */
.skill-item,
.project-item,
.education-item,
.experience-item,
.award-item {
    padding: 18px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 16px;
    position: relative;
}

.skill-item:hover,
.project-item:hover,
.education-item:hover,
.experience-item:hover,
.award-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ========================================
   Add & Remove Buttons
   ======================================== */
.add-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 16px;
    transition: all 0.3s;
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.remove-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.remove-btn:hover {
    background: #dc2626;
    transform: scale(1.05);
}

/* ========================================
   Action Buttons
   ======================================== */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid #e2e8f0;
}

.sample-data-btn,
.download-btn {
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.sample-data-btn {
    background: white;
    color: #475569;
    border: 2px solid #cbd5e1;
}

.sample-data-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    transform: translateY(-2px);
}

.download-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

/* ========================================
   Preview Section (Right Panel)
   ======================================== */
.preview-section {
    flex: 1;
    background: #e5e7eb;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    overflow: hidden;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: white;
    border-bottom: 2px solid #e2e8f0;
    flex-shrink: 0;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 850px;
    margin-bottom: 20px;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.preview-header h2 {
    color: #2d3748;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.preview-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-header-primary,
.btn-header-secondary,
.btn-header-success {
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.btn-header-primary {
    background: #667eea;
    color: white;
}

.btn-header-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-header-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-header-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-2px);
}

.btn-header-success {
    background: #48bb78;
    color: white;
}

.btn-header-success:hover {
    background: #38a169;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

.preview-container {
    width: 100%;
    max-width: 850px;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 8px 8px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    margin-bottom: 0;
}

/* ========================================
   Resume Preview
   ======================================== */
.resume-preview {
    width: 100%;
    min-height: auto;
    background: white;
    padding: 60px 70px 0 70px;
    font-family: 'Arial', sans-serif;
    color: #000;
    height: fit-content;
}

/* Header Section */
.resume-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
}

.resume-header h1 {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0 0 8px 0;
    color: #000;
    text-transform: uppercase;
}

.contact-line {
    font-size: 12px;
    color: #666;
    margin: 5px 0;
    letter-spacing: 0.5px;
}

.job-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 3px;
    margin: 10px 0 0 0;
    color: #000;
    text-transform: uppercase;
}

/* Section Styling */
.resume-section {
    margin-bottom: 25px;
}

.section-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: #a3c9d4;
    color: #000;
    padding: 10px 15px;
    margin-bottom: 15px;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 0 15px;
}

.skills-column {
    list-style: none;
    padding: 0;
}

.skills-column li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.6;
}

.skills-column li:before {
    content: "•";
    position: absolute;
    left: 5px;
    font-weight: bold;
}

/* Entry Headers (Projects, Education, Experience) */
.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 20px;
}

.entry-header > div:first-child {
    flex: 1;
}

.entry-header strong {
    font-size: 14px;
    font-weight: 700;
    color: #000;
}

.entry-date {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    font-style: italic;
}

/* Project Entry */
.project-entry {
    margin-bottom: 20px;
    padding: 0 15px;
}

.project-entry ul {
    margin: 5px 0 0 20px;
    padding: 0;
}

.project-entry ul li {
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 5px;
    color: #333;
}

/* Education Entry */
.education-entry {
    margin-bottom: 20px;
    padding: 0 15px;
}

.education-entry ul {
    margin: 5px 0 0 20px;
    padding: 0;
}

.education-entry ul li {
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 5px;
    color: #333;
}

/* Experience Entry */
.experience-entry {
    margin-bottom: 20px;
    padding: 0 15px;
}

.experience-entry ul {
    margin: 5px 0 0 20px;
    padding: 0;
}

.experience-entry ul li {
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 5px;
    color: #333;
}

/* Awards List */
.awards-list {
    margin: 0;
    padding: 0 15px 0 35px;
}

.awards-list li {
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 8px;
    color: #333;
}

/* ========================================
   Scrollbar Styling
   ======================================== */
.form-section::-webkit-scrollbar,
.preview-section::-webkit-scrollbar {
    width: 10px;
}

.form-section::-webkit-scrollbar-track,
.preview-section::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.form-section::-webkit-scrollbar-thumb,
.preview-section::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

.form-section::-webkit-scrollbar-thumb:hover,
.preview-section::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ========================================
   Mobile Responsive Design
   ======================================== */
@media (max-width: 1200px) {
    .resume-builder-container {
        width: 98vw;
        height: 95vh;
    }

    .form-section {
        width: 400px;
        padding: 24px 20px;
    }

    .resume-template {
        width: 190mm;
    }
}

/* ========================================
   Responsive Design - Mobile
   ======================================== */
@media (max-width: 968px) {
    body {
        padding: 10px;
        overflow: auto;
    }

    .resume-builder-container {
        flex-direction: column;
        width: 100%;
        height: auto;
        min-height: 100vh;
        border-radius: 8px;
    }

    .form-section {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid #e2e8f0;
        padding: 24px 16px;
        max-height: none;
        overflow-y: visible;
    }

    .form-section h2 {
        font-size: 22px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .preview-section {
        width: 100%;
    }

    .preview-header {
        padding: 16px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .preview-header h2 {
        font-size: 18px;
        width: 100%;
    }

    .preview-actions {
        width: 100%;
        flex-direction: column;
    }

    .btn-header-secondary,
    .btn-header-success {
        width: 100%;
    }

    .resume-preview {
        padding: 16px;
    }

    .resume-template {
        width: 100%;
        min-height: auto;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    }

    .resume-header {
        padding: 32px 24px;
    }

    .resume-header h1 {
        font-size: 28px;
    }

    .job-title {
        font-size: 16px;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .entry-header {
        flex-direction: column;
        gap: 5px;
    }

    .entry-date {
        white-space: normal;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .form-section {
        padding: 20px 12px;
    }

    .resume-header {
        padding: 24px 16px;
    }

    .resume-header h1 {
        font-size: 24px;
        letter-spacing: 1px;
    }

    .job-title {
        font-size: 14px;
        letter-spacing: 2px;
    }

    .section-title {
        font-size: 12px;
        padding: 8px 12px;
    }

    .project-entry,
    .education-entry,
    .experience-entry {
        padding: 0 10px;
    }

    .awards-list {
        padding: 0 10px 0 25px;
    }

    .resume-preview {
        padding: 20px 15px;
    }

    .color-picker-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .color-input {
        width: 100%;
    }

    .reset-color-btn {
        width: 100%;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .resume-builder-container {
        display: block;
        box-shadow: none;
        border-radius: 0;
    }

    .form-section {
        display: none;
    }

    .preview-section {
        background: white;
        padding: 0;
    }

    .preview-container {
        box-shadow: none;
    }

    .resume-preview {
        min-height: auto;
    }
}
