/**
 * Template Editor Styles
 * Gelişmiş şablon editörü için tüm CSS stilleri
 */

/* ===== VARIABLES ===== */
:root {
    /* Site ile uyumlu renkler */
    --editor-bg: #0a0a0f;
    /* site --bg-primary */
    --editor-card: #16161f;
    /* site --bg-card */
    --editor-card-hover: #1a1a25;
    /* site --bg-tertiary */
    --editor-border: #2a2a3a;
    /* site --border-color */
    --editor-accent: #667eea;
    /* site --accent-primary */
    --editor-accent-hover: #7c8fea;
    --editor-success: #10b981;
    /* site --success */
    --editor-warning: #f59e0b;
    /* site --warning */
    --editor-danger: #ef4444;
    /* site --danger */
    --editor-text: #ffffff;
    /* site --text-primary */
    --editor-text-muted: #a0a0b0;
    /* site --text-secondary */
    --editor-radius: 12px;
    --editor-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== EDITOR LAYOUT ===== */
.editor-layout {
    display: grid;
    grid-template-columns: 480px 1fr;
    gap: 24px;
    min-height: calc(100vh - 140px);
    padding: 20px;
}

@media (max-width: 1400px) {
    .editor-layout {
        grid-template-columns: 420px 1fr;
    }
}

@media (max-width: 1200px) {
    .editor-layout {
        grid-template-columns: 1fr;
    }

    .preview-panel {
        min-height: 700px;
    }
}

/* ===== EDITOR PANEL ===== */
.editor-panel {
    background: var(--editor-card);
    border: 1px solid var(--editor-border);
    border-radius: var(--editor-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 180px);
}

.editor-panel-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--editor-accent), #764ba2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.editor-panel-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.editor-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Custom Scrollbar */
.editor-panel-content::-webkit-scrollbar {
    width: 6px;
}

.editor-panel-content::-webkit-scrollbar-track {
    background: var(--editor-card);
}

.editor-panel-content::-webkit-scrollbar-thumb {
    background: var(--editor-border);
    border-radius: 3px;
}

.editor-panel-content::-webkit-scrollbar-thumb:hover {
    background: var(--editor-accent);
}

/* ===== ACCORDION SECTIONS ===== */
.accordion-section {
    border-bottom: 1px solid var(--editor-border);
}

.accordion-section:last-child {
    border-bottom: none;
}

.accordion-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    transition: var(--editor-transition);
    user-select: none;
}

.accordion-header:hover {
    background: var(--editor-card-hover);
}

.accordion-header.active {
    background: rgba(102, 126, 234, 0.1);
}

.accordion-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(102, 126, 234, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    color: var(--editor-accent);
    font-size: 1rem;
}

.accordion-title {
    flex: 1;
    font-weight: 500;
    color: var(--editor-text);
    font-size: 0.95rem;
}

.accordion-subtitle {
    font-size: 0.8rem;
    color: var(--editor-text-muted);
    margin-top: 2px;
}

.accordion-chevron {
    color: var(--editor-text-muted);
    transition: transform 0.3s ease;
}

.accordion-header.active .accordion-chevron {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: rgba(0, 0, 0, 0.2);
}

.accordion-content.open {
    max-height: 2000px;
}

.accordion-body {
    padding: 20px;
}

/* ===== FORM CONTROLS ===== */
.form-group {
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    color: var(--editor-text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    background: var(--editor-bg);
    border: 1px solid var(--editor-border);
    border-radius: 8px;
    color: var(--editor-text);
    font-size: 0.9rem;
    transition: var(--editor-transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--editor-accent);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.form-control::placeholder {
    color: var(--editor-text-muted);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0aec0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

/* ===== LAYOUT OPTIONS ===== */
.layout-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.layout-option {
    position: relative;
    padding: 16px 10px;
    background: var(--editor-bg);
    border: 2px solid var(--editor-border);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--editor-transition);
}

.layout-option:hover {
    border-color: var(--editor-accent);
    transform: translateY(-2px);
}

.layout-option.active {
    border-color: var(--editor-accent);
    background: rgba(102, 126, 234, 0.15);
}

.layout-option input {
    position: absolute;
    opacity: 0;
}

.layout-option-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 10px;
    border-radius: 8px;
    background: var(--editor-card);
    display: flex;
    overflow: hidden;
}

.layout-option-icon .sidebar-preview {
    width: 35%;
    background: var(--editor-accent);
}

.layout-option-icon .main-preview {
    flex: 1;
    background: #e2e8f0;
}

.layout-option-icon.right .sidebar-preview {
    order: 2;
}

.layout-option-icon.single .sidebar-preview {
    display: none;
}

.layout-option-icon.single .main-preview {
    width: 100%;
}

.layout-option-icon.header-layout {
    flex-direction: column;
}

.layout-option-icon.header-layout .sidebar-preview {
    width: 100%;
    height: 35%;
}

.layout-option-label {
    font-size: 0.8rem;
    color: var(--editor-text-muted);
    font-weight: 500;
}

.layout-option.active .layout-option-label {
    color: var(--editor-accent);
}

/* ===== COLOR PRESETS ===== */
.color-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.color-preset {
    position: relative;
    height: 50px;
    border-radius: 10px;
    cursor: pointer;
    overflow: hidden;
    transition: var(--editor-transition);
    border: 2px solid transparent;
}

.color-preset:hover {
    transform: scale(1.05);
}

.color-preset.active {
    border-color: white;
    box-shadow: 0 0 0 2px var(--editor-accent);
}

.color-preset-colors {
    display: flex;
    height: 100%;
}

.color-preset-colors span {
    flex: 1;
}

.color-preset-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px;
    background: rgba(0, 0, 0, 0.7);
    font-size: 0.65rem;
    text-align: center;
    color: white;
    opacity: 0;
    transition: opacity 0.2s;
}

