/* =====================================================
    AI 导师系统 — Cybernetic Command Theme
    Design: Glassmorphism Dashboard on Deep Space
    ===================================================== */

/* ==================== CSS Variables ==================== */
:root {
    /* Deep Space Palette */
    --bg-deep: #060a14;
    --bg-space: #0a0e1a;
    --bg-panel: rgba(14, 18, 32, 0.85);
    --bg-card: rgba(20, 26, 48, 0.6);
    --bg-glass: rgba(20, 28, 58, 0.45);
    --bg-input: rgba(15, 20, 40, 0.7);

    /* Neon Accents */
    --neon-blue: #00d4ff;
    --neon-purple: #a855f7;
    --neon-cyan: #06b6d4;
    --neon-gradient: linear-gradient(135deg, #00d4ff 0%, #a855f7 100%);
    --neon-glow: 0 0 20px rgba(0, 212, 255, 0.3);

    /* Semantic */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Text */
    --text-bright: #f1f5f9;
    --text-primary: #cbd5e1;
    --text-secondary: #64748b;
    --text-muted: #475569;

    /* Borders */
    --border-subtle: rgba(100, 116, 139, 0.15);
    --border-glow: rgba(0, 212, 255, 0.25);

    /* Shadows */
    --shadow-panel: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-glow-sm: 0 0 12px rgba(0, 212, 255, 0.15);
    --shadow-glow-md: 0 0 24px rgba(0, 212, 255, 0.2);

    /* Geometry */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 9999px;

    /* Typography */
    --font-sans: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Consolas', 'Monaco', monospace;

    /* Layout */
    --bar-height: 64px;
    --panel-width: 280px;
    --ide-width: 420px;
    --drawer-width: 380px;
}

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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-deep);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Animated space background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(0, 212, 255, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(168, 85, 247, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 80%, rgba(6, 182, 212, 0.03) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

::selection {
    background: rgba(0, 212, 255, 0.3);
    color: var(--text-bright);
}

::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.3);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.5);
}

/* ==================== Layout Shell ==================== */
.command-center {
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
    z-index: 1;
}

/* ==================== Top Command Bar ==================== */
.command-bar {
    height: var(--bar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: var(--bg-panel);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 100;
    flex-shrink: 0;
}

.command-bar-left,
.command-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.command-bar-center {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0 24px;
    overflow: hidden;
}

/* Brand */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--neon-gradient);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 16px;
}

.brand-text h1 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-bright);
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.brand-sub {
    font-size: 10px;
    font-weight: 400;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Icon Button */
.icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--bg-glass);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 14px;
}

.icon-btn:hover {
    color: var(--neon-blue);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow-sm);
}

.icon-btn.active {
    color: var(--neon-blue);
    border-color: var(--neon-blue);
    background: rgba(0, 212, 255, 0.1);
}

.icon-btn-ghost {
    border: none;
    background: none;
}

.icon-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: none;
}

/* ==================== Phase Timeline ==================== */
.phase-timeline {
    display: flex;
    align-items: center;
    gap: 0;
}

.phase-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: default;
    position: relative;
}

.node-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--text-muted);
    transition: all 0.4s ease;
    position: relative;
}

.node-label {
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
    transition: color 0.3s ease;
}

.phase-line {
    width: 28px;
    height: 2px;
    background: var(--text-muted);
    margin: 0 2px;
    margin-bottom: 18px;
    transition: background 0.4s ease;
    border-radius: 1px;
}

/* Phase states */
.phase-node.completed .node-dot {
    background: var(--neon-blue);
    border-color: var(--neon-blue);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

.phase-node.completed .node-label {
    color: var(--neon-blue);
}

.phase-node.completed + .phase-line {
    background: var(--neon-blue);
    box-shadow: 0 0 6px rgba(0, 212, 255, 0.3);
}

.phase-node.active .node-dot {
    background: var(--neon-purple);
    border-color: var(--neon-purple);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.6);
    animation: phase-pulse 2s ease-in-out infinite;
}

.phase-node.active .node-label {
    color: var(--neon-purple);
    font-weight: 600;
}

@keyframes phase-pulse {
    0%, 100% { box-shadow: 0 0 8px rgba(168, 85, 247, 0.4); }
    50% { box-shadow: 0 0 18px rgba(168, 85, 247, 0.7); }
}

/* ==================== Main Body ==================== */
.command-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

/* ==================== Control Panel (Sidebar) ==================== */
.control-panel {
    width: var(--panel-width);
    background: var(--bg-panel);
    backdrop-filter: blur(24px);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 50;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s ease;
}

.control-panel.hidden {
    transform: translateX(-100%);
    width: 0;
    border: none;
    overflow: hidden;
}

.panel-section {
    padding: 16px 18px;
}

.panel-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-section-title i {
    color: var(--neon-blue);
    font-size: 12px;
}

.panel-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 0 18px;
}

.panel-footer {
    padding: 16px 18px;
    margin-top: auto;
}

/* Cyber Select */
.cyber-select {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: border-color 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.cyber-select:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.1);
}

.cyber-select-sm {
    padding: 6px 10px;
    font-size: 12px;
}

/* Collapsible */
.collapsible-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.collapsible-trigger:hover {
    color: var(--text-primary);
}

.arrow-icon {
    font-size: 10px;
    transition: transform 0.25s ease;
}

.collapsible-trigger.active .arrow-icon {
    transform: rotate(180deg);
}

.collapsible-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.collapsible-body.show {
    max-height: 300px;
}

.collapsible-body textarea {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 12px;
    font-family: var(--font-sans);
    resize: vertical;
    margin-top: 8px;
}

.collapsible-body textarea:focus {
    outline: none;
    border-color: var(--neon-blue);
}

