:root {
    --primary: #4F46E5;
    --primary-dark: #4338CA;
    --secondary: #10B981;
    --dark: #1e293b;
    --gray: #64748b;
    --light-gray: #e2e8f0;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #22c55e;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
    --radius: 16px;
    --radius-lg: 16px;
    --card-gap: 32px;
}

.hidden {
    display: none !important;
}

/* Icon Fallback System - Hide emoji when Font Awesome loads */
.icon-fallback {
    font-style: normal;
    margin-right: 4px;
    display: none; /* Hidden by default - only show if FA fails */
}

/* Show icon-fallback only if Font Awesome fails to load */
.fa-failed .icon-fallback {
    display: inline;
}

/* Hide emoji fallback when Font Awesome is loaded */
.fa, .fas, .far, .fab, .fal, .fad {
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands', sans-serif !important;
}

/* When FA loads successfully, hide the emoji fallback */
.fas:not(:empty) ~ .icon-fallback,
.far:not(:empty) ~ .icon-fallback,
.fab:not(:empty) ~ .icon-fallback,
.fa:not(:empty) ~ .icon-fallback,
.icon-fallback + .fas,
.icon-fallback + .far,
.icon-fallback + .fab,
.icon-fallback + .fa {
    /* Both show by default, FA takes precedence visually */
}

/* Ensure icons have proper sizing */
.fas, .far, .fab, .fa {
    min-width: 1em;
    text-align: center;
}

/* Section toolbar button fix - ensure icons show */
.section-toolbar .toolbar-btn {
    min-width: 32px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.section-toolbar .toolbar-btn i {
    font-size: 12px;
}

/* Toolbar button text fallbacks */
.section-toolbar .toolbar-btn[title="Move Up"]::before {
    content: "↑";
    font-family: inherit;
}
.section-toolbar .toolbar-btn[title="Move Down"]::before {
    content: "↓";
    font-family: inherit;
}
.section-toolbar .toolbar-btn[title="Duplicate"]::before {
    content: "⧉";
    font-family: inherit;
}
.section-toolbar .toolbar-btn[title="Delete"]::before {
    content: "🗑";
    font-family: inherit;
}

/* Hide text fallback when icon loads */
.section-toolbar .toolbar-btn i.fas,
.section-toolbar .toolbar-btn i.far,
.section-toolbar .toolbar-btn i.fa {
    display: inline-block;
}

.section-toolbar .toolbar-btn i.fas:not(:empty)::before,
.section-toolbar .toolbar-btn i.far:not(:empty)::before,
.section-toolbar .toolbar-btn i.fa:not(:empty)::before {
    content: none;
}

/* Hide fallback ::before when FA is available */
@supports (font-family: "Font Awesome 6 Free") {
    .section-toolbar .toolbar-btn::before {
        display: none !important;
    }
}

/* Drag handle styling */
.section-drag-handle {
    display: flex;
    align-items: center;
    gap: 4px;
}

.section-drag-handle .icon-fallback {
    display: inline-block;
    color: var(--gray);
    font-size: 12px;
    letter-spacing: -2px;
}

/* Resume section header icons */
.resume-section h2 .icon-fallback {
    font-size: 16px;
    margin-right: 6px;
}

/* Button icon fallbacks */
.btn .icon-fallback,
.add-item-btn .icon-fallback {
    font-size: 14px;
    margin-right: 4px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-light);
    color: var(--dark);
    line-height: 1.6;
}

body.rtl {
    direction: rtl;
    text-align: right;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    gap: 8px;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

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

.btn-success:hover {
    background: #059669;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--light-gray);
    color: var(--dark);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

/* Header */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    font-size: 28px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav a {
    color: var(--gray);
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s;
    white-space: nowrap;
    padding: 8px 0;
}

.nav a:hover, .nav a.active {
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-switcher {
    position: relative;
}

.lang-switcher select {
    padding: 10px 32px 10px 14px;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    background: var(--white);
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    min-width: 100px;
}

.header-actions .btn {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 8px;
    white-space: nowrap;
}

.lang-switcher::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 12px;
    color: var(--gray);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.85) 0%, rgba(124, 58, 237, 0.85) 100%),
                url('../images/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 20px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 30px;
}

.hero .btn {
    font-size: 18px;
    padding: 16px 40px;
}

/* Hero Background Decorations */
.hero {
    position: relative;
    overflow: hidden;
}

.hero-bg-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

/* Floating Abstract Shapes */
.floating-shape {
    position: absolute;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    opacity: 0.1;
    animation: floatShape 20s ease-in-out infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.5) 100%);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(45deg, #a78bfa 0%, #7c3aed 100%);
    top: 50%;
    right: -50px;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation-delay: -5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: rgba(255,255,255,0.15);
    bottom: -50px;
    left: 20%;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation-delay: -10s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 100%);
    top: 30%;
    left: 10%;
    border-radius: 50% 50% 30% 70% / 50% 70% 30% 50%;
    animation-delay: -3s;
}

.shape-5 {
    width: 180px;
    height: 180px;
    background: rgba(167, 139, 250, 0.15);
    bottom: 10%;
    right: 15%;
    border-radius: 70% 30% 50% 50% / 30% 60% 40% 70%;
    animation-delay: -8s;
}

.shape-6 {
    width: 120px;
    height: 120px;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, rgba(124,58,237,0.2) 100%);
    top: 20%;
    right: 30%;
    border-radius: 50%;
    animation-delay: -12s;
}

/* Floating Circles */
.floating-circle {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2);
    animation: floatCircle 15s ease-in-out infinite;
}

.circle-1 {
    width: 80px;
    height: 80px;
    top: 15%;
    left: 5%;
    animation-delay: 0s;
}

.circle-2 {
    width: 50px;
    height: 50px;
    bottom: 25%;
    left: 15%;
    border-color: rgba(167, 139, 250, 0.3);
    animation-delay: -4s;
}

.circle-3 {
    width: 60px;
    height: 60px;
    top: 40%;
    right: 8%;
    animation-delay: -7s;
}

/* Wave Pattern at Bottom */
.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='rgba(255,255,255,0.05)' d='M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,250.7C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") no-repeat bottom;
    background-size: cover;
}

/* Dots Pattern */
.hero-dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.5;
}

/* Floating Animations */
@keyframes floatShape {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(15px, -20px) rotate(5deg);
    }
    50% {
        transform: translate(-10px, 15px) rotate(-3deg);
    }
    75% {
        transform: translate(20px, 10px) rotate(8deg);
    }
}

@keyframes floatCircle {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.5;
    }
    33% {
        transform: translate(10px, -15px) scale(1.1);
        opacity: 0.7;
    }
    66% {
        transform: translate(-5px, 10px) scale(0.9);
        opacity: 0.4;
    }
}

/* Glowing effect for shapes */
.shape-1, .shape-2 {
    filter: blur(1px);
}

/* Mobile responsiveness for decorations */
@media (max-width: 768px) {
    .floating-shape {
        transform: scale(0.6);
    }
    .floating-circle {
        transform: scale(0.7);
    }
    .hero-dots {
        background-size: 20px 20px;
    }
}

/* Features Section */
.features {
    padding: 80px 0;
    background: var(--white);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
}

.section-title p {
    color: var(--gray);
    font-size: 18px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--card-gap);
}

.feature-card {
    padding: 30px;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.feature-icon i {
    font-size: 28px;
    color: var(--white);
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--gray);
    font-size: 15px;
}

/* Templates Section */
.templates-section {
    padding: 80px 0;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--card-gap);
}

.template-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.template-preview {
    height: 300px;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.template-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.template-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(79, 70, 229, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.template-card:hover .template-overlay {
    opacity: 1;
}

.template-info {
    padding: 20px;
}

.template-info h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.template-info .category {
    color: var(--gray);
    font-size: 14px;
}

.template-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.template-badge.free {
    background: var(--secondary);
    color: var(--white);
}

.template-badge.premium {
    background: var(--warning);
    color: var(--white);
}

/* Builder Page */
.builder-container {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    min-height: calc(100vh - 70px);
    gap: 0;
}

.builder-sidebar {
    background: var(--white);
    border-right: 1px solid var(--light-gray);
    overflow-y: auto;
    height: calc(100vh - 70px);
    position: sticky;
    top: 70px;
}

.builder-canvas {
    background: var(--bg-light);
    padding: 30px;
    overflow-y: auto;
}

.builder-toolbar {
    background: var(--white);
    border-left: 1px solid var(--light-gray);
    padding: 20px;
    overflow-y: auto;
    height: calc(100vh - 70px);
    position: sticky;
    top: 70px;
}

.sidebar-section {
    padding: 20px;
    border-bottom: 1px solid var(--light-gray);
}

.sidebar-section h3 {
    font-size: 14px;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid var(--light-gray);
}

.sidebar-tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    font-weight: 500;
    color: var(--gray);
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.sidebar-tab:hover, .sidebar-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Resume Canvas */
.resume-paper {
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 27px,
            rgba(79, 70, 229, 0.03) 27px,
            rgba(79, 70, 229, 0.03) 28px
        ),
        linear-gradient(90deg, #fdfbf7 0%, #fffef9 50%, #fdfbf7 100%);
    background-color: #fffef9;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 50px;
    box-shadow: 
        0 0 0 1px rgba(0, 0, 0, 0.05),
        0 2px 4px rgba(0, 0, 0, 0.05),
        0 8px 16px rgba(0, 0, 0, 0.08),
        0 24px 48px rgba(0, 0, 0, 0.1);
    border-radius: var(--radius);
    min-height: 1100px;
    position: relative;
}

.resume-paper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.8) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    border-radius: var(--radius);
}

.resume-section {
    margin-bottom: 20px;
    padding: 15px;
    border: 2px dashed transparent;
    border-radius: 12px;
    transition: all 0.2s ease;
    position: relative;
    cursor: move;
}

.resume-section:hover {
    border-color: rgba(79, 70, 229, 0.3);
    background: rgba(79, 70, 229, 0.02);
}

.resume-section.dragging {
    opacity: 0.5;
}

.resume-section h2 {
    font-size: 18px;
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 8px;
    margin-bottom: 15px;
}

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

.resume-header h1 {
    font-size: 28px;
    color: var(--dark);
    margin-bottom: 5px;
}

.resume-header .title {
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 10px;
}

.resume-header .contact-info {
    color: var(--gray);
    font-size: 14px;
}

.resume-header .contact-info span {
    margin: 0 10px;
}

/* Editable Fields */
.editable {
    outline: none;
    border: 1px solid transparent;
    padding: 2px 5px;
    border-radius: 4px;
    transition: all 0.2s;
}

.editable:hover {
    background: rgba(79, 70, 229, 0.05);
}

.editable:focus {
    border-color: var(--primary);
    background: var(--white);
}