.color-preset:hover .color-preset-name {
    opacity: 1;
}

/* ===== COLOR GRID ===== */
.color-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.color-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.color-item label {
    font-size: 0.8rem;
    color: var(--editor-text-muted);
}

.color-picker-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-picker {
    width: 50px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    padding: 2px;
    background: transparent;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker::-webkit-color-swatch {
    border-radius: 6px;
    border: 2px solid var(--editor-border);
}

.color-hex-input {
    flex: 1;
    padding: 10px 12px;
    background: var(--editor-bg);
    border: 1px solid var(--editor-border);
    border-radius: 8px;
    color: var(--editor-text);
    font-family: monospace;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.color-hex-input:focus {
    outline: none;
    border-color: var(--editor-accent);
}

/* ===== GRADIENT TOGGLE ===== */
.gradient-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--editor-border);
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.toggle-track {
    width: 44px;
    height: 24px;
    background: var(--editor-bg);
    border-radius: 12px;
    position: relative;
    transition: var(--editor-transition);
    border: 1px solid var(--editor-border);
}

.toggle-thumb {
    width: 18px;
    height: 18px;
    background: var(--editor-text-muted);
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 3px;
    transition: var(--editor-transition);
}

.toggle-switch input {
    display: none;
}

.toggle-switch input:checked+.toggle-track {
    background: var(--editor-accent);
    border-color: var(--editor-accent);
}

.toggle-switch input:checked+.toggle-track .toggle-thumb {
    transform: translateX(20px);
    background: white;
}

.toggle-label {
    font-size: 0.9rem;
    color: var(--editor-text);
}

/* Gradient Direction Preset Buttons */
.gradient-preset-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--editor-border);
    background: var(--editor-bg);
    color: var(--editor-text);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--editor-transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gradient-preset-btn:hover {
    border-color: var(--editor-accent);
    background: rgba(102, 126, 234, 0.15);
    color: var(--editor-accent);
}

.gradient-preset-btn:active {
    transform: scale(0.95);
}

/* Gradient Direction Indicator */
.gradient-direction-indicator {
    background: var(--editor-bg);
}

/* ===== RANGE SLIDER ===== */
.range-slider-group {
    margin-bottom: 16px;
}

.range-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.range-slider-label {
    font-size: 0.85rem;
    color: var(--editor-text-muted);
}

.range-slider-value {
    font-size: 0.85rem;
    color: var(--editor-accent);
    font-weight: 600;
    background: rgba(102, 126, 234, 0.15);
    padding: 2px 10px;
    border-radius: 10px;
}

.range-slider {
    width: 100%;
    height: 6px;
    background: var(--editor-bg);
    border-radius: 3px;
    appearance: none;
    cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--editor-accent);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--editor-transition);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.6);
}

/* ===== FONT PREVIEW ===== */
.font-preview {
    padding: 12px;
    background: var(--editor-bg);
    border-radius: 8px;
    margin-top: 12px;
    text-align: center;
}

.font-preview-heading {
    font-size: 1.2rem;
    margin-bottom: 6px;
    color: var(--editor-text);
}

.font-preview-body {
    font-size: 0.9rem;
    color: var(--editor-text-muted);
}

/* ===== SKILL BAR STYLES ===== */
.skill-style-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.skill-style-option {
    padding: 14px;
    background: var(--editor-bg);
    border: 2px solid var(--editor-border);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--editor-transition);
}

.skill-style-option:hover,
.skill-style-option.active {
    border-color: var(--editor-accent);
}

.skill-style-option.active {
    background: rgba(102, 126, 234, 0.1);
}

.skill-style-option input {
    display: none;
}

.skill-style-preview {
    margin-bottom: 8px;
}

.skill-style-label {
    font-size: 0.8rem;
    color: var(--editor-text-muted);
    text-align: center;
}

/* Skill Bar Preview */
.skill-bar-preview {
    height: 8px;
    background: var(--editor-border);
    border-radius: 4px;
    overflow: hidden;
}

.skill-bar-preview-fill {
    height: 100%;
    width: 75%;
    background: var(--editor-accent);
    border-radius: 4px;
}

/* Skill Dots Preview */
.skill-dots-preview {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.skill-dots-preview span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--editor-border);
}

.skill-dots-preview span.filled {
    background: var(--editor-accent);
}

/* Skill Percentage Preview */
.skill-percentage-preview {
    display: flex;
    justify-content: center;
}

.skill-percentage-badge {
    background: var(--editor-accent);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Skill Stars Preview */
.skill-stars-preview {
    display: flex;
    gap: 2px;
    justify-content: center;
    font-size: 0.9rem;
}

.skill-stars-preview .filled {
    color: #fbbf24;
}

.skill-stars-preview .empty {
    color: var(--editor-border);
}

/* Skill Circular Preview */
.skill-circular-preview {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    position: relative;
}

.skill-circular-preview svg {
    transform: rotate(-90deg);
}

.skill-circular-preview circle {
    fill: none;
    stroke-width: 4;
}

.skill-circular-preview .bg {
    stroke: var(--editor-border);
}

.skill-circular-preview .progress {
    stroke: var(--editor-accent);
    stroke-dasharray: 100;
    stroke-dashoffset: 25;
    stroke-linecap: round;
}

/* NEW: Skill Tags Preview */
.skill-tags-preview {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.skill-tags-preview .skill-tag {
    padding: 2px 6px;
    background: var(--editor-accent);
    opacity: 0.8;
    border-radius: 8px;
    font-size: 0.6rem;
    color: white;
}

/* NEW: Skill Level Preview */
.skill-level-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
}

.skill-level-preview .skill-name {
    color: var(--editor-text-muted);
}

.skill-level-preview .skill-level-text {
    padding: 2px 6px;
    background: var(--editor-accent);
    border-radius: 6px;
    font-size: 0.6rem;
    color: white;
}

/* NEW: Skill Gradient Preview */
.skill-gradient-preview {
    padding: 4px 0;
}

.skill-gradient-preview .gradient-bar-bg {
    height: 8px;
    background: var(--editor-border);
    border-radius: 4px;
    overflow: hidden;
}

.skill-gradient-preview .gradient-bar-fill {
    height: 100%;
    width: 75%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f472b6 100%);
    border-radius: 4px;
}