/* Cyber Toggle */
.cyber-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    user-select: none;
}

.cyber-toggle input {
    display: none;
}

.toggle-slider {
    width: 36px;
    height: 20px;
    background: var(--text-muted);
    border-radius: 10px;
    position: relative;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.cyber-toggle input:checked + .toggle-slider {
    background: var(--neon-blue);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

.cyber-toggle input:checked + .toggle-slider::after {
    transform: translateX(16px);
}

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

/* Field label */
.field-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin: 12px 0 6px;
}

/* Range slider */
.cyber-range {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: var(--text-muted);
    border-radius: 2px;
    outline: none;
    margin-top: 4px;
}

.cyber-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--neon-blue);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

.rag-settings {
    margin-top: 8px;
}

/* Hint text */
.hint-text {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Resume */
.resume-file-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.file-icon {
    color: var(--error);
    font-size: 16px;
}

.file-name-text {
    font-size: 12px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.progress-track {
    width: 100%;
    height: 4px;
    background: rgba(100, 116, 139, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-glow {
    height: 100%;
    width: 0%;
    background: var(--neon-gradient);
    border-radius: 2px;
    transition: width 0.4s ease;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
}

/* ==================== Cyber Buttons ==================== */
.cyber-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--bg-glass);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.cyber-btn:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow-sm);
    color: var(--text-bright);
}

.cyber-btn-accent {
    background: var(--neon-gradient);
    border: none;
    color: #fff;
    font-weight: 600;
}

.cyber-btn-accent:hover {
    box-shadow: var(--shadow-glow-md);
    opacity: 0.9;
}

.cyber-btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    border: none;
    color: #fff;
}

.cyber-btn-success:hover {
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}

.cyber-btn-danger {
    background: linear-gradient(135deg, var(--error) 0%, #dc2626 100%);
    border: none;
    color: #fff;
}

.cyber-btn-ghost {
    background: transparent;
    border: 1px solid var(--border-subtle);
}

.cyber-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.03);
}

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

/* Immersive mode switch button */
.cyber-btn-immersive {
    background: linear-gradient(135deg, var(--neon-purple) 0%, #c084fc 100%);
    border: none;
    color: #fff;
    font-weight: 600;
}

.cyber-btn-immersive:hover {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
    opacity: 0.95;
}

.full-width {
    width: 100%;
}

/* ==================== Main Stage (Chat) ==================== */
.main-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
}

.chat-viewport {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Empty state */
.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--text-muted);
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    font-size: 32px;
    color: var(--neon-blue);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 13px;
}

.empty-state-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 13px;
}

.empty-state-mini i {
    font-size: 24px;
    opacity: 0.5;
}

/* Chat Messages */
.chat-message {
    max-width: 75%;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    line-height: 1.7;
    word-wrap: break-word;
    animation: msg-in 0.3s ease-out;
    position: relative;
}

@keyframes msg-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-message.user {
    align-self: flex-end;
    background: var(--neon-gradient);
    color: #fff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.2);
}

.chat-message.assistant {
    align-self: flex-start;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-card);
}

.chat-message p {
    margin: 0;
    font-size: 14px;
}

/* ==================== Markdown Body (chat + report) ==================== */
.md-body {
    font-size: 14px;
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.md-body > *:first-child { margin-top: 0; }
.md-body > *:last-child  { margin-bottom: 0; }

/* Headings */
.md-body h1, .md-body h2, .md-body h3,
.md-body h4, .md-body h5, .md-body h6 {
    color: var(--text-bright);
    font-weight: 600;
    margin: 16px 0 8px;
    line-height: 1.4;
}
.md-body h1 { font-size: 1.4em; border-bottom: 1px solid var(--border-subtle); padding-bottom: 6px; }
.md-body h2 { font-size: 1.25em; }
.md-body h3 { font-size: 1.1em; }
.md-body h4, .md-body h5, .md-body h6 { font-size: 1em; }

/* Paragraphs */
.md-body p {
    margin: 8px 0;
    font-size: 14px;
}

/* Lists */
.md-body ul, .md-body ol {
    margin: 8px 0;
    padding-left: 24px;
}
.md-body li {
    margin: 4px 0;
}
.md-body li > p {
    margin: 4px 0;
}

/* Inline code */
.md-body code:not(pre code) {
    background: rgba(0, 212, 255, 0.08);
    color: var(--neon-blue);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
    border: 1px solid rgba(0, 212, 255, 0.15);
}

/* Code blocks */
.md-body pre {
    background: rgba(6, 10, 20, 0.85);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin: 12px 0;
    overflow-x: auto;
    position: relative;
}
.md-body pre code {
    background: none;
    border: none;
    padding: 0;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
}

/* Copy button for code blocks */
.code-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(100, 116, 139, 0.25);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s, color 0.2s;
}
.md-body pre:hover .code-copy-btn {
    opacity: 1;
}
.code-copy-btn:hover {
    background: rgba(0, 212, 255, 0.15);
    color: var(--neon-blue);
}
.code-copy-btn.copied {
    color: var(--success);
}