/* ATS Score */
.ats-score-widget {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(var(--primary) var(--score-percent, 0%), var(--light-gray) 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    position: relative;
}

.score-circle::before {
    content: '';
    width: 90px;
    height: 90px;
    background: var(--white);
    border-radius: 50%;
    position: absolute;
}

.score-value {
    position: relative;
    z-index: 1;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

.score-grade {
    font-size: 14px;
    color: var(--gray);
}

.suggestions-list {
    text-align: left;
    margin-top: 15px;
}

.suggestion-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    background: var(--bg-light);
    border-radius: var(--radius);
    margin-bottom: 8px;
    font-size: 13px;
}

.suggestion-item i {
    color: var(--warning);
    margin-top: 2px;
}

/* Section Items */
.section-item {
    padding: 14px 16px;
    background: var(--white);
    border: 2px dashed var(--light-gray);
    border-radius: var(--radius);
    margin-bottom: 10px;
    cursor: grab;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.25s ease;
    position: relative;
}

.section-item::before {
    content: "⋮⋮";
    color: var(--gray);
    font-size: 12px;
    letter-spacing: -3px;
    margin-right: 4px;
}

.section-item:hover {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: var(--white);
    border-color: var(--primary);
    border-style: solid;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.section-item:hover::before {
    color: rgba(255, 255, 255, 0.7);
}

.section-item:active {
    cursor: grabbing;
    transform: scale(1.02);
}

.section-item.dragging {
    opacity: 0.5;
    transform: rotate(3deg);
}

.section-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.section-item span {
    font-weight: 500;
}

.section-items-header {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-items-header::before {
    content: "📋";
}

.resume-sections.drag-over {
    background: rgba(79, 70, 229, 0.05);
    border: 2px dashed var(--primary);
    border-radius: var(--radius);
}

/* Input Fields */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--light-gray);
    border-radius: var(--radius);
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

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

/* Toolbar Actions */
.toolbar-section {
    margin-bottom: 25px;
}

.toolbar-section h4 {
    font-size: 13px;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 12px;
}

.toolbar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.toolbar-btn {
    width: 45px;
    height: 45px;
    border: 1px solid var(--light-gray);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--white);
}

.toolbar-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

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

.color-options {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.color-option {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: transform 0.2s;
}

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

.color-option.active {
    border-color: var(--dark);
}

/* Optimizer Page */
.optimizer-container {
    padding: 50px 0;
}

.optimizer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.optimizer-input, .optimizer-results {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow);
}

.optimizer-input h2, .optimizer-results h2 {
    font-size: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.keyword-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.keyword-tag {
    padding: 6px 12px;
    background: var(--bg-light);
    border-radius: 20px;
    font-size: 13px;
    color: var(--dark);
}

.keyword-tag.technical {
    background: #dbeafe;
    color: #1e40af;
}

.keyword-tag.soft {
    background: #dcfce7;
    color: #166534;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: var(--white);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.footer-section.brand {
    max-width: 280px;
}

.footer-section .footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
}

.footer-section .footer-logo i {
    color: var(--primary);
    font-size: 24px;
}

.footer-section .footer-desc {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: all 0.3s;
    margin-bottom: 0;
}

.footer-social a:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.footer-section h4 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-section a {
    display: block;
    color: #94a3b8;
    margin-bottom: 12px;
    font-size: 14px;
    transition: all 0.2s;
}

.footer-section a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.08);
    color: #64748b;
    font-size: 13px;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    .footer-section.brand {
        grid-column: span 2;
        max-width: 100%;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .builder-container {
        grid-template-columns: 1fr;
    }
    
    .builder-sidebar, .builder-toolbar {
        display: none;
    }
    
    .optimizer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }
    
    .nav {
        display: none;
    }
    
    .templates-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-gray);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    background: var(--dark);
    color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    animation: slideIn 0.3s ease-out;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--dark);
    padding: 8px;
    z-index: 1002;
    position: relative;
}

.mobile-menu-btn:hover {
    color: var(--primary);
}

.mobile-menu-btn .fa-times {
    display: none;
}

.mobile-menu-btn.active .fa-bars {
    display: none;
}

.mobile-menu-btn.active .fa-times {
    display: inline-block;
}

/* Mobile Menu Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 80px 30px 30px;
        gap: 0;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1001;
        display: flex;
    }
    
    .nav.active {
        right: 0;
    }
    
    .nav a {
        width: 100%;
        padding: 15px 0;
        font-size: 18px;
        border-bottom: 1px solid var(--light-gray);
    }
    
    .nav a:last-child {
        border-bottom: none;
    }
    
    .header-actions {
        display: none;
    }
    
    .header-actions.mobile-visible {
        display: flex;
        flex-direction: column;
        position: fixed;
        bottom: 0;
        right: 0;
        width: 280px;
        padding: 20px 30px;
        background: var(--white);
        border-top: 1px solid var(--light-gray);
        z-index: 1001;
        gap: 15px;
    }
    
    .header-actions.mobile-visible .btn {
        width: 100%;
        justify-content: center;
    }
    
    .header-actions.mobile-visible .lang-switcher {
        width: 100%;
    }
    
    .header-actions.mobile-visible .lang-switcher select {
        width: 100%;
    }
}

/* Stats Section */
.stats-section {
    background: var(--white);
    padding: 60px 0;
    border-bottom: 1px solid var(--light-gray);
}

.stats-section .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    text-align: center;
}

.stat-item {
    padding: 20px;
}

.stat-number {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 10px;
}

.stat-number::after {
    content: '+';
}

.stat-label {
    font-size: 16px;
    color: var(--gray);
    font-weight: 500;
}

@media (max-width: 768px) {
    .stats-section .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .stat-number {
        font-size: 36px;
    }
}

/* Features Section Fix */
.features {
    padding: 80px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--card-gap);
    margin-top: 40px;
}

.feature-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.feature-icon i {
    font-size: 28px;
    color: var(--white);
}

.feature-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--dark);
}

.feature-card p {
    color: var(--gray);
    font-size: 14px;
    line-height: 1.6;
}

@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* How It Works Section */
.how-it-works {
    background: var(--bg-light);
    padding: 80px 0;
}

.steps-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 50px;
}

.step-card {
    text-align: center;
    padding: 40px 30px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    flex: 1;
    max-width: 300px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.step-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.step-icon i {
    font-size: 32px;
    color: var(--white);
}

.step-number {
    width: 36px;
    height: 36px;
    background: var(--secondary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    margin: 0 auto 15px;
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
}

.step-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--dark);
}

.step-card p {
    color: var(--gray);
    font-size: 14px;
}

.step-connector {
    color: var(--primary);
    font-size: 24px;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .steps-container {
        flex-direction: column;
        gap: 40px;
    }
    
    .step-connector {
        transform: rotate(90deg);
    }
    
    .step-card {
        max-width: 100%;
        width: 100%;
    }
}

/* Testimonials Section */
.testimonials-section {
    padding: 80px 0;
    background: var(--white);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--card-gap);
    margin-top: 50px;
}

.testimonial-card {
    background: var(--bg-light);
    padding: 30px;
    border-radius: var(--radius-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow);
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.testimonial-rating {
    margin-bottom: 15px;
}

.testimonial-rating i {
    color: #fbbf24;
    font-size: 16px;
}

.testimonial-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--dark);
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-avatar i {
    color: var(--white);
    font-size: 20px;
}

.author-info strong {
    display: block;
    color: var(--dark);
    font-size: 16px;
}

.author-info span {
    color: var(--gray);
    font-size: 14px;
}

@media (max-width: 992px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    padding: 80px 0;
    text-align: center;
}

.cta-section h2 {
    color: var(--white);
    font-size: 36px;
    margin-bottom: 15px;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    margin-bottom: 30px;
}

.cta-section .btn {
    background: var(--white);
    color: var(--primary);
    font-size: 16px;
    padding: 15px 40px;
}

.cta-section .btn:hover {
    background: var(--bg-light);
    transform: translateY(-2px);
}

/* Templates Page Styles */
.templates-page {
    padding: 50px 0 80px;
}

.templates-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    background: var(--white);
    padding: 24px 32px;
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--light-gray);
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
    max-width: 350px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid var(--light-gray);
    border-radius: var(--radius);
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.results-count {
    color: var(--gray);
    font-size: 14px;
}

.results-count span {
    font-weight: 700;
    color: var(--primary);
}

/* Resume Mockup Preview */
.resume-mockup {
    background: var(--white);
    border-radius: 8px;
    padding: 15px;
    height: 220px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s;
}

.mockup-header {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--light-gray);
}

.mockup-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-color, var(--primary));
    flex-shrink: 0;
}

.mockup-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
}

.mockup-line {
    height: 8px;
    background: var(--light-gray);
    border-radius: 4px;
}

.mockup-line.name {
    width: 70%;
    height: 10px;
    background: var(--accent-color, var(--primary));
}

.mockup-line.title {
    width: 50%;
}

.mockup-line.heading {
    width: 40%;
    height: 8px;
    background: var(--accent-color, var(--primary));
    margin-bottom: 8px;
}

.mockup-line.short {
    width: 60%;
}

.mockup-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mockup-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Sidebar Layout Mockup */
.resume-mockup.sidebar {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 10px;
    padding: 12px;
}

.resume-mockup.sidebar .mockup-header {
    grid-column: 1;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-bottom: none;
    border-right: 1px solid var(--light-gray);
    padding-right: 10px;
    margin-bottom: 0;
}

.resume-mockup.sidebar .mockup-body {
    grid-column: 2;
}

/* Creative Layout */
.resume-mockup.creative .mockup-header {
    background: var(--accent-color, var(--primary));
    margin: -15px -15px 15px;
    padding: 15px;
    border-bottom: none;
}

.resume-mockup.creative .mockup-avatar {
    background: var(--white);
}

.resume-mockup.creative .mockup-line.name {
    background: var(--white);
}

/* Executive Layout */
.resume-mockup.executive .mockup-header {
    border-bottom: 2px solid var(--accent-color, var(--primary));
}

/* Minimal Layout */
.resume-mockup.minimal .mockup-avatar {
    display: none;
}

.resume-mockup.minimal .mockup-header {
    text-align: center;
    display: block;
}

.resume-mockup.minimal .mockup-lines {
    align-items: center;
}

/* Template Card Updates */
.template-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.template-card:hover .template-overlay {
    opacity: 1;
}

.template-card:hover .resume-mockup {
    transform: scale(1.02);
}

.template-preview {
    position: relative;
    padding: 20px;
    background: var(--bg-light);
}

.template-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

.template-overlay .btn {
    min-width: 140px;
}

.template-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1;
}

.template-badge.free {
    background: var(--secondary);
    color: var(--white);
}

.template-badge.premium {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: var(--dark);
}

.template-info {
    padding: 20px;
}

.template-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--dark);
}

.template-info .category {
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
}

.template-desc {
    font-size: 13px;
    color: var(--gray);
    margin-top: 8px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Preview Modal */
.template-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.template-modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    position: relative;
    box-shadow: var(--shadow-hover);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: var(--gray);
    z-index: 1;
}

