/* ============================================================
   InnoJudge — 双创比赛AI判分智能体 样式
   ============================================================ */

/* ── CSS Variables ──────────────────────────────────── */
:root {
    --primary: #4A235A;
    --primary-light: #6B3A7D;
    --primary-lighter: #9B6FAF;
    --primary-bg: #F3EAF7;
    --accent: #D4AF37;
    --accent-light: #FDF6E3;
    --danger: #c62828;
    --danger-light: #ffebee;
    --warning: #E67E22;
    --warning-light: #FDF2E9;
    --success: #27AE60;
    --success-light: #E8F8F0;
    --text-primary: #1a1a2e;
    --text-secondary: #5D5D7A;
    --text-hint: #9999B3;
    --border: #E0D8E8;
    --border-light: #F0EAF5;
    --bg: #F8F5FA;
    --bg-white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(74,35,90,0.08);
    --shadow-md: 0 4px 12px rgba(74,35,90,0.1);
    --shadow-lg: 0 8px 24px rgba(74,35,90,0.12);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: 0.2s ease;
    --font-mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
                 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ── Header ─────────────────────────────────────────── */
.app-header {
    background: linear-gradient(135deg, #3D1F4E 0%, #4A235A 50%, #5B2C6E 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 60px;
    box-shadow: 0 2px 12px rgba(74,35,90,0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--accent);
}
.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.school-badge {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background: white;
    padding: 2px;
}
.school-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.app-title {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
    color: #FFFFFF;
}
.app-subtitle {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-left: 12px;
    font-weight: 400;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}
.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,0.15);
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
}
.status-indicator.idle .status-dot { background: #aaa; }
.status-indicator.processing .status-dot {
    background: var(--accent);
    animation: pulse 1s infinite;
}
.status-indicator.complete .status-dot { background: var(--success); }
.status-indicator.error .status-dot { background: var(--danger); }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ── Layout ─────────────────────────────────────────── */
.app-container {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 0;
    height: calc(100vh - 56px);
    overflow: hidden;
}
.left-panel {
    overflow-y: auto;
    padding: 16px;
    border-right: 1px solid var(--border);
    background: var(--bg-white);
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}
.right-panel {
    overflow-y: auto;
    padding: 16px;
    height: 100%;
}

/* ── Cards ──────────────────────────────────────────── */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    padding: 20px;
}
.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

/* ── Track Selector ─────────────────────────────────── */
.track-selector {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}
.track-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: block;
}
.track-row, .group-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.group-row {
    margin-top: 8px;
    padding-left: 4px;
}
.track-btn, .group-btn {
    padding: 5px 14px;
    border: 1.5px solid var(--border-light);
    border-radius: 16px;
    background: white;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.track-btn:hover, .group-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}
.track-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.group-btn.active {
    background: var(--primary-bg);
    color: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
}
.group-row.hidden { display: none; }

.detect-hint {
    margin-top: 8px;
    font-size: 0.78rem;
    color: var(--success);
    padding: 4px 10px;
    background: #e8f5e9;
    border-radius: 6px;
    display: inline-block;
}
.detect-hint.hidden { display: none; }

/* ── Upload Area ────────────────────────────────────── */
.upload-area {
    border: 2px dashed var(--primary-lighter);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--primary-bg);
}
.upload-area:hover, .upload-area.drag-over {
    border-color: var(--primary);
    background: #d1d9ff;
}
.upload-icon { color: var(--primary-light); margin-bottom: 12px; }
.upload-text {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-weight: 500;
}
.upload-hint {
    font-size: 0.8rem;
    color: var(--text-hint);
    margin-bottom: 16px;
}

.file-info { margin-top: 12px; }
.file-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--success-light);
    border-radius: var(--radius);
    margin-bottom: 12px;
}
.file-icon { font-size: 1.2rem; }
.file-name { font-weight: 500; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: 0.8rem; color: var(--text-secondary); }

.validation-msg {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    background: var(--danger-light);
    color: var(--danger);
}

