/* ============================================
   CPS-15 Civic Persuasion Score Analyzer
   Professional Analysis Dashboard Styles
   ============================================ */

/* === CSS Variables — Dark Theme (default) === */
:root, [data-theme="dark"] {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: #1a2035;
    --bg-card-hover: #1f2847;
    --bg-elevated: #232d4a;
    --bg-input: #0d1220;

    --text-primary: #f0f4ff;
    --text-secondary: #94a3c0;
    --text-muted: #5e6e8a;
    --text-accent: #a5b4fc;

    --accent-blue: #6366f1;
    --accent-blue-light: #818cf8;
    --accent-blue-glow: rgba(99, 102, 241, 0.3);
    --accent-cyan: #22d3ee;
    --accent-green: #34d399;
    --accent-amber: #fbbf24;
    --accent-red: #f87171;
    --accent-purple: #a78bfa;
    --accent-rose: #fb7185;

    --gradient-main: linear-gradient(135deg, #6366f1, #8b5cf6, #a78bfa);
    --gradient-success: linear-gradient(135deg, #34d399, #22d3ee);
    --gradient-danger: linear-gradient(135deg, #f87171, #fb7185);
    --gradient-warn: linear-gradient(135deg, #fbbf24, #f59e0b);

    --border-subtle: rgba(99, 102, 241, 0.15);
    --border-medium: rgba(99, 102, 241, 0.25);

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --transition-fast: 0.2s ease;
    --transition-med: 0.3s ease;
    --transition-slow: 0.5s ease;

    --header-bg: rgba(10, 14, 26, 0.85);
    --orb-opacity: 0.15;
    --gauge-label-color: #5e6e8a;
    --gauge-needle-color: #f0f4ff;
    --chart-grid: rgba(150, 150, 150, 0.15);
    --chart-angle: rgba(150, 150, 150, 0.12);
    --chart-point-label: #94a3c0;
    --tooltip-bg: rgba(26, 32, 53, 0.95);
    --tooltip-title: #f0f4ff;
    --tooltip-body: #94a3c0;
    --print-bg: white;
}

/* === CSS Variables — Light Theme === */
[data-theme="light"] {
    --bg-primary: #f0f2f7;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f3f4f8;
    --bg-elevated: #e8eaf0;
    --bg-input: #f8f9fc;

    --text-primary: #1a1f36;
    --text-secondary: #4a5568;
    --text-muted: #8896ab;
    --text-accent: #4f46e5;

    --accent-blue: #4f46e5;
    --accent-blue-light: #6366f1;
    --accent-blue-glow: rgba(79, 70, 229, 0.2);
    --accent-cyan: #0891b2;
    --accent-green: #059669;
    --accent-amber: #d97706;
    --accent-red: #dc2626;
    --accent-purple: #7c3aed;
    --accent-rose: #e11d48;

    --gradient-main: linear-gradient(135deg, #4f46e5, #7c3aed, #8b5cf6);
    --gradient-success: linear-gradient(135deg, #059669, #0891b2);
    --gradient-danger: linear-gradient(135deg, #dc2626, #e11d48);
    --gradient-warn: linear-gradient(135deg, #d97706, #ea580c);

    --border-subtle: rgba(79, 70, 229, 0.12);
    --border-medium: rgba(79, 70, 229, 0.22);

    --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
    --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.08);

    --header-bg: rgba(255, 255, 255, 0.88);
    --orb-opacity: 0.06;
    --gauge-label-color: #6b7280;
    --gauge-needle-color: #1a1f36;
    --chart-grid: rgba(100, 100, 100, 0.12);
    --chart-angle: rgba(100, 100, 100, 0.08);
    --chart-point-label: #4a5568;
    --tooltip-bg: rgba(255, 255, 255, 0.97);
    --tooltip-title: #1a1f36;
    --tooltip-body: #4a5568;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* === Ambient Background === */
.ambient-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: var(--orb-opacity, 0.15);
    animation: orbFloat 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px; height: 600px;
    background: var(--accent-blue);
    top: -200px; left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px; height: 500px;
    background: var(--accent-purple);
    top: 50%; right: -150px;
    animation-delay: -7s;
}

.orb-3 {
    width: 400px; height: 400px;
    background: var(--accent-cyan);
    bottom: -100px; left: 30%;
    animation-delay: -14s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -30px) scale(1.1); }
    66% { transform: translate(-30px, 50px) scale(0.9); }
}

/* === Header === */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.brand:hover {
    opacity: 0.85;
}

.brand-icon {
    width: 48px; height: 48px;
    background: var(--gradient-main);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.brand-text h1 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 900;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
}

.brand-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.header-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.meta-badge {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    color: var(--text-accent);
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-date {
    font-size: 13px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

/* === Main Content === */
.main-content {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px;
}

/* === Mode Selector === */
.mode-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.mode-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 24px;
    background: var(--bg-card);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-med);
    text-align: left;
}

.mode-btn i {
    font-size: 24px;
    width: 40px;
    text-align: center;
    color: var(--text-muted);
    transition: var(--transition-med);
}

.mode-btn strong {
    display: block;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.mode-btn small {
    font-size: 12px;
    color: var(--text-muted);
}

.mode-btn:hover {
    border-color: var(--border-medium);
    background: var(--bg-card-hover);
}

.mode-btn.active {
    border-color: var(--accent-blue);
    background: rgba(99, 102, 241, 0.08);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
}

.mode-btn.active i {
    color: var(--accent-blue);
}

/* === Compare Tabs === */
.compare-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding: 6px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.compare-tabs.hidden { display: none; }

.compare-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    background: transparent;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-fast);
}

.compare-tab-color {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2);
}

.compare-tab:hover {
    background: var(--bg-card);
    color: var(--text-secondary);
}

.compare-tab.active {
    background: var(--bg-card);
    border-color: var(--accent-blue);
    color: var(--text-primary);
}

/* === Hero Radar Chart (full 15 indicators) === */
.chart-section-hero {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
}

.chart-section-hero h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
    color: var(--text-primary);
}

.chart-section-hero h3 i {
    margin-right: 10px;
    color: var(--accent-blue-light);
}

.radar-chart-hero-wrapper {
    max-width: 750px;
    margin: 0 auto;
    height: 650px;
    position: relative;
}

.radar-legend {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.radar-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.radar-legend-swatch {
    width: 28px;
    height: 4px;
    border-radius: 2px;
}

/* === Step Indicator === */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 40px;
    padding: 24px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
}

.step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    border-radius: 50px;
    transition: var(--transition-med);
    cursor: default;
}

.step.active {
    background: rgba(99, 102, 241, 0.15);
}

.step.completed {
    background: rgba(52, 211, 153, 0.1);
}

.step-number {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 2px solid var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    transition: var(--transition-med);
}

.step.active .step-number {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
    box-shadow: 0 0 12px var(--accent-blue-glow);
}

.step.completed .step-number {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: white;
}

.step-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition-med);
}