.modal-close:hover {
    color: var(--dark);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

.modal-preview {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.resume-mockup-large {
    background: var(--white);
    border-radius: 8px;
    padding: 30px;
    width: 100%;
    min-height: 400px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.resume-mockup-large .mockup-header {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    border-radius: var(--radius);
}

.resume-mockup-large .mockup-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    flex-shrink: 0;
}

.resume-mockup-large .mockup-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}

.resume-mockup-large .mockup-line {
    height: 12px;
    background: var(--light-gray);
    border-radius: 6px;
}

.resume-mockup-large .mockup-line.name {
    width: 60%;
    height: 16px;
}

.resume-mockup-large .mockup-line.title {
    width: 40%;
}

.resume-mockup-large .mockup-line.contact {
    width: 80%;
}

.resume-mockup-large .mockup-body {
    padding: 0 10px;
}

.resume-mockup-large .mockup-section {
    margin-bottom: 25px;
}

.resume-mockup-large .mockup-line.heading {
    width: 30%;
    height: 14px;
    margin-bottom: 15px;
}

.resume-mockup-large .mockup-skills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.resume-mockup-large .mockup-skills span {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.modal-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-info h2 {
    font-size: 28px;
    margin-bottom: 15px;
    color: var(--dark);
}

.modal-info > p {
    color: var(--gray);
    margin-bottom: 25px;
    line-height: 1.6;
}

.modal-features {
    margin-bottom: 30px;
}

.modal-features .feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    color: var(--dark);
}

.modal-features .feature i {
    color: var(--secondary);
}

@media (max-width: 768px) {
    .templates-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: none;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    
    .modal-preview {
        order: -1;
    }
}

/* Admin Styles */
.admin-container {
    display: block;
    min-height: 100vh;
}

.admin-sidebar {
    background: var(--dark);
    color: var(--white);
    padding: 0;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 250px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.admin-sidebar::-webkit-scrollbar {
    width: 6px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.admin-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.admin-sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar-header a {
    color: white;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.admin-nav {
    flex: 1;
    padding: 20px 0;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s;
    font-size: 15px;
}

.admin-nav a i {
    width: 20px;
    text-align: center;
}

.admin-nav a:hover, .admin-nav a.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.admin-sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 0;
    font-size: 15px;
    transition: color 0.2s;
}

.admin-sidebar-footer a:hover {
    color: white;
}

.admin-sidebar-footer a i {
    width: 20px;
    text-align: center;
}

.admin-content {
    margin-left: 250px;
    padding: 30px;
    background: var(--bg-light);
    min-height: 100vh;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-header h1 {
    font-size: 28px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.stat-card h3 {
    color: var(--gray);
    font-size: 14px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.stat-card .value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

.data-table {
    width: 100%;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-table th, .data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

.data-table th {
    background: var(--bg-light);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--gray);
}

.data-table tr:hover {
    background: var(--bg-light);
}

/* Dark Mode Variables */
body.dark-mode {
    --primary: #818cf8;
    --primary-dark: #6366f1;
    --secondary: #34d399;
    --dark: #e2e8f0;
    --gray: #94a3b8;
    --light-gray: #334155;
    --bg-light: #0f172a;
    --white: #1e293b;
    --danger: #f87171;
    --warning: #fbbf24;
    --success: #4ade80;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

body.dark-mode {
    background-color: var(--bg-light);
    color: var(--dark);
}

body.dark-mode * {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body.dark-mode .header {
    background: var(--white);
    border-bottom: 1px solid var(--light-gray);
}

body.dark-mode .logo {
    color: var(--primary);
}

body.dark-mode .nav a {
    color: var(--gray);
}

body.dark-mode .nav a:hover,
body.dark-mode .nav a.active {
    color: var(--primary);
}

body.dark-mode .lang-switcher select {
    background: var(--white);
    border-color: var(--light-gray);
    color: var(--dark);
}

body.dark-mode .form-control {
    background: #0f172a;
    border-color: var(--light-gray);
    color: var(--dark);
}

body.dark-mode .form-control:focus {
    border-color: var(--primary);
}

body.dark-mode .resume-paper {
    background: #1e293b;
    color: var(--dark);
}

body.dark-mode .resume-section h2 {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

body.dark-mode .resume-header h1 {
    color: var(--dark);
}

body.dark-mode .builder-sidebar,
body.dark-mode .builder-toolbar {
    background: var(--white);
    border-color: var(--light-gray);
}

body.dark-mode .sidebar-tab {
    color: var(--gray);
}

body.dark-mode .sidebar-tab:hover,
body.dark-mode .sidebar-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

body.dark-mode .section-item {
    background: #0f172a;
    color: var(--dark);
}

body.dark-mode .section-item:hover {
    background: var(--primary);
    color: #ffffff;
}

body.dark-mode .toolbar-btn {
    background: var(--white);
    border-color: var(--light-gray);
    color: var(--dark);
}

body.dark-mode .toolbar-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

body.dark-mode .btn-outline {
    background: transparent;
    border-color: var(--light-gray);
    color: var(--dark);
}

body.dark-mode .btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

body.dark-mode .editable {
    color: var(--dark);
}

body.dark-mode .editable:hover {
    background: rgba(129, 140, 248, 0.1);
}

body.dark-mode .editable:focus {
    border-color: var(--primary);
    background: #0f172a;
}

body.dark-mode .ats-score-widget {
    background: var(--white);
}

body.dark-mode .suggestion-item {
    background: #0f172a;
}

body.dark-mode .modal-content {
    background: var(--white);
    color: var(--dark);
}

body.dark-mode .skill-tag {
    background: var(--primary);
    color: #ffffff;
}

body.dark-mode .canvas-toolbar {
    background: var(--white);
    border-color: var(--light-gray);
}

body.dark-mode .layout-btn {
    background: var(--white);
    border-color: var(--light-gray);
    color: var(--gray);
}

body.dark-mode .layout-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

body.dark-mode .layout-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

body.dark-mode .zoom-slider {
    background: var(--light-gray);
}

body.dark-mode .zoom-fit-btn {
    background: var(--white);
    border-color: var(--light-gray);
    color: var(--gray);
}

body.dark-mode .zoom-fit-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

body.dark-mode .layout-switcher::before,
body.dark-mode .zoom-controls::before,
body.dark-mode .drafts-controls::before,
body.dark-mode .canvas-actions::before {
    background: var(--light-gray);
}

body.dark-mode .resume-paper {
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 27px,
            rgba(129, 140, 248, 0.05) 27px,
            rgba(129, 140, 248, 0.05) 28px
        ),
        linear-gradient(90deg, #1e293b 0%, #1f2937 50%, #1e293b 100%);
    background-color: #1e293b;
}

body.dark-mode .resume-paper::before {
    background: 
        radial-gradient(ellipse at 50% 0%, rgba(30, 41, 59, 0.8) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.02'/%3E%3C/svg%3E");
}

body.dark-mode .hero {
    background: linear-gradient(135deg, #4338CA 0%, #5b21b6 100%);
}

body.dark-mode .feature-card,
body.dark-mode .template-card,
body.dark-mode .testimonial-card {
    background: var(--white);
}

body.dark-mode .footer {
    background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
}

/* Dark Mode - Text & Content Visibility */
body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode h4, 
body.dark-mode h5, 
body.dark-mode h6 {
    color: #f1f5f9;
}

body.dark-mode p,
body.dark-mode span,
body.dark-mode li {
    color: #cbd5e1;
}

body.dark-mode .hero-content h1,
body.dark-mode .hero-content p {
    color: #ffffff;
}

body.dark-mode .section-title,
body.dark-mode .section-subtitle {
    color: #f1f5f9;
}

body.dark-mode .feature-card {
    background: #1e293b;
    border: 1px solid #334155;
}

body.dark-mode .feature-card h3 {
    color: #f1f5f9;
}

body.dark-mode .feature-card p {
    color: #94a3b8;
}

body.dark-mode .feature-icon {
    background: rgba(129, 140, 248, 0.2);
    color: #818cf8;
}

body.dark-mode .template-card {
    background: #1e293b;
    border: 1px solid #334155;
}

body.dark-mode .template-card h3,
body.dark-mode .template-info h3 {
    color: #f1f5f9;
}

body.dark-mode .template-card p {
    color: #94a3b8;
}

body.dark-mode .testimonial-card {
    background: #1e293b;
    border: 1px solid #334155;
}

body.dark-mode .testimonial-card p {
    color: #cbd5e1;
}

body.dark-mode .testimonial-author h4 {
    color: #f1f5f9;
}

body.dark-mode .testimonial-author span {
    color: #94a3b8;
}

body.dark-mode .stat-card,
body.dark-mode .stats-section .stat {
    background: #1e293b;
}

body.dark-mode .stat-card h3,
body.dark-mode .stat-number {
    color: #818cf8;
}

body.dark-mode .stat-card p,
body.dark-mode .stat-label {
    color: #94a3b8;
}

body.dark-mode .cta-section {
    background: linear-gradient(135deg, #4338CA 0%, #5b21b6 100%);
}

body.dark-mode .cta-section h2,
body.dark-mode .cta-section p {
    color: #ffffff;
}

body.dark-mode .step-card {
    background: #1e293b;
    border: 1px solid #334155;
}

body.dark-mode .step-card h3 {
    color: #f1f5f9;
}

body.dark-mode .step-card p {
    color: #94a3b8;
}

body.dark-mode .step-number {
    background: #818cf8;
    color: #ffffff;
}

/* Dark Mode - Page specific */
body.dark-mode .page-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

body.dark-mode .page-header h1,
body.dark-mode .page-header p {
    color: #f1f5f9;
}

body.dark-mode .content-section,
body.dark-mode .about-content,
body.dark-mode .faq-section {
    background: #0f172a;
}

body.dark-mode .faq-item {
    background: #1e293b;
    border: 1px solid #334155;
}

body.dark-mode .faq-question {
    color: #f1f5f9;
}

body.dark-mode .faq-answer {
    color: #94a3b8;
}

body.dark-mode .contact-form {
    background: #1e293b;
    border: 1px solid #334155;
}

body.dark-mode .contact-form label {
    color: #f1f5f9;
}

body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark-mode .contact-form input::placeholder,
body.dark-mode .contact-form textarea::placeholder {
    color: #64748b;
}

/* Dark Mode - Footer */
body.dark-mode .footer-section h4 {
    color: #f1f5f9;
}

body.dark-mode .footer-section a {
    color: #94a3b8;
}

body.dark-mode .footer-section a:hover {
    color: #ffffff;
}

body.dark-mode .footer-desc {
    color: #94a3b8;
}

body.dark-mode .footer-bottom {
    border-top-color: rgba(255,255,255,0.05);
    color: #64748b;
}

body.dark-mode .footer-social a {
    background: rgba(255,255,255,0.05);
    color: #94a3b8;
}

body.dark-mode .footer-social a:hover {
    background: #818cf8;
    color: #ffffff;
}

/* Dark Mode - Buttons */
body.dark-mode .btn-secondary {
    background: #334155;
    color: #f1f5f9;
    border-color: #475569;
}

body.dark-mode .btn-secondary:hover {
    background: #475569;
}

/* Dark Mode - Cards & Containers */
body.dark-mode .card,
body.dark-mode .panel,
body.dark-mode .box {
    background: #1e293b;
    border-color: #334155;
}

/* Dark Mode - Tables */
body.dark-mode table {
    background: #1e293b;
}

body.dark-mode th {
    background: #0f172a;
    color: #f1f5f9;
}

body.dark-mode td {
    color: #cbd5e1;
    border-color: #334155;
}

body.dark-mode tr:hover {
    background: rgba(129, 140, 248, 0.1);
}

/* Dark Mode - Badges */
body.dark-mode .badge {
    background: #334155;
    color: #cbd5e1;
}

body.dark-mode .badge-primary {
    background: rgba(129, 140, 248, 0.2);
    color: #818cf8;
}

/* Dark Mode - Links */
body.dark-mode a {
    color: #818cf8;
}

body.dark-mode a:hover {
    color: #a5b4fc;
}

/* Dark Mode - Why Choose Section */
body.dark-mode .why-choose-us {
    background: #0f172a;
}

body.dark-mode .why-card {
    background: #1e293b;
    border: 1px solid #334155;
}

body.dark-mode .why-card h3 {
    color: #f1f5f9;
}

body.dark-mode .why-card p {
    color: #94a3b8;
}

/* Dark Mode - Stats Section */
body.dark-mode .stats-section {
    background: linear-gradient(135deg, #312e81 0%, #1e1b4b 100%);
}

body.dark-mode .stat-item {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.1);
}

body.dark-mode .stat-number {
    color: #ffffff !important;
}

body.dark-mode .stat-label {
    color: #e2e8f0 !important;
}

/* Dark Mode - Features Section */
body.dark-mode .features {
    background: #0f172a;
}

body.dark-mode .section-title h2 {
    color: #f1f5f9;
}

/* Dark Mode - How It Works */
body.dark-mode .how-it-works {
    background: #1e293b;
}

body.dark-mode .step-card {
    background: #0f172a;
}

/* Dark Mode - Templates Section */
body.dark-mode .templates-section,
body.dark-mode .featured-templates {
    background: #0f172a;
}

body.dark-mode .template-preview {
    background: #1e293b;
    border: 1px solid #334155;
}

/* Dark Mode - Testimonials */
body.dark-mode .testimonials {
    background: #1e293b;
}

/* Dark Mode - CTA Section */
body.dark-mode .cta-section {
    background: linear-gradient(135deg, #4338CA 0%, #5b21b6 100%);
}

/* Dark Mode - Builder Page */
body.dark-mode .builder-container {
    background: #0f172a;
}

body.dark-mode .builder-main {
    background: #0f172a;
}

body.dark-mode .resume-canvas {
    background: #1e293b;
}

body.dark-mode .canvas-toolbar {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .canvas-toolbar button,
body.dark-mode .canvas-toolbar select {
    background: #0f172a;
    color: #f1f5f9;
    border-color: #334155;
}

/* Dark Mode - Templates Page */
body.dark-mode .templates-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

body.dark-mode .templates-hero h1,
body.dark-mode .templates-hero p {
    color: #f1f5f9;
}

body.dark-mode .filter-section {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .filter-btn {
    background: #0f172a;
    color: #94a3b8;
    border-color: #334155;
}

body.dark-mode .filter-btn:hover,
body.dark-mode .filter-btn.active {
    background: #818cf8;
    color: #ffffff;
    border-color: #818cf8;
}

/* Dark Mode - Cover Letter Page */
body.dark-mode .cover-letter-page {
    background: #0f172a;
}

body.dark-mode .cover-letter-editor {
    background: #1e293b;
}

/* Dark Mode - Optimizer Page */
body.dark-mode .optimizer-page {
    background: #0f172a;
}

body.dark-mode .optimizer-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .optimizer-card h3 {
    color: #f1f5f9;
}

body.dark-mode .optimizer-card p {
    color: #94a3b8;
}

/* Dark Mode - About/Contact/FAQ Pages */
body.dark-mode .about-page,
body.dark-mode .contact-page,
body.dark-mode .faq-page,
body.dark-mode .terms-page,
body.dark-mode .privacy-page {
    background: #0f172a;
}

body.dark-mode .page-content {
    background: #1e293b;
    color: #cbd5e1;
}

body.dark-mode .page-content h2,
body.dark-mode .page-content h3 {
    color: #f1f5f9;
}

/* Dark Mode - Modals */
body.dark-mode .modal-overlay {
    background: rgba(0, 0, 0, 0.8);
}

body.dark-mode .modal-content {
    background: #1e293b;
    border: 1px solid #334155;
}

body.dark-mode .modal-content h2,
body.dark-mode .modal-content h3 {
    color: #f1f5f9;
}

body.dark-mode .modal-content p {
    color: #94a3b8;
}

body.dark-mode .modal-close {
    color: #94a3b8;
}

body.dark-mode .modal-close:hover {
    color: #f1f5f9;
}

/* Dark Mode - Alerts & Messages */
body.dark-mode .alert {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}

body.dark-mode .alert-success {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
    color: #4ade80;
}

body.dark-mode .alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #f87171;
}

/* Dark Mode - Inputs & Selects */
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #64748b;
}

body.dark-mode input:focus,
body.dark-mode select:focus,
body.dark-mode textarea:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.2);
}

/* Dark Mode - Scrollbar */
body.dark-mode ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

body.dark-mode ::-webkit-scrollbar-track {
    background: #1e293b;
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--light-gray);
    background: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--gray);
    font-size: 16px;
}

.dark-mode-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.dark-mode-toggle:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.dark-mode-toggle .fa-sun {
    display: none;
}

body.dark-mode .dark-mode-toggle .fa-moon {
    display: none;
}

body.dark-mode .dark-mode-toggle .fa-sun {
    display: inline-block;
    color: #fbbf24;
}

/* Skip to Content Link */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius);
    z-index: 10000;
    font-weight: 600;
    transition: top 0.3s ease;
}

.skip-to-content:focus {
    top: 10px;
    color: white;
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Progress Indicator */
.progress-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--bg-light);
    border-radius: var(--radius);
    margin-right: 15px;
}

.progress-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: conic-gradient(var(--primary) var(--progress, 0%), var(--light-gray) 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: --progress 0.5s ease;
}

.progress-circle::before {
    content: '';
    width: 35px;
    height: 35px;
    background: var(--white);
    border-radius: 50%;
    position: absolute;
}

.progress-value {
    position: relative;
    z-index: 1;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
}

.progress-text {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray);
    line-height: 1.3;
}

.progress-text strong {
    display: block;
    color: var(--dark);
    font-size: 13px;
}

body.dark-mode .progress-indicator {
    background: #0f172a;
}

body.dark-mode .progress-circle::before {
    background: var(--white);
}

/* Section Tooltips */
.section-tooltip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--light-gray);
    color: var(--gray);
    font-size: 11px;
    cursor: pointer;
    margin-left: 8px;
    transition: all 0.2s ease;
    border: none;
    position: relative;
}

.section-tooltip-trigger:hover,
.section-tooltip-trigger:focus {
    background: var(--primary);
    color: white;
    outline: none;
}

.section-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: white;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
    max-width: 280px;
    white-space: normal;
    text-align: left;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    box-shadow: var(--shadow-lg);
    line-height: 1.5;
}

.section-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: var(--dark);
}

.section-tooltip-trigger:hover .section-tooltip,
.section-tooltip-trigger:focus .section-tooltip,
.section-tooltip-trigger.active .section-tooltip {
    opacity: 1;
    visibility: visible;
}

body.dark-mode .section-tooltip {
    background: #0f172a;
    border: 1px solid var(--light-gray);
}

body.dark-mode .section-tooltip::before {
    border-bottom-color: #0f172a;
}

body.dark-mode .section-tooltip-trigger {
    background: #0f172a;
}

/* Canvas Toolbar Grouping */
.canvas-toolbar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.canvas-toolbar > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.layout-switcher,
.zoom-controls,
.drafts-controls,
.canvas-actions {
    position: relative;
    padding-left: 15px;
}

.layout-switcher::before,
.zoom-controls::before,
.drafts-controls::before,
.canvas-actions::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 28px;
    background: var(--light-gray);
}

