/* ============================================
   cv2md.me — Terminal Aesthetic
   ============================================ */

:root {
    --bg: #050505;
    --bg-raised: #0a0a0a;
    --bg-input: #0d0d0d;
    --fg: #00FF41;
    --fg-dim: #00CC33;
    --fg-muted: #009930;
    --fg-white: #c0c0c0;
    --accent: #FF007A;
    --accent-glow: rgba(255, 0, 122, 0.3);
    --green-glow: rgba(0, 255, 65, 0.15);
    --border: #1a1a1a;
    --font: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    --radius: 4px;
}

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

/* === Base === */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font);
    font-size: 0.9rem;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Subtle scanline overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 9999;
}

a {
    color: var(--accent);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* === Layout === */
.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* === Header === */
.header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-top: 1.5rem;
    position: relative;
}

.header-about {
    position: absolute;
    top: 1.5rem;
    right: 0;
    color: var(--fg-dim);
    font-size: 0.8rem;
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.2s;
}
.header-about:hover {
    color: var(--fg);
    text-decoration: none;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--fg);
    letter-spacing: 2px;
    margin-bottom: 0.3rem;
}
.logo span {
    color: var(--accent);
}

.tagline {
    color: var(--fg-dim);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* === Blinking cursor === */
.cursor {
    display: inline-block;
    width: 0.6em;
    height: 1.1em;
    background: var(--fg);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* === Input Section === */
.input-section {
    margin-bottom: 2rem;
}

.input-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
}

.input-tab {
    padding: 0.6rem 1.2rem;
    background: transparent;
    color: var(--fg-dim);
    border: 1px solid var(--border);
    border-bottom: none;
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.8rem;
    transition: color 0.2s, background 0.2s;
}
.input-tab:first-child {
    border-radius: var(--radius) 0 0 0;
}
.input-tab:last-child {
    border-radius: 0 var(--radius) 0 0;
}
.input-tab.active {
    color: var(--fg);
    background: var(--bg-input);
    border-color: var(--fg-muted);
}

.input-panel {
    display: none;
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 1.5rem;
    background: var(--bg-input);
}
.input-panel.active {
    display: block;
}

/* Textarea */
.resume-textarea {
    width: 100%;
    min-height: 240px;
    background: var(--bg);
    color: var(--fg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    font-family: var(--font);
    font-size: 0.85rem;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}
.resume-textarea:focus {
    border-color: var(--fg-muted);
    box-shadow: 0 0 0 1px var(--green-glow);
}
.resume-textarea::placeholder {
    color: var(--fg-dim);
}

/* Drop zone */
.drop-zone {
    border: 2px dashed var(--fg-muted);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
}
.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--fg);
    background: var(--green-glow);
}

/* Flash animation on file select */
.drop-zone.drop-zone-flash {
    animation: dropFlash 0.3s ease 3;
}

@keyframes dropFlash {
    0%, 100% { border-color: var(--fg-muted); background: transparent; }
    50% { border-color: var(--fg); background: var(--green-glow); }
}

/* Ready state — file loaded, click to process */
.drop-zone.drop-zone-ready {
    border-color: var(--fg);
    border-style: solid;
    background: var(--green-glow);
    cursor: pointer;
    transition: all 0.2s;
}
.drop-zone.drop-zone-ready:hover {
    background: rgba(0, 255, 65, 0.25);
    box-shadow: 0 0 20px var(--green-glow);
}
.drop-zone.drop-zone-ready .drop-zone-text {
    color: var(--fg);
    font-size: 0.9rem;
}
.drop-zone.drop-zone-ready .drop-zone-hint {
    color: var(--fg);
    font-size: 0.85rem;
    font-weight: 700;
}
.drop-zone.drop-zone-ready .file-input {
    pointer-events: none;
}