/* NEW: Skill Minimal Preview */
.skill-minimal-preview {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.skill-minimal-preview .minimal-line {
    height: 2px;
    background: var(--editor-accent);
    width: 100%;
    border-radius: 1px;
}

.skill-minimal-preview .minimal-line.short {
    width: 60%;
}

/* NEW: Skill Blocks Preview */
.skill-blocks-preview {
    display: flex;
    gap: 3px;
    justify-content: center;
}

.skill-blocks-preview .block {
    width: 12px;
    height: 8px;
    border-radius: 2px;
    background: var(--editor-border);
}

.skill-blocks-preview .block.filled {
    background: var(--editor-accent);
}

/* CV Preview Blocks Style */
.cv-skill-blocks-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.cv-skill-blocks {
    display: flex;
    gap: 3px;
}

.cv-skill-block {
    width: 16px;
    height: 8px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
}

.cv-skill-block.filled {
    background: currentColor;
    opacity: 0.8;
}

/* ===== PHOTO SETTINGS ===== */
.photo-frame-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.photo-frame-option {
    padding: 12px;
    background: var(--editor-bg);
    border: 2px solid var(--editor-border);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: var(--editor-transition);
}

.photo-frame-option:hover,
.photo-frame-option.active {
    border-color: var(--editor-accent);
}

.photo-frame-option input {
    display: none;
}

.photo-frame-preview {
    width: 40px;
    height: 40px;
    background: var(--editor-accent);
    margin: 0 auto 8px;
}

.photo-frame-preview.circle {
    border-radius: 50%;
}

.photo-frame-preview.rounded {
    border-radius: 12px;
}

.photo-frame-preview.square {
    border-radius: 4px;
}

.photo-frame-preview.hexagon {
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.photo-frame-preview.diamond {
    transform: rotate(45deg);
    width: 32px;
    height: 32px;
    margin-top: 4px;
}

.photo-frame-label {
    font-size: 0.75rem;
    color: var(--editor-text-muted);
}

/* Photo Frame Grid Expanded */
.photo-frame-grid.expanded {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.photo-frame-grid.expanded .photo-frame-option {
    padding: 10px 6px;
}

.photo-frame-grid.expanded .photo-frame-preview {
    width: 32px;
    height: 32px;
}

/* ===== PHOTO POSITION GRID ===== */
.photo-position-grid {
    display: flex;
    gap: 8px;
}

.photo-position-option {
    flex: 1;
    padding: 12px;
    background: var(--editor-bg);
    border: 2px solid var(--editor-border);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: var(--editor-transition);
}

.photo-position-option:hover,
.photo-position-option.active {
    border-color: var(--editor-accent);
}

.photo-position-option i {
    font-size: 1.2rem;
    color: var(--editor-text-muted);
    display: block;
    margin-bottom: 6px;
}

.photo-position-option.active i {
    color: var(--editor-accent);
}

.photo-position-option span {
    font-size: 0.75rem;
    color: var(--editor-text-muted);
}

.photo-position-option input {
    display: none;
}

/* ===== PHOTO FILTER GRID ===== */
.photo-filter-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.photo-filter-option {
    padding: 10px;
    background: var(--editor-bg);
    border: 2px solid var(--editor-border);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: var(--editor-transition);
}

.photo-filter-option:hover,
.photo-filter-option.active {
    border-color: var(--editor-accent);
}

.photo-filter-option input {
    display: none;
}

.filter-preview {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    margin: 0 auto 6px;
}

.filter-preview.grayscale {
    filter: grayscale(100%);
}

.filter-preview.sepia {
    filter: sepia(80%);
}

.filter-preview.contrast {
    filter: contrast(150%);
}

.filter-preview.brightness {
    filter: brightness(130%);
}

.photo-filter-option span {
    font-size: 0.7rem;
    color: var(--editor-text-muted);
    display: block;
}

/* ===== SECTION TITLE STYLES ===== */
.section-title-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.section-title-option {
    padding: 14px;
    background: var(--editor-bg);
    border: 2px solid var(--editor-border);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--editor-transition);
}

.section-title-option:hover,
.section-title-option.active {
    border-color: var(--editor-accent);
}

.section-title-option input {
    display: none;
}

.section-title-preview {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--editor-text);
    margin-bottom: 4px;
}

.section-title-preview.underline {
    border-bottom: 2px solid var(--editor-accent);
    padding-bottom: 4px;
}

.section-title-preview.left-line {
    border-left: 3px solid var(--editor-accent);
    padding-left: 10px;
}

.section-title-preview.boxed {
    background: rgba(102, 126, 234, 0.15);
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-block;
}

.section-title-preview.minimal {
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.section-title-label {
    font-size: 0.75rem;
    color: var(--editor-text-muted);
}

/* ===== PREVIEW PANEL ===== */
.preview-panel {
    background: var(--editor-card);
    border: 1px solid var(--editor-border);
    border-radius: var(--editor-radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.preview-header {
    padding: 16px 20px;
    background: var(--editor-bg);
    border-bottom: 1px solid var(--editor-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--editor-text);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.preview-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.preview-zoom {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 12px;
}

.preview-zoom-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--editor-border);
    background: var(--editor-bg);
    border-radius: 6px;
    color: var(--editor-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--editor-transition);
}

.preview-zoom-btn:hover {
    border-color: var(--editor-accent);
    color: var(--editor-accent);
}

.preview-zoom-value {
    font-size: 0.85rem;
    color: var(--editor-text-muted);
    min-width: 45px;
    text-align: center;
}

.preview-paper {
    flex: 1;
    background: #0a0a14;
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow: auto;
}

/* ===== CV PREVIEW ===== */
.cv-preview {
    width: 595px !important;
    height: 842px !important;
    min-height: 842px !important;
    max-height: 842px !important;
    background: white;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transform-origin: top center;
    transition: transform 0.3s ease;
    overflow: hidden !important;
}

/* Preview panelinin kendisi */
.preview-paper {
    flex: 1;
    background: #0a0a14;
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow: auto;
    min-height: 500px;
    max-height: calc(100vh - 100px);
}

/* CV'yi container'a sığdır - desktop default */
.preview-paper .cv-preview,
.preview-container .cv-preview,
#cvPreview {
    transform: scale(0.75);
    transform-origin: top center;
    margin: 0 auto;
}

/* Two Column Left */
.cv-preview.two-column-left {
    display: grid;
    grid-template-columns: 35% 1fr;
}

/* Two Column Right */
.cv-preview.two-column-right {
    display: grid;
    grid-template-columns: 1fr 35%;
}

.cv-preview.two-column-right .cv-sidebar {
    order: 2;
}

/* Single Column */
.cv-preview.single-column {
    display: block;
}

.cv-preview.single-column .cv-sidebar {
    padding: 30px;
}

/* Header Layout */
.cv-preview.header-layout {
    display: block;
}

.cv-preview.header-layout .cv-sidebar {
    padding: 30px;
}

.cv-preview.header-layout .cv-main {
    padding: 30px;
}

/* CV Sidebar */
.cv-sidebar {
    padding: 30px 20px;
    color: white;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* CV Main */
.cv-main {
    padding: 30px;
    background: white;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* CV Photo */
.cv-photo {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    overflow: hidden;
}

.cv-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cv-photo i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.5);
}

/* CV Name */
.cv-name {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 5px;
}

/* CV Title */
.cv-title-preview {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 25px;
}

/* CV Sections */
.cv-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.cv-section-content {
    margin-bottom: 20px;
}

/* Skill Bars in Preview */
.cv-skill-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    margin-bottom: 8px;
    overflow: hidden;
}

.cv-skill-bar-fill {
    height: 100%;
    background: currentColor;
    opacity: 0.8;
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Skill Dots */
.cv-skill-dots {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.cv-skill-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.cv-skill-dots span.filled {
    background: currentColor;
    opacity: 0.8;
}

/* Skill Percentage */
.cv-skill-percentage {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 0.7rem;
    margin-bottom: 8px;
}

/* Skill Stars */
.cv-skill-stars {
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.cv-skill-stars .fas {
    color: #fbbf24;
}

.cv-skill-stars .far {
    opacity: 0.3;
}

/* ===== NEW SKILL STYLES ===== */

/* Skill Tags Style */
.cv-skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cv-skill-tag {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.cv-skill-tag:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Skill Level Text Style */
.cv-skill-level-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cv-skill-level-text .cv-skill-name {
    font-size: 0.8rem;
}

.cv-skill-level-badge {
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cv-skill-level-badge[data-level="başlangıç"] {
    background: rgba(156, 163, 175, 0.3);
    color: #9ca3af;
}

.cv-skill-level-badge[data-level="orta"] {
    background: rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.cv-skill-level-badge[data-level="ileri"],
.cv-skill-level-badge[data-level="İleri"] {
    background: rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.cv-skill-level-badge[data-level="uzman"] {
    background: rgba(139, 92, 246, 0.3);
    color: #a78bfa;
}

/* Skill Gradient Style */
.cv-skill-gradient {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.cv-skill-gradient-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f472b6 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Skill Minimal Style */
.cv-skill-minimal {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.cv-skill-minimal .cv-skill-name {
    font-size: 0.8rem;
    min-width: 80px;
}

.cv-skill-minimal-line {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 1px;
}

.cv-skill-minimal-fill {
    height: 100%;
    background: currentColor;
    opacity: 0.7;
    border-radius: 1px;
    transition: width 0.5s ease;
}

/* ===== ACTION BUTTONS ===== */
.editor-actions {
    padding: 20px;
    background: var(--editor-bg);
    border-top: 1px solid var(--editor-border);
    display: flex;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--editor-transition);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--editor-accent), #764ba2);
    color: white;
    flex: 2;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: var(--editor-card);
    color: var(--editor-text);
    border: 1px solid var(--editor-border);
    flex: 1;
}

.btn-secondary:hover {
    background: var(--editor-card-hover);
    border-color: var(--editor-accent);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.85rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
}

/* ===== UNDO/REDO BAR ===== */
.undo-redo-bar {
    display: flex;
    gap: 6px;
}

.undo-redo-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--editor-border);
    background: var(--editor-card);
    border-radius: 8px;
    color: var(--editor-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--editor-transition);
}

.undo-redo-btn:hover:not(:disabled) {
    border-color: var(--editor-accent);
    color: var(--editor-accent);
}

.undo-redo-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ===== SAVE STATUS ===== */
.save-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--editor-text-muted);
}

.save-status.saving {
    color: var(--editor-warning);
}

.save-status.saved {
    color: var(--editor-success);
}

.save-status.error {
    color: var(--editor-danger);
}

.save-status i {
    font-size: 1rem;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 20px;
    background: var(--editor-card);
    border: 1px solid var(--editor-border);
    border-radius: 10px;
    color: var(--editor-text);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-color: var(--editor-success);
}

.toast.success i {
    color: var(--editor-success);
}

.toast.error {
    border-color: var(--editor-danger);
}

.toast.error i {
    color: var(--editor-danger);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== KEYBOARD SHORTCUTS HINT ===== */
.keyboard-hint {
    position: fixed;
    bottom: 24px;
    left: 24px;
    display: flex;
    gap: 16px;
    font-size: 0.75rem;
    color: var(--editor-text-muted);
}

.keyboard-hint span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.keyboard-hint kbd {
    background: var(--editor-card);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--editor-border);
    font-size: 0.7rem;
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 15, 26, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: var(--editor-transition);
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--editor-border);
    border-top-color: var(--editor-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== SECTION MANAGER ===== */
.section-group {
    margin-bottom: 20px;
}

.section-group-title {
    font-size: 0.8rem;
    color: var(--editor-text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-list {
    background: var(--editor-bg);
    border-radius: 10px;
    padding: 8px;
    min-height: 60px;
}

.section-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: var(--editor-card);
    border-radius: 8px;
    margin-bottom: 6px;
    cursor: grab;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    position: relative;
}

.section-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--editor-accent);
    border-radius: 8px 0 0 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.section-item:last-child {
    margin-bottom: 0;
}

.section-item:hover {
    border-color: var(--editor-border);
    transform: translateX(4px);
}

.section-item:hover::before {
    opacity: 1;
}

.section-item.dragging {
    opacity: 0.6;
    border-color: var(--editor-accent);
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    z-index: 10;
}

.section-item.hidden-section {
    opacity: 0.4;
    background: rgba(22, 22, 31, 0.5);
}

.section-item.hidden-section::before {
    background: var(--editor-danger);
}

.section-item.hidden-section .section-item-name {
    text-decoration: line-through;
    color: var(--editor-text-muted);
}

.section-item.hidden-section .section-item-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--editor-danger);
}

.section-item-drag {
    color: var(--editor-text-muted);
    margin-right: 10px;
    cursor: grab;
    transition: color 0.2s ease;
}

.section-item:hover .section-item-drag {
    color: var(--editor-accent);
}

.section-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(102, 126, 234, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    color: var(--editor-accent);
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.section-item-name {
    flex: 1;
    font-size: 0.85rem;
    color: var(--editor-text);
    font-weight: 500;
    transition: color 0.2s ease;
}

.section-item-actions {
    display: flex;
    gap: 4px;
}

.section-action-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--editor-text-muted);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.section-action-btn:hover:not(:disabled) {
    background: var(--editor-bg);
    color: var(--editor-accent);
    transform: scale(1.1);
}

.section-action-btn.toggle-visibility:hover:not(:disabled) {
    color: var(--editor-warning);
}

.section-action-btn.delete-section:hover:not(:disabled) {
    color: var(--editor-danger);
}

.section-action-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Section group titles */
.section-group-title {
    font-size: 0.75rem;
    color: var(--editor-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    padding-left: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-group-title i {
    color: var(--editor-accent);
}

/* Drag placeholder */
.section-item.drag-placeholder {
    border: 2px dashed var(--editor-accent);
    background: rgba(102, 126, 234, 0.1);
    height: 48px;
}

/* ===== ICON MANAGER ===== */
.icon-style-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.icon-style-option {
    padding: 12px 8px;
    background: var(--editor-bg);
    border: 2px solid var(--editor-border);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: var(--editor-transition);
}

.icon-style-option:hover,
.icon-style-option.active {
    border-color: var(--editor-accent);
}

.icon-style-option input {
    display: none;
}

.icon-style-preview {
    font-size: 1.2rem;
    color: var(--editor-accent);
    margin-bottom: 6px;
}

.icon-style-label {
    font-size: 0.7rem;
    color: var(--editor-text-muted);
}

.icon-size-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.icon-size-option {
    padding: 12px;
    background: var(--editor-bg);
    border: 2px solid var(--editor-border);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: var(--editor-transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.icon-size-option:hover,
.icon-size-option.active {
    border-color: var(--editor-accent);
}

.icon-size-option input {
    display: none;
}

/* ===== SPACING MANAGER ===== */
.margin-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.margin-input-wrapper label {
    display: block;
    font-size: 0.75rem;
    color: var(--editor-text-muted);
    margin-bottom: 6px;
    text-align: center;
}

.margin-input-group {
    display: flex;
    align-items: center;
    background: var(--editor-bg);
    border-radius: 8px;
    overflow: hidden;
}

.margin-input {
    width: 100%;
    padding: 8px;
    background: transparent;
    border: none;
    color: var(--editor-text);
    text-align: center;
    font-size: 0.85rem;
}

.margin-input:focus {
    outline: none;
}

.margin-unit {
    padding: 0 8px;
    color: var(--editor-text-muted);
    font-size: 0.75rem;
}

.spacing-presets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.spacing-preset-btn {
    padding: 12px;
    background: var(--editor-bg);
    border: 1px solid var(--editor-border);
    border-radius: 8px;
    color: var(--editor-text);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: var(--editor-transition);
}

.spacing-preset-btn:hover {
    border-color: var(--editor-accent);
    color: var(--editor-accent);
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--editor-card);
    border-radius: var(--editor-radius);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px 24px;
    background: var(--editor-bg);
    border-bottom: 1px solid var(--editor-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--editor-text);
}

.modal-close {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: var(--editor-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 6px;
}

.modal-close:hover {
    background: var(--editor-card);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 16px 24px;
    background: var(--editor-bg);
    border-top: 1px solid var(--editor-border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ===== IMPORT DROPZONE ===== */
.import-dropzone {
    padding: 40px 20px;
    border: 2px dashed var(--editor-border);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--editor-transition);
}

.import-dropzone:hover,
.import-dropzone.dragover {
    border-color: var(--editor-accent);
    background: rgba(102, 126, 234, 0.05);
}

.import-dropzone i {
    font-size: 3rem;
    color: var(--editor-text-muted);
    margin-bottom: 12px;
}

.import-dropzone p {
    color: var(--editor-text-muted);
    margin: 0;
}

/* ===== VERSION HISTORY ===== */
.version-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.version-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--editor-bg);
    border-radius: 10px;
}

.version-number {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--editor-accent);
    margin-bottom: 4px;
}

.version-details {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--editor-text-muted);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--editor-text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* ===== TEMPLATE CARDS ===== */
.template-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.template-card {
    background: var(--editor-card);
    border: 1px solid var(--editor-border);
    border-radius: var(--editor-radius);
    overflow: hidden;
    transition: var(--editor-transition);
}

.template-card:hover {
    border-color: var(--editor-accent);
    transform: translateY(-4px);
}

.template-card-preview {
    height: 160px;
    background: var(--editor-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.template-card-body {
    padding: 16px;
}

.template-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--editor-text);
    margin-bottom: 4px;
}

.template-card-description {
    font-size: 0.85rem;
    color: var(--editor-text-muted);
    margin-bottom: 12px;
}

.template-card-actions {
    display: flex;
    gap: 8px;
}

.template-card-actions .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.8rem;
}

/* ===== ICON MANAGER STYLES ===== */
.icon-style-grid,
.icon-size-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.icon-style-option,
.icon-size-option {
    flex: 1;
    min-width: 70px;
    padding: 12px 8px;
    background: var(--editor-bg);
    border: 2px solid var(--editor-border);
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: var(--editor-transition);
}

.icon-style-option:hover,
.icon-size-option:hover {
    border-color: var(--editor-accent);
    background: var(--editor-card-hover);
}

.icon-style-option.active,
.icon-size-option.active {
    border-color: var(--editor-accent);
    background: rgba(102, 126, 234, 0.1);
}

.icon-style-option input,
.icon-size-option input {
    display: none;
}

.icon-style-preview {
    font-size: 1.5rem;
    color: var(--editor-accent);
    margin-bottom: 6px;
}

.icon-style-label,
.icon-size-option span {
    font-size: 0.75rem;
    color: var(--editor-text-muted);
    display: block;
}

.icon-color-options {
    display: flex;
    gap: 8px;
}

.icon-color-option {
    flex: 1;
    padding: 10px;
    background: var(--editor-bg);
    border: 2px solid var(--editor-border);
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: var(--editor-transition);
}

.icon-color-option:hover {
    border-color: var(--editor-accent);
}

.icon-color-option.active {
    border-color: var(--editor-accent);
    background: rgba(102, 126, 234, 0.1);
}

.icon-color-option input {
    display: none;
}

.icon-color-option span {
    font-size: 0.8rem;
    color: var(--editor-text);
}

.social-style-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.social-style-option {
    padding: 12px 8px;
    background: var(--editor-bg);
    border: 2px solid var(--editor-border);
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: var(--editor-transition);
}

.social-style-option:hover {
    border-color: var(--editor-accent);
}

.social-style-option.active {
    border-color: var(--editor-accent);
    background: rgba(102, 126, 234, 0.1);
}

.social-style-option input {
    display: none;
}

.social-style-preview {
    width: 32px;
    height: 32px;
    margin: 0 auto 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: var(--editor-accent);
}

.social-style-preview.social-circle {
    border-radius: 50%;
}

.social-style-preview.social-square {
    border-radius: 0;
}

.social-style-preview.social-rounded {
    border-radius: 8px;
}

.social-style-preview.social-minimal {
    background: transparent;
    color: var(--editor-accent);
}

.social-style-option span {
    font-size: 0.7rem;
    color: var(--editor-text-muted);
    display: block;
}

/* ===== SECTION MANAGER STYLES ===== */
.section-group {
    margin-bottom: 20px;
}

.section-group-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--editor-text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-group-title i {
    color: var(--editor-accent);
}

.section-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 50px;
    padding: 8px;
    background: var(--editor-bg);
    border-radius: 8px;
}

.section-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--editor-card);
    border: 1px solid var(--editor-border);
    border-radius: 8px;
    cursor: grab;
    transition: var(--editor-transition);
}

.section-item:hover {
    border-color: var(--editor-accent);
}

.section-item.dragging {
    opacity: 0.5;
    border-style: dashed;
}

.section-item.hidden-section {
    opacity: 0.5;
}

.section-item-drag {
    color: var(--editor-text-muted);
    cursor: grab;
}

.section-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(102, 126, 234, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--editor-accent);
    font-size: 0.8rem;
}