.progress-indicator + .layout-switcher::before {
    display: block;
}

.layout-btn {
    padding: 8px 12px;
    border: 1px solid var(--light-gray);
    border-radius: var(--radius);
    background: var(--white);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gray);
}

.layout-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

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

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.zoom-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    background: var(--light-gray);
    border-radius: 2px;
    cursor: pointer;
}

.zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

.zoom-level {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray);
    min-width: 40px;
}

.zoom-fit-btn {
    padding: 6px 10px;
    border: 1px solid var(--light-gray);
    border-radius: var(--radius);
    background: var(--white);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--gray);
}

.zoom-fit-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.drafts-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.autosave-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--success);
    font-weight: 500;
}

.autosave-indicator i {
    font-size: 14px;
}

/* Focus States for Accessibility */
.btn:focus,
.toolbar-btn:focus,
button:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.editable:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.section-item:focus,
.mini-template:focus,
.color-option:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Aria Live Region Styling */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

[aria-live] {
    position: relative;
}

/* Hero Section with Mockup */
.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.hero-text {
    flex: 1;
    text-align: left;
}

.hero-mockup {
    flex: 0 0 380px;
    display: flex;
    justify-content: center;
}

.resume-mockup-hero {
    width: 300px;
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3), 0 10px 20px rgba(0, 0, 0, 0.2);
    transform: rotate(3deg);
    position: relative;
    animation: floatAnimation 4s ease-in-out infinite;
}

@keyframes floatAnimation {
    0%, 100% { transform: rotate(3deg) translateY(0); }
    50% { transform: rotate(3deg) translateY(-10px); }
}

.mockup-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
}

.mockup-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}

.mockup-title {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 8px;
}

.mockup-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mockup-contact span {
    font-size: 9px;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 4px;
}

.mockup-contact i {
    font-size: 8px;
    color: var(--primary);
}

.mockup-section {
    margin-bottom: 14px;
}

.mockup-section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--light-gray);
    padding-bottom: 4px;
}

.mockup-item {
    margin-bottom: 10px;
}

.mockup-item-title {
    font-size: 10px;
    font-weight: 600;
    color: var(--dark);
}

.mockup-item-date {
    font-size: 8px;
    color: var(--gray);
    margin-bottom: 4px;
}

.mockup-line {
    height: 6px;
    background: var(--light-gray);
    border-radius: 3px;
    margin-bottom: 4px;
    width: 100%;
}

.mockup-line.short { width: 60%; }
.mockup-line.medium { width: 80%; }

.mockup-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.mockup-skill {
    font-size: 8px;
    background: var(--primary);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
}

.mockup-ats-badge {
    position: absolute;
    bottom: -10px;
    right: -10px;
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.4);
}

.mockup-ats-badge i {
    margin-right: 4px;
}

/* Why Choose Us Section */
.why-choose-us {
    padding: 60px 0;
    background: var(--white);
}

.why-choose-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.why-card {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: 30px 24px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    border: 1px solid transparent;
}

.why-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.why-icon {
    font-size: 48px;
    margin-bottom: 16px;
    line-height: 1;
}

.why-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}

.why-card p {
    font-size: 14px;
    color: var(--gray);
    line-height: 1.6;
}

/* Template Overlay Improvements */
.btn-overlay-use,
.btn-overlay-preview {
    min-width: 160px;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-overlay-use {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.btn-overlay-use:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
}

.btn-overlay-preview {
    background: rgba(255, 255, 255, 0.95);
    color: var(--dark);
    border: 2px solid transparent;
}

.btn-overlay-preview:hover {
    background: white;
    transform: scale(1.05);
    border-color: var(--primary);
    color: var(--primary);
}

/* Empty State Illustrations */
.empty-state-jobs,
.empty-state-favorites {
    text-align: center;
    padding: 40px 20px;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    line-height: 1;
    opacity: 0.9;
}

.empty-state-jobs h4,
.empty-state-favorites h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.empty-state-jobs p,
.empty-state-favorites p {
    font-size: 13px;
    color: var(--gray);
    line-height: 1.5;
    max-width: 200px;
    margin: 0 auto;
}

.empty-state-cta {
    margin-top: 16px;
}

.empty-state-cta .btn {
    font-size: 13px;
    padding: 8px 16px;
}

/* Responsive for Hero Mockup */
@media (max-width: 1024px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-text {
        text-align: center;
    }
    
    .hero-mockup {
        flex: none;
        margin-top: 40px;
    }
    
    .why-choose-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-mockup {
        display: none;
    }
    
    .why-choose-grid {
        grid-template-columns: 1fr;
    }
    
    .why-card {
        padding: 24px 20px;
    }
    
    .why-icon {
        font-size: 40px;
    }
}

/* ===================================
   CANVA-STYLE IMPROVEMENTS
   =================================== */

/* 1. Photo Upload Area Enhancement */
/* HIDE photo container by default - only show when has photo */
.profile-photo-wrapper {
    display: none !important;
}

.profile-photo-wrapper:has(.has-photo) {
    display: block !important;
}

.profile-photo-container {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: transparent !important;
    padding: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none !important;
}

/* Only show container when has photo class */
.profile-photo-container.has-photo {
    display: block !important;
    background: transparent !important;
}

.profile-photo-container::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    padding: 3px;
    background: transparent;
    background-size: 200% 200%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.profile-photo-container.has-photo::before {
    background: transparent;
    animation: none;
}

@keyframes gradientBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.profile-photo-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--light-gray);
    transition: all 0.3s ease;
}

.profile-photo-placeholder i {
    font-size: 32px;
    color: var(--gray);
    margin-bottom: 4px;
}

.profile-photo-placeholder span {
    font-size: 11px;
    color: var(--gray);
}

.profile-photo-container:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(79, 70, 229, 0.4);
}

.profile-photo-container:hover .profile-photo-placeholder {
    border-color: var(--primary);
    animation: pulse 1.5s ease-in-out infinite;
}