/* ── Buttons ────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.btn-primary {
    background: var(--primary);
    color: white;
    border: 1px solid var(--accent);
}
.btn-primary:hover { background: var(--primary-light); border-color: #C5A55A; }
.btn-primary:disabled { background: var(--primary-lighter); cursor: not-allowed; opacity: 0.6; }

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary-lighter);
}
.btn-outline:hover {
    background: var(--primary-bg);
    border-color: var(--primary);
}

.btn-sm { padding: 4px 12px; font-size: 0.8rem; }
.btn-block { width: 100%; margin-top: 8px; }
.btn-icon {
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 1rem;
    color: var(--text-secondary);
}
.btn-icon:hover { background: var(--bg); }

/* ── Progress Section ───────────────────────────────── */
.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}
.progress-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: var(--progress, 0%);
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 4px;
    transition: width 0.3s ease;
}
.progress-percent {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    min-width: 40px;
}

.progress-stages {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.stage {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    padding: 6px 8px;
    border-radius: var(--radius);
    background: var(--bg);
    transition: all var(--transition);
}
.stage.active {
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 500;
}
.stage-icon {
    font-size: 0.9rem;
    width: 18px;
    text-align: center;
}
.stage-icon.pending { color: var(--text-hint); }
.stage-icon.active { color: var(--primary); animation: pulse 1.5s infinite; }
.stage-icon.done { color: var(--success); }

.current-message {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 8px;
    background: var(--bg);
    border-radius: var(--radius);
    min-height: 36px;
}
.elapsed-time {
    font-size: 0.75rem;
    color: var(--text-hint);
    margin-top: 8px;
    text-align: right;
}

/* ── Thinking Section ───────────────────────────────── */
.thinking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}
.thinking-count {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-hint);
    margin-left: 8px;
    background: var(--bg);
    padding: 1px 8px;
    border-radius: 10px;
}
.thinking-actions {
    display: flex;
    gap: 4px;
}
.thinking-placeholder {
    color: #666;
    font-size: 0.8rem;
    text-align: center;
    padding: 20px;
}
.thinking-content {
    max-height: 400px;
    overflow-y: auto;
    transition: max-height 0.3s ease;
}
.thinking-content.collapsed { max-height: 0; overflow: hidden; }