.drop-zone-text {
    color: var(--fg-dim);
    font-size: 0.85rem;
}
.drop-zone-text strong {
    color: var(--fg);
}
.drop-zone-hint {
    color: var(--fg-dim);
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-selected {
    margin-top: 1rem;
    color: var(--fg);
    font-size: 0.8rem;
    display: none;
}
.file-selected.visible {
    display: block;
}

/* === CTA Button === */
.cta-wrapper {
    text-align: center;
    margin: 2rem 0;
}

.cta-button {
    display: inline-block;
    background: transparent;
    color: var(--fg);
    border: 2px solid var(--fg);
    padding: 0.8rem 2rem;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.2s;
    letter-spacing: 1px;
}
.cta-button:hover {
    background: var(--fg);
    color: var(--bg);
    box-shadow: 0 0 20px var(--green-glow);
}
.cta-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.cta-button:disabled:hover {
    background: transparent;
    color: var(--fg);
    box-shadow: none;
}

/* === Terminal Log (Processing Animation) === */
.terminal-section {
    display: none;
    margin: 2rem 0;
}
.terminal-section.visible {
    display: block;
}

.terminal-window {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.terminal-titlebar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 0.8rem;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
}
.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #28c840; }
.terminal-title {
    color: var(--fg-dim);
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.terminal-body {
    padding: 1rem;
    min-height: 180px;
    max-height: 300px;
    overflow-y: auto;
}

.terminal-line {
    color: var(--fg-dim);
    font-size: 0.8rem;
    line-height: 1.8;
    opacity: 0;
    animation: fadeInLine 0.3s ease forwards;
}
.terminal-line.success {
    color: var(--fg);
    font-weight: 700;
}
.terminal-line.error {
    color: var(--accent);
}

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

/* === Results Section === */
.results-section {
    display: none;
    margin: 2rem 0;
}
.results-section.visible {
    display: block;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.results-title {
    color: var(--fg);
    font-size: 1rem;
}

.remaining-count {
    color: var(--fg-dim);
    font-size: 0.8rem;
}

/* Result tabs */
.result-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
}

.result-tab {
    padding: 0.5rem 0.8rem;
    background: transparent;
    color: var(--fg-dim);
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.8rem;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}
.result-tab:hover {
    color: var(--fg);
}
.result-tab.active {
    color: var(--fg);
    border-bottom-color: var(--fg);
}

.result-content {
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    background: var(--bg-input);
    position: relative;
}

.result-panel {
    display: none;
    padding: 1rem;
    max-height: 500px;
    overflow-y: auto;
}
.result-panel.active {
    display: block;
}

.result-panel pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--fg-white);
    font-size: 0.85rem;
    line-height: 1.6;
}

/* Copy button */
.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--bg-raised);
    color: var(--fg-dim);
    border: 1px solid var(--border);
    padding: 0.3rem 0.6rem;
    font-family: var(--font);
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: var(--radius);
    transition: color 0.2s, border-color 0.2s;
    z-index: 10;
}
.copy-btn:hover {
    color: var(--fg);
    border-color: var(--fg-muted);
}
.copy-btn.copied {
    color: var(--fg);
    border-color: var(--fg);
}

/* === Download Bar === */
.download-bar {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--fg-dim);
    border: 1px solid var(--border);
    font-family: var(--font);
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.2s;
}
.download-btn:hover {
    color: var(--fg);
    border-color: var(--fg-muted);
}