/* 2. Section Cards Styling */
.resume-section.section-card {
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    border: none;
    border-left: 4px solid var(--primary);
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.resume-section.section-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.resume-section[data-section="summary"],
.resume-section.section-summary {
    border-left-color: #4F46E5;
}

.resume-section[data-section="experience"],
.resume-section.section-experience {
    border-left-color: #3B82F6;
}

.resume-section[data-section="education"],
.resume-section.section-education {
    border-left-color: #10B981;
}

.resume-section[data-section="skills"],
.resume-section.section-skills {
    border-left-color: #F59E0B;
}

.resume-section[data-section="projects"],
.resume-section.section-projects {
    border-left-color: #EC4899;
}

.resume-section[data-section="achievements"],
.resume-section.section-achievements {
    border-left-color: #EAB308;
}

/* 3. Floating Section Toolbar */
.section-toolbar {
    position: absolute;
    top: 10px;
    right: 10px;
    display: none !important;
    align-items: center;
    gap: 4px;
    background: var(--white);
    border-radius: 25px;
    padding: 6px 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s ease;
    z-index: 10;
}

.resume-section:hover .section-toolbar {
    display: flex !important;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.section-toolbar button {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    transition: all 0.2s ease;
}

.section-toolbar button:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.section-toolbar button.btn-delete:hover {
    background: #FEE2E2;
    color: var(--danger);
}

.section-toolbar .toolbar-divider {
    width: 1px;
    height: 20px;
    background: var(--light-gray);
    margin: 0 4px;
}

/* 4. Drag & Drop Visual */
.drag-handle {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px 4px;
    cursor: grab;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.resume-section:hover .drag-handle {
    opacity: 0.5;
}

.resume-section:hover .drag-handle:hover {
    opacity: 1;
}

.drag-handle:active {
    cursor: grabbing;
}

.drag-handle::before,
.drag-handle::after {
    content: '';
    display: block;
    width: 12px;
    height: 4px;
    background-image: radial-gradient(circle, var(--gray) 1.5px, transparent 1.5px);
    background-size: 6px 4px;
    background-repeat: repeat-x;
}

.section-drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    opacity: 0;
    transition: opacity 0.2s ease;
    padding: 4px;
}

.resume-section:hover .section-drag-handle {
    opacity: 0.5;
}

.resume-section:hover .section-drag-handle:hover,
.section-drag-handle:hover {
    opacity: 1;
}

.section-drag-handle:active {
    cursor: grabbing;
}

.resume-section.is-dragging {
    opacity: 0.6;
    box-shadow: 0 10px 40px rgba(79, 70, 229, 0.3);
}

.resume-section.drag-over {
    border-top: 3px solid var(--primary);
}

/* 5. Inline Editing Enhancement */
.editable:focus {
    outline: none;
    border-color: transparent;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
    background: var(--white);
}

.editable:empty::before {
    content: attr(data-placeholder);
    color: var(--gray);
    opacity: 0.6;
    font-style: italic;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.editable:focus:empty::before {
    opacity: 0.4;
}

.editable[contenteditable="true"] {
    min-height: 1.5em;
}

textarea.editable,
.textarea-auto-expand {
    resize: none;
    overflow: hidden;
    min-height: 60px;
    transition: height 0.2s ease;
}

/* 6. Color Theme Picker */
.color-picker-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--white);
    border-radius: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

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

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

.color-swatch.active::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.color-swatch.color-purple { background: #4F46E5; }
.color-swatch.color-green { background: #10B981; }
.color-swatch.color-blue { background: #3B82F6; }
.color-swatch.color-orange { background: #F59E0B; }
.color-swatch.color-dark { background: #1e293b; }

/* Advanced Color Panel */
.advanced-colors-toggle {
    display: flex;
    align-items: center;
    position: relative;
}
.advanced-colors-toggle .toolbar-btn {
    padding: 8px 12px;
    font-size: 12px;
    gap: 6px;
}
.advanced-color-panel {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 15px;
    z-index: 1000;
    min-width: 200px;
    margin-top: 10px;
}
.advanced-color-panel::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-bottom-color: var(--white);
    border-top: 0;
}
.color-control-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 10px;
}
.color-control-row:last-of-type {
    margin-bottom: 15px;
}
.color-control-row label {
    font-size: 13px;
    font-weight: 500;
    color: var(--dark);
}
.color-control-row input[type="color"] {
    width: 40px;
    height: 30px;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    cursor: pointer;
    padding: 2px;
}
.btn-reset-colors {
    width: 100%;
    padding: 8px;
    background: var(--bg-light);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius);
    font-size: 12px;
    color: var(--gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.btn-reset-colors:hover {
    background: var(--light-gray);
    color: var(--dark);
}

/* 7. Add Button Styling */
.add-item-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    color: var(--white);
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.add-item-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
    background: linear-gradient(135deg, #4338CA 0%, #6D28D9 100%);
}

.add-item-btn i {
    font-size: 12px;
}

.add-item-btn.btn-outline {
    background: transparent;
    border: 1px solid rgba(79, 70, 229, 0.3);
    color: var(--primary);
    box-shadow: none;
}

.add-item-btn.btn-outline:hover {
    background: rgba(79, 70, 229, 0.05);
    border-color: var(--primary);
}

/* Example button styling - less prominent by default */
.example-btn,
.btn-see-example {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.resume-section:hover .example-btn,
.resume-section:hover .btn-see-example {
    opacity: 1;
}

/* 8. Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(79, 70, 229, 0);
    }
}

@keyframes lift {
    from {
        transform: translateY(0);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }
    to {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes checkmark {
    0% { 
        transform: scale(0); 
        opacity: 0;
    }
    50% { 
        transform: scale(1.2); 
    }
    100% { 
        transform: scale(1); 
        opacity: 1;
    }
}

.section-animate-in {
    animation: slideUp 0.4s ease forwards;
}

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

/* 9. Visual Feedback */
.saving-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-size: 13px;
    color: var(--gray);
}

.saving-indicator .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--light-gray);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.saved-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-size: 13px;
    color: var(--success);
}

.saved-indicator i {
    animation: checkmark 0.4s ease forwards;
}

.undo-redo-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px;
    background: var(--white);
    border-radius: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.undo-redo-buttons button {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    transition: all 0.2s ease;
}

.undo-redo-buttons button:hover:not(:disabled) {
    background: var(--bg-light);
    color: var(--primary);
}

.undo-redo-buttons button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 10. Better Typography Controls */
.text-controls {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 6px 10px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--light-gray);
}

.text-controls button {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    font-size: 14px;
    transition: all 0.2s ease;
}

.text-controls button:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.text-controls button.active {
    background: var(--primary);
    color: var(--white);
}

.text-controls .font-size-control {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 8px;
    border-left: 1px solid var(--light-gray);
    border-right: 1px solid var(--light-gray);
    margin: 0 4px;
}

.text-controls .font-size-control input {
    width: 40px;
    border: none;
    text-align: center;
    font-size: 13px;
    background: transparent;
}

.text-controls .font-size-control button {
    width: 24px;
    height: 24px;
    font-size: 10px;
}

.inline-text-toolbar {
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
}

.editable:focus + .inline-text-toolbar,
.inline-text-toolbar:hover,
.inline-text-toolbar.visible {
    opacity: 1;
    visibility: visible;
}

/* ===================================
   PRINT STYLES
   =================================== */
@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    html, body {
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
        font-size: 8pt !important;
        line-height: 1.15 !important;
    }

    /* Hide ALL non-printable elements - comprehensive list */
    .header,
    .footer,
    footer,
    .builder-sidebar,
    .builder-toolbar,
    .ats-sidebar,
    .ats-score-widget,
    .canvas-toolbar,
    .sidebar-tabs,
    .page-indicator,
    .page-status-group,
    .page-warning,
    .floating-toolbar,
    .section-add-menu,
    .section-drag-handle,
    .section-tooltip-trigger,
    .section-tooltip,
    .btn-see-example,
    .add-item-btn,
    .item-actions,
    .profile-photo-overlay,
    .profile-photo-placeholder,
    .page-break-line,
    .drop-placeholder,
    .skip-to-content,
    .mobile-menu-btn,
    .mobile-overlay,
    .dark-mode-toggle,
    .lang-switcher,
    .nav,
    .logo,
    .header-actions,
    .header-content,
    #sr-announcements,
    .zoom-controls,
    .drafts-controls,
    .canvas-actions,
    .progress-indicator,
    .layout-switcher,
    .autosave-indicator,
    .ats-breakdown,
    .suggestions-list,
    .print-preview-modal,
    .modal-overlay,
    .skill-input-group,
    .template-nav-header,
    .import-buttons,
    .mini-templates,
    .sidebar-section,
    .sidebar-content,
    .section-toolbar,
    .drag-handle,
    .color-picker-bar,
    .undo-redo-buttons,
    .tooltip-trigger,
    .example-btn,
    .btn-see-example,
    .section-heading .tooltip-icon,
    .btn-outline,
    .btn-sm,
    .icon-fallback,
    input,
    select,
    button,
    [title="Drag to reorder"],
    [title="Move Up"],
    [title="Move Down"],
    [title="Duplicate"],
    [title="Delete"],
    [title="See Example"],
    [contenteditable]:empty::before {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* Hide profile photo placeholder completely in print */
    .profile-photo-placeholder {
        display: none !important;
    }
    
    .profile-photo-wrapper {
        display: none !important;
    }
    
    .profile-photo-container {
        display: none !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    /* Only show photo container if it has a real uploaded photo */
    .profile-photo-container.has-photo {
        display: block !important;
        background: transparent !important;
        border: none !important;
    }
    
    .profile-photo-container.has-photo .profile-photo-image {
        display: block !important;
        border-radius: 50%;
    }
    
    .profile-photo-wrapper:has(.has-photo) {
        display: block !important;
    }
    
    /* Force hide empty photo containers in creative template */
    .resume-paper.template-creative .profile-photo-container:not(.has-photo),
    .resume-paper.template-creative .profile-photo-wrapper:not(:has(.has-photo)) {
        display: none !important;
    }
    
    /* Only show photo container if image is displayed */
    .profile-photo-image[style*="display: none"],
    .profile-photo-image:not([src]),
    .profile-photo-image[src=""] {
        display: none !important;
    }
    
    /* Hide URL in print footer/header */
    @page {
        size: letter;
        margin: 0.35in;
    }
    
    /* Remove any links styling */
    a {
        color: inherit !important;
        text-decoration: none !important;
    }
    
    /* Hide any URL text that might appear */
    a[href]::after {
        content: none !important;
    }

    /* Reset builder container layout for print */
    .builder-container {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        grid-template-columns: none !important;
    }

    /* Full width canvas for print */
    .builder-canvas {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
        overflow: visible !important;
    }

    .resume-wrapper {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    /* Resume paper styling for print - COMPACT for 1-page */
    .resume-paper {
        background: white !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        border: none !important;
        margin: 0 !important;
        padding: 0.3in 0.4in !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: auto !important;
        transform: none !important;
        transform-origin: top left !important;
    }

    .resume-paper::before {
        display: none !important;
    }

    /* Resume sections - COMPACT */
    .resume-section {
        margin-bottom: 4pt !important;
        padding: 0 !important;
        border: none !important;
        background: transparent !important;
        cursor: default !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .resume-section:hover {
        border: none !important;
        background: transparent !important;
    }

    .resume-section h2 {
        font-size: 10pt !important;
        margin-bottom: 4pt !important;
        padding-bottom: 2pt !important;
        page-break-after: avoid !important;
        break-after: avoid !important;
    }

    /* Prevent page breaks inside content items - COMPACT */
    .experience-item,
    .education-item,
    .project-item,
    .certification-item,
    .achievement-item {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        margin-bottom: 4pt !important;
    }

    /* Resume header - COMPACT */
    .resume-header {
        text-align: center !important;
        margin-bottom: 8pt !important;
        page-break-after: avoid !important;
    }

    .resume-header h1 {
        font-size: 14pt !important;
        margin-bottom: 2pt !important;
    }

    .resume-header .title {
        font-size: 10pt !important;
        margin-bottom: 3pt !important;
    }

    .resume-header .contact-info {
        font-size: 8pt !important;
    }

    /* Profile photo for print - COMPACT */
    .profile-photo-container {
        width: 60px !important;
        height: 60px !important;
        margin: 0 auto 6pt !important;
    }

    .profile-photo-image {
        display: block !important;
    }

    /* Editable elements - remove edit styling */
    .editable {
        border: none !important;
        padding: 0 !important;
        background: transparent !important;
        outline: none !important;
    }

    .editable:hover,
    .editable:focus {
        border: none !important;
        background: transparent !important;
    }
    
    /* Hide placeholder text in print */
    .editable[data-placeholder]:empty::before,
    .editable:empty::before,
    [contenteditable="true"]:empty::before,
    [placeholder]::before {
        display: none !important;
        content: none !important;
    }
    
    /* Hide sections with only placeholder content */
    .resume-section .editable:empty {
        display: none !important;
    }
    
    /* Hide empty experience/education items in print */
    .experience-item:has(.editable:empty),
    .education-item:has(.editable:empty),
    .project-item:has(.editable:empty) {
        display: none !important;
    }
    
    /* Hide photo container if no actual image */
    .profile-photo-container:not(:has(img)) {
        display: none !important;
    }
    
    .profile-photo-placeholder {
        display: none !important;
    }

    /* Skills */
    .skills-tags {
        gap: 6pt !important;
    }

    .skill-tag {
        padding: 3pt 8pt !important;
        font-size: 9pt !important;
        margin-bottom: 4pt !important;
        border: 1px solid #ccc !important;
        background: #f5f5f5 !important;
    }

    /* Text sizing - COMPACT for 1-page */
    p, li, span, div {
        font-size: 8pt !important;
        line-height: 1.15 !important;
    }
    
    /* More compact margins for content */
    .resume-sections {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Remove section border styling */
    .resume-section::before {
        display: none !important;
    }
    
    /* Compact experience/education items */
    .experience-item,
    .education-item,
    .project-item {
        padding: 2pt 0 !important;
        margin-bottom: 3pt !important;
    }
    
    /* Compact job titles and company names */
    .job-title,
    .degree-title {
        font-size: 9pt !important;
        margin-bottom: 1pt !important;
    }
    
    .company-name,
    .school-name {
        font-size: 8pt !important;
        margin-bottom: 1pt !important;
    }
    
    .date-range {
        font-size: 7pt !important;
    }
    
    /* Compact description lists */
    .job-description ul,
    .project-description ul {
        margin: 2pt 0 !important;
        padding-left: 12pt !important;
    }
    
    .job-description li,
    .project-description li {
        margin-bottom: 1pt !important;
    }

    /* Links */
    a {
        color: inherit !important;
        text-decoration: none !important;
    }

    /* Page setup - COMPACT margins */
    @page {
        size: letter;
        margin: 0.35in;
    }

    /* Orphan and widow control */
    p {
        orphans: 3;
        widows: 3;
    }

    h1, h2, h3 {
        page-break-after: avoid !important;
        break-after: avoid !important;
    }

    /* Hide checkboxes, bullets, and action elements in print */
    .item-bullet,
    .item-checkbox,
    .experience-actions,
    .education-actions,
    .remove-btn,
    .delete-btn,
    [type="checkbox"],
    input[type="checkbox"],
    .skill-remove,
    .skill-delete,
    .item-delete,
    .fa-square,
    .fa-check-square,
    i.fas,
    i.far,
    i.fab,
    .section-heading i,
    .tooltip-icon,
    .help-icon,
    .question-mark {
        display: none !important;
        visibility: hidden !important;
    }

    /* Clean up section headings - remove icons */
    .resume-section h2 i,
    .section-heading i,
    .resume-section .section-icon {
        display: none !important;
    }

    /* Fix section heading display without icons */
    .resume-section h2 {
        padding-left: 0 !important;
    }

    /* Make sure skill tags don't show X buttons */
    .skill-tag .remove-skill,
    .skill-tag button,
    .skill-tag .fa-times {
        display: none !important;
    }

    /* Reduce spacing for more compact print */
    .resume-section {
        margin-bottom: 10pt !important;
    }

    .experience-item,
    .education-item {
        margin-bottom: 8pt !important;
    }
}

/* ===================================
   ICON FALLBACKS - For when Font Awesome fails
   =================================== */
.resume-section h2 i.fas,
.resume-section h2 i.far,
.resume-section h2 i.fab {
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands', sans-serif;
    font-style: normal;
}

.resume-section h2 i.fas::before,
.resume-section h2 i.far::before {
    font-weight: 900;
}

/* Icon fallback using CSS content if Font Awesome fails */
.resume-section h2 i.fa-user:empty::after { content: "👤"; font-family: sans-serif; }
.resume-section h2 i.fa-briefcase:empty::after { content: "💼"; font-family: sans-serif; }
.resume-section h2 i.fa-graduation-cap:empty::after { content: "🎓"; font-family: sans-serif; }
.resume-section h2 i.fa-cogs:empty::after { content: "⚙️"; font-family: sans-serif; }
.resume-section h2 i.fa-folder-open:empty::after { content: "📁"; font-family: sans-serif; }
.resume-section h2 i.fa-certificate:empty::after { content: "📜"; font-family: sans-serif; }
.resume-section h2 i.fa-language:empty::after { content: "🌐"; font-family: sans-serif; }
.resume-section h2 i.fa-trophy:empty::after { content: "🏆"; font-family: sans-serif; }

/* ===================================
   CLEAN UI/UX IMPROVEMENTS
   Canva-like minimal editing experience
   =================================== */

/* 1. HIDE DASHED BORDERS - Clean resume look */
.resume-section {
    border: none !important;
    border-left: 3px solid transparent;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.resume-section:hover {
    border-left-color: var(--primary);
    background: rgba(79, 70, 229, 0.02);
}

/* 2. HIDE EXAMPLE BUTTONS - Remove confusing elements */
.btn-see-example,
.example-toggle,
.example-checkbox,
input[type="checkbox"].example-toggle {
    display: none !important;
}

/* 3. HIDE SECTION TOOLTIP TRIGGERS by default */
.section-tooltip-trigger {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.resume-section:hover .section-tooltip-trigger {
    opacity: 1;
}

/* 4. HIDE DRAG HANDLES by default */
.drag-handle,
.section-drag-handle {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.resume-section:hover .drag-handle,
.resume-section:hover .section-drag-handle {
    opacity: 0.5;
    visibility: visible;
}

.resume-section:hover .drag-handle:hover,
.resume-section:hover .section-drag-handle:hover {
    opacity: 1;
}

/* 5. IMPROVED EDITABLE FOCUS STATE - Clear visual feedback */
.editable {
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 4px 8px;
    transition: all 0.15s ease;
    cursor: text;
}

.editable:hover {
    background: rgba(79, 70, 229, 0.03);
    border-color: rgba(79, 70, 229, 0.15);
}

.editable:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    background: rgba(79, 70, 229, 0.05) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
}

/* 6. CLEAN SECTION HEADINGS */
.resume-section h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.resume-section h2 i {
    font-size: 14px;
    opacity: 0.8;
}

/* 7. PROMINENT ADD BUTTONS */
.add-item-btn {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: white !important;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 16px;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.add-item-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.add-item-btn i {
    font-size: 12px;
}

/* 8. CLEAN PHOTO AREA */
.profile-photo-wrapper {
    margin: 0 auto 20px;
}

.profile-photo-container {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: transparent;
    border: 3px solid var(--primary);
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    position: relative;
}

.profile-photo-container:hover {
    border-color: var(--primary);
    transform: scale(1.02);
}

.profile-photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--gray);
    border: none !important;
    background: transparent !important;
}

.profile-photo-placeholder i {
    font-size: 24px;
    margin-bottom: 4px;
}

.profile-photo-placeholder span {
    font-size: 10px;
    font-weight: 500;
}

/* Hide photo overlay by default */
.profile-photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-photo-container:hover .profile-photo-overlay {
    opacity: 1;
}

/* 9. CLEAN RESUME HEADER */
.resume-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.resume-header .title {
    font-size: 16px;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 12px;
}

.resume-header .contact-info {
    font-size: 13px;
    color: var(--gray);
}

.resume-header .contact-info span.editable {
    padding: 2px 6px;
}

/* 10. HIDE SECTION TOOLBAR by default */
.section-toolbar {
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.resume-section:hover .section-toolbar {
    opacity: 1;
    visibility: visible;
}

/* 10b. Undo/Redo Controls */
.undo-redo-controls {
    display: flex;
    gap: 4px;
    align-items: center;
}

.undo-redo-controls .toolbar-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--light-gray);
    background: var(--white);
    color: var(--gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.undo-redo-controls .toolbar-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.undo-redo-controls .toolbar-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.undo-redo-controls .toolbar-btn:disabled:hover {
    background: var(--white);
    color: var(--gray);
    border-color: var(--light-gray);
}

/* 11. CLEAN EXPERIENCE/EDUCATION ITEMS */
.experience-item,
.education-item,
.project-item,
.cert-item,
.achievement-item {
    position: relative;
    padding: 12px 0;
    border-bottom: 1px solid var(--light-gray);
    margin-bottom: 8px;
}

.experience-item:last-child,
.education-item:last-child,
.project-item:last-child,
.cert-item:last-child,
.achievement-item:last-child {
    border-bottom: none;
}

.experience-item h4,
.education-item h4,
.project-item h4,
.achievement-item h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.experience-item .company,
.education-item .institution,
.experience-item .duration,
.education-item .year {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 4px;
}

.experience-item .description,
.education-item .description,
.project-item .description,
.achievement-item .description {
    font-size: 14px;
    color: var(--dark);
    line-height: 1.5;
}

/* Hide delete buttons by default */
.experience-item .btn,
.education-item .btn,
.project-item .btn,
.cert-item .btn,
.achievement-item .btn,
.language-item .btn {
    opacity: 0;
    position: absolute;
    right: 0;
    top: 12px;
    transition: opacity 0.2s ease;
}

.experience-item:hover .btn,
.education-item:hover .btn,
.project-item:hover .btn,
.cert-item:hover .btn,
.achievement-item:hover .btn,
.language-item:hover .btn {
    opacity: 1;
}

/* 12. CLEAN SKILL TAGS */
.skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-light);
    border: 1px solid var(--light-gray);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--dark);
    margin: 4px;
    transition: all 0.2s ease;
}

.skill-tag:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

.skill-tag i {
    font-size: 10px;
    color: var(--gray);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.skill-tag:hover i {
    opacity: 1;
}

.skill-tag i:hover {
    color: var(--danger);
}

/* 13. CLEANER SKILLS CONTAINER */
.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.skill-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.skill-input-group input {
    flex: 1;
    min-width: 150px;
    padding: 10px 14px;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    font-size: 14px;
}

.skill-input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* 14. PAGE BREAK LINE AND INDICATORS */
.page-break-line {
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.resume-paper.exceeds-page .page-break-line {
    opacity: 1;
    background: linear-gradient(90deg, transparent, var(--danger), transparent);
    height: 3px;
}

/* Page Indicator Enhancements */
.page-indicator {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-status-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--dark);
}

.page-status-group i {
    color: var(--primary);
}

.page-indicator.warning .page-status-group {
    color: var(--warning);
}

.page-indicator.warning .page-status-group i {
    color: var(--warning);
}

.page-warning {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(239, 68, 68, 0.1));
    border: 1px solid var(--warning);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    color: var(--warning);
    animation: pulseWarning 2s ease-in-out infinite;
}

.page-warning i {
    font-size: 16px;
    color: var(--warning);
}

@keyframes pulseWarning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.btn-compact {
    background: var(--warning);
    color: white;
    border: none;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-compact:hover {
    background: #d97706;
    transform: translateY(-1px);
}

/* 1-PAGE LAYOUT - COMPACT MODE */
.resume-paper.compact-mode {
    padding: 25px 35px;
}

.resume-paper.compact-mode .resume-header {
    margin-bottom: 15px;
}

.resume-paper.compact-mode .resume-header h1 {
    font-size: 22px;
    margin-bottom: 3px;
}

.resume-paper.compact-mode .resume-header .title {
    font-size: 14px;
    margin-bottom: 6px;
}

.resume-paper.compact-mode .resume-header .contact-info {
    font-size: 12px;
}

.resume-paper.compact-mode .resume-section {
    margin-bottom: 12px;
    padding: 10px;
}

.resume-paper.compact-mode .resume-section h2 {
    font-size: 14px;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.resume-paper.compact-mode .resume-section p,
.resume-paper.compact-mode .resume-section .editable {
    font-size: 12px;
    line-height: 1.4;
}

.resume-paper.compact-mode .experience-item,
.resume-paper.compact-mode .education-item,
.resume-paper.compact-mode .project-item {
    margin-bottom: 10px;
    padding: 10px;
}

.resume-paper.compact-mode .experience-item .job-title,
.resume-paper.compact-mode .education-item .degree {
    font-size: 13px;
}

.resume-paper.compact-mode .experience-item .company,
.resume-paper.compact-mode .education-item .institution {
    font-size: 12px;
}

.resume-paper.compact-mode .experience-item .duration,
.resume-paper.compact-mode .education-item .year {
    font-size: 11px;
}

.resume-paper.compact-mode .experience-item .description,
.resume-paper.compact-mode .project-item .description {
    font-size: 11px;
    line-height: 1.4;
}

.resume-paper.compact-mode .skills-tags {
    gap: 6px;
}

.resume-paper.compact-mode .skill-tag {
    padding: 4px 10px;
    font-size: 11px;
}

/* AUTO-SCALE FONT SIZE FOR 1-PAGE FIT */
.resume-paper.auto-scale {
    --scale-factor: 1;
    transform: scale(var(--scale-factor));
    transform-origin: top center;
}

.resume-paper.auto-scale .resume-section p,
.resume-paper.auto-scale .editable {
    font-size: calc(14px * var(--scale-factor));
}

/* EXCEEDS PAGE VISUAL WARNING */
.resume-paper.exceeds-page {
    border: 2px solid var(--warning);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2), var(--shadow-lg);
}

.resume-paper.exceeds-page::after {
    content: '⚠️ Exceeds 1 Page';
    position: absolute;
    top: -35px;
    right: 0;
    background: linear-gradient(135deg, var(--warning), #d97706);
    color: white;
    padding: 6px 16px;
    border-radius: var(--radius) var(--radius) 0 0;
    font-size: 12px;
    font-weight: 600;
    box-shadow: var(--shadow);
}

/* COMPACT MODE INDICATOR */
.resume-paper.compact-mode::before {
    content: '📄 Compact Mode';
    position: absolute;
    top: -35px;
    left: 0;
    background: linear-gradient(135deg, var(--secondary), #059669);
    color: white;
    padding: 6px 16px;
    border-radius: var(--radius) var(--radius) 0 0;
    font-size: 12px;
    font-weight: 600;
    box-shadow: var(--shadow);
    z-index: 10;
}

/* 15. CLEAN RESUME PAPER LOOK */
.resume-paper {
    background: white !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.resume-paper::before {
    display: none;
}

/* Remove lined paper effect for cleaner look */
.resume-paper {
    background-image: none !important;
}

/* 16. Language and certification item styling */
.language-item,
.cert-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--light-gray);
    position: relative;
}

.language-item:last-child,
.cert-item:last-child {
    border-bottom: none;
}

.lang-name,
.cert-name {
    font-weight: 600;
    color: var(--dark);
}

.lang-level,
.cert-issuer {
    color: var(--gray);
    font-size: 13px;
}

/* 17. RESPONSIVE ADJUSTMENTS */
@media (max-width: 768px) {
    .add-item-btn {
        width: 100%;
        justify-content: center;
    }
    
    .skill-input-group {
        flex-direction: column;
    }
    
    .skill-input-group input,
    .skill-input-group select,
    .skill-input-group button {
        width: 100%;
    }
}

/* 18. MOBILE/TOUCH-FRIENDLY - Always show controls on small screens */
@media (max-width: 1024px) {
    /* Show section toolbar on touch devices */
    .section-toolbar {
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Show drag handles on touch devices */
    .drag-handle,
    .section-drag-handle {
        opacity: 0.5 !important;
    }
    
    /* Always show delete buttons on mobile */
    .experience-item .btn-outline,
    .education-item .btn-outline,
    .project-item .btn-outline,
    .language-item .btn-outline,
    .achievement-item .btn-outline,
    .cert-item .btn-outline {
        opacity: 1 !important;
    }
    
    /* Show tooltip triggers */
    .section-tooltip-trigger {
        opacity: 0.7 !important;
    }
    
    /* Larger touch targets */
    .editable {
        min-height: 44px;
        padding: 8px !important;
    }
    
    /* Better button sizing for touch */
    .btn-sm {
        min-height: 40px;
        min-width: 40px;
        padding: 10px 16px !important;
    }
    
    /* Stack layout options on mobile */
    .layout-options {
        flex-wrap: wrap;
    }
    
    /* Full-width resume paper on mobile */
    .resume-paper {
        width: 100% !important;
        min-width: auto !important;
    }
    
    .resume-wrapper {
        padding: 10px !important;
    }
}

/* Phrase Suggestions Styles */
.btn-suggestions {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: var(--white);
    border: none;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    transition: all 0.2s ease;
    vertical-align: middle;
}

.btn-suggestions:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.btn-suggestions i {
    font-size: 10px;
}

.btn-suggestions .icon-fallback {
    font-size: 10px;
    margin-right: 2px;
}

.suggestions-intro {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 20px;
    padding: 12px 15px;
    background: var(--bg-light);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}

.suggestions-list-container {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.suggestion-phrase-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-light);
    border-radius: var(--radius);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.suggestion-phrase-item:hover {
    background: var(--white);
    border-color: var(--primary);
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

.suggestion-number {
    min-width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.suggestion-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: var(--dark);
}

.btn-insert-suggestion {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    opacity: 0;
    transition: all 0.2s ease;
}

.suggestion-phrase-item:hover .btn-insert-suggestion {
    opacity: 1;
}

.btn-insert-suggestion:hover {
    transform: scale(1.2);
    color: var(--primary-dark);
}

#suggestions-modal .modal-content {
    max-width: 650px;
}

#suggestions-modal .modal-header {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: var(--white);
    border-radius: var(--radius) var(--radius) 0 0;
}

#suggestions-modal .modal-header h3 {
    color: var(--white);
}

#suggestions-modal .modal-close {
    color: var(--white);
}

#suggestions-modal .modal-close:hover {
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 768px) {
    .btn-suggestions {
        padding: 3px 8px;
        font-size: 10px;
        margin-left: 5px;
    }
    
    .btn-suggestions span:not(.icon-fallback) {
        display: none;
    }
    
    .suggestion-phrase-item {
        padding: 12px;
    }
    
    .suggestion-text {
        font-size: 13px;
    }
    
    .btn-insert-suggestion {
        opacity: 1;
    }
}

/* Mini Template Thumbnails - Layout Previews */
.mini-templates {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.mini-template {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 8px;
    border-radius: 8px;
    background: var(--bg-light);
    border: 2px solid transparent;
}

.mini-template:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--light-gray);
}

.mini-template.active {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

.mini-preview {
    width: 70px;
    height: 90px;
    background: var(--white);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    padding: 6px;
    position: relative;
}

.mini-header-bar {
    height: 14px;
    background: linear-gradient(90deg, var(--accent-color) 40%, var(--light-gray) 40%);
    border-radius: 2px;
    margin-bottom: 6px;
}

.mini-content-single {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mini-content-double {
    display: flex;
    gap: 4px;
    height: calc(100% - 20px);
}

.mini-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mini-sidebar-layout {
    display: flex;
    gap: 4px;
    height: 100%;
}

.mini-sidebar-left {
    width: 22px;
    background: var(--accent-color);
    border-radius: 2px;
    padding: 4px 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.mini-sidebar-left .mini-avatar {
    width: 14px;
    height: 14px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    flex-shrink: 0;
}

.mini-sidebar-left .mini-line.short {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 1px;
}

.mini-sidebar-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 2px 0;
}

.mini-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mini-line {
    height: 3px;
    background: var(--light-gray);
    border-radius: 1px;
}

.mini-line.heading {
    height: 4px;
    width: 60%;
    background: var(--accent-color);
    margin-bottom: 1px;
}

.mini-line.short {
    width: 70%;
}

.mini-sidebar-main .mini-line {
    background: var(--light-gray);
}

.mini-sidebar-main .mini-line.heading {
    background: var(--accent-color);
    width: 50%;
}

.mini-sidebar-main .mini-line.short {
    width: 65%;
}

.mini-template-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 6px;
    gap: 2px;
}

.mini-template-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--dark);
}

.mini-template-layout {
    font-size: 9px;
    color: var(--gray);
    background: var(--light-gray);
    padding: 1px 6px;
    border-radius: 10px;
}

/* Cover Letter Builder Styles */
.cover-letter-paper {
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 27px,
            rgba(79, 70, 229, 0.03) 27px,
            rgba(79, 70, 229, 0.03) 28px
        ),
        linear-gradient(90deg, #fdfbf7 0%, #fffef9 50%, #fdfbf7 100%);
    background-color: #fffef9;
    max-width: 800px;
    margin: 0 auto;
    padding: 50px 60px;
    box-shadow: 
        0 0 0 1px rgba(0, 0, 0, 0.05),
        0 2px 4px rgba(0, 0, 0, 0.05),
        0 8px 16px rgba(0, 0, 0, 0.08),
        0 24px 48px rgba(0, 0, 0, 0.1);
    min-height: 1100px;
    line-height: 1.6;
}

.cover-letter-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary);
}

.cover-letter-header h1 {
    color: var(--primary);
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.sender-contact {
    font-size: 14px;
    color: var(--gray);
}

.sender-contact span[aria-hidden] {
    margin: 0 8px;
    color: var(--light-gray);
}

.cover-letter-date {
    margin: 25px 0;
    font-size: 14px;
}

.cover-letter-recipient {
    margin-bottom: 25px;
    line-height: 1.5;
}

.cover-letter-recipient div {
    padding: 2px 0;
}

.recipient-name {
    font-weight: 600;
}

.cover-letter-salutation {
    margin-bottom: 20px;
    font-weight: 500;
}

.cover-letter-body {
    margin-bottom: 30px;
}

.cover-letter-section {
    position: relative;
    margin-bottom: 20px;
}

.cover-letter-section p {
    margin: 0;
    text-align: justify;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.2s;
}

.cover-letter-section p:hover {
    background: rgba(79, 70, 229, 0.05);
}

.cover-letter-section p:focus {
    background: rgba(79, 70, 229, 0.08);
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.section-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.7;
}

.section-label i {
    font-size: 10px;
}

.btn-suggestions-inline {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
    margin-left: auto;
}

.btn-suggestions-inline:hover {
    background: rgba(79, 70, 229, 0.1);
}

.cover-letter-signature {
    margin-top: 40px;
}

.signature-closing {
    margin-bottom: 40px;
}

.signature-name {
    font-weight: 600;
    font-size: 16px;
}

/* Suggestions sidebar */
.suggestion-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.suggestion-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: var(--bg-light);
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.5;
    transition: all 0.2s;
}

.suggestion-item:hover {
    background: rgba(79, 70, 229, 0.1);
}

.suggestion-item span {
    flex: 1;
    color: var(--dark);
}

.btn-use-suggestion {
    background: var(--primary);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.btn-use-suggestion:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.btn-use-suggestion i {
    font-size: 10px;
}

/* Tips section */
.tips-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--dark);
}

