:root {
    --bg: #0f0f1a;
    --surface: #1a1a2e;
    --surface2: #242442;
    --border: #2d2640;
    --accent: #8b5cf6;
    --accent-glow: rgba(139,92,246,0.1);
    --text: #e0e0ec;
    --text-dim: #888;
    --green: #34d399;
    --red: #f87171;
    --cyan: #67e8f9;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

.hero { text-align: center; padding: 80px 20px 40px; }
.hero h1 { font-size: 2rem; margin-bottom: 8px; }
.hero p { color: #a78bfa; font-size: 1rem; margin-bottom: 32px; }

.input-row { display: flex; max-width: 600px; margin: 0 auto; gap: 10px; }
.input-row input {
    flex: 1; padding: 14px 18px; border-radius: 12px; border: 1px solid var(--border);
    background: var(--surface); color: #fff; font-size: 1rem; outline: none;
}
.input-row input:focus { border-color: var(--accent); }
.input-row button {
    padding: 14px 28px; border-radius: 12px; border: none;
    background: var(--accent); color: #fff; font-size: 1rem; font-weight: 600;
    cursor: pointer; white-space: nowrap;
}
.input-row button:hover { background: #7c3aed; }
.input-row button:disabled { background: #4a4a5a; cursor: not-allowed; }

/* 프로젝트 맥락 입력 */
.project-context-wrapper {
    max-width: 600px;
    margin: 1rem auto 0;
}
.context-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
    text-align: left;
}
.context-label .optional {
    font-weight: 400;
    color: var(--text-dim);
    font-size: 0.78rem;
}
.project-context-input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 60px;
    max-height: 150px;
    transition: border-color 0.2s;
}
.project-context-input:focus {
    outline: none;
    border-color: var(--accent);
}
.project-context-input::placeholder {
    color: var(--text-dim);
    opacity: 0.6;
}
.context-counter {
    text-align: right;
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 0.3rem;
}

/* 수동 대본 폴백 (추출 실패 영상 구제) */
.manual-fallback {
    margin-top: 1.2rem;
    padding: 1rem;
    background: var(--accent-glow);
    border: 1px solid var(--accent);
    border-radius: 12px;
}
.manual-fallback-hint {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text);
    margin: 0 0 0.7rem;
}
.manual-fallback-how {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin: 0 0 0.7rem;
}
.manual-fallback-how summary {
    cursor: pointer;
    color: var(--accent);
    margin-bottom: 0.4rem;
}
.manual-fallback-how ol {
    margin: 0.3rem 0 0;
    padding-left: 1.2rem;
    line-height: 1.6;
}
.manual-fallback-how b { color: var(--text); }
.manual-transcript-input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 110px;
    max-height: 320px;
}
.manual-transcript-input:focus {
    outline: none;
    border-color: var(--accent);
}
.manual-transcript-input::placeholder { color: var(--text-dim); opacity: 0.6; }
.manual-fallback-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.6rem;
    gap: 0.8rem;
}
.manual-count { font-size: 0.72rem; color: var(--text-dim); }
.btn-manual {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-manual:hover { background: #7c3aed; }
.btn-manual:disabled { background: #4a4a5a; cursor: not-allowed; }

/* Error */
.error-msg {
    max-width: 600px; margin: 20px auto; padding: 14px 18px;
    background: rgba(239,68,68,0.1); border: 1px solid #ef4444;
    border-radius: 10px; color: #ef4444; text-align: center; display: none;
}

/* ── 프로그레스 카드 ── */
.progress-card {
    max-width: 600px;
    margin: 1.5rem auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    animation: fadeInUp 0.3s ease;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 영상 정보 */
.progress-video-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.progress-thumb {
    width: 120px;
    border-radius: 8px;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: #000;
}
.progress-title {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.progress-channel {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 0.3rem;
}

/* 전체 프로그레스 바 */
.progress-total {
    margin-bottom: 1.2rem;
}
.progress-bar-track {
    height: 8px;
    background: var(--surface2);
    border-radius: 4px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #a78bfa);
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
}
.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,255,255,0.15) 50%,
        transparent 100%
    );
    animation: shimmer 2s infinite;
}
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
.progress-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 0.4rem;
    font-size: 0.82rem;
}
#progress-percent {
    font-weight: 700;
    color: var(--accent);
    font-size: 1rem;
}
#progress-elapsed {
    color: var(--text-dim);
}