/* Blockquote */
.md-body blockquote {
    border-left: 3px solid var(--neon-purple);
    margin: 12px 0;
    padding: 8px 16px;
    background: rgba(168, 85, 247, 0.06);
    color: var(--text-secondary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.md-body blockquote p {
    margin: 4px 0;
}

/* Tables */
.md-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 13px;
}
.md-body th, .md-body td {
    border: 1px solid var(--border-subtle);
    padding: 8px 12px;
    text-align: left;
}
.md-body th {
    background: rgba(0, 212, 255, 0.08);
    color: var(--text-bright);
    font-weight: 600;
}
.md-body tr:nth-child(even) {
    background: rgba(20, 26, 48, 0.3);
}

/* Horizontal rule */
.md-body hr {
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin: 16px 0;
}

/* Links */
.md-body a {
    color: var(--neon-blue);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}
.md-body a:hover {
    border-bottom-color: var(--neon-blue);
}

/* Strong & Emphasis */
.md-body strong {
    color: var(--text-bright);
    font-weight: 600;
}
.md-body em {
    color: var(--text-primary);
    font-style: italic;
}

/* Images */
.md-body img {
    max-width: 100%;
    border-radius: var(--radius-sm);
    margin: 8px 0;
}

/* Report area — apply md-body overrides */
.report-content .md-body {
    white-space: normal;
}

/* User messages keep plain text (no markdown) */
.chat-message.user .md-body {
    /* should not exist, but safety fallback */
    color: #fff;
}

/* ==================== TTS Float ==================== */
.tts-float {
    position: absolute;
    top: 12px;
    right: 16px;
    z-index: 10;
}

.tts-float-inner {
    background: var(--bg-panel);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--shadow-panel);
    min-width: 240px;
}

.tts-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.tts-info i {
    color: var(--neon-purple);
}

.tts-controls-bar {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tts-ctrl-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
}

.tts-ctrl-btn:nth-child(1) {
    background: var(--success);
    color: #fff;
}
.tts-ctrl-btn:nth-child(2) {
    background: var(--warning);
    color: #fff;
}
.tts-ctrl-btn:nth-child(3) {
    background: var(--error);
    color: #fff;
}

.tts-ctrl-btn:hover {
    transform: scale(1.1);
}

.tts-progress-track {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-left: 4px;
}

.tts-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--neon-gradient);
    transition: width 0.3s;
}

/* ==================== Input Dock ==================== */
.input-dock {
    padding: 16px 32px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(to top, var(--bg-space) 0%, transparent 100%);
    flex-shrink: 0;
}

/* Record Orb */
.record-orb {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid var(--neon-blue);
    background: rgba(0, 212, 255, 0.08);
    color: var(--neon-blue);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.record-orb:hover {
    background: rgba(0, 212, 255, 0.15);
    box-shadow: var(--shadow-glow-md);
}

.orb-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid rgba(0, 212, 255, 0.2);
    opacity: 0;
    transition: opacity 0.3s;
}

.orb-ring-2 {
    inset: -12px;
    border-color: rgba(0, 212, 255, 0.1);
}

.record-orb.recording {
    border-color: var(--error);
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
    animation: recording-pulse 1.5s ease-in-out infinite;
}

.record-orb.recording .orb-ring {
    opacity: 1;
    border-color: rgba(239, 68, 68, 0.3);
    animation: ring-expand 1.5s ease-in-out infinite;
}

.record-orb.recording .orb-ring-2 {
    border-color: rgba(239, 68, 68, 0.15);
    animation: ring-expand 1.5s ease-in-out infinite 0.2s;
}

@keyframes recording-pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(239, 68, 68, 0.3); }
    50% { box-shadow: 0 0 25px rgba(239, 68, 68, 0.5); }
}

@keyframes ring-expand {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.5; }
}

.recording-badge {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--error);
    font-weight: 500;
}

.recording-badge.show {
    display: flex;
}

.vad-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-subtle);
    background: var(--bg-glass);
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}

.vad-status-badge.listening {
    border-color: rgba(0, 212, 255, 0.4);
    color: var(--neon-blue);
}

.vad-status-badge.speaking {
    border-color: rgba(16, 185, 129, 0.5);
    color: var(--success);
}

.vad-status-badge.processing {
    border-color: rgba(245, 158, 11, 0.5);
    color: var(--warning);
}

.vad-status-badge.tts-playing {
    border-color: rgba(168, 85, 247, 0.5);
    color: var(--neon-purple);
}

.vad-status-badge.error {
    border-color: rgba(239, 68, 68, 0.5);
    color: var(--error);
}

.record-orb.listening {
    border-color: var(--neon-blue);
    background: rgba(0, 212, 255, 0.16);
    box-shadow: 0 0 16px rgba(0, 212, 255, 0.35);
}

.record-orb.speaking {
    border-color: var(--success);
    color: var(--success);
    background: rgba(16, 185, 129, 0.16);
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.35);
}

.record-orb.processing {
    border-color: var(--warning);
    color: var(--warning);
    background: rgba(245, 158, 11, 0.16);
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.35);
}

.record-orb.tts-playing {
    border-color: var(--neon-purple);
    color: var(--neon-purple);
    background: rgba(168, 85, 247, 0.16);
    box-shadow: 0 0 18px rgba(168, 85, 247, 0.35);
    animation: recordOrbTTSPulse 2s ease-in-out infinite;
}

@keyframes recordOrbTTSPulse {
    0%, 100% { box-shadow: 0 0 18px rgba(168, 85, 247, 0.35); }
    50% { box-shadow: 0 0 28px rgba(168, 85, 247, 0.5); }
}

.rec-pulse {
    width: 8px;
    height: 8px;
    background: var(--error);
    border-radius: 50%;
    animation: pulse-dot 1s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ==================== Video Preview ==================== */
.video-preview-container {
    position: relative;
    margin: 0 32px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glow);
    background: var(--bg-card);
    overflow: hidden;
    flex-shrink: 0;
}

.video-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    font-size: 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
}

.video-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-rec-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--error);
    font-weight: 600;
}

.video-rec-status.active::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--error);
    animation: video-rec-pulse 1s ease-in-out infinite;
}

@keyframes video-rec-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