.tip-item i {
    color: var(--secondary);
    font-size: 14px;
}

/* Position form */
.position-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.position-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.position-form label {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray);
}

.position-form .form-control {
    padding: 8px 12px;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    font-size: 13px;
    transition: all 0.2s;
}

.position-form .form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Quick links */
.quick-link-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-light);
    border-radius: 8px;
    color: var(--dark);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 8px;
    text-decoration: none;
}

.quick-link-btn:hover {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
}

.quick-link-btn i {
    color: var(--primary);
}

/* Toolbar section for cover letter */
.toolbar-section {
    padding: 20px;
    border-bottom: 1px solid var(--light-gray);
}

.toolbar-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar-section h3 i {
    color: var(--primary);
}

/* Toast notification */
.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--dark);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    z-index: 10000;
}

.toast-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-notification.toast-success {
    background: var(--secondary);
}

.toast-notification.toast-warning {
    background: var(--warning);
}

.toast-notification.toast-info {
    background: var(--primary);
}

/* Cover letter mini template preview */
.mini-preview.layout-cover-letter {
    padding: 8px;
}

.mini-preview.layout-cover-letter .mini-header-bar {
    height: 12px;
    margin-bottom: 6px;
}

.mini-preview.layout-cover-letter .mini-section {
    margin-bottom: 6px;
}

