:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #059669;
    --accent: #f59e0b;
    --bg-main: #f8fafc;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;

    --radius: 0.5rem;
    --font-ui: 'Outfit', sans-serif;
    --font-cv: 'Inter', sans-serif;
    --sidebar-width: 420px;
    --header-height: 72px;
}

body.dark-theme {
    --bg-main: #020617;
    --bg-sidebar: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-ui);
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
}

/* Landing Page Header & Nav */
.landing-header {
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--primary);
}

.landing-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Hero Section */
.hero-section {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    padding: 6rem 5%;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-content h1 span {
    color: var(--primary);
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.preview-card-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.preview-card {
    width: 350px;
    height: 450px;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: simpleFloat 4s ease-in-out infinite;
    overflow: hidden;
}

.preview-card.demo-cv {
    gap: 1rem;
    padding: 1.5rem;
}

.cv-header {
    text-align: center;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary);
}

.cv-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    color: var(--text-main);
}

.cv-title {
    font-size: 0.85rem;
    color: var(--primary);
    margin: 0;
    font-weight: 600;
}

.cv-body {
    flex: 1;
    overflow-y: auto;
    font-size: 0.75rem;
}

.cv-section {
    margin-bottom: 0.75rem;
}

.cv-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 0.4rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cv-info {
    font-size: 0.7rem;
    margin: 0.2rem 0;
    color: var(--text-main);
}

.cv-item {
    margin-bottom: 0.5rem;
}

.cv-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.2rem;
}

.cv-item-header strong {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
}

.cv-item-header span {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.cv-item-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin: 0.1rem 0 0 0;
}

@keyframes simpleFloat {

    0%,
    100% {
        transform: translateY(0) rotate(2deg);
    }

    50% {
        transform: translateY(-15px) rotate(4deg);
    }
}