#video-preview,
#immersive-video-preview {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    display: block;
    background: #000;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.video-toggle-btn.active i {
    color: var(--neon-blue);
}

/* 沉浸式模式视频预览 */
.immersive-video-preview {
    position: relative;
    width: 200px;
    height: 150px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-glow);
    margin-bottom: 20px;
    background: #000;
}

.immersive-video-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-rec-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--error);
    display: none;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

.video-rec-dot.active {
    display: block;
    animation: video-rec-pulse 1s ease-in-out infinite;
}

/* Input Form */
.input-form {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    padding: 4px 6px 4px 20px;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.input-form:focus-within {
    border-color: var(--border-glow);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.08);
}

.input-form input {
    flex: 1;
    border: none;
    background: none;
    color: var(--text-bright);
    font-size: 14px;
    font-family: var(--font-sans);
    outline: none;
    padding: 10px 0;
}

.input-form input::placeholder {
    color: var(--text-muted);
}

.send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--neon-gradient);
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s;
    flex-shrink: 0;
}

.send-btn:hover {
    box-shadow: var(--shadow-glow-md);
    transform: scale(1.05);
}

/* ==================== IDE Panel ==================== */
.ide-panel {
    width: var(--ide-width);
    background: #0d1117;
    border-left: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transform: translateX(100%);
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 60;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
}

.ide-panel.show {
    transform: translateX(0);
}

.ide-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #161b22;
    border-bottom: 1px solid rgba(100, 116, 139, 0.15);
}

.ide-title {
    color: var(--text-bright);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ide-title i {
    color: var(--neon-blue);
}

.ide-body {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* IDE 题目显示区域 */
.ide-problem-section {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08) 0%, rgba(168, 85, 247, 0.08) 100%);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ide-problem-section.collapsed .ide-problem-content {
    max-height: 0;
    padding: 0 12px;
    opacity: 0;
}

.ide-problem-section.collapsed .ide-problem-toggle i {
    transform: rotate(180deg);
}

.ide-problem-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(0, 212, 255, 0.05);
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
    cursor: pointer;
}

.ide-problem-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--neon-cyan);
}

.ide-problem-title i {
    font-size: 14px;
}

.ide-problem-toggle i {
    transition: transform 0.3s ease;
    color: var(--text-tertiary);
}

.ide-problem-content {
    max-height: 200px;
    overflow-y: auto;
    padding: 12px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-primary);
    transition: all 0.3s ease;
    opacity: 1;
}

.ide-problem-content::-webkit-scrollbar {
    width: 6px;
}

.ide-problem-content::-webkit-scrollbar-track {
    background: transparent;
}

.ide-problem-content::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 3px;
}

.ide-problem-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    color: var(--text-tertiary);
    font-style: italic;
}

.ide-problem-placeholder i {
    animation: pulse 2s ease-in-out infinite;
}

.ide-problem-content .md-body {
    font-size: 13px;
}

.ide-problem-content .md-body h1,
.ide-problem-content .md-body h2,
.ide-problem-content .md-body h3 {
    font-size: 14px;
    margin: 8px 0 6px;
    color: var(--neon-cyan);
}

.ide-problem-content .md-body p {
    margin: 6px 0;
}

.ide-problem-content .md-body code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

.ide-problem-content .md-body pre {
    background: rgba(0, 0, 0, 0.4);
    padding: 10px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 8px 0;
}

.ide-problem-content .md-body pre code {
    background: transparent;
    padding: 0;
}

.ide-problem-content .md-body ul,
.ide-problem-content .md-body ol {
    margin: 6px 0;
    padding-left: 20px;
}

.ide-problem-content .md-body li {
    margin: 4px 0;
}

.ide-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    background: #161b22;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--text-secondary);
}

.ide-toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ide-toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* CodeMirror 容器 */
.code-editor-container {
    flex: 1;
    height: 240px;
    min-height: 180px;
    max-height: 280px;
    border: 1px solid rgba(100, 116, 139, 0.15);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.code-editor-container .CodeMirror {
    height: 240px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.5;
    background: #0d1117;
}

.code-editor-container .CodeMirror-gutters {
    background: #161b22;
    border-right: 1px solid rgba(100, 116, 139, 0.15);
}

.code-editor-container .CodeMirror-linenumber {
    color: #484f58;
}

.code-editor-container .CodeMirror-foldgutter {
    width: 12px;
}

.code-editor-container .CodeMirror-cursor {
    border-left: 2px solid var(--neon-blue);
}

.code-editor-container .CodeMirror-selected {
    background: rgba(0, 212, 255, 0.15) !important;
}

.code-editor-container .CodeMirror-matchingbracket {
    color: var(--neon-cyan) !important;
    border-bottom: 1px solid var(--neon-cyan);
}

/* I/O 区域 */
.io-section {
    margin-top: 10px;
    background: #161b22;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.io-tabs {
    display: flex;
    border-bottom: 1px solid rgba(100, 116, 139, 0.15);
}

.io-tab {
    flex: 1;
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.io-tab:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
}

.io-tab.active {
    color: var(--neon-blue);
    background: rgba(0, 212, 255, 0.08);
    border-bottom: 2px solid var(--neon-blue);
}

.io-content {
    position: relative;
    min-height: 100px;
    max-height: 120px;
}

.io-panel {
    display: none;
    height: 100%;
}

.io-panel.active {
    display: block;
}

.code-output {
    margin: 0;
    padding: 10px 12px;
    background: #0d1117;
    color: #c9d1d9;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
    overflow-y: auto;
    height: 100%;
    max-height: 120px;
}

.code-output.running {
    color: var(--neon-cyan);
}

.code-output.success {
    color: var(--success);
}

.code-output.error {
    color: var(--error);
}

.code-input {
    width: 100%;
    height: 100%;
    min-height: 100px;
    max-height: 120px;
    padding: 10px 12px;
    background: #0d1117;
    color: #c9d1d9;
    border: none;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.5;
    resize: none;
    outline: none;
}

.code-input::placeholder {
    color: #484f58;
}

/* 旧的代码编辑器样式（保留兼容） */
.code-editor-wrapper {
    flex: 1;
    display: flex;
    background: #0d1117;
    border: 1px solid rgba(100, 116, 139, 0.15);
    border-radius: var(--radius-sm);
    overflow: hidden;
    min-height: 200px;
}

.line-numbers {
    width: 40px;
    padding: 12px 8px;
    background: #161b22;
    color: #484f58;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    text-align: right;
    user-select: none;
    border-right: 1px solid rgba(100, 116, 139, 0.15);
    overflow: hidden;
}

#code-editor {
    flex: 1;
    padding: 12px 14px;
    background: #0d1117;
    color: #c9d1d9;
    border: none;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    resize: none;
    outline: none;
    overflow: auto;
}