.mini-preview.layout-cover-letter .mini-line {
    margin-bottom: 2px;
}

/* 2-Column and Sidebar Layout Styles */
.resume-paper.layout-2-column,
.resume-paper.layout-sidebar {
    overflow: hidden;
}

.resume-paper.layout-2-column #resume-sections,
.resume-paper.layout-sidebar #resume-sections {
    display: flex;
    gap: 15px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.layout-left-col,
.layout-right-col {
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.resume-paper.layout-2-column .layout-left-col,
.resume-paper.layout-2-column .layout-right-col {
    flex: 1 1 50%;
    max-width: 50%;
}

.resume-paper.layout-sidebar .layout-left-col.sidebar-left {
    flex: 0 0 40%;
    max-width: 40%;
    background: rgba(79, 70, 229, 0.03);
    padding: 12px;
    border-radius: var(--radius);
}

.resume-paper.layout-sidebar .layout-right-col.sidebar-right {
    flex: 0 0 58%;
    max-width: 58%;
    padding-left: 10px;
}

/* Sidebar section header fixes */
.resume-paper.layout-sidebar .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.resume-paper.layout-sidebar .section-header h2 {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.resume-paper.layout-sidebar .btn-suggestions {
    display: none;
}

.resume-paper.layout-sidebar .section-toolbar {
    top: 2px;
    right: 2px;
    padding: 2px 4px;
}

.resume-paper.layout-sidebar .section-toolbar button {
    width: 18px;
    height: 18px;
    font-size: 9px;
}

.layout-left-col .resume-section,
.layout-right-col .resume-section {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.resume-paper.layout-2-column .section-toolbar,
.resume-paper.layout-sidebar .section-toolbar {
    position: absolute;
    top: 5px;
    right: 5px;
    left: auto;
    transform: none;
    padding: 4px 6px;
    font-size: 11px;
}

.resume-paper.layout-2-column .section-toolbar button,
.resume-paper.layout-sidebar .section-toolbar button {
    width: 22px;
    height: 22px;
    font-size: 10px;
}

.resume-paper.layout-2-column .resume-section,
.resume-paper.layout-sidebar .resume-section {
    position: relative;
    overflow: hidden;
    word-wrap: break-word;
    word-break: break-word;
}

.resume-paper.layout-2-column .btn-suggestions,
.resume-paper.layout-sidebar .btn-suggestions {
    font-size: 10px;
    padding: 2px 6px;
}

.resume-paper.layout-2-column h3,
.resume-paper.layout-sidebar h3 {
    font-size: 14px;
}

.resume-paper.layout-2-column p,
.resume-paper.layout-sidebar p {
    font-size: 12px;
}

.resume-paper.layout-2-column .section-header,
.resume-paper.layout-sidebar .section-header {
    flex-wrap: wrap;
    gap: 5px;
}

@media print {
    .resume-paper.layout-2-column #resume-sections,
    .resume-paper.layout-sidebar #resume-sections {
        display: flex !important;
        gap: 15px !important;
    }
    
    .layout-left-col,
    .layout-right-col {
        overflow: visible !important;
    }
}

/* ========================================
   TEMPLATE STYLES - Creative, Executive, Minimal, Sidebar
   ======================================== */

/* CREATIVE TEMPLATE - Colored Header */
.resume-paper.template-creative .resume-header {
    background: var(--template-color, var(--primary));
    margin: -20px -20px 20px -20px;
    padding: 25px 20px;
    border-radius: 8px 8px 0 0;
}

.resume-paper.template-creative .resume-header [data-field="name"] {
    color: white !important;
}

.resume-paper.template-creative .resume-header [data-field="title"] {
    color: rgba(255, 255, 255, 0.9) !important;
}

.resume-paper.template-creative .resume-header .contact-info {
    color: rgba(255, 255, 255, 0.85);
}

.resume-paper.template-creative .resume-header .contact-info i {
    color: white;
}

.resume-paper.template-creative .resume-header .contact-info span,
.resume-paper.template-creative .resume-header .contact-info a {
    color: rgba(255, 255, 255, 0.9);
}

/* Hide photo container in creative template when no photo uploaded */
.resume-paper.template-creative .profile-photo-container:not(.has-photo) {
    display: none !important;
}

.resume-paper.template-creative .profile-photo-wrapper:not(:has(.has-photo)) {
    display: none !important;
}

.resume-paper.template-creative .profile-photo-container.has-photo {
    border: 3px solid white !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    background: white !important;
}

/* EXECUTIVE TEMPLATE - Top Border */
.resume-paper.template-executive {
    border-top: 5px solid var(--template-color, var(--primary)) !important;
}

.resume-paper.template-executive .resume-header {
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-gray);
    margin-bottom: 15px;
}

.resume-paper.template-executive .section-title h2 {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
}

.resume-paper.template-executive .resume-section {
    border-left: 2px solid var(--template-color, var(--primary));
    padding-left: 12px;
    margin-left: 4px;
}

/* MINIMAL TEMPLATE - Clean, Simple */
.resume-paper.template-minimal .resume-header {
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light-gray);
    margin-bottom: 15px;
}