.section-item-name {
    flex: 1;
    font-size: 0.85rem;
    color: var(--editor-text);
}

.section-item-actions {
    display: flex;
    gap: 4px;
}

.section-action-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--editor-text-muted);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--editor-transition);
}

.section-action-btn:hover {
    background: var(--editor-bg);
    color: var(--editor-accent);
}

.section-action-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ===== SPACING MANAGER STYLES ===== */
.margin-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.margin-input-wrapper {
    text-align: center;
}

.margin-input-wrapper label {
    font-size: 0.7rem;
    color: var(--editor-text-muted);
    display: block;
    margin-bottom: 4px;
}

.margin-input-group {
    display: flex;
    align-items: center;
    background: var(--editor-bg);
    border: 1px solid var(--editor-border);
    border-radius: 6px;
    overflow: hidden;
}

.margin-input {
    width: 100%;
    padding: 8px;
    background: transparent;
    border: none;
    color: var(--editor-text);
    text-align: center;
    font-size: 0.85rem;
}

.margin-input:focus {
    outline: none;
}

.margin-unit {
    padding-right: 8px;
    font-size: 0.75rem;
    color: var(--editor-text-muted);
}

.spacing-presets {
    display: flex;
    gap: 8px;
}

.spacing-preset-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px;
    background: var(--editor-bg);
    border: 2px solid var(--editor-border);
    border-radius: 8px;
    color: var(--editor-text-muted);
    cursor: pointer;
    transition: var(--editor-transition);
}