/* 단계별 상세 */
.progress-steps {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1rem;
}
.progress-step {
    display: grid;
    grid-template-columns: 28px 80px 1fr 50px auto;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.82rem;
    opacity: 0.4;
    transition: opacity 0.3s;
}
.progress-step.active {
    opacity: 1;
}
.progress-step.done {
    opacity: 0.8;
}
.step-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--surface2);
    color: var(--text-dim);
    transition: all 0.3s;
}
.progress-step.active .step-icon {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 10px rgba(139,92,246,0.4);
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(139,92,246,0.4); }
    50% { box-shadow: 0 0 20px rgba(139,92,246,0.6); }
}
.progress-step.done .step-icon {
    background: var(--green);
    color: #fff;
}
.step-label {
    font-weight: 500;
    color: var(--text-dim);
}
.progress-step.active .step-label {
    color: var(--text);
    font-weight: 600;
}
.step-bar {
    height: 4px;
    background: var(--surface2);
    border-radius: 2px;
    overflow: hidden;
}
.step-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    width: 0%;
    transition: width 0.5s ease;
}
.progress-step.done .step-bar-fill {
    width: 100%;
    background: var(--green);
}
.step-time {
    text-align: right;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-dim);
}
.step-detail {
    font-size: 0.75rem;
    color: var(--text-dim);
    min-width: 80px;
}
.progress-step.active .step-detail {
    color: var(--cyan);
}
.progress-step.done .step-detail {
    color: var(--green);
}

/* 하단 메시지 */
.progress-message {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-dim);
    padding-top: 0.8rem;
    border-top: 1px solid var(--border);
}

/* 에러 상태 */
.progress-card.error {
    border-color: rgba(248,113,113,0.3);
}
.progress-card.error .progress-bar-fill {
    background: var(--red);
}
.progress-card.error .progress-message {
    color: var(--red);
}

/* 완료 상태 */
.progress-card.complete .progress-bar-fill {
    background: var(--green);
}
.progress-card.complete .progress-bar-fill::after {
    animation: none;
}

/* Dashboard History Grid */
.history-section { max-width: 900px; margin: 60px auto; padding: 0 20px; }
.history-section h2 { font-size: 1.2rem; font-weight: 700; color: var(--text); }

#history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.2rem;
}
.history-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; overflow: hidden; cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
}
.history-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.card-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: #000; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-duration {
    position: absolute; bottom: 6px; right: 6px;
    background: rgba(0,0,0,0.8); color: #fff; padding: 2px 6px;
    border-radius: 4px; font-size: 0.75rem;
}

.card-body { padding: 1rem; }
.card-title {
    font-size: 0.9rem; font-weight: 600; line-height: 1.4; margin-bottom: 0.5rem;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-dim); margin-bottom: 0.8rem; }
.card-channel { font-weight: 500; }
/* 버튼이 8개(원본/플레이북/퀵가이드/⬇/정밀/⬇/재분석/삭제)까지 늘어나므로
   줄바꿈 허용 + 글자 세로 꺾임 방지 (nowrap) — 좁으면 두 줄로 흐른다 */