#code-editor::placeholder {
    color: #484f58;
}

.ide-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.ide-actions .cyber-btn {
    flex: 1;
    padding: 10px;
}

.code-history {
    margin-top: 10px;
    padding: 10px;
    background: #161b22;
    border-radius: var(--radius-sm);
    max-height: 100px;
    overflow-y: auto;
}

.code-history h4 {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.history-list {
    font-size: 12px;
    color: var(--text-muted);
}

.history-item {
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    justify-content: space-between;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.history-item .time {
    color: #484f58;
    font-size: 11px;
}

/* ==================== Side Drawers (RAG & Report) ==================== */
.side-drawer {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: var(--drawer-width);
    background: var(--bg-panel);
    backdrop-filter: blur(24px);
    border-left: 1px solid var(--border-subtle);
    z-index: 55;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
}

.side-drawer.show {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-subtle);
}

.drawer-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-bright);
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawer-header h3 i {
    color: var(--neon-blue);
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
}

/* Report */
.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--neon-blue);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.report-actions-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.report-actions-row .cyber-btn {
    flex: 1;
}

.report-content {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    min-height: 60px;
    line-height: 1.8;
    font-size: 13px;
    color: var(--text-primary);
}

.report-content:empty {
    display: none;
}

/* RAG Cards */
.rag-card {
    background: var(--bg-card);
    border-left: 3px solid var(--neon-blue);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 12px;
}

.rag-query {
    color: var(--neon-blue);
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 8px;
}

.rag-content {
    font-size: 12px;
    color: var(--text-primary);
    line-height: 1.6;
}

.rag-snippet {
    margin-bottom: 6px;
    padding: 8px;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 4px;
    font-size: 12px;
}

.rag-meta {
    color: var(--text-muted);
    font-size: 11px;
    margin-top: 8px;
}

/* ==================== Loading Overlay ==================== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 10, 20, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 24px;
    z-index: 9999;
}

.loading-overlay.show {
    display: flex;
}

.loading-orb {
    width: 60px;
    height: 60px;
    position: relative;
}

.spinner-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--neon-blue);
    animation: spin 1s linear infinite;
}

.spinner-ring-2 {
    inset: 6px;
    border-top-color: var(--neon-purple);
    animation-direction: reverse;
    animation-duration: 0.7s;
}

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

.loading-overlay p {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

/* ==================== Responsive ==================== */
@media (max-width: 1200px) {
    :root {
        --ide-width: 360px;
        --drawer-width: 340px;
    }
}

@media (max-width: 900px) {
    :root {
        --panel-width: 260px;
    }

    .control-panel {
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 70;
        transform: translateX(-100%);
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.4);
    }

    .control-panel.show {
        transform: translateX(0);
    }

    .phase-timeline {
        display: none;
    }

    .command-bar-center {
        display: none;
    }

    .ide-panel {
        width: 100%;
    }

    .side-drawer {
        width: 100%;
    }

    .chat-viewport {
        padding: 16px;
    }

    .input-dock {
        padding: 12px 16px 16px;
    }
}

@media (max-width: 600px) {
    .brand-text h1 {
        font-size: 14px;
    }

    .brand-sub {
        display: none;
    }

    .record-orb {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    .chat-message {
        max-width: 88%;
    }
}

/* ==================== Prefer reduced motion ==================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==================== Compact Mode Styles ==================== */
/* 精简模式指示器 */
.compact-mode-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    margin: 0 auto 20px auto;
    max-width: 400px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: var(--radius-pill);
    color: var(--neon-blue);
    font-size: 13px;
    font-weight: 500;
    backdrop-filter: blur(8px);
    animation: compactIndicatorFadeIn 0.4s ease-out;
}

.compact-mode-indicator i {
    font-size: 14px;
    color: var(--neon-cyan);
}

.compact-mode-indicator .compact-total {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 400;
    padding-left: 10px;
    border-left: 1px solid rgba(100, 116, 139, 0.3);
}

/* 精简模式消息动画 */
.chat-message.compact-animate {
    animation: compactMessageFadeIn 0.5s ease-out;
}

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

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

/* 精简模式提示文字 */
.compact-mode-hint {
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-muted);
}

/* ==================== Radar Chart Styles ==================== */
.radar-chart-container {
    margin-top: 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    animation: radarFadeIn 0.5s ease-out;
}

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

.radar-chart-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-bright);
}

.radar-chart-header i {
    color: var(--neon-blue);
    font-size: 16px;
}

.radar-chart-wrapper {
    position: relative;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    padding: 10px;
}

.radar-chart-wrapper canvas {
    width: 100% !important;
    height: auto !important;
}