.resume-paper.template-minimal .contact-info {
    justify-content: center;
}

.resume-paper.template-minimal .contact-info i {
    display: none;
}

.resume-paper.template-minimal .contact-info span::after,
.resume-paper.template-minimal .contact-info a::after {
    content: ' • ';
    margin-left: 8px;
    color: var(--gray);
}

.resume-paper.template-minimal .contact-info > div:last-child span::after,
.resume-paper.template-minimal .contact-info > div:last-child a::after {
    display: none;
}

.resume-paper.template-minimal .profile-photo-wrapper {
    display: none;
}

.resume-paper.template-minimal .section-title h2 {
    font-weight: 600;
    text-transform: none;
    border-bottom: 1px solid var(--light-gray);
    padding-bottom: 4px;
}

/* SIDEBAR TEMPLATE - Enhanced Styling */
.resume-paper.template-sidebar .layout-left-col,
.resume-paper.layout-sidebar .layout-left-col {
    background: var(--template-color, var(--primary));
    color: white;
    padding: 20px 15px;
    border-radius: 8px 0 0 8px;
}

.resume-paper.template-sidebar .layout-left-col *,
.resume-paper.layout-sidebar .layout-left-col * {
    color: white !important;
}

/* 2-COLUMN LAYOUT - Left column visibility fix */
.resume-paper.layout-2-column .layout-left-col {
    background: #ffffff !important;
    padding: 15px;
    border-radius: 8px 0 0 8px;
    border-right: 2px solid var(--template-color, var(--primary));
}

.resume-paper.layout-2-column .layout-left-col .resume-section {
    background: transparent !important;
}

/* FORCE all text in left column to be dark and readable */
.resume-paper.layout-2-column .layout-left-col p,
.resume-paper.layout-2-column .layout-left-col span:not(.icon-fallback),
.resume-paper.layout-2-column .layout-left-col li,
.resume-paper.layout-2-column .layout-left-col div,
.resume-paper.layout-2-column .layout-left-col .editable,
.resume-paper.layout-2-column .layout-left-col [contenteditable] {
    color: #1e293b !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

.resume-paper.layout-2-column .layout-left-col h2,
.resume-paper.layout-2-column .layout-left-col h3,
.resume-paper.layout-2-column .layout-left-col .section-heading {
    color: var(--template-color, var(--primary)) !important;
}

/* Skill items in left column */
.resume-paper.layout-2-column .layout-left-col .skill-item,
.resume-paper.layout-2-column .layout-left-col .skill-tag {
    background: var(--template-color, var(--primary)) !important;
    color: white !important;
}

/* Creative template 2-column styling */
.resume-paper.template-creative.layout-2-column .layout-left-col {
    background: #fafafa !important;
    border-right: 3px solid var(--template-color, var(--primary));
}

/* Fix overlay/placeholder text issue */
.resume-paper.layout-2-column .layout-left-col .editable:empty::before {
    color: #94a3b8 !important;
    opacity: 0.7 !important;
}

.resume-paper.template-sidebar .layout-left-col .section-title h2,
.resume-paper.layout-sidebar .layout-left-col .section-title h2 {
    color: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.resume-paper.template-sidebar .layout-left-col .skill-item,
.resume-paper.layout-sidebar .layout-left-col .skill-item {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

.resume-paper.template-sidebar .layout-left-col .contact-info span,
.resume-paper.template-sidebar .layout-left-col .contact-info a,
.resume-paper.layout-sidebar .layout-left-col .contact-info span,
.resume-paper.layout-sidebar .layout-left-col .contact-info a {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Print styles for template variations */
@media print {
    .resume-paper.template-creative .resume-header {
        background: var(--template-color, var(--primary)) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .resume-paper.template-executive {
        border-top: 5px solid var(--template-color, var(--primary)) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .resume-paper.template-sidebar .layout-left-col,
    .resume-paper.layout-sidebar .layout-left-col {
        background: var(--template-color, var(--primary)) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* Hide photo when no real photo uploaded */
    .profile-photo-container:not(.has-photo),
    .profile-photo-wrapper:not(:has(.has-photo)),
    .profile-photo-placeholder {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* 2-column layout print fix */
    .resume-paper.layout-2-column .layout-left-col {
        background: #f8fafc !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* FORCE dark text in 2-column left side for print */
    .resume-paper.layout-2-column .layout-left-col * {
        color: #1e293b !important;
    }
    .resume-paper.layout-2-column .layout-left-col h2,
    .resume-paper.layout-2-column .layout-left-col h3 {
        color: var(--template-color, var(--primary)) !important;
    }
    
    /* Sidebar layout - keep white text on colored background in print */
    .resume-paper.layout-sidebar .layout-left-col * {
        color: white !important;
    }
}

/* ========================================
   HOME PAGE - Resume Mockup Mini Previews
   ======================================== */

.resume-mockup-mini {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 180px;
    margin: 20px auto;
    aspect-ratio: 8.5 / 11;
}

.resume-mockup-mini .mockup-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color, #4F46E5);
}

.resume-mockup-mini .mockup-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    flex-shrink: 0;
}

.resume-mockup-mini .mockup-header-text {
    flex: 1;
}

.resume-mockup-mini .mockup-section {
    margin-bottom: 12px;
}

.resume-mockup-mini .mockup-section-title {
    margin-bottom: 6px;
}

.resume-mockup-mini .mockup-line {
    margin-top: 4px;
}

/* Template card improvements */
.template-card .template-preview {
    position: relative;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.template-card .template-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.template-card:hover .template-overlay {
    opacity: 1;
}

.template-card .template-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
}

.template-card .template-badge.free {
    background: #22c55e;
    color: white;
}

.template-card .template-info {
    padding: 15px;
    background: white;
    border-radius: 0 0 12px 12px;
}

.template-card .template-info h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.template-card .template-info .category {
    font-size: 13px;
    color: var(--primary);
}

/* ===========================================
   COMPREHENSIVE MOBILE RESPONSIVE STYLES
   =========================================== */

/* Admin Panel Mobile Styles */
.admin-sidebar-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1100;
    background: var(--primary);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.admin-sidebar-toggle:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

@media (max-width: 992px) {
    .admin-sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1050;
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .admin-content {
        margin-left: 0;
        padding: 80px 20px 20px;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .admin-header h1 {
        font-size: 22px;
    }
    
    /* Admin overlay when sidebar is open */
    .admin-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
    }
    
    .admin-overlay.active {
        display: block;
    }
}

@media (max-width: 768px) {
    .admin-content {
        padding: 70px 15px 15px;
    }
    
    /* Admin forms mobile */
    .form-row {
        flex-direction: column;
    }
    
    .form-row > div {
        width: 100%;
    }
    
    /* Admin tables mobile */
    .data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    /* Admin cards mobile */
    .stat-card {
        padding: 18px;
    }
    
    .stat-card h3 {
        font-size: 13px;
    }
    
    .stat-card .value {
        font-size: 28px;
    }
}

/* Footer Mobile Styles */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-section h3 {
        margin-bottom: 15px;
    }
    
    .footer-section ul {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .social-links {
        justify-content: center !important;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-bottom-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Header Mobile Improvements */
@media (max-width: 768px) {
    .header-container {
        padding: 10px 15px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .logo i {
        font-size: 22px;
    }
}

/* Hero Section Mobile */
@media (max-width: 576px) {
    .hero {
        padding: 60px 15px 40px;
    }
    
    .hero h1 {
        font-size: 26px !important;
        line-height: 1.3;
    }
    
    .hero p {
        font-size: 15px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Features Grid Mobile */
@media (max-width: 576px) {
    .features-grid {
        gap: 20px;
    }
    
    .feature-card {
        padding: 25px 20px;
    }
    
    .feature-card h3 {
        font-size: 18px;
    }
}

/* Templates Page Mobile */
@media (max-width: 576px) {
    .templates-filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .templates-filters select,
    .templates-filters input {
        width: 100%;
    }
    
    .template-card {
        margin-bottom: 20px;
    }
}

/* Resume Builder Mobile */
@media (max-width: 576px) {
    .builder-main {
        padding: 15px;
    }
    
    .resume-section {
        padding: 15px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .section-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    /* Theme picker mobile */
    .theme-picker {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Font controls mobile */
    .font-controls {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .font-controls select,
    .font-controls input {
        min-width: 100px;
    }
}

/* Contact Page Mobile */
@media (max-width: 576px) {
    .contact-section {
        padding: 40px 15px;
    }
    
    .contact-form {
        padding: 25px 20px;
    }
    
    .contact-info {
        padding: 20px;
    }
}

/* FAQ Page Mobile */
@media (max-width: 576px) {
    .faq-section {
        padding: 40px 15px;
    }
    
    .faq-item {
        padding: 15px;
    }
}

/* Modal Mobile */
@media (max-width: 576px) {
    .modal-content {
        margin: 10px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px;
    }
}

/* Buttons Mobile */
@media (max-width: 576px) {
    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .btn-lg {
        padding: 14px 25px;
    }
}

/* Stats Section Mobile */
@media (max-width: 576px) {
    .stats-row {
        flex-direction: column;
        gap: 25px;
    }
    
    .stat-item h3 {
        font-size: 32px;
    }
    
    .stat-item p {
        font-size: 14px;
    }
}

/* Testimonials Mobile */
@media (max-width: 576px) {
    .testimonials-grid {
        gap: 20px;
    }
    
    .testimonial-card {
        padding: 20px;
    }
}

/* Optimizer Page Mobile */
@media (max-width: 768px) {
    .optimizer-grid {
        gap: 20px;
    }
    
    .optimizer-panel {
        padding: 20px;
    }
}

/* Cover Letter Page Mobile */
@media (max-width: 576px) {
    .cover-letter-templates {
        flex-direction: column;
    }
    
    .cover-letter-template {
        width: 100%;
    }
}

/* Toast Mobile */
@media (max-width: 576px) {
    .toast {
        left: 15px;
        right: 15px;
        bottom: 15px;
        width: auto;
    }
}

/* Dark Mode Mobile Adjustments */
body.dark-mode .admin-sidebar-toggle {
    background: var(--primary);
}

body.dark-mode .mobile-menu-btn {
    color: #e0e0e0;
}

/* Admin Messages Mobile */
@media (max-width: 768px) {
    .message-row {
        padding: 12px !important;
    }
    
    .message-avatar {
        width: 35px !important;
        height: 35px !important;
        font-size: 14px !important;
    }
    
    .message-content {
        gap: 3px;
    }
    
    .message-sender {
        font-size: 13px;
    }
    
    .message-preview {
        font-size: 12px;
        max-width: 150px;
    }
    
    .message-date {
        font-size: 11px;
    }
    
    .message-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .message-actions .btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Print styles for mobile */
@media print {
    .admin-sidebar,
    .admin-sidebar-toggle,
    .mobile-menu-btn,
    .mobile-overlay {
        display: none !important;
    }
    
    .admin-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
}