/* === Score Display === */
.score-display {
    text-align: center;
    margin: 1.5rem 0;
    display: none;
}
.score-display.visible {
    display: block;
}
.score-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--fg);
}
.score-label {
    color: var(--fg-dim);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === Gem Teaser === */
.gem-teaser {
    text-align: center;
    padding: 1rem 0 0;
    font-size: 0.8rem;
    color: var(--fg-muted);
}

/* === Footer === */
.footer {
    text-align: center;
    padding: 3rem 0 2rem;
    color: var(--fg-dim);
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.footer-logo {
    max-width: 120px;
    height: auto;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.dark-only {
    display: block;
}
.light-only {
    display: none;
}
[data-theme="light"] .dark-only {
    display: none;
}
[data-theme="light"] .light-only {
    display: block;
}


.footer a {
    color: var(--fg-dim);
}

/* === Tooltip === */
.tooltip {
    position: relative;
    cursor: help;
    border-bottom: 1px dashed var(--fg-dim);
}

.tooltip-icon {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--fg-dim);
    border: 1px solid var(--fg-dim);
    border-radius: 50%;
    width: 1rem;
    height: 1rem;
    line-height: 1rem;
    text-align: center;
    margin-left: 0.2rem;
    vertical-align: middle;
}

.tooltip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-raised);
    color: var(--fg-white);
    border: 1px solid var(--fg-muted);
    border-radius: var(--radius);
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
    line-height: 1.5;
    width: 300px;
    text-align: left;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 100;
}

.tooltip:hover::after {
    opacity: 1;
}

/* === Hidden utility === */
.hidden {
    display: none !important;
}

/* === Results Intro === */
.results-intro {
    color: var(--fg-white);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* === Format Cards === */
.format-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.format-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem;
    background: var(--bg-input);
}

.format-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.format-name {
    color: var(--fg);
    font-size: 1rem;
    font-weight: 700;
}

.format-desc {
    color: var(--fg-white);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 0.8rem;
}

.format-preview {
    margin-top: 0.5rem;
}

.preview-toggle {
    background: transparent;
    color: var(--fg-dim);
    border: 1px solid var(--border);
    padding: 0.3rem 0.8rem;
    font-family: var(--font);
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: var(--radius);
    transition: color 0.2s, border-color 0.2s;
}
.preview-toggle:hover {
    color: var(--fg);
    border-color: var(--fg-dim);
}

.preview-content {
    display: none;
    margin-top: 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
}
.preview-content.visible {
    display: block;
}
.preview-content pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--fg-white);
    font-size: 0.85rem;
    line-height: 1.6;
}

/* === ATS Score Section === */
.ats-score-section {
    display: none;
    border: 1px solid var(--fg-muted);
    border-radius: var(--radius);
    background: var(--bg-input);
    padding: 1.5rem;
    margin-bottom: 2rem;
}
.ats-score-section.visible {
    display: block;
}

.ats-header {
    margin-bottom: 1.2rem;
}