/* 评分摘要区域 */
.radar-score-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.radar-overall-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 50%;
    flex-shrink: 0;
}

.radar-overall-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--neon-blue);
    line-height: 1;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.radar-overall-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.radar-grade-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

/* 分数条形图 */
.radar-score-bars {
    flex: 1;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radar-score-bar {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.radar-score-bar-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
}

.radar-score-bar-name {
    color: var(--text-secondary);
}

.radar-score-bar-value {
    color: var(--text-primary);
    font-weight: 500;
    font-family: var(--font-mono);
}

.radar-score-bar-track {
    width: 100%;
    height: 6px;
    background: rgba(100, 116, 139, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.radar-score-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s ease-out;
    box-shadow: 0 0 8px currentColor;
}

/* 响应式调整 */
@media (max-width: 400px) {
    .radar-score-summary {
        flex-direction: column;
        align-items: center;
    }
    
    .radar-overall-score {
        width: 70px;
        height: 70px;
    }
    
    .radar-overall-number {
        font-size: 24px;
    }
    
    .radar-score-bars {
        width: 100%;
    }
}

/* ==================== Mode Selector Overlay ==================== */
.mode-selector-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-deep);
    background-image: 
        radial-gradient(ellipse at 30% 40%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 60%, rgba(168, 85, 247, 0.08) 0%, transparent 50%);
    animation: modeSelectorFadeIn 0.5s ease-out;
}

.mode-selector-overlay.hidden {
    display: none;
}

@keyframes modeSelectorFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.mode-selector-container {
    max-width: 900px;
    width: 90%;
    padding: 40px;
    text-align: center;
}

.mode-selector-header {
    margin-bottom: 48px;
}

.mode-selector-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--neon-gradient);
    border-radius: var(--radius-lg);
    font-size: 36px;
    color: #fff;
    box-shadow: var(--shadow-glow-md);
    animation: float 3s ease-in-out infinite;
}

.mode-selector-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.mode-selector-header p {
    font-size: 16px;
    color: var(--text-secondary);
}

.mode-selector-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.mode-option {
    padding: 32px 28px;
    background: var(--bg-panel);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
}

.mode-option:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow-md), var(--shadow-panel);
    transform: translateY(-4px);
}

.mode-option:hover .mode-option-icon {
    transform: scale(1.1);
    box-shadow: var(--shadow-glow-md);
}

.mode-option-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 28px;
    color: var(--neon-blue);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.mode-option[data-mode="immersive"] .mode-option-icon {
    color: var(--neon-purple);
}

.mode-option h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 10px;
}

.mode-option > p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.mode-option-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mode-option-features span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0, 212, 255, 0.08);
    border-radius: var(--radius-pill);
    font-size: 12px;
    color: var(--text-primary);
}

.mode-option-features span i {
    color: var(--success);
    font-size: 10px;
}

.mode-option[data-mode="immersive"] .mode-option-features span {
    background: rgba(168, 85, 247, 0.08);
}

/* Recommended mode highlight */
.mode-option-recommended {
    position: relative;
    border-color: rgba(168, 85, 247, 0.4);
    background: linear-gradient(135deg, var(--bg-panel) 0%, rgba(168, 85, 247, 0.08) 100%);
}

.mode-option-recommended::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.5) 0%, rgba(0, 212, 255, 0.3) 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.mode-option-recommended:hover::before {
    opacity: 1;
}

.mode-option-recommended:hover {
    border-color: transparent;
}

.mode-recommend-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--neon-purple) 0%, #c084fc 100%);
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
}

.mode-recommend-badge i {
    font-size: 10px;
    animation: starTwinkle 1.5s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(168, 85, 247, 0.4); }
    50% { box-shadow: 0 4px 24px rgba(168, 85, 247, 0.6); }
}

@keyframes starTwinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

.mode-option-highlight {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 14px;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: var(--radius-sm);
}

.mode-option-highlight i {
    color: var(--warning);
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

.mode-option-highlight span {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Mode option active/selected state */
.mode-option.selecting {
    border-color: var(--neon-blue);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.3);
}

.mode-option[data-mode="immersive"].selecting {
    border-color: var(--neon-purple);
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.3);
}

@media (max-width: 700px) {
    .mode-selector-options {
        grid-template-columns: 1fr;
    }
    
    .mode-selector-container {
        padding: 24px;
    }
    
    .mode-selector-header h1 {
        font-size: 24px;
    }
}

/* ==================== Immersive Mode Stage ==================== */
.immersive-stage {
    display: none;
    position: absolute;
    inset: 0;
    top: var(--bar-height);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-space);
    z-index: 50;
}

.immersive-stage.active {
    display: flex;
}

.immersive-header {
    position: absolute;
    top: 24px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
}

.immersive-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.immersive-brand i {
    font-size: 18px;
    color: var(--neon-purple);
}

.immersive-phase {
    padding: 8px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    font-size: 13px;
    color: var(--text-primary);
}

.immersive-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.immersive-mic-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* Large Microphone Button */
.immersive-mic-btn {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 3px solid var(--neon-blue);
    background: rgba(0, 212, 255, 0.08);
    color: var(--neon-blue);
    font-size: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 
        0 0 40px rgba(0, 212, 255, 0.2),
        inset 0 0 30px rgba(0, 212, 255, 0.05);
}

.immersive-mic-btn:hover {
    background: rgba(0, 212, 255, 0.15);
    box-shadow: 
        0 0 60px rgba(0, 212, 255, 0.3),
        inset 0 0 40px rgba(0, 212, 255, 0.1);
}