.spacing-preset-btn:hover {
    border-color: var(--editor-accent);
    color: var(--editor-accent);
}

.spacing-preset-btn i {
    font-size: 1.2rem;
}

.spacing-preset-btn span {
    font-size: 0.75rem;
}

/* ===== MODAL STYLES ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--editor-card);
    border: 1px solid var(--editor-border);
    border-radius: var(--editor-radius);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--editor-accent), #764ba2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.modal-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 24px;
    max-height: 400px;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px;
    background: var(--editor-bg);
    border-top: 1px solid var(--editor-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Version History List */
.version-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.version-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--editor-bg);
    border: 1px solid var(--editor-border);
    border-radius: 8px;
    transition: var(--editor-transition);
}

.version-item:hover {
    border-color: var(--editor-accent);
}

.version-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.version-number {
    font-weight: 600;
    color: var(--editor-text);
    font-size: 0.9rem;
}

.version-date {
    font-size: 0.75rem;
    color: var(--editor-text-muted);
}

.version-actions {
    display: flex;
    gap: 8px;
}

.version-action-btn {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--editor-border);
    border-radius: 4px;
    color: var(--editor-text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--editor-transition);
}

.version-action-btn:hover {
    border-color: var(--editor-accent);
    color: var(--editor-accent);
}

