/* ===== Minimalist Resume Builder - Styles ===== */

/* ===== CSS Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Core Colors */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --text-muted: #888888;
    --border-color: #e0e0e0;
    
    /* UI Variables */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;
    --transition: all 0.2s ease;
    --preview-bg: #525252;
    --base-font-size: 13px;
    
    /* Typography */
    --heading-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --body-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    
    /* Typography Scale */
    --text-xs: 0.75rem;
    --text-sm: 0.813rem;
    --text-base: 0.875rem;
    --text-lg: 1rem;
    --text-xl: 1.125rem;
    --text-2xl: 1.25rem;
    --text-3xl: 1.5rem;
    --text-4xl: 1.75rem;
}

/* ===== Color Palette Definitions ===== */
.theme-blue {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --template-accent: #2563eb;
}

.theme-navy {
    --primary-color: #1e3a5f;
    --primary-hover: #1a2f4a;
    --template-accent: #1e3a5f;
}

.theme-green {
    --primary-color: #059669;
    --primary-hover: #047857;
    --template-accent: #059669;
}

.theme-teal {
    --primary-color: #0d9488;
    --primary-hover: #0f766e;
    --template-accent: #0d9488;
}

.theme-purple {
    --primary-color: #7c3aed;
    --primary-hover: #6d28d9;
    --template-accent: #7c3aed;
}

.theme-maroon {
    --primary-color: #92400e;
    --primary-hover: #78350f;
    --template-accent: #92400e;
}

.theme-black {
    --primary-color: #1f2937;
    --primary-hover: #111827;
    --template-accent: #1f2937;
}

.theme-red {
    --primary-color: #dc2626;
    --primary-hover: #b91c1c;
    --template-accent: #dc2626;
}