.step.active .step-label { color: var(--text-accent); }
.step.completed .step-label { color: var(--accent-green); }

.step-connector {
    width: 60px;
    height: 2px;
    background: var(--border-subtle);
    margin: 0 4px;
}

/* === Panel === */
.panel {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    animation: panelIn 0.5s ease;
}

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

.panel.hidden { display: none; }

.panel-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.panel-icon {
    width: 44px; height: 44px;
    background: var(--gradient-main);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
}

.panel-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.panel-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* === Input Section === */
.input-meta-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.input-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.input-field label i {
    margin-right: 6px;
    color: var(--accent-blue-light);
}

.input-field input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition-fast);
}

.input-field input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px var(--accent-blue-glow);
}

.textarea-wrapper {
    position: relative;
    margin-bottom: 24px;
}

textarea#analysisText {
    width: 100%;
    min-height: 350px;
    padding: 20px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    line-height: 1.8;
    resize: vertical;
    transition: var(--transition-fast);
}

textarea#analysisText:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px var(--accent-blue-glow);
}

textarea#analysisText::placeholder {
    color: var(--text-muted);
}

.textarea-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.char-count {
    font-size: 13px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.textarea-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 36px; height: 36px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.btn-icon:hover {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

/* === Buttons === */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: var(--gradient-main);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-med);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-proceed {
    width: 100%;
    justify-content: center;
    padding: 16px;
    font-size: 17px;
}

.btn-back {
    padding: 8px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-fast);
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-back:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.btn-secondary {
    padding: 8px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary:hover {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

.report-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

/* === Text Preview === */
.text-preview {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    overflow: hidden;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-elevated);
    font-size: 13px;
    color: var(--text-secondary);
}

.preview-header i { margin-right: 8px; color: var(--accent-blue-light); }

.btn-toggle-preview {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: var(--transition-fast);
}

.btn-toggle-preview:hover { color: var(--text-primary); }

.preview-body {
    padding: 16px 20px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
    max-height: 200px;
    overflow-y: auto;
    transition: max-height 0.4s ease;
    white-space: pre-wrap;
}

.preview-body.collapsed {
    max-height: 0;
    padding: 0 20px;
}

/* === Category Tabs === */
.category-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 6px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    overflow-x: auto;
}

.cat-tab {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    white-space: nowrap;
}

.cat-tab i { font-size: 14px; }
.cat-tab small {
    background: var(--bg-card);
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 11px;
}

.cat-tab:hover { color: var(--text-secondary); background: var(--bg-card); }

.cat-tab.active {
    background: var(--accent-blue);
    color: white;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.cat-tab.active small {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* === Evaluation Card === */
.eval-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
    transition: var(--transition-med);
    animation: cardIn 0.3s ease;
}

.eval-card.hidden { display: none; }

@keyframes cardIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.eval-card:hover {
    border-color: var(--border-medium);
}

.eval-card.scored {
    border-left: 3px solid var(--accent-green);
}

.eval-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.eval-num {
    width: 36px; height: 36px;
    min-width: 36px;
    background: var(--bg-elevated);
    border: 2px solid var(--border-medium);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-blue-light);
    font-family: 'JetBrains Mono', monospace;
}

.eval-card.scored .eval-num {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: white;
}

.eval-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.eval-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

.eval-theory {
    font-size: 12px;
    color: var(--accent-purple);
    margin-top: 4px;
}

/* Score Scale */
.eval-scale {
    margin: 16px 0;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 11px;
}

.scale-label-low { color: var(--accent-red); }
.scale-label-high { color: var(--accent-green); }

.scale-buttons {
    display: flex;
    gap: 8px;
}

.scale-btn {
    flex: 1;
    padding: 12px 8px;
    background: var(--bg-card);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 18px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: center;
}

.scale-btn:hover {
    border-color: var(--accent-blue);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.scale-btn.selected-1 { background: #7f1d1d; border-color: var(--accent-red); color: var(--accent-red); }
.scale-btn.selected-2 { background: #78350f; border-color: #f59e0b; color: #f59e0b; }
.scale-btn.selected-3 { background: #3b3612; border-color: var(--accent-amber); color: var(--accent-amber); }
.scale-btn.selected-4 { background: #064e3b; border-color: #10b981; color: #10b981; }
.scale-btn.selected-5 { background: #064e3b; border-color: var(--accent-green); color: var(--accent-green); }

.scale-desc {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    min-height: 18px;
    transition: var(--transition-fast);
}

/* Evaluation Textarea */
.eval-rationale {
    margin-top: 16px;
}

.eval-rationale label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.eval-rationale label i {
    margin-right: 6px;
    color: var(--accent-blue-light);
}

.eval-rationale textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    line-height: 1.7;
    resize: vertical;
    transition: var(--transition-fast);
}

.eval-rationale textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px var(--accent-blue-glow);
}

.eval-rationale textarea::placeholder {
    color: var(--text-muted);
}

/* Prompts (Guide Questions) */
.eval-guides {
    margin-top: 12px;
    padding: 12px 14px;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-sm);
}

.eval-guides summary {
    font-size: 12px;
    color: var(--accent-blue-light);
    cursor: pointer;
    user-select: none;
}

.eval-guides ul {
    margin-top: 8px;
    padding-left: 18px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.8;
}

/* === Progress Bar === */
.eval-progress {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin: 24px 0;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.progress-bar {
    height: 8px;
    background: var(--bg-card);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-main);
    border-radius: 4px;
    width: 0;
    transition: width 0.5s ease;
}

.progress-detail {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

/* === REPORT STYLES === */

/* Verdict Section */
.verdict-section {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
    align-items: center;
    padding: 32px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
}

.verdict-gauge {
    text-align: center;
}

.gauge-container {
    margin-bottom: 12px;
}

.verdict-score {
    font-family: 'Playfair Display', serif;
    font-size: 56px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 8px;
}

.verdict-label {
    font-size: 18px;
    font-weight: 700;
    padding: 6px 20px;
    border-radius: 50px;
    display: inline-block;
}

.verdict-summary {
    font-size: 15px;
    line-height: 1.9;
    color: var(--text-secondary);
}

.verdict-summary h4 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

/* Chart Sections */
.chart-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.chart-section h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.chart-section h3 i {
    margin-right: 10px;
    color: var(--accent-blue-light);
}

.radar-chart-wrapper {
    max-width: 600px;
    margin: 0 auto;
    height: 450px;
}

@media (max-width: 768px) {
    .radar-chart-hero-wrapper {
        height: 400px;
    }
    .mode-selector {
        grid-template-columns: 1fr;
    }
}

.bar-chart-wrapper {
    width: 100%;
}

/* Score Table */
.score-table-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.score-table-section h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.score-table-section h3 i {
    margin-right: 10px;
    color: var(--accent-blue-light);
}

.score-table-wrapper {
    overflow-x: auto;
}

.score-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.score-table th {
    padding: 12px 16px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid var(--border-medium);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.score-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

.score-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.col-num { width: 40px; text-align: center; }
.col-score { width: 60px; text-align: center; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.col-bar { width: 150px; }
.col-verdict { width: 100px; }
.col-category { width: 120px; }

.score-bar-cell {
    height: 8px;
    background: var(--bg-card);
    border-radius: 4px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease;
}

.verdict-tag {
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.verdict-tag.v-1 { background: rgba(248,113,113,0.15); color: var(--accent-red); }
.verdict-tag.v-2 { background: rgba(245,158,11,0.15); color: #f59e0b; }
.verdict-tag.v-3 { background: rgba(251,191,36,0.15); color: var(--accent-amber); }
.verdict-tag.v-4 { background: rgba(16,185,129,0.15); color: #10b981; }
.verdict-tag.v-5 { background: rgba(52,211,153,0.15); color: var(--accent-green); }

.total-row {
    background: var(--bg-card) !important;
}

.total-row td {
    border-top: 2px solid var(--border-medium);
    padding: 16px;
}

.total-score {
    font-size: 20px;
    font-weight: 900;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
}

.total-verdict {
    text-align: center;
}

/* Analysis Grid */
.analysis-section {
    margin-bottom: 24px;
}

.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.analysis-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.analysis-card h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 16px;
}

.analysis-card h3 i { margin-right: 10px; }

.analysis-card.strengths { border-top: 3px solid var(--accent-green); }
.analysis-card.strengths h3 i { color: var(--accent-green); }
.analysis-card.weaknesses { border-top: 3px solid var(--accent-red); }
.analysis-card.weaknesses h3 i { color: var(--accent-red); }

.sw-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
}

.sw-score {
    width: 40px; height: 40px;
    min-width: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.sw-item.positive .sw-score {
    background: rgba(52, 211, 153, 0.15);
    color: var(--accent-green);
}

.sw-item.negative .sw-score {
    background: rgba(248, 113, 113, 0.15);
    color: var(--accent-red);
}

.sw-info h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.sw-info p { font-size: 12px; color: var(--text-muted); line-height: 1.6; }

/* Detail Section */
.detail-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.detail-section h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.detail-section h3 i {
    margin-right: 10px;
    color: var(--accent-blue-light);
}

.detail-item {
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    border-left: 3px solid var(--text-muted);
}

.detail-item.score-high { border-left-color: var(--accent-green); }
.detail-item.score-mid { border-left-color: var(--accent-amber); }
.detail-item.score-low { border-left-color: var(--accent-red); }

.detail-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.detail-item-title {
    font-size: 14px;
    font-weight: 600;
}

.detail-item-score {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 14px;
}

.detail-item-rationale {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
    white-space: pre-wrap;
}

/* Recommendations */
.recommendations-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    border-top: 3px solid var(--accent-amber);
}

.recommendations-section h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.recommendations-section h3 i {
    margin-right: 10px;
    color: var(--accent-amber);
}

.rec-item {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
}

.rec-icon {
    width: 32px; height: 32px;
    min-width: 32px;
    background: rgba(251, 191, 36, 0.15);
    color: var(--accent-amber);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.rec-text {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.rec-text strong {
    color: var(--text-primary);
}

/* === Footer === */
.main-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 32px;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 13px;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-note {
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.7;
}

/* === File Upload Zone === */
.file-upload-zone {
    position: relative;
    border: 2px dashed var(--border-medium);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-med);
    background: var(--bg-input);
    margin-bottom: 0;
}

.file-upload-zone:hover,
.file-upload-zone.drag-over {
    border-color: var(--accent-blue);
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
}

.file-upload-zone.drag-over {
    transform: scale(1.01);
    border-color: var(--accent-cyan);
    background: rgba(34, 211, 238, 0.05);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.upload-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: var(--accent-blue-light);
    transition: var(--transition-med);
}

.file-upload-zone:hover .upload-icon-wrapper,
.file-upload-zone.drag-over .upload-icon-wrapper {
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent-blue);
    transform: translateY(-3px);
}

.upload-text h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.upload-text p {
    font-size: 13px;
    color: var(--text-muted);
}

.upload-formats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.format-tag {
    padding: 4px 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 50px;
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.format-tag i {
    font-size: 10px;
    color: var(--accent-blue-light);
}

/* Upload Loading */
.upload-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.upload-loading.hidden,
.upload-success.hidden {
    display: none;
}

.upload-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Upload Success */
.upload-success {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background: rgba(52, 211, 153, 0.08);
    border: 1px solid rgba(52, 211, 153, 0.2);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--accent-green);
}

.upload-success i {
    font-size: 18px;
}

.btn-upload-clear {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(52, 211, 153, 0.3);
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    margin-left: 8px;
}

.btn-upload-clear:hover {
    background: rgba(248, 113, 113, 0.15);
    border-color: var(--accent-red);
    color: var(--accent-red);
}

/* Input Divider */
.input-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 13px;
}

.input-divider::before,
.input-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
}

.input-divider span {
    white-space: nowrap;
    padding: 0 4px;
}

/* === Scrollbar === */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
    background: var(--bg-elevated);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-blue); }

/* === Theme Toggle & Language Toggle Buttons === */
.header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-header-toggle {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 17px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-med);
    position: relative;
    overflow: hidden;
}

.btn-header-toggle:hover {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
    transform: scale(1.08);
}

/* Theme icon animation */
.theme-icon {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="light"] .theme-icon-moon { display: flex; }
[data-theme="light"] .theme-icon-sun { display: none; }
[data-theme="dark"] .theme-icon-moon,
:root:not([data-theme]) .theme-icon-moon { display: none; }
[data-theme="dark"] .theme-icon-sun,
:root:not([data-theme]) .theme-icon-sun { display: flex; }

.btn-lang-toggle {
    width: auto;
    padding: 0 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
    gap: 6px;
}

.btn-lang-toggle .lang-label {
    transition: var(--transition-fast);
}

/* Light theme extra overrides */
[data-theme="light"] .scale-btn.selected-1 { background: #fef2f2; border-color: var(--accent-red); color: var(--accent-red); }
[data-theme="light"] .scale-btn.selected-2 { background: #fffbeb; border-color: #d97706; color: #d97706; }
[data-theme="light"] .scale-btn.selected-3 { background: #fefce8; border-color: var(--accent-amber); color: var(--accent-amber); }
[data-theme="light"] .scale-btn.selected-4 { background: #ecfdf5; border-color: #059669; color: #059669; }
[data-theme="light"] .scale-btn.selected-5 { background: #ecfdf5; border-color: var(--accent-green); color: var(--accent-green); }

[data-theme="light"] .verdict-tag.v-1 { background: rgba(220,38,38,0.1); color: var(--accent-red); }
[data-theme="light"] .verdict-tag.v-2 { background: rgba(217,119,6,0.1); color: #d97706; }
[data-theme="light"] .verdict-tag.v-3 { background: rgba(217,119,6,0.08); color: var(--accent-amber); }
[data-theme="light"] .verdict-tag.v-4 { background: rgba(5,150,105,0.1); color: #059669; }
[data-theme="light"] .verdict-tag.v-5 { background: rgba(5,150,105,0.1); color: var(--accent-green); }

[data-theme="light"] .brand-text h1 {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .eval-card.scored {
    border-left-color: var(--accent-green);
}

[data-theme="light"] .eval-card.scored .eval-num {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: white;
}

/* === Print Styles === */
@media print {
    .ambient-bg, .main-header, .step-indicator,
    .btn-back, .btn-secondary, .btn-primary,
    .main-footer, .report-actions { display: none !important; }

    body {
        background: white !important;
        color: #111 !important;
        font-size: 12px;
    }

    .panel {
        background: white !important;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        padding: 16px !important;
    }

    .main-content { padding: 0 !important; }

    .verdict-section,
    .chart-section,
    .score-table-section,
    .analysis-card,
    .detail-section,
    .recommendations-section {
        background: white !important;
        border-color: #ddd !important;
        break-inside: avoid;
    }

    .score-table th { background: #f3f4f6 !important; }
}

/* Print: also hide theme/lang toggles */
@media print {
    .header-controls { display: none !important; }
}

/* === Responsive === */
@media (max-width: 1024px) {
    .verdict-section {
        grid-template-columns: 1fr;
    }

    .analysis-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-content { padding: 16px; }

    .header-inner {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }

    .input-meta-row {
        grid-template-columns: 1fr;
    }

    .category-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .cat-tab span { display: none; }

    .step-label { display: none; }

    .panel { padding: 20px; }

    .brand-text h1 { font-size: 22px; }

    .scale-buttons { gap: 4px; }
    .scale-btn { padding: 10px 4px; font-size: 16px; }

    .report-actions {
        flex-wrap: wrap;
    }
}
