/* ============================================================
   GitHub Profile README Builder — Styles
   GitHub-inspired dark theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --primary: #238636;
    --primary-light: #3FB950;
    --accent: #58A6FF;
    --bg: #0D1117;
    --bg-elevated: #161B22;
    --bg-surface: #21262D;
    --bg-card: #161B22;
    --bg-hover: #30363D;
    --text-primary: #E6EDF3;
    --text-secondary: #8B949E;
    --text-muted: #484F58;
    --border: #30363D;
    --radius: 12px;
    --radius-sm: 8px;
    --font: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
}

.app {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 16px 80px;
}

.header {
    text-align: center;
    padding: 28px 0 16px;
}

.header h1 {
    font-size: 1.75rem;
    font-weight: 800;
}

.header h1 span {
    color: var(--primary-light);
}

.header p {
    color: var(--text-secondary);
    font-size: .9rem;
    margin-top: 4px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 150ms;
}

.btn:hover {
    background: var(--bg-hover);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: .8rem;
}

.toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
}

.card-title {
    font-weight: 700;
    font-size: .9rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.label {
    font-size: .75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    display: block;
    margin-bottom: 4px;
}

.input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: .85rem;
    outline: none;
    margin-bottom: 10px;
}

.input:focus {
    border-color: var(--accent);
}

textarea.input {
    resize: vertical;
    min-height: 60px;
}

.section-list .section-item {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background 150ms;
}

.section-item:hover {
    background: var(--bg-hover);
}

.section-item.active {
    border-color: var(--accent);
}

.badge-grid {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.badge-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: .75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 150ms;
    border: 1px solid var(--border);
    background: var(--bg-surface);
}

.badge-chip.selected {
    background: rgba(88, 166, 255, .15);
    border-color: var(--accent);
    color: var(--accent);
}

.preview-box {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    font-family: var(--font-mono);
    font-size: .8rem;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.6;
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    font-size: .85rem;
    opacity: 0;
    pointer-events: none;
    transition: all 200ms;
    z-index: 200;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}