/* ===== Font Family Definitions */
.font-inter {
    --heading-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --body-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.font-roboto {
    --heading-font: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    --body-font: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
}

.font-opensans {
    --heading-font: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --body-font: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.font-lato {
    --heading-font: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
    --body-font: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
}

.font-poppins {
    --heading-font: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    --body-font: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

.font-playfair {
    --heading-font: 'Playfair Display', Georgia, serif;
    --body-font: 'Playfair Display', Georgia, serif;
}

.font-merriweather {
    --heading-font: 'Merriweather', Georgia, serif;
    --body-font: 'Merriweather', Georgia, serif;
}

.font-montserrat {
    --heading-font: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    --body-font: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== Body & Layout ===== */
body {
    font-family: var(--body-font);
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

.header {
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-4) var(--space-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.logo {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.header-right {
    display: flex;
    gap: var(--space-3);
}

.main-container {
    display: flex;
    height: calc(100vh - 65px);
    overflow: hidden;
}

/* ===== Buttons ===== */
.btn {
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-family: var(--body-font);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

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

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--background-color);
    border-color: var(--text-secondary);
}

.btn-add {
    padding: var(--space-1) var(--space-3);
    background: transparent;
    color: var(--primary-color);
    border: 1px dashed var(--primary-color);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    cursor: pointer;
    transition: var(--transition);
}

.btn-add:hover {
    background: var(--primary-color);
    color: white;
    border-style: solid;
}

.btn-delete {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    padding: var(--space-1) var(--space-2);
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 10px;
    cursor: pointer;
    opacity: 0;
    transition: var(--transition);
}

.dynamic-item:hover .btn-delete {
    opacity: 1;
}

/* ===== Editor Panel ===== */
.editor-panel {
    width: 400px;
    background: var(--surface-color);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    flex-shrink: 0;
}

.editor-content {
    padding: var(--space-4);
}

.editor-section {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--border-color);
}

.editor-section:last-child {
    border-bottom: none;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3);
}

.section-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 var(--space-3) 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* ===== Toggle Switch ===== */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 20px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(16px);
}

/* ===== Template Selector ===== */
.template-selector {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-2);
}

.template-option {
    cursor: pointer;
    padding: var(--space-2);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
    text-align: center;
}

.template-option:hover {
    border-color: var(--primary-color);
}

.template-option.active {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.template-preview {
    aspect-ratio: 1.5;
    background: white;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-2);
    display: flex;
    flex-direction: column;
    padding: var(--space-2);
    gap: 3px;
    overflow: hidden;
}

.template-option span {
    font-size: 10px;
    color: var(--text-secondary);
}

/* Template Preview Thumbnails */
.template-clean-preview .preview-header {
    height: 8px;
    background: #333;
    border-radius: 2px;
    width: 60%;
    margin: 0 auto 3px;
}

.template-clean-preview .preview-line {
    height: 3px;
    background: #ddd;
    border-radius: 1px;
    width: 100%;
}

.template-line-preview .preview-header {
    height: 10px;
    background: #333;
    border-radius: 2px;
    margin-bottom: 3px;
}

.template-line-preview .preview-divider {
    height: 1px;
    background: #333;
    margin-bottom: 3px;
}

.template-line-preview .preview-line {
    height: 3px;
    background: #ddd;
    border-radius: 1px;
    width: 100%;
}

.template-box-preview .preview-header {
    height: 8px;
    background: #333;
    border-radius: 2px;
    margin-bottom: 3px;
}

.template-box-preview .preview-boxed {
    border: 1px solid #333;
    padding: 2px 4px;
    margin-bottom: 2px;
}

.template-box-preview .preview-line {
    height: 3px;
    background: #ddd;
    border-radius: 1px;
    width: 100%;
}

.template-simple-preview .preview-header {
    height: 8px;
    background: #333;
    border-radius: 2px;
    width: 80%;
    margin-bottom: 2px;
}

.template-simple-preview .preview-line {
    height: 2px;
    background: #ddd;
    border-radius: 1px;
    width: 100%;
}

.template-mono-preview .preview-header {
    height: 8px;
    background: #333;
    border-radius: 2px;
    width: 100%;
    margin-bottom: 2px;
}

.template-mono-preview .preview-line {
    height: 3px;
    background: #bbb;
    border-radius: 0;
    width: 100%;
}

.template-edge-preview .preview-header {
    height: 10px;
    background: #333;
    border-radius: 0;
    margin-bottom: 2px;
}

.template-edge-preview .preview-edge {
    border-left: 3px solid #333;
    padding-left: 3px;
    margin-bottom: 2px;
}

.template-edge-preview .preview-line {
    height: 2px;
    background: #ddd;
    border-radius: 0;
    width: 100%;
}

.template-flow-preview .preview-header {
    height: 10px;
    background: linear-gradient(90deg, #e0e7ff, #fae8ff);
    border-radius: 8px;
    margin-bottom: 2px;
}

.template-flow-preview .preview-line {
    height: 3px;
    background: #ddd;
    border-radius: 4px;
    width: 100%;
}

.template-bold-preview .preview-header {
    height: 12px;
    background: #1a1a1a;
    border-radius: 2px;
    margin-bottom: 2px;
}

.template-bold-preview .preview-line {
    height: 3px;
    background: #333;
    width: 70%;
}

.template-art-preview .preview-header {
    height: 8px;
    background: #d97706;
    border-radius: 50%;
    width: 50%;
    margin: 0 auto 2px;
}

.template-art-preview .preview-line {
    height: 3px;
    background: #ddd;
    border: 1px dotted #999;
    width: 100%;
}

.template-compact-preview .preview-header {
    height: 6px;
    background: #333;
    border-radius: 2px;
    margin-bottom: 1px;
}

.template-compact-preview .preview-line {
    height: 2px;
    background: #ccc;
    border-radius: 0;
    width: 100%;
}

/* ===== Style Controls ===== */
.style-grid {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-bottom: var(--space-4);
}

.color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.color-swatch:hover {
    transform: scale(1.1);
}

.color-swatch.active {
    border-color: var(--text-primary);
}

.theme-blue { background: #2563eb; }
.theme-navy { background: #1e3a5f; }
.theme-green { background: #059669; }
.theme-teal { background: #0d9488; }
.theme-purple { background: #7c3aed; }
.theme-maroon { background: #92400e; }
.theme-black { background: #1f2937; }
.theme-red { background: #dc2626; }

.font-control {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-2);
}

.font-label {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.font-label.large {
    font-size: var(--text-lg);
}

#fontSizeSlider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    background: var(--border-color);
    border-radius: 2px;
    outline: none;
}

#fontSizeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

.font-size-display {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* ===== Form Elements ===== */
.form-group {
    margin-bottom: var(--space-3);
}

.form-group label {
    display: block;
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-1);
}

.form-control {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-family: var(--body-font);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control-sm {
    width: 100%;
    padding: var(--space-2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-family: var(--body-font);
    background: white;
}

.form-row {
    display: flex;
    gap: var(--space-3);
}

.form-row .form-group {
    flex: 1;
}

textarea.form-control {
    resize: vertical;
    min-height: 60px;
}

.dynamic-section {
    min-height: 20px;
}

.dynamic-item {
    position: relative;
    padding: var(--space-3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
    background: var(--background-color);
}

.dynamic-item:last-child {
    margin-bottom: 0;
}

/* ===== Preview Panel ===== */
.preview-panel {
    flex: 1;
    background: var(--preview-bg);
    padding: var(--space-6);
    overflow: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preview-controls {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    background: var(--surface-color);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.preview-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--background-color);
    border-radius: var(--radius-md);
    font-size: var(--text-lg);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-btn:hover {
    background: var(--primary-color);
    color: white;
}

.zoom-level {
    font-size: var(--text-sm);
    font-weight: 500;
    min-width: 50px;
    text-align: center;
}

.preview-wrapper {
    flex: 1;
    overflow: auto;
    display: flex;
    justify-content: center;
}

.preview-container {
    transform-origin: top center;
    transition: transform 0.2s ease;
}

/* ===== Resume Preview Paper ===== */
.resume-preview {
    width: 210mm;
    min-height: 297mm;
    background: white;
    box-shadow: var(--shadow-lg);
    padding: 15mm;
    font-size: var(--base-font-size);
    line-height: 1.6;
    color: var(--text-primary);
}

/* ===== Resume Shared Styles ===== */
.resume-preview h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: var(--text-primary);
}

.resume-preview h2 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 12px 0;
    color: var(--text-primary);
}

.resume-preview h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 2px 0;
    color: var(--text-primary);
}

.resume-preview p {
    margin: 0 0 8px 0;
}

.resume-preview a {
    color: var(--primary-color);
    text-decoration: none;
}

.resume-preview ul {
    margin: 0;
    padding-left: 18px;
}

.resume-preview .resume-header {
    text-align: center;
    margin-bottom: 20px;
}

.resume-preview .resume-name {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 4px 0;
}

.resume-preview .resume-job-title {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
}

.resume-preview .resume-contact {
    font-size: 12px;
    color: var(--text-secondary);
}

.resume-preview .contact-item {
    display: inline;
}

.resume-preview .contact-separator {
    margin: 0 6px;
    color: var(--text-muted);
}

.resume-preview .resume-section {
    margin-bottom: 16px;
}

.resume-preview .resume-section:last-child {
    margin-bottom: 0;
}

.resume-preview .section-heading {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 6px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.resume-preview .resume-item {
    margin-bottom: 12px;
}

.resume-preview .resume-item:last-child {
    margin-bottom: 0;
}

.resume-preview .resume-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 2px;
}

.resume-preview .resume-item-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.resume-preview .resume-item-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

.resume-preview .resume-item-date {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.resume-preview .resume-item-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.resume-preview .skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.resume-preview .skills-category {
    margin-right: 16px;
    margin-bottom: 8px;
}

.resume-preview .skills-category-title {
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 4px;
    color: var(--text-secondary);
}

.resume-preview .skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.resume-preview .skill-item {
    background: var(--background-color);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
}

/* ===== Template 1: Clean ===== */
.template-clean .resume-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
}

.template-clean .resume-name {
    font-size: 36px;
    font-weight: 300;
    letter-spacing: 2px;
}

.template-clean .resume-job-title {
    font-size: 14px;
    color: var(--text-secondary);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.template-clean .resume-contact {
    font-size: 11px;
    color: var(--text-muted);
}

.template-clean .section-heading {
    font-size: 11px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 3px;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.template-clean .resume-item-header {
    flex-direction: column;
}

.template-clean .resume-item-date {
    margin-top: 2px;
}

/* ===== Template 2: Line ===== */
.template-line .resume-header {
    text-align: left;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--text-primary);
}

.template-line .resume-name {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0;
}

.template-line .resume-job-title {
    font-size: 14px;
    color: var(--text-secondary);
}

.template-line .section-heading {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
    margin-bottom: 12px;
}

.template-line .resume-item-header {
    flex-direction: row;
    align-items: baseline;
}

.template-line .resume-item-date {
    font-size: 11px;
    color: var(--text-muted);
}

/* ===== Template 3: Box ===== */
.template-box .resume-header {
    text-align: left;
    margin-bottom: 20px;
}

.template-box .resume-name {
    font-size: 28px;
    font-weight: 700;
}

.template-box .resume-job-title {
    font-size: 14px;
    color: var(--text-secondary);
}

.template-box .section-heading {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid var(--text-primary);
    padding: 4px 12px;
    margin-bottom: 12px;
    border-radius: 0;
}

.template-box .resume-item-header {
    flex-direction: row;
    align-items: baseline;
}

.template-box .resume-item-date {
    font-size: 11px;
    color: var(--text-muted);
}

/* ===== Template 4: Simple ===== */
.template-simple .resume-header {
    text-align: left;
    margin-bottom: 20px;
}

.template-simple .resume-name {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 0;
}

.template-simple .resume-job-title {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

.template-simple .resume-contact {
    font-size: 12px;
    color: var(--text-secondary);
}

.template-simple .section-heading {
    font-size: 12px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.template-simple .resume-item-header {
    flex-direction: row;
    align-items: baseline;
}

.template-simple .resume-item-title {
    font-weight: 600;
}

.template-simple .resume-item-date {
    font-size: 11px;
    color: var(--text-muted);
}

/* ===== Template 5: Mono ===== */
.template-mono .resume-header {
    text-align: left;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--text-primary);
}

.template-mono .resume-name {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.template-mono .resume-job-title {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: 'Courier New', Courier, monospace;
}

.template-mono .resume-contact {
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'Courier New', Courier, monospace;
}

.template-mono .section-heading {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: none;
    padding-bottom: 4px;
    margin-bottom: 8px;
    background: #f4f4f4;
    padding: 4px 8px;
    display: inline-block;
}

.template-mono .resume-item-header {
    flex-direction: row;
    align-items: baseline;
}

.template-mono .resume-item-date {
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'Courier New', Courier, monospace;
}

.template-mono .resume-item-title {
    font-weight: 600;
}

.template-mono .resume-item-description {
    font-family: 'Courier New', Courier, monospace;
}

/* ===== Template 6: Edge ===== */
.template-edge .resume-header {
    text-align: left;
    margin-bottom: 20px;
}

.template-edge .resume-name {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
}

.template-edge .resume-job-title {
    font-size: 14px;
    color: var(--text-secondary);
}

.template-edge .section-heading {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: none;
    padding-bottom: 4px;
    margin-bottom: 12px;
    border-left: 4px solid var(--text-primary);
    padding-left: 12px;
}

.template-edge .resume-item-header {
    flex-direction: row;
    align-items: baseline;
}

.template-edge .resume-item-date {
    font-size: 11px;
    color: var(--text-muted);
}

.template-edge .resume-item-title {
    font-weight: 700;
}

/* ===== Template 7: Flow ===== */
.template-flow .resume-header {
    text-align: left;
    margin-bottom: 20px;
    padding: 16px;
    background: linear-gradient(135deg, #f0f4ff 0%, #faf5ff 100%);
    margin-left: -15mm;
    margin-right: -15mm;
    padding-left: 15mm;
    padding-right: 15mm;
}

.template-flow .resume-name {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 0;
}

.template-flow .resume-job-title {
    font-size: 14px;
    color: var(--text-secondary);
}

.template-flow .section-heading {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: none;
    padding-bottom: 6px;
    margin-bottom: 12px;
    border-radius: 6px;
    background: var(--background-color);
    padding: 6px 12px;
}

.template-flow .resume-item-header {
    flex-direction: row;
    align-items: baseline;
}

.template-flow .resume-item-date {
    font-size: 11px;
    color: var(--text-muted);
}

.template-flow .resume-item-title {
    font-weight: 600;
}

.template-flow .resume-item {
    background: var(--background-color);
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 8px;
}

/* ===== Template 8: Bold ===== */
.template-bold .resume-header {
    text-align: center;
    margin-bottom: 24px;
    padding: 24px 15mm;
    background: var(--text-primary);
    margin-left: -15mm;
    margin-right: -15mm;
    padding-left: 15mm;
    padding-right: 15mm;
}

.template-bold .resume-name {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: 2px;
    color: white;
    margin-bottom: 8px;
}

.template-bold .resume-job-title {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 4px;
}

.template-bold .resume-contact {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 12px;
}

.template-bold .section-heading {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 2px solid var(--text-primary);
    padding-bottom: 8px;
    margin-bottom: 16px;
}

.template-bold .resume-item-header {
    flex-direction: row;
    align-items: baseline;
}

.template-bold .resume-item-date {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.template-bold .resume-item-title {
    font-weight: 700;
    font-size: 15px;
}

/* ===== Template 9: Art ===== */
.template-art .resume-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px dotted var(--border-color);
}

.template-art .resume-name {
    font-size: 32px;
    font-weight: 700;
    font-style: italic;
    letter-spacing: 1px;
}

.template-art .resume-job-title {
    font-size: 14px;
    color: var(--text-secondary);
    font-style: italic;
}

.template-art .resume-contact {
    font-size: 11px;
    color: var(--text-muted);
}

.template-art .section-heading {
    font-size: 12px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    border-bottom: 1px dotted var(--border-color);
    border-style: dotted;
    padding-bottom: 6px;
    margin-bottom: 12px;
    color: #d97706;
}

.template-art .resume-item-header {
    flex-direction: column;
}

.template-art .resume-item-date {
    margin-top: 2px;
    font-style: italic;
}

.template-art .resume-item-title {
    font-weight: 500;
    font-style: italic;
}

.template-art .resume-item-subtitle {
    font-style: italic;
}

/* ===== Template 10: Compact ===== */
.template-compact .resume-header {
    text-align: left;
    margin-bottom: 12px;
}

.template-compact .resume-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0;
}

.template-compact .resume-job-title {
    font-size: 11px;
    color: var(--text-secondary);
}

.template-compact .resume-contact {
    font-size: 10px;
    color: var(--text-muted);
}

.template-compact .section-heading {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2px;
    margin-bottom: 6px;
}

.template-compact .resume-section {
    margin-bottom: 10px;
}

.template-compact .resume-item {
    margin-bottom: 6px;
}

.template-compact .resume-item-header {
    flex-direction: row;
    align-items: baseline;
}

.template-compact .resume-item-title {
    font-weight: 600;
    font-size: 12px;
}

.template-compact .resume-item-subtitle {
    font-size: 11px;
}

.template-compact .resume-item-date {
    font-size: 10px;
    color: var(--text-muted);
}

.template-compact .resume-item-description {
    font-size: 11px;
    line-height: 1.4;
}

.template-compact .skill-item {
    padding: 1px 6px;
    font-size: 10px;
}

.template-compact .skills-category-title {
    font-size: 10px;
}

/* ===== Print Styles ===== */
@media print {
    .header,
    .editor-panel,
    .preview-controls {
        display: none !important;
    }
    
    .main-container {
        display: block;
        height: auto;
    }
    
    .preview-panel {
        background: white;
        padding: 0;
        overflow: visible;
    }
    
    .preview-wrapper {
        overflow: visible;
    }
    
    .preview-container {
        transform: none !important;
    }
    
    .resume-preview {
        box-shadow: none;
        padding: 0;
        width: 100%;
        min-height: auto;
    }
    
    .template-flow .resume-header {
        background: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .template-bold .resume-header {
        background: var(--text-primary) !important;
        margin: 0 !important;
        padding: 24px 0 !important;
        color: white !important;
    }
    
    .template-bold .resume-name {
        color: white !important;
    }
    
    .template-bold .resume-job-title {
        color: rgba(255, 255, 255, 0.8) !important;
    }
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .editor-panel {
        width: 350px;
    }
    
    .template-selector {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .main-container {
        flex-direction: column;
        height: auto;
    }
    
    .editor-panel {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        max-height: 50vh;
    }
    
    .preview-panel {
        min-height: 100vh;
    }
    
    .template-selector {
        grid-template-columns: repeat(4, 1fr);
    }
}
