/* 

:root {
    --editor-bg: #111827;
    --editor-section-bg: #ffffff;
    --ai-purple: #a855f7;
    --modern-blue: #2563eb;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body { font-family: 'Inter', sans-serif; background-color: #f3f4f6; overflow: hidden; }

.app-container { display: flex; height: 100vh; } */

/* EDITOR UI */
/* .editor-panel { width: 420px; background: var(--editor-bg); color: white; display: flex; flex-direction: column; }
.editor-header { padding: 20px; border-bottom: 1px solid #374151; }
.highlight { color: #60a5fa; }
.form-container { flex: 1; overflow-y: auto; padding: 20px; }
.form-section { background: white; padding: 15px; border-radius: 8px; margin-bottom: 15px; color: #374151; }
.form-section h3 { font-size: 0.75rem; color: #6b7280; margin-bottom: 10px; text-transform: uppercase; }

.template-selector { display: flex; gap: 8px; margin-bottom: 5px; }
.tpl-btn { flex: 1; padding: 8px; background: #374151; border: 2px solid transparent; color: white; cursor: pointer; border-radius: 4px; font-weight: 600; }
.tpl-btn.active { border-color: #60a5fa; background: #1f2937; }

.ai-btn { background: var(--ai-purple); color: white; border: none; padding: 5px 10px; border-radius: 4px; cursor: pointer; font-size: 0.7rem; float: right; }
.section-header-ai { display: flex; justify-content: space-between; align-items: center; }

input, textarea { width: 100%; padding: 8px; margin-bottom: 8px; border: 1px solid #d1d5db; border-radius: 4px; font-family: inherit; }
.row-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.download-btn { background: #60a5fa; color: white; border: none; padding: 15px; margin: 20px; cursor: pointer; border-radius: 8px; font-weight: bold; } */

/* PREVIEW AREA */
/* .preview-panel { flex: 1; background: #e5e7eb; overflow-y: auto; padding: 40px; display: flex; justify-content: center; }
#resumePreview { width: 210mm; min-height: 297mm; background: white; padding: 50px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); } */

/* --- TEMPLATE: EXECUTIVE --- */
/* .template-executive { font-family: "Times New Roman", Times, serif; color: black; text-align: center; }
.template-executive .contact-line { justify-content: center; border-top: 1px solid black; padding-top: 5px; gap: 15px; display: flex; font-size: 0.9rem; }
.template-executive .section-divider { height: 1px; background: black; margin: 5px 0 15px 0; }
.template-executive .resume-section { text-align: left; margin-bottom: 20px; }
.template-executive h1 { font-size: 2.5rem; text-transform: uppercase; } */

/* --- TEMPLATE: MODERN --- */
/* .template-modern { font-family: 'Inter', sans-serif; text-align: left; color: #334155; }
.template-modern h1 { font-family: 'Poppins', sans-serif; color: var(--modern-blue); font-size: 2.8rem; line-height: 1; }
.template-modern .section-title { color: var(--modern-blue); font-weight: 600; letter-spacing: 1px; }
.template-modern .section-divider { height: 4px; width: 40px; background: var(--modern-blue); margin: 5px 0 15px 0; }
.template-modern .contact-line { display: flex; gap: 15px; font-size: 0.85rem; color: #64748b; margin-top: 10px; } */

/* SHARED PREVIEW ELEMENTS */
/* .bullet-list { margin-left: 20px; font-size: 0.95rem; line-height: 1.5; margin-bottom: 15px; }
.skills-grid { display: flex; flex-wrap: wrap; gap: 5px; }
.skill-tag { border: 1px solid #cbd5e1; padding: 2px 8px; border-radius: 4px; font-size: 0.85rem; } */
/* .dual-column-section { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; } */