.version-action-btn.primary {
    background: var(--editor-accent);
    border-color: var(--editor-accent);
    color: white;
}

.version-action-btn.primary:hover {
    background: var(--editor-accent-hover);
}

/* ===== COLOR PRESETS ===== */
.color-presets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
}

.color-preset {
    padding: 10px;
    background: var(--editor-bg);
    border: 2px solid var(--editor-border);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--editor-transition);
    text-align: center;
}

.color-preset:hover {
    border-color: var(--editor-accent);
}

.color-preset.active {
    border-color: var(--editor-accent);
    background: rgba(102, 126, 234, 0.1);
}

.color-preset-colors {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
    justify-content: center;
}

.color-preset-colors span {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.color-preset-name {
    font-size: 0.7rem;
    color: var(--editor-text-muted);
    display: block;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {

    /* Editor layout - stack vertically on mobile */
    .editor-layout {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }

    /* Hide settings panel on mobile, show only preview */
    .editor-settings {
        display: none;
    }

    /* Preview takes full width */
    .editor-preview {
        width: 100% !important;
        padding: 10px !important;
    }

    /* CV Preview - fit to mobile with centering */
    .preview-paper .cv-preview,
    .preview-container .cv-preview,
    #cvPreview {
        transform: scale(0.7) !important;
        transform-origin: center center !important;
        margin: 0 auto !important;
    }

    /* Preview paper - flex center */
    .preview-paper {
        padding: 20px 10px !important;
        min-height: calc(100vh - 150px) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Preview controls - horizontal scroll if needed */
    .preview-controls {
        flex-wrap: wrap;
        gap: 8px;
        padding: 8px;
    }

    /* Zoom buttons smaller */
    .preview-zoom-btn {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}

/* Tablet view */
@media (min-width: 769px) and (max-width: 1024px) {
    .editor-layout {
        grid-template-columns: 380px 1fr !important;
    }

    .preview-paper .cv-preview,
    .preview-container .cv-preview,
    #cvPreview {
        transform: scale(0.65) !important;
    }
}

/* Large screens - larger scale for better readability */
@media (min-width: 1025px) {

    .preview-paper .cv-preview,
    .preview-container .cv-preview,
    #cvPreview {
        transform: scale(0.75) !important;
    }
}

/* ===== MOBILE TAB BAR SYSTEM ===== */
.mobile-tab-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--editor-card);
    border-top: 1px solid var(--editor-border);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    gap: 0;
}