.card-header-mock {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.avatar-mock {
    width: 45px;
    height: 45px;
    background: #e2e8f0;
    border-radius: 8px;
}

.header-text-mock {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-lines .line,
.line {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.line.sm {
    width: 30%;
}

.line.med {
    width: 60%;
}

.line.lg {
    width: 80%;
}

.line.full {
    width: 100%;
}

.line.blue {
    background: #dbeafe;
}

.card-body-mock {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.section-mock {
    margin-top: 1rem;
    border-top: 1px solid #f1f5f9;
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 6rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-item {
    text-align: center;
    padding: 2.5rem;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.feature-item i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.feature-item h3 {
    margin-bottom: 0.75rem;
}

.feature-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Builder Layout Styles */
.app-header {
    height: var(--header-height);
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    gap: 1rem;
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    align-items: center;
}

.hamburger-menu span {
    width: 24px;
    height: 2.5px;
    background: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Navigation Drawer */
.mobile-nav-drawer {
    position: fixed;
    left: -100%;
    top: var(--header-height);
    width: 100%;
    max-width: 300px;
    height: calc(100vh - var(--header-height));
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    z-index: 999;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.mobile-nav-drawer.open {
    left: 0;
}

.nav-drawer-content {
    padding: 1rem;
}

.nav-drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.nav-drawer-close:hover {
    background: var(--bg-main);
    border-radius: var(--radius);
}

.nav-drawer-content h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.nav-drawer-home {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 1rem;
    border-bottom: 2px solid var(--primary);
    transition: all 0.2s ease;
}

.nav-drawer-home:hover {
    background-color: var(--bg-main);
}

.nav-drawer-home i {
    font-size: 1.2rem;
}

.nav-drawer-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-drawer-items .nav-item {
    width: 100%;
    padding: 1rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.nav-drawer-items .nav-item:hover {
    background: var(--bg-main);
    color: var(--primary);
}

.nav-drawer-items .nav-item.active {
    background: var(--primary);
    color: white;
}

.nav-drawer-items .nav-item i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* Nav Overlay */
.nav-overlay {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.nav-overlay.open {
    display: block;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.logo-text span {
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cv-manager {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cv-selector {
    padding: 0.5rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    background: white;
    font-size: 0.875rem;
    cursor: pointer;
}

.cv-selector:hover {
    border-color: #2563eb;
}

#new-cv-btn {
    font-size: 1.2rem;
}

small[id$="-error"] {
    color: #ef4444;
    font-size: 0.8rem;
    display: none;
    margin-top: 0.25rem;
}

small.show-error {
    display: block !important;
}

.template-selector {
    display: flex;
    align-items: center;
}

.template-selector select {
    padding: 0.65rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-main);
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-ui);
}

.template-selector select:hover {
    border-color: var(--primary);
    background: var(--bg-sidebar);
}

.template-selector select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.app-container {
    display: flex;
    height: calc(100vh - var(--header-height));
    overflow: hidden;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-nav {
    display: flex;
    padding: 0.75rem;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
}

.sidebar-nav::-webkit-scrollbar {
    display: none;
}

.nav-item {
    padding: 0.6rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    cursor: pointer;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

.form-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.form-section {
    display: none;
}

.form-section.active {
    display: block;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

label .required {
    color: #ef4444;
    font-weight: 700;
    margin-left: 0.2rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.875rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: var(--bg-main);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Preview Canvas */
.preview-canvas {
    flex: 1;
    background: #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    overflow-y: auto;
    position: static;
}

.preview-toolbar {
    margin-bottom: 2rem;
    background: white;
    padding: 0.5rem 1.5rem;
    border-radius: 999px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

#close-preview {
    display: none;
}

.mobile-only {
    display: none;
}

.resume-paper {
    width: 210mm;
    min-height: 297mm;
    background: white;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    padding: 20mm;
    transform-origin: top center;
    height: auto;
}

@media print {
    .resume-paper {
        width: 100%;
        min-height: auto;
        box-shadow: none;
        margin: 0;
        padding: 0;
    }
}

/* Buttons */
.btn {
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    padding: 0.8rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-primary:hover:not(.loading) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.btn-primary.loading {
    opacity: 0.8;
    pointer-events: none;
    position: relative;
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-export {
    padding: 0.65rem 1.2rem;
    font-size: 0.95rem;
    white-space: nowrap;
}

.btn-export .btn-text {
    display: inline;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    border-radius: var(--radius);
    padding: 0.8rem 1.5rem;
}

.btn-outline:hover {
    background: var(--border);
}

.btn-lg {
    padding: 1.1rem 2.8rem;
    font-size: 1.1rem;
    border-radius: 0.75rem;
}

.btn-sm {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    border-radius: 0.5rem;
}

.btn-icon {
    background: transparent;
    color: var(--text-main);
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
}

/* Progress Indicator */
.progress-indicator {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border);
}

.progress-bar {
    width: 0%;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    font-weight: 600;
}

.progress-text #current-step {
    color: var(--primary);
}

/* Form Footer Navigation */
.form-footer {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.form-footer .btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

.btn-prev {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.8rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-prev:hover {
    background: var(--border);
    transform: translateY(-2px);
}

/* Footer */
.app-footer {
    background: var(--bg-sidebar);
    border-top: 1px solid var(--border);
    padding: 2rem 5%;
    margin-top: 4rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    text-align: center;
}

.footer-inner p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

/* Tablet & Smaller Screens */
@media (max-width: 1000px) {
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 3rem 5%;
        gap: 2rem;
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    .hero-image {
        display: flex;
        justify-content: center;
        margin-top: 1rem;
    }

    .preview-card {
        max-width: 320px;
        height: 420px;
    }

    .features {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        padding: 3rem 5%;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }

    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        max-height: 400px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .form-container {
        max-height: 300px;
    }

    .app-header {
        flex-wrap: nowrap;
        height: var(--header-height);
        padding: 0 1.5rem;
        gap: 1rem;
        overflow-x: auto;
    }

    .header-actions {
        display: flex;
        gap: 0.75rem;
        align-items: center;
        flex-wrap: nowrap;
        flex-shrink: 0;
    }

    .template-selector select {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
    }

    #export-pdf {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
        white-space: nowrap;
    }

    #export-pdf .btn-text {
        display: inline;
    }

    .preview-canvas {
        padding: 1rem;
        display: flex;
        position: static;
    }

    .resume-paper {
        width: 100%;
        max-width: 100%;
        min-height: auto;
        padding: 1rem;
        transform: none !important;
        box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    }
}

/* Desktop - show preview canvas live */
@media (min-width: 1025px) {
    .app-container {
        flex-direction: row;
        gap: 0;
    }

    .sidebar {
        width: 420px;
        height: auto;
        max-height: none;
        border-right: 1px solid var(--border);
        border-bottom: none;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
    }

    .form-container {
        max-height: none;
        flex: 1;
        overflow-y: auto;
    }

    .preview-canvas {
        display: flex !important;
        position: static !important;
        background: #e2e8f0;
        flex-direction: column;
        align-items: center;
        padding: 2rem;
        overflow-y: auto;
        flex: 1;
        min-width: 0;
    }

    .resume-paper {
        width: 210mm;
        min-height: 297mm;
        background: white;
        box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
        padding: 20mm;
        transform-origin: top center;
    }

    #close-preview {
        display: none !important;
    }

    .mobile-only {
        display: none !important;
    }

    .btn-preview {
        display: none !important;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --header-height: 64px;
        --sidebar-width: 100%;
    }

    .landing-header {
        height: 64px;
        padding: 0 1.5rem;
    }

    .nav-links {
        display: none;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .landing-actions {
        gap: 0.5rem;
    }

    .btn-sm {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .hero-section {
        padding: 2rem 4%;
        gap: 1.5rem;
    }

    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        line-height: 1.5;
    }

    .badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
    }

    .btn-lg {
        padding: 0.9rem 1.8rem;
        font-size: 0.95rem;
    }

    .preview-card {
        max-width: 100%;
        height: 400px;
        padding: 1.5rem;
    }

    .cv-name {
        font-size: 1rem;
    }

    .cv-title {
        font-size: 0.8rem;
    }

    .cv-section-title {
        font-size: 0.75rem;
    }

    .cv-info {
        font-size: 0.65rem;
    }

    .features {
        grid-template-columns: 1fr;
        padding: 2rem 4%;
    }

    .feature-item {
        padding: 1.5rem;
    }

    .feature-item i {
        font-size: 2rem;
    }

    .feature-item h3 {
        font-size: 1.1rem;
    }

    .feature-item p {
        font-size: 0.9rem;
    }

    .how-it-works {
        padding: 2rem 4% !important;
    }

    .how-it-works h2 {
        font-size: 1.8rem;
        margin-bottom: 2rem !important;
    }

    .how-it-works .steps-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .step {
        padding: 1.5rem;
    }

    .step h4 {
        font-size: 1rem;
    }

    .step p {
        font-size: 0.9rem;
    }

    .landing-footer {
        padding: 2rem 4% !important;
    }

    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    /* Builder Page Mobile */
    .app-header {
        flex-wrap: nowrap;
        height: 64px;
        padding: 0 1rem;
        gap: 0.5rem;
        overflow-x: visible;
    }

    .logo {
        display: flex;
        align-items: center;
        gap: 0.3rem;
        flex-shrink: 0;
    }

    .logo-icon {
        font-size: 1.2rem;
    }

    .logo-text {
        font-size: 0.9rem;
    }

    .hamburger-menu {
        display: flex;
        order: 2;
        margin-left: auto;
    }

    .header-actions {
        display: flex;
        gap: 0.5rem;
        order: 1;
        flex: 1;
        justify-content: flex-end;
    }

    .template-selector {
        display: none;
    }

    .cv-manager {
        display: none;
    }

    .btn-export .btn-text {
        display: none;
    }

    .btn-export {
        padding: 0.5rem;
        font-size: 1rem;
    }

    #lang-toggle {
        font-size: 0.85rem;
    }

    .mobile-nav-drawer {
        max-width: 100%;
    }

    .nav-drawer-content {
        padding: 1.5rem 1rem;
    }

    .nav-drawer-items .nav-item {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .app-container {
        flex-direction: column;
        height: auto;
    }

    .progress-indicator {
        display: flex;
        order: 0;
    }

    .sidebar {
        width: 100%;
        height: auto;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid var(--border);
        order: 1;
        flex-shrink: 0;
    }

    .sidebar-nav {
        padding: 0.5rem;
        gap: 0.25rem;
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
    }

    .nav-item {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
        gap: 0.3rem;
    }

    .nav-item i {
        font-size: 0.9rem;
    }

    .form-container {
        order: 2;
        max-height: none;
        padding: 1rem;
        overflow-y: visible;
        flex-shrink: 0;
        width: 100%;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    label {
        font-size: 0.8rem;
        margin-bottom: 0.3rem;
    }

    input,
    select,
    textarea {
        padding: 0.6rem;
        font-size: 0.9rem;
    }

    .grid-2 {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .preview-canvas {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        flex-direction: column;
        align-items: center;
        padding: 1rem;
        background: #1e293b;
        width: 100%;
        height: 100vh;
        overflow-y: auto;
    }

    .preview-canvas.active {
        display: flex;
    }

    .preview-canvas.active {
        display: flex;
    }

    .preview-toolbar {
        display: flex;
        width: 100%;
        max-width: 100%;
        margin-bottom: 1rem;
        position: sticky;
        top: 0;
        z-index: 1001;
        justify-content: space-between;
    }

    #close-preview {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .mobile-only {
        display: inline;
    }

    #zoom-level {
        font-size: 0.8rem;
    }

    .resume-paper {
        width: 90%;
        max-width: 100%;
        min-height: auto;
        padding: 12mm;
        margin: 0 auto;
        transform: scale(0.65);
        transform-origin: top center;
    }

    .form-footer {
        margin-top: 1rem;
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn-next {
        width: 100%;
    }

    .btn-prev {
        width: 100%;
    }

    .app-footer {
        padding: 1.5rem 4%;
        margin-top: 2rem;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .footer-inner p {
        font-size: 0.8rem;
    }

    .footer-links {
        gap: 1rem;
        width: 100%;
    }

    .footer-links a {
        font-size: 0.8rem;
        flex: 1;
        justify-content: center;
    }

    #resume-preview-container {
        padding: 0.5rem 0;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .landing-header {
        padding: 0 1rem;
    }

    .hero-section {
        padding: 1.5rem 3%;
    }

    .hero-content h1 {
        font-size: 1.6rem;
        line-height: 1.3;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    .preview-card {
        max-width: 100%;
        height: 350px;
        padding: 1rem;
    }

    .btn-lg {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .features {
        padding: 1.5rem 3%;
        gap: 1.5rem;
    }

    .feature-item {
        padding: 1rem;
    }

    .feature-item i {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    /* Builder Page Small Mobile */
    .app-header {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem;
        height: 64px;
        overflow-x: auto;
    }

    .logo {
        display: flex;
        align-items: center;
        gap: 0.3rem;
        flex-shrink: 0;
    }

    .logo-icon {
        font-size: 1.2rem;
    }

    .logo-text {
        font-size: 0.9rem;
    }

    .header-actions {
        flex-direction: row;
        gap: 0.3rem;
        align-items: center;
        margin-left: auto;
        flex-shrink: 0;
    }

    .template-selector {
        min-width: 120px;
        max-width: 150px;
    }

    .template-selector select {
        width: 100%;
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }

    #export-pdf {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        min-width: 40px;
    }

    #export-pdf .btn-text {
        display: none;
    }

    .sidebar-nav {
        flex-direction: row;
    }

    .resume-paper {
        transform: scale(0.6);
        padding: 10mm;
    }
}

/* Loading Spinner */
.section-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 3000;
    gap: 1rem;
}

.section-loader.active {
    display: flex;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.section-loader p {
    color: #1f2937;
    font-size: 1rem;
    font-weight: 500;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 400px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    z-index: 2000;
    font-weight: 600;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-error {
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.notification-error i {
    color: #ef4444;
    font-size: 1.25rem;
}

.notification-success {
    border-left: 4px solid #10b981;
    color: #065f46;
}

.notification-success i {
    color: #10b981;
    font-size: 1.25rem;
}