/* @media print {
    .editor-panel { display: none; }
    .preview-panel { padding: 0; background: white; }
    #resumePreview { box-shadow: none; width: 100%; }
} */
/* :root {
    --editor-bg: #111827;
    --editor-section-bg: #ffffff;
    --ai-purple: #a855f7;
    --modern-blue: #2563eb;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background-color: #f3f4f6; overflow: hidden; }
.app-container { display: flex; height: 100vh; }

/* EDITOR UI */
/* .editor-panel { width: 420px; background: var(--editor-bg); color: white; display: flex; flex-direction: column; }
.editor-header { padding: 20px; border-bottom: 1px solid #374151; }
.highlight { color: #60a5fa; }
.form-container { flex: 1; overflow-y: auto; padding: 20px; }
.form-section { background: white; padding: 15px; border-radius: 8px; margin-bottom: 15px; color: #374151; }
.form-section h3 { font-size: 0.75rem; color: #6b7280; margin-bottom: 10px; text-transform: uppercase; } */
/* 
.template-selector { display: flex; gap: 8px; }
.tpl-btn { flex: 1; padding: 8px; background: #374151; border: 2px solid transparent; color: white; cursor: pointer; border-radius: 4px; }
.tpl-btn.active { border-color: #60a5fa; background: #1f2937; }

.ai-btn { background: var(--ai-purple); color: white; border: none; padding: 4px 8px; border-radius: 4px; cursor: pointer; font-size: 0.65rem; }
.section-header-ai { display: flex; justify-content: space-between; align-items: center; }

input, textarea { width: 100%; padding: 8px; margin-bottom: 8px; border: 1px solid #d1d5db; border-radius: 4px; font-family: inherit; font-size: 0.85rem; }
.row-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.download-btn { background: #60a5fa; color: white; border: none; padding: 15px; margin: 20px; cursor: pointer; border-radius: 8px; font-weight: bold; } */

/* PREVIEW AREA */
/* .preview-panel { flex: 1; background: #e5e7eb; overflow-y: auto; padding: 40px; display: flex; justify-content: center; }
#resumePreview { width: 210mm; min-height: 297mm; background: white; padding: 40px 50px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); } */

/* EXECUTIVE TEMPLATE */
/* .template-executive { font-family: "Times New Roman", Times, serif; color: #000; text-align: center; }
.template-executive .contact-line { justify-content: center; border-top: 1px solid #000; padding-top: 5px; gap: 15px; display: flex; font-size: 0.85rem; }
.template-executive .section-divider { height: 1px; background: #000; margin: 2px 0 10px 0; }
.template-executive .resume-section { text-align: left; margin-bottom: 15px; }
.template-executive h1 { font-size: 2.2rem; text-transform: uppercase; }
.template-executive .edu-text { font-style: italic; } */

/* MODERN TEMPLATE
.template-modern { font-family: 'Inter', sans-serif; text-align: left; color: #334155; }
.template-modern h1 { font-family: 'Poppins', sans-serif; color: var(--modern-blue); font-size: 2.5rem; line-height: 1; }
.template-modern .section-title { color: var(--modern-blue); font-weight: 600; font-size: 1rem; }
.template-modern .section-divider { height: 3px; width: 35px; background: var(--modern-blue); margin: 4px 0 12px 0; }
.template-modern .contact-line { display: flex; gap: 12px; font-size: 0.8rem; color: #64748b; margin-top: 8px; }
.template-modern .skill-tag { background: #eff6ff; color: #1e40af; border: none; font-weight: 500; } */

/* SHARED */
/* .bullet-list { margin-left: 18px; font-size: 0.9rem; line-height: 1.4; }
.skills-grid { display: flex; flex-wrap: wrap; gap: 4px; }
.skill-tag { border: 1px solid #cbd5e1; padding: 1px 6px; border-radius: 3px; font-size: 0.75rem; }
.dual-column-section { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; } */

/* @media print { */
    /* .editor-panel { display: none; }
    .preview-panel { padding: 0; background: white; }
    #resumePreview { box-shadow: none; width: 100%; padding: 20px; }
} */ 
:root {
    --editor-bg: #111827;
    --editor-section-bg: #ffffff;
    --ai-purple: #a855f7;
    --modern-blue: #2563eb;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body { 
    font-family: 'Inter', sans-serif; 
    background-color: #f3f4f6; 
    /* Removed overflow: hidden so mobile users can scroll */
}

.app-container { 
    display: flex; 
    height: 100vh; 
}

/* EDITOR UI */
.editor-panel { 
    width: 420px; 
    min-width: 320px;
    background: var(--editor-bg); 
    color: white; 
    display: flex; 
    flex-direction: column; 
    flex-shrink: 0; /* Prevents the editor from squishing */
}