.ats-title {
    color: var(--fg);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.ats-subtitle {
    color: var(--fg-dim);
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

.ats-keywords-desc {
    color: var(--fg-dim);
    font-size: 0.8rem;
    margin-bottom: 0.6rem;
}

/* Overview: score ring + summary */
.ats-overview {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--border);
}

.ats-score-ring {
    flex-shrink: 0;
    text-align: center;
    width: 100px;
    height: 100px;
    border: 3px solid var(--fg-muted);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.ats-score-ring.score-green {
    border-color: var(--fg);
    box-shadow: 0 0 15px var(--green-glow);
}
.ats-score-ring.score-yellow {
    border-color: #ffbd2e;
    box-shadow: 0 0 15px rgba(255, 189, 46, 0.2);
}
.ats-score-ring.score-red {
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

.ats-overall-score {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--fg);
    line-height: 1;
}
.score-green .ats-overall-score { color: var(--fg); }
.score-yellow .ats-overall-score { color: #ffbd2e; }
.score-red .ats-overall-score { color: var(--accent); }

.ats-score-label {
    font-size: 0.8rem;
    color: var(--fg-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.2rem;
}

.ats-summary {
    color: var(--fg-white);
    font-size: 0.85rem;
    line-height: 1.6;
    flex: 1;
}

/* Breakdown categories */
.ats-breakdown {
    margin-bottom: 1.5rem;
}

.ats-breakdown-title {
    color: var(--fg-dim);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
}

.ats-categories {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.ats-category {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.ats-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ats-category-name {
    color: var(--fg-white);
    font-size: 0.85rem;
    font-weight: 700;
}

.ats-category-score {
    color: var(--fg-dim);
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 3ch;
    text-align: right;
}

.ats-bar-track {
    width: 100%;
    height: 6px;
    background: var(--bg);
    border-radius: 3px;
    overflow: hidden;
}

.ats-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
    background: var(--fg-muted);
}
.ats-bar-fill.bar-green { background: var(--fg); }
.ats-bar-fill.bar-yellow { background: #ffbd2e; }
.ats-bar-fill.bar-red { background: var(--accent); }

.ats-category-feedback {
    color: var(--fg-dim);
    font-size: 0.8rem;
    line-height: 1.5;
    padding-left: 0.5rem;
    border-left: 2px solid var(--border);
    margin-top: 0.15rem;
}

/* Keywords */
.ats-keywords-section {
    padding-top: 1.2rem;
    border-top: 1px solid var(--border);
}

.ats-keywords-title {
    color: var(--fg-dim);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
}

.ats-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ats-keyword {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: var(--bg);
    border: 1px solid var(--fg-muted);
    border-radius: var(--radius);
    color: var(--fg);
    font-size: 0.8rem;
    line-height: 1.4;
}

/* ATS mobile responsive */
@media (max-width: 640px) {
    .ats-overview {
        flex-direction: column;
        text-align: center;
    }

    .ats-score-ring {
        margin: 0 auto;
    }

    .ats-summary {
        text-align: center;
    }
}

/* === JSON collapsible card === */
.format-card-extra {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    background: var(--bg-input);
}

.format-extra-toggle {
    color: var(--fg-dim);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 1rem 1.2rem;
    list-style: none;
}
.format-extra-toggle::-webkit-details-marker {
    display: none;
}
.format-extra-toggle::before {
    content: '+ ';
    color: var(--fg-muted);
}
details[open] > .format-extra-toggle::before {
    content: '- ';
}
.format-extra-toggle:hover {
    color: var(--fg);
}

details.format-card-extra[open] > .format-extra-toggle {
    border-bottom: 1px solid var(--border);
}

.format-card-extra .format-desc {
    padding: 1rem 1.2rem 0.5rem;
}

.format-extra-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem 1rem;
}

.format-card-extra .preview-content {
    margin: 0 1.2rem 1rem;
}

/* === Prompt Section === */
.prompt-section {
    border: 1px solid var(--fg-muted);
    border-radius: var(--radius);
    background: var(--bg-input);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.prompt-header {
    margin-bottom: 1rem;
}

.prompt-title {
    color: var(--fg);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.prompt-desc {
    color: var(--fg-white);
    font-size: 0.85rem;
    line-height: 1.6;
}

.prompt-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.prompt-box pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--fg-dim);
    font-size: 0.85rem;
    line-height: 1.6;
}

/* Gem CTA */
.gem-cta {
    text-align: center;
    padding: 1.5rem;
    margin-bottom: 1.2rem;
    border: 1px solid var(--fg-muted);
    border-radius: var(--radius);
    background: var(--bg);
}

.gem-name {
    color: var(--fg);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.gem-desc {
    color: var(--fg-white);
    font-size: 0.85rem;
    line-height: 1.6;
    max-width: 540px;
    margin: 0 auto 1rem;
}

.gem-button {
    display: inline-block;
    background: var(--fg);
    color: var(--bg);
    border-color: var(--fg);
    font-size: 0.95rem;
    padding: 0.7rem 2rem;
    text-decoration: none;
}
.gem-button:hover {
    background: var(--fg-dim);
    border-color: var(--fg-dim);
    box-shadow: 0 0 20px var(--green-glow);
    text-decoration: none;
}

.gem-hint {
    color: var(--fg-dim);
    font-size: 0.8rem;
    margin-top: 0.6rem;
}

/* DIY Prompt Toggle */
.diy-prompt {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.diy-toggle {
    color: var(--fg-dim);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.5rem 0;
    list-style: none;
}
.diy-toggle::-webkit-details-marker {
    display: none;
}
.diy-toggle::before {
    content: '+ ';
    color: var(--fg-muted);
}
details[open] .diy-toggle::before {
    content: '- ';
}
.diy-toggle:hover {
    color: var(--fg);
}

.diy-desc {
    color: var(--fg-white);
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0.8rem 0;
}

.cta-prompt-copy {
    font-size: 0.85rem;
    padding: 0.5rem 1.5rem;
}

/* === Share Section === */
.share-section {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-input);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.share-title {
    color: var(--fg);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.share-desc {
    color: var(--fg-white);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.share-buttons {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
}

.share-x {
    background: #000;
    color: #fff;
    border: 1px solid #333;
}
.share-x:hover {
    background: #1a1a1a;
    text-decoration: none;
}

.share-linkedin {
    background: #0a66c2;
    color: #fff;
    border: 1px solid #0a66c2;
}
.share-linkedin:hover {
    background: #004182;
    text-decoration: none;
}

/* === Agent Config Hero === */
.agent-config {
    border: 1px solid var(--fg-muted);
    border-radius: var(--radius);
    background: var(--bg-input);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.agent-config-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.2rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.agent-config-status {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.agent-config-status.status-pass {
    background: var(--fg);
    color: var(--bg);
}
.agent-config-status.status-warn {
    background: #ffbd2e;
    color: #1a1a1a;
}
.agent-config-status.status-fail {
    background: var(--accent);
    color: #fff;
}

.agent-config-title {
    color: var(--fg);
    font-size: 0.9rem;
    font-weight: 700;
    flex: 1;
}

.agent-config-body {
    padding: 1.2rem;
    max-height: 500px;
    overflow-y: auto;
}

.agent-config-body pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--fg-dim);
    font-size: 0.8rem;
    line-height: 1.7;
}

/* === Diagnostics Section === */
.diagnostics-section {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-input);
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.diag-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.diag-title {
    color: var(--fg);
    font-weight: 700;
    font-size: 0.9rem;
}

.diag-score-badge {
    padding: 0.2rem 0.8rem;
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: 700;
}
.diag-score-badge.status-pass {
    background: var(--fg);
    color: var(--bg);
}
.diag-score-badge.status-warn {
    background: #ffbd2e;
    color: #1a1a1a;
}
.diag-score-badge.status-fail {
    background: var(--accent);
    color: #fff;
}

.diag-warnings {
    margin-bottom: 0.8rem;
}

.diag-warning {
    padding: 0.2rem 0;
    font-size: 0.8rem;
    line-height: 1.6;
    font-family: var(--font);
}
.diag-warning.severity-critical {
    color: var(--accent);
}
.diag-warning.severity-warning {
    color: #ffbd2e;
}
.diag-warning.severity-info {
    color: var(--fg-dim);
}

.diag-keywords {
    padding-top: 0.8rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
}

.diag-keywords-label {
    color: var(--fg);
    font-weight: 700;
}

.diag-keywords-list {
    color: var(--fg-dim);
}

.diag-downloads {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    margin-bottom: 0;
}

/* === Downloads Bar === */
.downloads-bar {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.download-btn-primary {
    flex: 1;
    min-width: 0;
    padding: 0.7rem 1.2rem;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 700;
    background: var(--fg);
    color: var(--bg);
    border: 1px solid var(--fg);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.download-btn-primary:hover {
    background: var(--fg-dim);
    border-color: var(--fg-dim);
    box-shadow: 0 0 15px var(--green-glow);
}

.download-btn-sm {
    padding: 0.5rem 0.8rem;
    font-family: var(--font);
    font-size: 0.75rem;
    background: transparent;
    color: var(--fg-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}
.download-btn-sm:hover {
    color: var(--fg-dim);
    border-color: var(--fg-muted);
}

.download-extra {
    position: relative;
}

.download-extra-toggle {
    color: var(--fg-dim);
    font-family: var(--font);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.7rem 1rem;
    list-style: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.download-extra-toggle::-webkit-details-marker {
    display: none;
}
.download-extra-toggle:hover {
    color: var(--fg);
    border-color: var(--fg-muted);
}

.download-extra .download-btn {
    margin-top: 0.4rem;
}

/* === Share Nudge (inline, post-download) === */
.share-nudge {
    display: none;
    margin-top: 0.8rem;
    font-size: 0.8rem;
    color: var(--fg-dim);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.share-nudge.visible {
    display: block;
    animation: fadeInNudge 0.4s ease forwards;
}

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

.share-nudge-link {
    color: var(--fg);
    font-weight: 700;
    text-decoration: none;
    padding: 0.1rem 0.3rem;
    border: 1px solid var(--border);
    border-radius: 3px;
    transition: all 0.2s;
}
.share-nudge-link:hover {
    border-color: var(--fg-muted);
    background: var(--green-glow);
    text-decoration: none;
}

.share-nudge-sep {
    color: var(--fg-muted);
    margin: 0 0.15rem;
}

[data-theme="light"] .share-nudge-link {
    border-color: #D1C9C0;
}
[data-theme="light"] .share-nudge-link:hover {
    border-color: var(--accent);
    background: rgba(217, 119, 6, 0.06);
}

/* === Mission Section === */
.mission-section {
    border: 1px solid var(--fg-muted);
    border-radius: var(--radius);
    background: var(--bg-input);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.mission-header {
    margin-bottom: 1rem;
}

.mission-title {
    color: var(--fg);
    font-size: 0.9rem;
    font-weight: 700;
}

.mission-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mission-gem {
    text-align: center;
    padding: 1.2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
}

.mission-desc {
    color: var(--fg-white);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* === Convert Another === */
.convert-another {
    text-align: center;
    margin: 2rem 0;
}

.cta-secondary {
    border-color: var(--fg-dim);
    color: var(--fg-dim);
}
.cta-secondary:hover {
    background: var(--fg-dim);
    color: var(--bg);
}

/* === Error Display === */
.error-message {
    background: rgba(255, 0, 122, 0.1);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    padding: 1rem;
    color: var(--accent);
    font-size: 0.85rem;
    margin: 1rem 0;
    display: none;
}
.error-message.visible {
    display: block;
}

/* === Mobile Responsive === */
@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }

    .input-tab {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    .result-tab {
        padding: 0.4rem 0.5rem;
        font-size: 0.8rem;
    }

    .resume-textarea {
        min-height: 180px;
    }

    .cta-button {
        width: 100%;
        padding: 0.8rem 1rem;
    }

    .format-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .download-btn {
        width: 100%;
        justify-content: center;
    }

    .downloads-bar {
        flex-direction: column;
    }

    .download-btn-primary {
        width: 100%;
    }

    .agent-config-header {
        flex-wrap: wrap;
    }

    .diag-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* === About Page === */
.about-content {
    max-width: 680px;
    margin: 0 auto;
}

.about-section {
    margin-bottom: 2.5rem;
}

.about-heading {
    color: var(--fg);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.about-content p {
    color: var(--fg-white);
    font-size: 0.85rem;
    line-height: 1.7;
    margin-bottom: 0.8rem;
}

.about-content code {
    color: var(--fg);
    background: var(--bg-input);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    border: 1px solid var(--border);
    font-size: 0.82rem;
}

.about-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0.8rem;
}

.about-list li {
    color: var(--fg-white);
    font-size: 0.85rem;
    line-height: 1.7;
    padding: 0.2rem 0;
    padding-left: 1.2rem;
    position: relative;
}

.about-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--fg-muted);
}

.about-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
}

.about-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 1.8rem;
    height: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--fg-muted);
    border-radius: 50%;
    color: var(--fg);
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 0.1rem;
}

.about-step strong {
    color: var(--fg);
    font-size: 0.85rem;
    display: block;
    margin-bottom: 0.2rem;
}

.about-step p {
    margin-bottom: 0;
}

.about-format-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.about-format-item {
    color: var(--fg-white);
    font-size: 0.85rem;
    line-height: 1.6;
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--border);
}

.about-format-item:last-child {
    border-bottom: none;
}

.about-cta {
    text-align: center;
    margin: 3rem 0 1rem;
}

/* ============================================
   Theme Toggle
   ============================================ */

.theme-toggle {
    position: absolute;
    top: 1.5rem;
    right: 4.5rem;
    background: transparent;
    border: 1px solid var(--fg-muted);
    color: var(--fg-dim);
    font-family: var(--font);
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    cursor: pointer;
    border-radius: var(--radius);
    transition: color 0.2s, border-color 0.2s;
    letter-spacing: 1px;
}
.theme-toggle:hover {
    color: var(--fg);
    border-color: var(--fg);
}
.theme-toggle::after {
    content: 'light';
}
[data-theme="light"] .theme-toggle::after {
    content: 'dark';
}

/* ============================================
   Light Mode (Claude Aesthetic)
   ============================================ */

[data-theme="light"] {
    --bg: #FAF9F6;
    --bg-raised: #FFFFFF;
    --bg-input: #FFFFFF;
    --fg: #2D2B2B;
    --fg-dim: #6B6560;
    --fg-muted: #9B9490;
    --fg-white: #3D3836;
    --accent: #D97706;
    --accent-glow: rgba(217, 119, 6, 0.12);
    --green-glow: rgba(217, 119, 6, 0.12);
    --border: #E8E2DC;
    --radius: 12px;
}

/* Remove scanline overlay */
[data-theme="light"] body::after {
    display: none;
}

/* --- Buttons --- */

[data-theme="light"] .cta-button {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
[data-theme="light"] .cta-button:hover {
    background: #B45309;
    border-color: #B45309;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .cta-button:disabled {
    opacity: 0.4;
}
[data-theme="light"] .cta-button:disabled:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: none;
}

[data-theme="light"] .cta-secondary {
    background: transparent;
    border-color: #D1C9C0;
    color: var(--fg-dim);
}
[data-theme="light"] .cta-secondary:hover {
    background: #F5F0EB;
    border-color: var(--fg-dim);
    color: var(--fg);
    box-shadow: none;
}

/* --- Input --- */

[data-theme="light"] .input-tab.active {
    border-color: #D1C9C0;
}

[data-theme="light"] .input-panel {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .resume-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.12);
}

/* --- Drop zone --- */

[data-theme="light"] .drop-zone {
    border-color: #D1C9C0;
}
[data-theme="light"] .drop-zone:hover,
[data-theme="light"] .drop-zone.drag-over {
    border-color: var(--accent);
    background: rgba(217, 119, 6, 0.06);
}
[data-theme="light"] .drop-zone.drop-zone-ready {
    border-color: var(--accent);
    background: rgba(217, 119, 6, 0.06);
}
[data-theme="light"] .drop-zone.drop-zone-ready:hover {
    background: rgba(217, 119, 6, 0.12);
    box-shadow: 0 0 20px rgba(217, 119, 6, 0.1);
}
[data-theme="light"] .drop-zone.drop-zone-ready .drop-zone-hint {
    color: var(--accent);
}

@keyframes dropFlashLight {
    0%, 100% { border-color: #D1C9C0; background: transparent; }
    50% { border-color: #D97706; background: rgba(217, 119, 6, 0.06); }
}
[data-theme="light"] .drop-zone.drop-zone-flash {
    animation: dropFlashLight 0.3s ease 3;
}

/* --- Terminal / Processing: chat bubble style --- */

[data-theme="light"] .terminal-window {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .terminal-titlebar {
    background: #F5F0EB;
}
[data-theme="light"] .terminal-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
}
[data-theme="light"] .terminal-body {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
[data-theme="light"] .terminal-line {
    padding: 0.6rem 1rem;
    background: #F0E8DF;
    border-radius: 8px;
    max-width: 85%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
[data-theme="light"] .terminal-line.success {
    color: #16A34A;
    background: #DCFCE7;
    font-weight: 600;
}
[data-theme="light"] .terminal-line.error {
    color: #DC2626;
    background: #FEE2E2;
}
[data-theme="light"] .terminal-line.terminal-hint {
    color: var(--fg-muted);
    background: transparent;
    font-size: 0.8rem;
    font-style: italic;
    padding: 0.3rem 0;
}
[data-theme="light"] .terminal-line.terminal-waiting {
    background: #F0E8DF;
    font-family: var(--font);
    font-size: 0.8rem;
}

/* --- Diagnostics --- */

[data-theme="light"] .diagnostics-section {
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .diag-score-badge {
    border-radius: 20px;
}
[data-theme="light"] .diag-score-badge.status-pass {
    background: #DCFCE7;
    color: #16A34A;
}
[data-theme="light"] .diag-score-badge.status-warn {
    background: #FEF9C3;
    color: #CA8A04;
}
[data-theme="light"] .diag-score-badge.status-fail {
    background: #FEE2E2;
    color: #DC2626;
}
[data-theme="light"] .diag-warning.severity-critical {
    color: #DC2626;
}
[data-theme="light"] .diag-warning.severity-warning {
    color: #CA8A04;
}

/* --- Mission / Job Match --- */

[data-theme="light"] .mission-section {
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .mission-gem {
    background: #F5F0EB;
}
[data-theme="light"] .mission-desc {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
[data-theme="light"] .gem-button {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
[data-theme="light"] .gem-button:hover {
    background: #B45309;
    border-color: #B45309;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .diy-toggle::before {
    color: var(--accent);
}

/* --- Downloads --- */

[data-theme="light"] .download-btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
[data-theme="light"] .download-btn-primary:hover {
    background: #B45309;
    border-color: #B45309;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* --- Share --- */

[data-theme="light"] .share-section {
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .share-desc {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* --- Error --- */

[data-theme="light"] .error-message {
    background: #FEE2E2;
    border-color: #DC2626;
    color: #DC2626;
}

/* --- Typography --- */

[data-theme="light"] .tagline {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* --- ATS Score (if visible) --- */

[data-theme="light"] .ats-score-ring.score-green {
    border-color: #16A34A;
    box-shadow: 0 0 15px rgba(22, 163, 74, 0.15);
}
[data-theme="light"] .ats-score-ring.score-yellow {
    border-color: #CA8A04;
    box-shadow: 0 0 15px rgba(202, 138, 4, 0.15);
}
[data-theme="light"] .ats-score-ring.score-red {
    border-color: #DC2626;
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.15);
}
[data-theme="light"] .score-green .ats-overall-score { color: #16A34A; }
[data-theme="light"] .score-yellow .ats-overall-score { color: #CA8A04; }
[data-theme="light"] .score-red .ats-overall-score { color: #DC2626; }
[data-theme="light"] .ats-bar-fill.bar-green { background: #16A34A; }
[data-theme="light"] .ats-bar-fill.bar-yellow { background: #CA8A04; }
[data-theme="light"] .ats-bar-fill.bar-red { background: #DC2626; }
[data-theme="light"] .ats-score-section {
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* --- About page --- */

[data-theme="light"] .about-list li::before {
    color: var(--accent);
}
[data-theme="light"] .step-number {
    border-color: var(--accent);
    color: var(--accent);
}
[data-theme="light"] .about-content code {
    background: #F5F0EB;
    border-color: #E8E2DC;
}

/* --- Light mode mobile --- */

@media (max-width: 640px) {
    .theme-toggle {
        right: 4rem;
    }
}