.immersive-ring {
    position: absolute;
    inset: -15px;
    border-radius: 50%;
    border: 2px solid rgba(0, 212, 255, 0.2);
    opacity: 0;
    transition: opacity 0.3s;
}

.immersive-ring-2 {
    inset: -30px;
    border-color: rgba(0, 212, 255, 0.15);
}

.immersive-ring-3 {
    inset: -45px;
    border-color: rgba(0, 212, 255, 0.1);
}

.immersive-mic-btn:hover .immersive-ring {
    opacity: 1;
}

/* Recording state */
.immersive-mic-btn.recording {
    border-color: var(--error);
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
    animation: immersiveRecordingPulse 1.5s ease-in-out infinite;
}

.immersive-mic-btn.recording .immersive-ring {
    opacity: 1;
    border-color: rgba(239, 68, 68, 0.3);
    animation: immersiveRingExpand 2s ease-in-out infinite;
}

.immersive-mic-btn.recording .immersive-ring-2 {
    border-color: rgba(239, 68, 68, 0.2);
    animation-delay: 0.3s;
}

.immersive-mic-btn.recording .immersive-ring-3 {
    border-color: rgba(239, 68, 68, 0.1);
    animation-delay: 0.6s;
}

@keyframes immersiveRecordingPulse {
    0%, 100% { box-shadow: 0 0 40px rgba(239, 68, 68, 0.3), inset 0 0 30px rgba(239, 68, 68, 0.05); }
    50% { box-shadow: 0 0 80px rgba(239, 68, 68, 0.5), inset 0 0 50px rgba(239, 68, 68, 0.1); }
}

@keyframes immersiveRingExpand {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 0.3; }
}

/* Processing state */
.immersive-mic-btn.processing {
    border-color: var(--warning);
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

/* Listening state - 监听中 */
.immersive-mic-btn.listening {
    border-color: var(--neon-cyan);
    background: rgba(0, 212, 255, 0.12);
    color: var(--neon-cyan);
    animation: immersiveListeningPulse 2s ease-in-out infinite;
}

.immersive-mic-btn.listening .immersive-ring {
    opacity: 1;
    border-color: rgba(0, 212, 255, 0.3);
    animation: immersiveRingExpand 2.5s ease-in-out infinite;
}

@keyframes immersiveListeningPulse {
    0%, 100% { box-shadow: 0 0 40px rgba(0, 212, 255, 0.2), inset 0 0 30px rgba(0, 212, 255, 0.05); }
    50% { box-shadow: 0 0 60px rgba(0, 212, 255, 0.35), inset 0 0 40px rgba(0, 212, 255, 0.08); }
}

/* Speaking state - 说话中（用户） */
.immersive-mic-btn.speaking {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    animation: immersiveSpeakingPulse 1s ease-in-out infinite;
}

.immersive-mic-btn.speaking .immersive-ring {
    opacity: 1;
    border-color: rgba(16, 185, 129, 0.4);
    animation: immersiveRingExpand 1.5s ease-in-out infinite;
}

.immersive-mic-btn.speaking .immersive-ring-2 {
    border-color: rgba(16, 185, 129, 0.3);
    animation-delay: 0.2s;
}

.immersive-mic-btn.speaking .immersive-ring-3 {
    border-color: rgba(16, 185, 129, 0.2);
    animation-delay: 0.4s;
}

@keyframes immersiveSpeakingPulse {
    0%, 100% { box-shadow: 0 0 40px rgba(16, 185, 129, 0.3), inset 0 0 30px rgba(16, 185, 129, 0.05); transform: scale(1); }
    50% { box-shadow: 0 0 70px rgba(16, 185, 129, 0.5), inset 0 0 50px rgba(16, 185, 129, 0.1); transform: scale(1.02); }
}

/* TTS Playing state - AI说话中 */
.immersive-mic-btn.tts-playing {
    border-color: var(--neon-purple);
    background: rgba(168, 85, 247, 0.12);
    color: var(--neon-purple);
    animation: immersiveTTSPlayingPulse 2s ease-in-out infinite;
    cursor: pointer;
}

.immersive-mic-btn.tts-playing .immersive-ring {
    opacity: 1;
    border-color: rgba(168, 85, 247, 0.3);
    animation: immersiveRingExpand 3s ease-in-out infinite;
}

.immersive-mic-btn.tts-playing .immersive-ring-2 {
    border-color: rgba(168, 85, 247, 0.2);
    animation-delay: 0.5s;
}

.immersive-mic-btn.tts-playing .immersive-ring-3 {
    border-color: rgba(168, 85, 247, 0.1);
    animation-delay: 1s;
}

@keyframes immersiveTTSPlayingPulse {
    0%, 100% { box-shadow: 0 0 40px rgba(168, 85, 247, 0.25), inset 0 0 30px rgba(168, 85, 247, 0.05); }
    50% { box-shadow: 0 0 60px rgba(168, 85, 247, 0.4), inset 0 0 45px rgba(168, 85, 247, 0.08); }
}

.immersive-status {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 400;
    text-align: center;
    min-height: 28px;
}

/* TTS Indicator */
.immersive-tts-indicator {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 24px 40px;
    background: var(--bg-glass);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(16px);
}

.immersive-tts-indicator.active {
    display: flex;
    animation: immersiveTTSFadeIn 0.3s ease-out;
}

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

.immersive-tts-wave {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 32px;
}

.immersive-tts-wave span {
    width: 4px;
    height: 12px;
    background: var(--neon-purple);
    border-radius: 2px;
    animation: immersiveWave 1s ease-in-out infinite;
}

.immersive-tts-wave span:nth-child(1) { animation-delay: 0s; }
.immersive-tts-wave span:nth-child(2) { animation-delay: 0.1s; }
.immersive-tts-wave span:nth-child(3) { animation-delay: 0.2s; }
.immersive-tts-wave span:nth-child(4) { animation-delay: 0.3s; }
.immersive-tts-wave span:nth-child(5) { animation-delay: 0.4s; }

@keyframes immersiveWave {
    0%, 100% { height: 12px; }
    50% { height: 32px; }
}

.immersive-tts-text {
    font-size: 14px;
    color: var(--neon-purple);
    font-weight: 500;
}

.immersive-footer {
    position: absolute;
    bottom: 32px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
}

.immersive-stats {
    padding: 10px 20px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    font-size: 13px;
    color: var(--text-secondary);
}

/* ==================== Immersive Settings Panel ==================== */
.immersive-settings-panel {
    position: fixed;
    top: var(--bar-height);
    right: 0;
    bottom: 0;
    width: 320px;
    background: var(--bg-panel);
    backdrop-filter: blur(24px);
    border-left: 1px solid var(--border-subtle);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 80;
    display: none;
}

.immersive-settings-panel.visible {
    display: block;
}

.immersive-settings-panel.show {
    transform: translateX(0);
}

.immersive-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.immersive-settings-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-bright);
}