.editor-header { padding: 20px; border-bottom: 1px solid #374151; }
.highlight { color: #60a5fa; }

.form-container { 
    flex: 1; 
    overflow-y: auto; 
    padding: 20px; 
}

.form-section { background: white; padding: 15px; border-radius: 8px; margin-bottom: 15px; color: #374151; }
.form-section h3 { font-size: 0.75rem; color: #6b7280; margin-bottom: 10px; text-transform: uppercase; }

.template-selector { display: flex; gap: 8px; }
.tpl-btn { flex: 1; padding: 8px; background: #374151; border: 2px solid transparent; color: white; cursor: pointer; border-radius: 4px; }
.tpl-btn.active { border-color: #60a5fa; background: #1f2937; }

.ai-btn { background: var(--ai-purple); color: white; border: none; padding: 4px 8px; border-radius: 4px; cursor: pointer; font-size: 0.65rem; }
.section-header-ai { display: flex; justify-content: space-between; align-items: center; }

input, textarea { width: 100%; padding: 8px; margin-bottom: 8px; border: 1px solid #d1d5db; border-radius: 4px; font-family: inherit; font-size: 0.85rem; }
.row-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.download-btn { background: #60a5fa; color: white; border: none; padding: 15px; margin: 20px; cursor: pointer; border-radius: 8px; font-weight: bold; }

/* PREVIEW AREA */
.preview-panel { 
    flex: 1; 
    background: #e5e7eb; 
    overflow-y: auto; 
    padding: 40px; 
    display: flex; 
    justify-content: center; 
}

/* Base Resume Size */
#resumePreview { 
    width: 210mm; 
    min-height: 297mm; 
    background: white; 
    padding: 40px 50px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); 
    transform-origin: top center; /* Critical for scaling on mobile */
}

/* --- RESPONSIVE ADJUSTMENTS --- */

@media (max-width: 1024px) {
    .app-container {
        flex-direction: column; /* Stack Editor on top of Preview */
        height: auto;
    }

    .editor-panel {
        width: 100%;
        height: 600px; /* Give it a fixed height on mobile or use auto */
    }

    .preview-panel {
        padding: 20px 10px;
        overflow-x: hidden; /* Prevent horizontal scroll */
    }

    /* This trick scales the A4 page down to fit small screens */
    #resumePreview {
        zoom: 0.45; /* Quick fix for mobile browsers */
        -moz-transform: scale(0.45); /* Firefox */
        width: 210mm;
    }
}

@media (max-width: 600px) {
    #resumePreview {
        zoom: 0.35; /* Even smaller for phones */
        -moz-transform: scale(0.35);
    }
    
    .row-inputs {
        grid-template-columns: 1fr; /* Stack email/phone on phones */
    }
}

/* TEMPLATE STYLES (Keep these as they were) */
.template-executive { font-family: "Times New Roman", Times, serif; color: #000; text-align: center; }
.template-executive .contact-line { justify-content: center; border-top: 1px solid #000; padding-top: 5px; gap: 15px; display: flex; font-size: 0.85rem; }
.template-executive .section-divider { height: 1px; background: #000; margin: 2px 0 10px 0; }
.template-executive .resume-section { text-align: left; margin-bottom: 15px; }
.template-executive h1 { font-size: 2.2rem; text-transform: uppercase; }
.template-executive .edu-text { font-style: italic; }

.template-modern { font-family: 'Inter', sans-serif; text-align: left; color: #334155; }
.template-modern h1 { font-family: 'Poppins', sans-serif; color: var(--modern-blue); font-size: 2.5rem; line-height: 1; }
.template-modern .section-title { color: var(--modern-blue); font-weight: 600; font-size: 1rem; }
.template-modern .section-divider { height: 3px; width: 35px; background: var(--modern-blue); margin: 4px 0 12px 0; }
.template-modern .contact-line { display: flex; gap: 12px; font-size: 0.8rem; color: #64748b; margin-top: 8px; }

.bullet-list { margin-left: 18px; font-size: 0.9rem; line-height: 1.4; }
.skills-grid { display: flex; flex-wrap: wrap; gap: 4px; }
.skill-tag { border: 1px solid #cbd5e1; padding: 1px 6px; border-radius: 3px; font-size: 0.75rem; }
.dual-column-section { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

@media print {
    .editor-panel { display: none !important; }
    .preview-panel { padding: 0; background: white; overflow: visible; }
    #resumePreview { 
        box-shadow: none; 
        width: 100%; 
        padding: 0; 
        zoom: 1 !important; 
        transform: scale(1) !important;
    }
}