:root {
    --primary: #000000;
    --primary-dark: #333333;
    --secondary: #666666;
    --accent: #000000;
    --bg: #ffffff;
    --surface: #ffffff;
    --text: #000000;
    --text-light: #666666;
    --border: #000000;
    --radius: 0px;
    /* Sharp edges */
    --shadow: 8px 8px 0px #000000;
    /* Hard shadow */
    --font-main: 'Inter', sans-serif;
    --font-ar: 'Noto Sans Arabic', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* RTL Support */
body[dir="rtl"] {
    font-family: var(--font-ar);
}

.main-header {
    background: var(--surface);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border);
}

.logo {
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: -0.05em;
}

.logo span {
    color: var(--text);
    font-weight: 300;
}

.controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

#main-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    border: 2px solid var(--border);
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

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

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

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

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

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

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

.btn-block {
    width: 100%;
}

/* Wizard */
.wizard-container {
    display: flex;
    max-width: 1000px;
    margin: 0 auto;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-height: 600px;
    overflow: hidden;
}

.wizard-sidebar {
    width: 250px;
    background: #f4f4f4;
    padding: 2rem;
    border-right: 2px solid var(--border);
}

body[dir="rtl"] .wizard-sidebar {
    border-right: none;
    border-left: 2px solid var(--border);
}

.steps-list {
    list-style: none;
}

.steps-list li {
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius);
    color: var(--text-light);
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 2px solid transparent;
}

.steps-list li.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.wizard-content {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
}

#wizard-form {
    flex: 1;
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background: #f0f0f0;
}

.wizard-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border);
}

body[dir="rtl"] .wizard-actions {
    flex-direction: row-reverse;
}

/* Preview / Resume Paper */
.preview-container {
    max-width: 850px;
    /* A4 width approx */
    margin: 0 auto;
}

.preview-toolbar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    background: var(--surface);
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.resume-paper {
    background: white;
    width: 100%;
    min-height: 1100px;
    /* A4 height approx */
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

/* Auth */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.auth-box {
    background: var(--surface);
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
}

.auth-switch {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

/* Resume Content Styles (Minimal ATS) */
.resume-header {
    border-bottom: 2px solid #000;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.resume-name {
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.2;
}

.resume-contact {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #555;
}

.resume-section {
    margin-bottom: 1.5rem;
}

.resume-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    border-bottom: 1px solid #ccc;
    margin-bottom: 1rem;
    padding-bottom: 0.25rem;
}

.resume-item {
    margin-bottom: 1rem;
}

.resume-item-header {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.resume-item-subtitle {
    font-style: italic;
    color: #444;
    margin-bottom: 0.25rem;
}

/* Print Styles */
@media print {
    body {
        background: white;
        height: auto;
    }

    .main-header,
    .preview-toolbar,
    .wizard-container,
    .auth-container {
        display: none !important;
    }

    #main-content {
        padding: 0;
        overflow: visible;
    }

    .preview-container {
        margin: 0;
        max-width: none;
    }

    .resume-paper {
        box-shadow: none;
        padding: 0;
        margin: 0;
    }
}

/* Status Bar */
.status-bar {
    background: #000;
    border-bottom: 2px solid #000;
    color: #fff;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-bar a {
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    border-bottom: 1px dashed #fff;
}

.status-bar a:hover {
    border-bottom-style: solid;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .main-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .controls {
        width: 100%;
        justify-content: space-between;
    }

    .wizard-container {
        flex-direction: column;
        min-height: auto;
        border-width: 1px;
        box-shadow: 4px 4px 0px #000;
    }

    .wizard-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid var(--border);
        padding: 1rem;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    body[dir="rtl"] .wizard-sidebar {
        border-left: none;
    }

    .steps-list {
        display: flex;
        gap: 0.5rem;
    }

    .steps-list li {
        margin-bottom: 0;
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        flex-shrink: 0;
    }

    .wizard-content {
        padding: 1.5rem;
    }

    .wizard-actions {
        flex-direction: column-reverse;
        /* Stack buttons, primary on top usually, or keep flow */
        gap: 0.75rem;
    }

    .wizard-actions .btn {
        width: 100%;
        text-align: center;
    }

    /* Ensure clear button is also full width if present */
    .wizard-actions .btn-clear {
        margin-right: 0 !important;
    }

    /* Preview adjustments */
    .preview-toolbar {
        flex-direction: column;
        gap: 1rem;
    }

    .preview-toolbar .btn {
        width: 100%;
        margin-left: 0 !important;
        margin-bottom: 0.5rem;
    }

    .resume-paper {
        padding: 20px;
        min-height: auto;
    }

    .resume-name {
        font-size: 1.75rem;
    }
}