.card-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.card-actions a {
    flex: 1 1 auto; text-align: center; padding: 0.4rem 0.6rem; border-radius: 6px;
    font-size: 0.78rem; font-weight: 500; text-decoration: none; transition: all 0.2s;
    white-space: nowrap;
}
.btn-yt { background: rgba(255,0,0,0.08); border: 1px solid rgba(255,0,0,0.2); color: #f87171; }
.btn-yt:hover { background: rgba(255,0,0,0.15); }
.btn-playbook { background: var(--accent-glow); border: 1px solid rgba(139,92,246,0.3); color: var(--accent); }
.btn-playbook:hover { background: rgba(139,92,246,0.2); }

/* 초보자 퀵가이드 버튼 */
.btn-quickguide {
    background: rgba(52,211,153,0.08);
    border: 1px solid rgba(52,211,153,0.2);
    color: #34d399;
    white-space: nowrap;
}
.btn-quickguide:hover {
    background: rgba(52,211,153,0.15);
}

/* 퀵가이드 HTML 다운로드 버튼 (아이콘, 작게) */
.btn-qg-download {
    flex: 0 0 auto !important;
    padding: 0.4rem 0.55rem !important;
    background: rgba(52,211,153,0.12);
    border: 1px solid rgba(52,211,153,0.3);
    color: #34d399;
    font-weight: 700;
}
.btn-qg-download:hover {
    background: rgba(52,211,153,0.25);
}

/* 정밀 실행 가이드 버튼 */
.btn-deepguide {
    background: rgba(14,165,233,0.08);
    border: 1px solid rgba(14,165,233,0.25);
    color: #38bdf8;
    white-space: nowrap;
}
.btn-deepguide:hover {
    background: rgba(14,165,233,0.16);
}

/* 정밀 가이드 HTML 다운로드 버튼 (아이콘, 작게) */
.btn-dg-download {
    flex: 0 0 auto !important;
    padding: 0.4rem 0.55rem !important;
    background: rgba(14,165,233,0.12);
    border: 1px solid rgba(14,165,233,0.3);
    color: #38bdf8;
    font-weight: 700;
}
.btn-dg-download:hover {
    background: rgba(14,165,233,0.25);
}

/* 재분석 버튼 */
.btn-reanalyze {
    background: rgba(6,182,212,0.08);
    border: 1px solid rgba(6,182,212,0.2);
    color: var(--cyan);
}
.btn-reanalyze:hover {
    background: rgba(6,182,212,0.15);
}

/* 삭제 버튼 (아이콘, flex 미적용 — 작게) */
.btn-delete {
    flex: 0 0 auto;
    padding: 0.4rem 0.55rem;
    border-radius: 6px;
    font-size: 0.78rem;
    cursor: pointer;
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.25);
    color: #ef4444;
    transition: all 0.2s;
}
.btn-delete:hover { background: rgba(239,68,68,0.18); }

/* 확인 모달 */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
}
.modal-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.6rem;
    max-width: 420px; width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-title { margin: 0 0 0.8rem; font-size: 1.1rem; color: var(--text); }