.immersive-settings-header h3 i {
    color: var(--neon-blue);
}

.immersive-settings-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.immersive-setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.immersive-setting-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-primary);
}

.immersive-setting-label i {
    width: 20px;
    text-align: center;
    color: var(--text-secondary);
}

.immersive-lock-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: var(--radius-sm);
    font-size: 11px;
    color: var(--neon-purple);
}

.immersive-tts-toggle {
    opacity: 0.7;
    cursor: not-allowed;
}

.immersive-settings-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 8px 0;
}

/* Settings Toggle Button */
.immersive-settings-toggle {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 70;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-panel);
}

.immersive-settings-toggle.visible {
    display: flex;
}

.immersive-settings-toggle:hover {
    color: var(--neon-blue);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow-md);
}

.immersive-settings-toggle:hover i {
    animation: settingsRotate 0.5s ease;
}

@keyframes settingsRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(90deg); }
}

/* ==================== Mode-specific Body Classes ==================== */
body.standard-mode .immersive-stage,
body.standard-mode .immersive-settings-panel,
body.standard-mode .immersive-settings-toggle {
    display: none !important;
}

body.immersive-mode .command-body {
    /* 使用 visibility 而不是 display:none，让子元素仍可独立控制可见性 */
    visibility: hidden;
    pointer-events: none;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* 沉浸式模式下的面板显示（独立于command-body） */
body.immersive-mode .ide-panel {
    visibility: visible;
    pointer-events: auto;
    position: fixed;
    top: var(--bar-height);
    right: 0;
    bottom: 0;
    width: var(--ide-width);
    z-index: 100;
}

body.immersive-mode .side-drawer {
    visibility: visible;
    pointer-events: auto;
    position: fixed;
    top: var(--bar-height);
    right: 0;
    bottom: 0;
    width: var(--drawer-width);
    z-index: 100;
}

body.immersive-mode .immersive-stage {
    display: flex;
}

body.immersive-mode .immersive-settings-toggle {
    display: flex;
}

body.immersive-mode .command-bar-center {
    display: none;
}

body.immersive-mode .command-bar-left .sidebar-toggle-btn {
    display: none;
}

/* Responsive for immersive mode */
@media (max-width: 600px) {
    .immersive-mic-btn {
        width: 140px;
        height: 140px;
        font-size: 44px;
    }
    
    .immersive-ring {
        inset: -10px;
    }
    
    .immersive-ring-2 {
        inset: -20px;
    }
    
    .immersive-ring-3 {
        inset: -30px;
    }
    
    .immersive-settings-panel {
        width: 100%;
    }
    
    .immersive-settings-toggle {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
    
    .immersive-status {
        font-size: 16px;
    }
}

/* ==================== Advisor Search Styles ==================== */
.advisor-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-top: 10px;
    animation: advisorFadeIn 0.4s ease-out;
}

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

.advisor-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.advisor-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: var(--radius-sm);
    font-size: 24px;
    color: var(--neon-blue);
    flex-shrink: 0;
}

.advisor-basic {
    flex: 1;
    min-width: 0;
}

.advisor-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 4px;
}

.advisor-school {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.advisor-title {
    font-size: 12px;
    color: var(--neon-cyan);
}

.advisor-research {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    padding-top: 8px;
    border-top: 1px solid var(--border-subtle);
}

.advisor-result-box {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 12px;
    animation: advisorFadeIn 0.4s ease-out;
}

.advisor-meta-line {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    word-break: break-word;
}

.advisor-meta-line strong {
    font-size: 14px;
    color: var(--text-bright);
}

.advisor-result-textbox {
    width: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 12px;
    line-height: 1.55;
    resize: vertical;
    min-height: 130px;
}

.advisor-result-textbox:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

/* Cyber Input for advisor fields */
.cyber-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-family: var(--font-sans);
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
}

.cyber-input::placeholder {
    color: var(--text-muted);
}

.cyber-input:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

/* ==================== Advisor Modal Styles ==================== */
.advisor-modal {
    position: fixed;
    inset: 0;
    background: rgba(6, 10, 20, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.advisor-modal-content {
    width: 90%;
    max-width: 500px;
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-panel);
    animation: modalSlideIn 0.3s ease-out;
}

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

.advisor-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
}

.advisor-modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-bright);
    display: flex;
    align-items: center;
    gap: 10px;
}

.advisor-modal-header h3 i {
    color: var(--neon-blue);
}

.advisor-modal-body {
    padding: 24px;
}

.advisor-input-group {
    margin-bottom: 16px;
}

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