.thinking-log {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.5;
    max-height: 360px;
    overflow-y: auto;
    padding: 8px;
    background: #1e1e1e;
    border-radius: var(--radius);
    color: #d4d4d4;
}
.thinking-entry {
    padding: 6px 8px;
    border-bottom: 1px solid #333;
    animation: fadeIn 0.2s ease;
}
.thinking-entry .ts {
    color: #6a9955;
    margin-right: 8px;
}
.thinking-entry .stage-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    margin-right: 6px;
    font-weight: 600;
}
.thinking-entry .stage-tag.visual { background: #264f78; color: #569cd6; }
.thinking-entry .stage-tag.scoring { background: #5a3e1b; color: #ce9178; }
.thinking-entry .stage-tag.info { background: #1b3a1b; color: #6a9955; }
.thinking-entry .stage-tag.error { background: #5a1d1d; color: #f44747; }
.thinking-entry .stage-tag.ocr { background: #3a1b5a; color: #c586c0; }
.thinking-entry .stage-tag.progress { background: #1a3a5a; color: #4fc1ff; }
.thinking-entry .content-text { color: #d4d4d4; word-break: break-all; }
.thinking-detail {
    font-size: 0.72rem;
    color: #aaa;
    margin-top: 4px;
    margin-left: 80px;
    padding: 3px 6px;
    border-left: 2px solid #555;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: none;
    overflow-y: visible;
}

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

/* ── Results ────────────────────────────────────────── */
.results-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.toolbar-actions { display: flex; gap: 8px; }

.score-overview {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}
.score-card {
    text-align: center;
    padding: 12px 4px;
    border-radius: var(--radius-lg);
    background: var(--bg);
    border: 2px solid transparent;
    transition: all var(--transition);
}
.score-card.total {
    background: linear-gradient(135deg, #3D1F4E, #5B2C6E);
    color: white;
    border-color: var(--accent);
}
.score-card .score-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
}
.score-card.total .score-value { font-size: 2rem; }
.score-card .score-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}
.score-card.total .score-label { color: rgba(255,255,255,0.8); }
.score-card .score-max { font-size: 0.75rem; color: var(--text-hint); }
.score-card.total .score-max { color: rgba(255,255,255,0.6); }

/* ── Tab Navigation ─────────────────────────────────── */
.tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 16px;
    overflow-x: auto;
}
.tab-btn {
    padding: 10px 16px;
    border: none;
    background: none;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
    white-space: nowrap;
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── Criterion Card ─────────────────────────────────── */
.criterion-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 14px;
    transition: box-shadow var(--transition);
}
.criterion-card:hover { box-shadow: var(--shadow-sm); }
.criterion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 8px;
}
.criterion-header > div:first-child {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.criterion-id {
    font-size: 0.8rem;
    color: var(--primary-light);
    font-weight: 600;
    background: var(--primary-bg);
    padding: 2px 8px;
    border-radius: 4px;
}
.criterion-name { font-weight: 600; font-size: 0.95rem; word-break: break-all; }
.criterion-score {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    flex-shrink: 0;
    white-space: nowrap;
}
.criterion-score.low { color: var(--danger); }
.criterion-score.mid { color: var(--warning); }
.criterion-score.high { color: var(--success); }

.criterion-assessment {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.5;
    padding: 8px 12px;
    background: var(--bg);
    border-radius: var(--radius);
    border-left: 3px solid var(--primary-lighter);
}

/* ── Deduction Table ────────────────────────────────── */
.deduction-section { margin-bottom: 12px; }
.deduction-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--danger);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.deduction-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    margin-bottom: 8px;
}
.deduction-table th {
    background: var(--danger);
    color: white;
    padding: 6px 10px;
    text-align: left;
    font-weight: 500;
}
.deduction-table td {
    padding: 6px 10px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: top;
}
.deduction-table tr:nth-child(even) td { background: var(--danger-light); }

.suggestion-list {
    list-style: none;
    padding: 0;
    font-size: 0.82rem;
}
.suggestion-list li {
    padding: 4px 0 4px 16px;
    position: relative;
    color: var(--text-secondary);
}
.suggestion-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-light);
}

.strengths-section, .weaknesses-section {
    font-size: 0.82rem;
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: var(--radius);
}
.strengths-section {
    background: var(--success-light);
    color: var(--success);
}
.weaknesses-section {
    background: var(--warning-light);
    color: #e65100;
}

/* ── Batch Processing ──────────────────────────────── */
.batch-panel { }
.batch-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.batch-mini-status {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 600;
}
.progress-bar-container.compact {
    height: 6px;
    margin-bottom: 12px;
}
.batch-task-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 350px;
    overflow-y: auto;
}
.batch-task-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}
.batch-task-card.task-done {
    border-color: var(--success);
}
.batch-task-card.task-active {
    border-color: var(--primary);
    background: var(--primary-bg);
}
.batch-task-card { cursor: pointer; }
.task-mini-progress {
    font-size: 0.7rem;
    color: var(--text-hint);
}
.task-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}
.task-name {
    font-size: 0.85rem;
    color: var(--text-primary);
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.task-track {
    font-size: 0.7rem;
    color: var(--text-hint);
    display: block;
    margin-top: 1px;
}
.task-status-badge {
    font-size: 0.72rem;
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 600;
}
.task-status-badge.processing {
    background: #fff3e0;
    color: #e65100;
}
.task-status-badge.done {
    background: #e8f5e9;
    color: #2e7d32;
}
.task-score {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary);
}
.task-score.hidden { display: none; }

/* Project switcher */
.batch-project-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}
.batch-project-switcher.hidden { display: none; }
.project-switch-btn {
    padding: 4px 12px;
    border: 1.5px solid var(--border-light);
    border-radius: 14px;
    background: white;
    color: var(--text-secondary);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.project-switch-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}