.mobile-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px;
    background: transparent;
    border: none;
    color: var(--editor-text-muted);
    cursor: pointer;
    transition: var(--editor-transition);
    font-size: 0.75rem;
    height: 100%;
}

.mobile-tab i {
    font-size: 1.2rem;
}

.mobile-tab.active {
    color: var(--editor-accent);
    background: rgba(102, 126, 234, 0.1);
}

.mobile-tab:hover:not(.active) {
    color: var(--editor-text);
    background: rgba(255, 255, 255, 0.05);
}

/* Mobile Tab System - Panel Visibility */
@media (max-width: 768px) {

    /* Show tab bar only on mobile */
    .mobile-tab-bar {
        display: flex;
    }

    /* Editor Layout - Stack on mobile */
    .editor-layout {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
        padding: 0 !important;
        padding-bottom: 70px !important;
        /* Space for tab bar */
        min-height: calc(100vh - 60px) !important;
    }

    /* Panel sizing on mobile */
    .editor-panel,
    .preview-panel {
        max-height: none !important;
        min-height: calc(100vh - 130px) !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
    }

    /* Default: Show editor, hide preview */
    .editor-panel {
        display: flex !important;
    }

    .preview-panel {
        display: none !important;
    }

    /* When preview tab is active */
    body.show-preview .editor-panel {
        display: none !important;
    }

    body.show-preview .preview-panel {
        display: flex !important;
    }

    /* Preview paper - container for mobile full screen CV */
    .preview-paper {
        padding: 0 !important;
        height: calc(100vh - 120px) !important;
        min-height: calc(100vh - 120px) !important;
        max-height: calc(100vh - 120px) !important;
        overflow: visible !important;
        display: flex !important;
        justify-content: center !important;
        align-items: flex-start !important;
        background: #0a0a14 !important;
        padding-top: 10px !important;
    }

    /* Hide preview header and controls on mobile to save space */
    .preview-controls,
    .preview-header,
    #exportTemplateBtn {
        display: none !important;
    }

    /* Adjust preview panel height since header is hidden */
    .preview-panel {
        padding-top: 0 !important;
        overflow: hidden !important;
    }

    /* CV Preview - use transform scale to fit entire CV */
    .preview-paper .cv-preview,
    .preview-container .cv-preview,
    #cvPreview {
        /* Keep original A4 dimensions */
        width: 595px !important;
        height: 842px !important;
        min-height: 842px !important;
        max-height: 842px !important;
        /* Scale to fit viewport height - (viewport - header - tabbar) / 842 */
        transform: scale(calc((100vh - 160px) / 842)) !important;
        transform-origin: top center !important;
        margin: 0 auto !important;
        flex-shrink: 0 !important;
        position: relative !important;
        overflow: visible !important;
    }

    /* Remove custom font sizes - let scale handle it */

    /* Hide keyboard hints on mobile */
    .keyboard-hint {
        display: none !important;
    }

    /* Admin sidebar hidden on mobile editor */
    .admin-sidebar {
        display: none !important;
    }

    .admin-main {
        margin-left: 0 !important;
    }

    /* User header adjustments */
    .user-editor-header {
        padding: 0 12px !important;
        height: 50px !important;
    }

    .user-editor-header h1 {
        font-size: 0.9rem !important;
    }

    .user-editor-content {
        margin-top: 50px !important;
    }

    /* Editor panel header */
    .editor-panel-header {
        padding: 12px 16px !important;
    }

    .editor-panel-header h2 {
        font-size: 1rem !important;
    }

    /* Accordion adjustments */
    .accordion-header {
        padding: 12px 16px !important;
    }

    .accordion-body {
        padding: 16px !important;
    }

    /* Editor actions */
    .editor-actions {
        padding: 12px 16px !important;
        flex-wrap: wrap !important;
    }

    .editor-actions .btn {
        flex: 1 1 auto !important;
        min-width: 45% !important;
    }

    /* Color grid - single column on small screens */
    .color-grid {
        grid-template-columns: 1fr !important;
    }

    /* Layout grid - 2 columns on mobile */
    .layout-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Very small screens */