.modal-text { margin: 0 0 0.5rem; font-size: 0.9rem; color: var(--text); }
.modal-item {
    margin: 0 0 0.8rem; padding: 0.6rem 0.8rem;
    background: var(--bg); border-radius: 8px;
    font-size: 0.88rem; font-weight: 600; color: var(--accent);
    word-break: break-word;
}
.modal-note { margin: 0 0 1.2rem; font-size: 0.78rem; color: var(--text-dim); }
.modal-actions { display: flex; gap: 0.7rem; justify-content: flex-end; }
.btn-modal-cancel, .btn-modal-confirm {
    padding: 0.55rem 1.1rem; border-radius: 8px;
    font-size: 0.88rem; font-weight: 600; cursor: pointer; border: none;
}
.btn-modal-cancel { background: var(--bg); border: 1px solid var(--border); color: var(--text); }
.btn-modal-cancel:hover { background: var(--border); }
.btn-modal-confirm { background: #ef4444; color: #fff; }
.btn-modal-confirm:hover { background: #dc2626; }
.btn-modal-confirm:disabled { background: #4a4a5a; cursor: not-allowed; }
.modal-warn { color: #f87171; font-weight: 600; }
.btn-modal-danger { background: #dc2626; }
.btn-modal-danger:hover { background: #b91c1c; }

/* 휴지통 토글 버튼 */
.btn-trash-toggle {
    padding: 0.5rem 0.9rem; border-radius: 8px; cursor: pointer;
    background: var(--surface); border: 1px solid var(--border); color: var(--text-dim);
    font-size: 0.85rem; transition: all 0.2s;
}
.btn-trash-toggle:hover { color: #f87171; border-color: rgba(239,68,68,0.4); }

/* 휴지통 패널 */
.trash-panel {
    margin-top: 1.5rem; padding: 1.2rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
}
.trash-panel-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem; }
.trash-panel-header h3 { margin: 0; font-size: 1.05rem; color: var(--text); }
.trash-count { color: var(--text-dim); font-weight: 400; }
.trash-panel-actions { display: flex; gap: 0.6rem; }
.btn-empty-trash {
    padding: 0.5rem 1rem; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 0.85rem;
    background: rgba(220,38,38,0.12); border: 1px solid rgba(220,38,38,0.4); color: #f87171;
}
.btn-empty-trash:hover { background: rgba(220,38,38,0.22); }
.btn-empty-trash:disabled { background: var(--bg); border-color: var(--border); color: var(--text-dim); cursor: not-allowed; }
.btn-trash-close {
    padding: 0.5rem 1rem; border-radius: 8px; cursor: pointer; font-size: 0.85rem;
    background: var(--bg); border: 1px solid var(--border); color: var(--text);
}
.trash-note { font-size: 0.78rem; color: var(--text-dim); margin: 0.6rem 0 1rem; }
.trash-error {
    margin: 0 0 0.8rem; padding: 0.6rem 0.9rem; border-radius: 8px;
    background: rgba(239,68,68,0.1); border: 1px solid #ef4444; color: #f87171; font-size: 0.85rem;
}
.trash-grid { display: flex; flex-direction: column; gap: 0.6rem; }
.trash-card {
    display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
    padding: 0.7rem 0.9rem; background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
}
.trash-card-info { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.trash-card-icon { font-size: 1.2rem; flex-shrink: 0; }
.trash-card-title { font-size: 0.88rem; color: var(--text); font-weight: 500; word-break: break-word; }
.trash-card-meta { font-size: 0.74rem; color: var(--text-dim); }
.trash-card-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.btn-restore, .btn-purge {
    padding: 0.4rem 0.7rem; border-radius: 6px; cursor: pointer; font-size: 0.78rem; font-weight: 500;
}
.btn-restore { background: rgba(6,182,212,0.1); border: 1px solid rgba(6,182,212,0.3); color: var(--cyan); }
.btn-restore:hover { background: rgba(6,182,212,0.2); }
.btn-purge { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.3); color: #ef4444; }
.btn-purge:hover { background: rgba(239,68,68,0.18); }

/* 강제 재분석 체크박스 */
.force-check {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
    cursor: pointer;
}
.force-check input[type="checkbox"] {
    accent-color: var(--accent);
}

/* 영상 유형 선택 (자동 감지 / 개발 분석 / 교양·뉴스 요약) */
.type-select {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.6rem 0 0.2rem;
    font-size: 0.8rem;
}
.type-select-label {
    color: var(--text-dim);
    font-weight: 700;
    margin-right: 0.2rem;
}
.type-select label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.8rem;
    border: 1px solid rgba(139,92,246,0.25);
    border-radius: 18px;
    cursor: pointer;
    color: var(--text-dim);
    transition: all 0.2s;
}
.type-select label:hover { border-color: var(--accent); color: var(--text); }
.type-select input[type="radio"] {
    accent-color: var(--accent);
    margin: 0;
}
.type-select label:has(input:checked) {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: var(--text);
}

/* 교양·뉴스 카드 배지 */
.type-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 800;
    color: #fbbf24;
    background: rgba(245,158,11,0.12);
    border: 1px solid rgba(245,158,11,0.35);
    padding: 1px 8px;
    border-radius: 10px;
    margin-right: 6px;
    vertical-align: 2px;
    white-space: nowrap;
}

/* 배치 분석 */
.batch-toggle { margin-top: 0.8rem; }
.btn-secondary {
    padding: 8px 18px; border-radius: 8px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text-dim); font-size: 0.85rem;
    cursor: pointer; transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-secondary.active { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

.batch-section {
    max-width: 600px; margin: 1rem auto 0;
    animation: fadeInUp 0.3s ease;
}
.batch-urls-input {
    width: 100%; background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; padding: 0.8rem 1rem; color: var(--text);
    font-family: 'JetBrains Mono', monospace; font-size: 0.82rem; line-height: 1.6;
    resize: vertical; min-height: 100px; max-height: 250px;
}
.batch-urls-input:focus { outline: none; border-color: var(--accent); }
.batch-counter { text-align: right; font-size: 0.72rem; color: var(--text-dim); margin-top: 0.3rem; }
.btn-batch {
    margin-top: 0.8rem; padding: 12px 28px; border-radius: 10px; border: none;
    background: var(--accent); color: #fff; font-size: 0.95rem; font-weight: 600;
    cursor: pointer; width: 100%;
}
.btn-batch:hover { background: #7c3aed; }
.btn-batch:disabled { background: #4a4a5a; cursor: not-allowed; }

/* 배치 프로그레스 */
.batch-progress h3 { font-size: 1rem; margin-bottom: 1rem; }
.batch-video-list { display: flex; flex-direction: column; gap: 0.5rem; margin: 1rem 0; }
.batch-video-item {
    display: flex; align-items: center; gap: 0.8rem;
    padding: 0.6rem 0.8rem; background: var(--surface2); border-radius: 8px;
    font-size: 0.82rem;
}
.batch-video-item .bv-status {
    width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; flex-shrink: 0;
}
.batch-video-item .bv-status.waiting { background: var(--surface); color: var(--text-dim); }
.batch-video-item .bv-status.analyzing { background: var(--accent); color: #fff; animation: pulse 1.5s infinite; }
.batch-video-item .bv-status.done { background: var(--green); color: #fff; }
.batch-video-item .bv-status.error { background: var(--red); color: #fff; }
.batch-video-item .bv-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 배치 이력 카드 */
.history-card.batch-card { border-color: rgba(139,92,246,0.3); }
.history-card.batch-card .card-thumb { background: var(--surface2); display: flex; align-items: center; justify-content: center; }
.batch-card-icon { font-size: 2.5rem; }

/* 검색 */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.history-header h2 { margin-bottom: 0; }
.search-bar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.search-bar input {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.85rem;
    width: 220px;
    outline: none;
}
.search-bar input:focus { border-color: var(--accent); }
.search-bar button {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}
.search-bar button:hover { background: #7c3aed; }
.btn-search-clear {
    background: var(--surface2) !important;
    color: var(--text-dim) !important;
    border: 1px solid var(--border) !important;
}
.btn-search-clear:hover {
    border-color: var(--accent) !important;
    color: var(--accent) !important;
}
.search-result-info {
    max-width: 900px;
    margin: 0 auto 1rem;
    padding: 0.6rem 1rem;
    background: var(--accent-glow);
    border: 1px solid rgba(139,92,246,0.2);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--accent);
}
.card-oneliner {
    font-size: 0.78rem;
    color: var(--text-dim);
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
}
.tech-badge {
    padding: 2px 8px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--cyan);
    font-family: 'JetBrains Mono', monospace;
}
.match-info {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.empty-msg { grid-column: 1/-1; text-align: center; color: var(--text-dim); padding: 3rem 0; font-size: 0.9rem; }

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.page-numbers {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: center;
}
.page-btn {
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.45rem 0.8rem;
    min-width: 38px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.page-btn:hover:not(.active) { background: var(--border); }
.page-num.active {
    background: var(--accent, #3b82f6);
    color: #fff;
    border-color: var(--accent, #3b82f6);
    font-weight: 700;
    cursor: default;
}
.page-ellipsis { color: var(--text-dim); padding: 0.45rem 0.3rem; font-size: 0.9rem; }
.page-total { color: var(--text-dim); font-size: 0.8rem; }