.project-switch-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    font-weight: 700;
    box-shadow: 0 0 0 3px rgba(74, 35, 90, 0.25);
}

/* Comparison table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}
.comparison-table th, .comparison-table td {
    padding: 6px 8px;
    border: 1px solid var(--border-light);
    text-align: center;
}
.comparison-table th {
    background: var(--primary);
    color: white;
    font-weight: 600;
}
.comparison-table .project-name-cell {
    text-align: left;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.comparison-table .total-cell {
    font-weight: 700;
    color: var(--primary);
}
.comparison-best td {
    background: #fff8e1;
}

/* File chips */
.file-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.file-chip {
    padding: 3px 10px;
    border-radius: 12px;
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 0.75rem;
    white-space: nowrap;
}
.file-chip.more {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}
.chip-remove {
    display: inline-block;
    margin-left: 6px;
    cursor: pointer;
    font-weight: 700;
    color: var(--text-hint);
    font-size: 0.85rem;
    line-height: 1;
}
.chip-remove:hover {
    color: var(--danger);
}
.chip-name {
    max-width: 180px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

/* ── Empty State ────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 40px;
}
.empty-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.empty-desc { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 24px; }

/* ── Waiting Animation ─────────────────────────────── */
.waiting-animation {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary-lighter);
    animation: pulseRing 2s ease-out infinite;
    opacity: 0;
}
.pulse-ring.delay-1 { animation-delay: 0.6s; }
.pulse-ring.delay-2 { animation-delay: 1.2s; }
.pulse-center {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}
@keyframes pulseRing {
    0% { transform: scale(0.5); opacity: 0.6; }
    100% { transform: scale(1.3); opacity: 0; }
}

/* ── Processing State ──────────────────────────────── */
.processing-state {
    text-align: center;
    padding: 80px 40px;
}
.processing-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.doc-scanning {
    position: relative;
    width: 100px;
    height: 130px;
    background: var(--primary-bg);
    border-radius: 8px;
    border: 2px solid var(--primary-lighter);
    overflow: hidden;
}
.doc-page {
    position: absolute;
    inset: 10px;
    background: white;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
}
.doc-page::before {
    content: '';
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    width: 80%;
}
.doc-page::after {
    content: '';
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    width: 60%;
}
.scan-line {
    position: absolute;
    top: 0;
    left: 5%;
    width: 90%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: scanDown 1.5s ease-in-out infinite;
}
@keyframes scanDown {
    0% { top: 0; opacity: 0; }
    30% { opacity: 1; }
    100% { top: 95%; opacity: 0; }
}
.processing-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
}
.processing-dots {
    display: flex;
    gap: 6px;
}
.processing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: dotBounce 1.2s ease-in-out infinite;
}
.processing-dots span:nth-child(2) { animation-delay: 0.2s; }
.processing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0.4); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    text-align: left;
}
.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg);
    border-radius: var(--radius);
    font-size: 0.85rem;
}
.feature-bullet {
    font-weight: 700;
    color: var(--accent);
    font-size: 0.75rem;
    background: var(--accent-light);
    padding: 2px 8px;
    border-radius: 4px;
}

/* ── Full Report ────────────────────────────────────── */
.full-report {
    font-size: 0.9rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-all;
    background: var(--bg);
    padding: 20px;
    border-radius: var(--radius);
    max-height: 70vh;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

/* ── Utility ────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
    .app-container { grid-template-columns: 1fr; }
    .left-panel { max-height: 50vh; border-right: none; border-bottom: 1px solid var(--border); }
    .score-overview { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .score-card { padding: 10px 4px; }
    .score-card .score-value { font-size: 1.3rem; }
    .score-card.total .score-value { font-size: 1.6rem; }
    .feature-list { grid-template-columns: 1fr; }
    .progress-stages { grid-template-columns: repeat(2, 1fr); }
}