@media (max-width: 375px) {
    .mobile-tab span {
        display: none;
    }

    .mobile-tab i {
        font-size: 1.4rem;
    }

    .preview-paper .cv-preview,
    .preview-container .cv-preview,
    #cvPreview {
        transform: scale(0.35) !important;
    }
}

/* ===== CV PREVIEW COMPONENT STYLES ===== */
.cv-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    margin-bottom: 6px;
}

.cv-contact-item i {
    width: 16px;
    text-align: center;
    opacity: 0.8;
}

.cv-skill-item {
    margin-bottom: 10px;
}

.cv-skill-name {
    font-size: 0.75rem;
    display: block;
    margin-bottom: 4px;
}

.cv-language-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-bottom: 6px;
}

.cv-language-level {
    opacity: 0.7;
}

.cv-hobby-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cv-hobby-item {
    font-size: 0.75rem;
}

.cv-about-text {
    font-size: 0.8rem;
    line-height: 1.6;
    color: inherit;
    opacity: 0.9;
}

.cv-experience-item,
.cv-education-item,
.cv-certificate-item,
.cv-project-item,
.cv-reference-item {
    margin-bottom: 16px;
}

.cv-experience-item:last-child,
.cv-education-item:last-child,
.cv-certificate-item:last-child,
.cv-project-item:last-child,
.cv-reference-item:last-child {
    margin-bottom: 0;
}

.cv-experience-header {
    margin-bottom: 2px;
}

.cv-experience-header strong {
    font-size: 0.9rem;
}

.cv-experience-company {
    font-size: 0.85rem;
    opacity: 0.7;
}

.cv-experience-date,
.cv-education-date,
.cv-education-school,
.cv-certificate-org,
.cv-reference-title,
.cv-reference-contact {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 2px;
}

.cv-experience-desc,
.cv-project-desc {
    font-size: 0.8rem;
    line-height: 1.5;
    margin-top: 6px;
    opacity: 0.9;
}

/* NEW: Section Title Styles Preview */
.section-title-preview.gradient {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.05) 100%);
    /* Fallback colors */
    background: linear-gradient(135deg, var(--editor-accent-bg, rgba(102, 126, 234, 0.15)) 0%, rgba(118, 75, 162, 0.05) 100%);
    padding: 6px 10px;
    border-radius: 6px;
    border-left: 3px solid var(--editor-accent);
    color: var(--editor-text);
}

.section-title-preview.double-line {
    border-bottom: 1px solid var(--editor-accent);
    padding-bottom: 4px;
    position: relative;
    box-shadow: 0 3px 0 -2px var(--editor-accent);
    color: var(--editor-text);
}

.section-title-preview.shadow {
    text-shadow: 2px 2px 0 var(--editor-border);
    letter-spacing: 1px;
    color: var(--editor-text);
}

.section-title-preview.badge {
    display: inline-block;
    background: var(--editor-accent);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
}

.section-title-preview.uppercase {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--editor-text);
}