	/* ==================== CSS 变量定义 ==================== */
	:root {
	    /* 主色调 - fly.io风格紫色 */
	    --primary: #7c3aed;
	    --primary-light: #a78bfa;
	    --primary-dark: #6d28d9;
	    --primary-bg: rgba(124, 58, 237, 0.08);
	    /* 背景色 - 浅色主题 */
	    --bg-primary: #f9fafb;
	    --bg-secondary: #ffffff;
	    --bg-tertiary: #f3f4f6;
	    --bg-hover: #e5e7eb;
	    /* 文字色 */
	    --text-primary: #1e1b4b;
	    --text-secondary: #4b5563;
	    --text-muted: #9ca3af;
	    --text-placeholder: #d1d5db;
	    /* 边框色 */
	    --border: #e5e7eb;
	    --border-light: #f3f4f6;
	    /* 状态色 */
	    --success: #10b981;
	    --success-bg: rgba(16, 185, 129, 0.1);
	    --warning: #f59e0b;
	    --warning-bg: rgba(245, 158, 11, 0.1);
	    --error: #ef4444;
	    --error-bg: rgba(239, 68, 68, 0.1);
	    /* 阴影 */
	    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
	    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
	    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.08);
	    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.12);
	    /* 圆角 */
	    --radius-sm: 6px;
	    --radius-md: 10px;
	    --radius-lg: 16px;
	    --radius-xl: 24px;
	    /* 动画 */
	    --transition-fast: 0.15s ease;
	    --transition-normal: 0.25s ease;
	    --transition-slow: 0.4s ease;
	    --dynamic-bg-image: none;
	}
	/* ==================== 基础重置 ==================== */
	*, *::before, *::after {
	    margin: 0;
	    padding: 0;
	    box-sizing: border-box;
	}
	html {
	    font-size: 15px;
	    scroll-behavior: smooth;
	}
	body {
	    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	    background: var(--bg-primary);
	    color: var(--text-primary);
	    line-height: 1.6;
	    -webkit-font-smoothing: antialiased;
	    -moz-osx-font-smoothing: grayscale;
	    min-height: 100vh;
	}
	a {
	    color: var(--primary);
	    text-decoration: none;
	    transition: color var(--transition-fast);
	}
	a:hover {
	    color: var(--primary-dark);
	}
	button {
	    font-family: inherit;
	    cursor: pointer;
	    border: none;
	    background: none;
	}
	input, textarea, select {
	    font-family: inherit;
	    font-size: inherit;
	}
	.hidden {
	    display: none !important;
	}
	/* ==================== 登录页面 ==================== */
	#loginPage {
	    min-height: 100vh;
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    background: #f9fafb;
	    padding: 20px;
	    position: relative;
	    overflow: hidden;
	}
	#loginPage::before {
	    content: '';
	    position: absolute;
	    inset: -40px;
	    background: url('bg-gradient.png') center/cover no-repeat;
	    filter: blur(50px) saturate(1.3);
	    opacity: 0.45;
	    z-index: 0;
	}
	.login-container {
	    position: relative;
	    z-index: 1;
	    background: rgba(255, 255, 255, 0.75);
	    backdrop-filter: blur(24px);
	    border: 1px solid rgba(255, 255, 255, 0.6);
	    border-radius: var(--radius-xl);
	    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(124, 58, 237, 0.05);
	    padding: 48px 40px;
	    width: 100%;
	    max-width: 420px;
	}
	.login-header {
	    text-align: center;
	    margin-bottom: 40px;
	}
	.login-header .logo {
	    width: 72px;
	    height: 72px;
	    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 50%, #6366f1 100%);
	    border-radius: var(--radius-lg);
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    margin: 0 auto 20px;
	    color: white;
	    font-size: 28px;
	    font-weight: 700;
	    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.3);
	}
	.login-header h1 {
	    font-size: 26px;
	    font-weight: 700;
	    color: var(--text-primary);
	    margin-bottom: 8px;
	}
	.login-header p {
	    color: var(--text-secondary);
	    font-size: 15px;
	}
	.login-form {
	    display: flex;
	    flex-direction: column;
	    gap: 20px;
	}
	.form-group {
	    display: flex;
	    flex-direction: column;
	    gap: 8px;
	}
	.form-group label {
	    font-size: 13px;
	    font-weight: 600;
	    color: var(--text-secondary);
	    letter-spacing: 0.02em;
	}
	.form-group input {
	    padding: 14px 16px;
	    border: 2px solid var(--border);
	    border-radius: var(--radius-md);
	    font-size: 15px;
	    color: var(--text-primary);
	    background: var(--bg-secondary);
	    transition: all var(--transition-fast);
	}
	.form-group input:focus {
	    outline: none;
	    border-color: var(--primary);
	    box-shadow: 0 0 0 4px var(--primary-bg);
	}
	.form-group input::placeholder {
	    color: var(--text-placeholder);
	}
	.btn-login {
	    margin-top: 12px;
	    padding: 16px;
	    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
	    color: white;
	    font-size: 16px;
	    font-weight: 600;
	    border-radius: var(--radius-md);
	    transition: all var(--transition-normal);
	    box-shadow: 0 4px 16px rgba(8, 145, 178, 0.25);
	}
	.btn-login:hover {
	    transform: translateY(-2px);
	    box-shadow: 0 8px 24px rgba(8, 145, 178, 0.35);
	}
	.btn-login:active {
	    transform: translateY(0);
	}
	.error-msg {
	    color: var(--error);
	    font-size: 13px;
	    text-align: center;
	    margin-top: 8px;
	}
	.register-link {
	    text-align: center;
	    margin-top: 28px;
	    padding-top: 28px;
	    border-top: 1px solid var(--border-light);
	    color: var(--text-secondary);
	    font-size: 14px;
	}
	.register-link a {
	    font-weight: 600;
	    margin-left: 4px;
	}
	/* ==================== 注册页面 ==================== */
	#registerPage {
	    height: 100vh;
	    overflow: hidden;
	    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
	}
	.register-layout {
	    display: flex;
	    height: 100vh;
	    overflow: hidden;
	}
	.register-form-section {
	    flex: 1;
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    padding: 40px;
	    overflow-y: auto;
	}
	.register-form-container {
	    width: 100%;
	    max-width: 440px;
	}
	.register-header {
	    margin-bottom: 36px;
	}
	.back-link {
	    display: inline-flex;
	    align-items: center;
	    gap: 6px;
	    color: var(--text-secondary);
	    font-size: 14px;
	    font-weight: 500;
	    margin-bottom: 20px;
	    transition: color var(--transition-fast);
	}
	.back-link svg {
	    width: 18px;
	    height: 18px;
	}
	.back-link:hover {
	    color: var(--primary);
	}
	.register-header h1 {
	    font-size: 32px;
	    font-weight: 700;
	    color: var(--text-primary);
	    margin-bottom: 8px;
	}
	.register-header p {
	    color: var(--text-secondary);
	    font-size: 15px;
	}
	.register-step-content {
	    background: var(--bg-secondary);
	    border-radius: var(--radius-xl);
	    padding: 36px;
	    box-shadow: var(--shadow-lg);
	}
	.step-icon {
	    width: 56px;
	    height: 56px;
	    background: var(--primary-bg);
	    border-radius: var(--radius-md);
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    margin-bottom: 24px;
	}
	.step-icon svg {
	    width: 28px;
	    height: 28px;
	    stroke: var(--primary);
	}
	.step-icon.luogu {
	    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
	}
	.step-icon.luogu svg {
	    stroke: #d97706;
	}
	.register-step-content h2 {
	    font-size: 22px;
	    font-weight: 700;
	    color: var(--text-primary);
	    margin-bottom: 8px;
	}
	.step-desc {
	    color: var(--text-secondary);
	    font-size: 14px;
	    margin-bottom: 28px;
	}
	.verify-hint {
	    font-size: 12px;
	    color: var(--text-muted);
	    background: var(--bg-tertiary);
	    padding: 12px;
	    border-radius: var(--radius-md);
	    margin-bottom: 20px;
	    line-height: 1.6;
	}
	.luogu-bind-info-box {
	    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
	    border: 1px solid rgba(16, 185, 129, 0.3);
	    border-radius: var(--radius-md);
	    padding: 16px;
	    display: flex;
	    align-items: center;
	    gap: 10px;
	}
	.luogu-bind-info-box .bind-label {
	    color: var(--text-muted);
	    font-size: 13px;
	}
	.luogu-bind-info-box .bind-name {
	    color: #10b981;
	    font-weight: 600;
	    font-size: 15px;
	}
	.invite-code-input input {
	    width: 100%;
	    padding: 16px 20px;
	    border: 2px dashed var(--border);
	    border-radius: var(--radius-md);
	    font-size: 20px;
	    font-weight: 600;
	    text-align: center;
	    letter-spacing: 0.3em;
	    text-transform: uppercase;
	    color: var(--text-primary);
	    background: var(--bg-tertiary);
	    transition: all var(--transition-fast);
	}
	.invite-code-input input:focus {
	    outline: none;
	    border-style: solid;
	    border-color: var(--primary);
	    background: var(--bg-secondary);
	}
	.btn-primary {
	    display: inline-flex;
	    align-items: center;
	    justify-content: center;
	    gap: 10px;
	    padding: 14px 28px;
	    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
	    color: white;
	    font-size: 15px;
	    font-weight: 600;
	    border-radius: var(--radius-md);
	    transition: all var(--transition-normal);
	    box-shadow: 0 4px 16px rgba(8, 145, 178, 0.25);
	}
	.btn-primary svg {
	    width: 18px;
	    height: 18px;
	}
	.btn-primary:hover {
	    transform: translateY(-2px);
	    box-shadow: 0 8px 24px rgba(8, 145, 178, 0.35);
	}
	.btn-primary.full {
	    width: 100%;
	}
	.btn-secondary {
	    display: inline-flex;
	    align-items: center;
	    justify-content: center;
	    gap: 8px;
	    padding: 14px 24px;
	    background: var(--bg-tertiary);
	    color: var(--text-primary);
	    font-size: 15px;
	    font-weight: 500;
	    border-radius: var(--radius-md);
	    transition: all var(--transition-fast);
	}
	.btn-secondary svg {
	    width: 18px;
	    height: 18px;
	}
	.btn-secondary:hover {
	    background: var(--bg-hover);
	}
	.btn-ghost {
	    padding: 14px 20px;
	    background: transparent;
	    color: var(--text-secondary);
	    font-size: 15px;
	    font-weight: 500;
	    border-radius: var(--radius-md);
	    transition: all var(--transition-fast);
	}
	.btn-ghost:hover {
	    background: var(--bg-tertiary);
	    color: var(--text-primary);
	}
	.btn-group {
	    display: flex;
	    gap: 12px;
	    margin-top: 24px;
	}
	.btn-group.three {
	    display: grid;
	    grid-template-columns: auto 1fr auto;
	    align-items: center;
	}
	.input-hint {
	    display: block;
	    margin-top: 8px;
	    font-size: 12px;
	    color: var(--text-muted);
	}
	/* 右侧装饰区 */
	.register-side-section {
	    width: 420px;
	    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
	    position: relative;
	    overflow: hidden;
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    padding: 60px;
	}
	.side-content {
	    position: relative;
	    z-index: 2;
	}
	.brand-area {
	    text-align: center;
	    color: white;
	    margin-bottom: 48px;
	}
	.logo-large {
	    width: 80px;
	    height: 80px;
	    background: rgba(255, 255, 255, 0.2);
	    border-radius: var(--radius-lg);
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    margin: 0 auto 20px;
	    font-size: 32px;
	    font-weight: 700;
	    backdrop-filter: blur(10px);
	}
	.brand-area h2 {
	    font-size: 26px;
	    font-weight: 700;
	    margin-bottom: 8px;
	}
	.brand-area p {
	    opacity: 0.85;
	    font-size: 14px;
	}
	/* 垂直步骤指示器 */
	.vertical-steps {
	    display: flex;
	    flex-direction: column;
	    gap: 0;
	}
	.v-step {
	    display: flex;
	    gap: 16px;
	    opacity: 0.5;
	    transition: opacity var(--transition-normal);
	}
	.v-step.active {
	    opacity: 1;
	}
	.v-step.completed {
	    opacity: 0.7;
	}
	.v-step-indicator {
	    display: flex;
	    flex-direction: column;
	    align-items: center;
	}
	.v-step-dot {
	    width: 12px;
	    height: 12px;
	    background: rgba(255, 255, 255, 0.3);
	    border-radius: 50%;
	    transition: all var(--transition-normal);
	}
	.v-step.active .v-step-dot {
	    background: white;
	    box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
	}
	.v-step.completed .v-step-dot {
	    background: rgba(255, 255, 255, 0.8);
	}
	.v-step-line {
	    width: 2px;
	    height: 40px;
	    background: rgba(255, 255, 255, 0.2);
	}
	.v-step:last-child .v-step-line {
	    display: none;
	}
	.v-step-content {
	    padding-top: 0;
	}
	.v-step-title {
	    color: white;
	    font-weight: 600;
	    font-size: 14px;
	    margin-bottom: 2px;
	}
	.v-step-desc {
	    color: rgba(255, 255, 255, 0.7);
	    font-size: 12px;
	}
	/* 特性预览 */
	.features-preview {
	    margin-top: 48px;
	    display: flex;
	    flex-direction: column;
	    gap: 12px;
	}
	.feature-item {
	    display: flex;
	    align-items: center;
	    gap: 12px;
	    color: white;
	    font-size: 14px;
	    opacity: 0.9;
	}
	.feature-icon {
	    font-size: 18px;
	}
	/* 背景装饰 */
	.side-decoration {
	    position: absolute;
	    inset: 0;
	    z-index: 1;
	}
	.deco-circle {
	    position: absolute;
	    border-radius: 50%;
	    background: rgba(255, 255, 255, 0.05);
	}
	.deco-circle.c1 {
	    width: 300px;
	    height: 300px;
	    top: -100px;
	    right: -100px;
	}
	.deco-circle.c2 {
	    width: 200px;
	    height: 200px;
	    bottom: 50px;
	    left: -50px;
	}
	.deco-circle.c3 {
	    width: 150px;
	    height: 150px;
	    bottom: -50px;
	    right: 100px;
	}
	/* 深度分析步骤 */
	.deep-analysis-container {
	    text-align: center;
	}
	.analysis-header {
	    margin-bottom: 32px;
	}
	.analysis-icon {
	    width: 64px;
	    height: 64px;
	    background: var(--primary-bg);
	    border-radius: 50%;
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    margin: 0 auto 20px;
	    animation: pulse 2s ease-in-out infinite;
	}
	@keyframes pulse {
	    0%, 100% { transform: scale(1); }
	    50% { transform: scale(1.05); }
	}
	.analysis-icon svg {
	    width: 32px;
	    height: 32px;
	    stroke: var(--primary);
	}
	.analysis-header h2 {
	    font-size: 20px;
	    font-weight: 600;
	    color: var(--text-primary);
	    margin-bottom: 8px;
	}
	.analysis-subtitle {
	    color: var(--text-secondary);
	    font-size: 14px;
	}
	.analysis-steps-list {
	    text-align: left;
	    margin-bottom: 28px;
	}
	.analysis-step-item {
	    display: flex;
	    align-items: flex-start;
	    gap: 14px;
	    padding: 14px 0;
	    border-bottom: 1px solid var(--border-light);
	}
	.analysis-step-item:last-child {
	    border-bottom: none;
	}
	.step-status-icon {
	    width: 24px;
	    height: 24px;
	    border-radius: 50%;
	    background: var(--bg-tertiary);
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    flex-shrink: 0;
	}
	.step-status-icon svg {
	    width: 14px;
	    height: 14px;
	    stroke: white;
	    stroke-width: 3;
	}
	.step-status-icon.completed {
	    background: var(--success);
	}
	.step-status-icon.running {
	    background: var(--primary);
	    animation: spin 1s linear infinite;
	}
	.step-status-icon.running::after {
	    content: '';
	    width: 8px;
	    height: 8px;
	    border: 2px solid white;
	    border-top-color: transparent;
	    border-radius: 50%;
	    display: block;
	}
	@keyframes spin {
	    to { transform: rotate(360deg); }
	}
	.step-status-icon.error {
	    background: var(--error);
	}
	.step-status-icon.pending {
	    background: var(--bg-hover);
	}
	.step-content {
	    flex: 1;
	}
	.step-title {
	    font-weight: 600;
	    color: var(--text-primary);
	    font-size: 14px;
	    margin-bottom: 2px;
	}
	.step-description {
	    color: var(--text-muted);
	    font-size: 13px;
	}
	.step-detail {
	    margin-top: 6px;
	    padding: 8px 12px;
	    background: var(--bg-tertiary);
	    border-radius: var(--radius-sm);
	    font-size: 12px;
	    color: var(--text-secondary);
	}
	.analysis-progress {
	    margin-bottom: 20px;
	}
	.progress-bar {
	    height: 6px;
	    background: var(--bg-tertiary);
	    border-radius: 3px;
	    overflow: hidden;
	    margin-bottom: 10px;
	}
	.progress-fill {
	    height: 100%;
	    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
	    border-radius: 3px;
	    transition: width var(--transition-normal);
	    width: 0;
	}
	.progress-text {
	    font-size: 13px;
	    color: var(--text-secondary);
	}
	.skip-analysis-btn {
	    margin-top: 16px;
	}
	/* 注册成功 */
	.register-success {
	    text-align: center;
	}
	.success-animation {
	    position: relative;
	    width: 80px;
	    height: 80px;
	    margin: 0 auto 24px;
	}
	.success-circle {
	    width: 100%;
	    height: 100%;
	    background: var(--success-bg);
	    border-radius: 50%;
	    animation: scaleIn 0.5s ease-out;
	}
	@keyframes scaleIn {
	    from { transform: scale(0); }
	    to { transform: scale(1); }
	}
	.success-check {
	    position: absolute;
	    top: 50%;
	    left: 50%;
	    transform: translate(-50%, -50%);
	    width: 40px;
	    height: 40px;
	    stroke: var(--success);
	    stroke-linecap: round;
	    stroke-linejoin: round;
	    animation: checkDraw 0.5s ease-out 0.3s forwards;
	    stroke-dasharray: 50;
	    stroke-dashoffset: 50;
	}
	@keyframes checkDraw {
	    to { stroke-dashoffset: 0; }
	}
	.register-success h2 {
	    font-size: 24px;
	    font-weight: 700;
	    color: var(--text-primary);
	    margin-bottom: 8px;
	}
	.success-msg {
	    color: var(--text-secondary);
	    font-size: 15px;
	    margin-bottom: 28px;
	}
	.success-info {
	    background: var(--bg-tertiary);
	    border-radius: var(--radius-md);
	    padding: 20px;
	    margin-bottom: 28px;
	    text-align: left;
	}
	.success-info-item {
	    display: flex;
	    justify-content: space-between;
	    padding: 10px 0;
	    border-bottom: 1px solid var(--border-light);
	    font-size: 14px;
	}
	.success-info-item:last-child {
	    border-bottom: none;
	}
	.success-info-item span:first-child {
	    color: var(--text-muted);
	}
	.success-info-item span:last-child {
	    font-weight: 600;
	    color: var(--text-primary);
	}
	/* ==================== 主应用页面 ==================== */
	#appPage {
	    height: 100vh;
	    overflow: hidden;
	}
	.app-container {
	    display: flex;
	    height: 100vh;
	    overflow: hidden;
	}
	/* 侧边栏 */
	.sidebar {
	    width: 280px;
	    background: var(--bg-secondary);
	    border-right: 1px solid var(--border);
	    display: flex;
	    flex-direction: column;
	    flex-shrink: 0;
	}
	.sidebar-header {
	    padding: 20px 16px;
	    display: flex;
	    align-items: center;
	    gap: 10px;
	    border-bottom: 1px solid var(--border-light);
	}
	.logo-small {
	    width: 36px;
	    height: 36px;
	    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
	    border-radius: var(--radius-md);
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    color: white;
	    font-weight: 700;
	    font-size: 14px;
	}
	.sidebar-header span {
	    font-size: 16px;
	    font-weight: 700;
	    color: var(--text-primary);
	}
.new-chat-btn,
.profile-btn {
    margin: 16px;
    width: calc(100% - 32px);
    padding: 14px 18px;
	    display: flex;
	    align-items: center;
	    gap: 10px;
	    border-radius: var(--radius-md);
	    font-size: 14px;
	    font-weight: 500;
	    transition: all var(--transition-fast);
	    cursor: pointer;
	    border: none;
	    outline: none;
	    user-select: none;
	    position: relative;
	    z-index: 1;
	}
	.new-chat-btn {
	    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
	    color: white;
	    box-shadow: 0 2px 12px rgba(8, 145, 178, 0.2);
	}
	.new-chat-btn svg {
	    width: 18px;
	    height: 18px;
	}
	.new-chat-btn:hover {
	    transform: translateY(-2px);
	    box-shadow: 0 6px 20px rgba(8, 145, 178, 0.35);
	}
	.new-chat-btn:active {
	    transform: translateY(0) scale(0.97);
	    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.25);
	    transition: transform 0.1s ease-out, box-shadow 0.1s ease-out;
	}
	.profile-btn {
	    background: var(--bg-tertiary);
	    color: var(--text-primary);
	}
	.profile-btn svg {
	    width: 18px;
	    height: 18px;
	}
	.profile-btn:hover {
	    background: var(--bg-hover);
	    transform: translateY(-2px);
	}
	.profile-btn:active {
	    transform: translateY(0) scale(0.98);
	}
	.conversations-list {
	    flex: 1;
	    overflow-y: auto;
	    padding: 8px;
	}
	.conv-item {
	    display: flex;
	    align-items: center;
	    padding: 12px;
	    border-radius: var(--radius-md);
	    cursor: pointer;
	    transition: background var(--transition-fast);
	    margin-bottom: 4px;
	}
	.conv-item:hover {
	    background: var(--bg-tertiary);
	}
	.conv-item.active {
	    background: var(--primary-bg);
	}
	.conv-item-content {
	    flex: 1;
	    min-width: 0;
	}
	.conv-item-title-row {
	    display: flex;
	    align-items: center;
	    gap: 8px;
	    min-width: 0;
	}
	.conv-item-title {
	    font-size: 14px;
	    font-weight: 500;
	    color: var(--text-primary);
	    white-space: nowrap;
	    overflow: hidden;
	    text-overflow: ellipsis;
	    min-width: 0;
	}
	.conv-item-badge {
	    flex-shrink: 0;
	    padding: 2px 6px;
	    border-radius: 999px;
	    background: color-mix(in srgb, var(--primary) 12%, transparent);
	    color: var(--primary);
	    font-size: 11px;
	    font-weight: 600;
	}
	.conv-item-time {
	    font-size: 12px;
	    color: var(--text-muted);
	    margin-top: 2px;
	}
	.conv-item-actions {
	    display: flex;
	    align-items: center;
	    gap: 4px;
	    flex-shrink: 0;
	    margin-left: 8px;
	}
	.conv-item-pin,
	.conv-item-delete {
	    opacity: 0;
	    padding: 6px;
	    border-radius: var(--radius-sm);
	    color: var(--text-muted);
	    transition: all var(--transition-fast);
	}
	.conv-item:hover .conv-item-pin,
	.conv-item:hover .conv-item-delete {
	    opacity: 1;
	}
	.conv-item-pin:hover {
	    background: color-mix(in srgb, var(--warning) 14%, transparent);
	    color: var(--warning);
	}
	.conv-item-pin.active {
	    opacity: 1;
	    color: var(--warning);
	    background: color-mix(in srgb, var(--warning) 14%, transparent);
	}
	.conv-item-delete:hover {
	    background: var(--error-bg);
	    color: var(--error);
	}
	.conv-item-pin svg,
	.conv-item-delete svg {
	    width: 16px;
	    height: 16px;
	}
	/* 后台流式传输指示器 */
	.conv-item.streaming .conv-item-title {
	    display: flex;
	    align-items: center;
	    gap: 6px;
	}
	.streaming-indicator {
	    width: 8px;
	    height: 8px;
	    background: var(--primary);
	    border-radius: 50%;
	    animation: pulse-streaming 1.5s ease-in-out infinite;
	    flex-shrink: 0;
	}
	@keyframes pulse-streaming {
	    0%, 100% { opacity: 1; transform: scale(1); }
	    50% { opacity: 0.5; transform: scale(0.8); }
	}
	.sidebar-footer {
	    padding: 16px;
	    border-top: 1px solid var(--border-light);
	    display: flex;
	    align-items: center;
	    justify-content: space-between;
	}
	.user-info {
	    display: flex;
	    align-items: center;
	    gap: 10px;
	}
	.user-avatar {
	    width: 36px;
	    height: 36px;
	    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
	    border-radius: 50%;
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    color: white;
	    font-weight: 600;
	    font-size: 14px;
	}
	.user-info span {
	    font-size: 14px;
	    font-weight: 500;
	    color: var(--text-primary);
	}
	.logout-btn {
	    padding: 8px;
	    border-radius: var(--radius-sm);
	    color: var(--text-muted);
	    transition: all var(--transition-fast);
	}
	.logout-btn:hover {
	    background: var(--error-bg);
	    color: var(--error);
	}
	.logout-btn svg {
	    width: 18px;
	    height: 18px;
	}
	/* 主内容区 */
	.main-content {
	    flex: 1;
	    display: flex;
	    flex-direction: column;
	    background: var(--bg-primary);
	    min-width: 0;
	    height: 100vh;
	    overflow: hidden;
	    position: relative;
	}
	.main-content::before {
	    content: '';
	    position: absolute;
	    inset: -60px;
	    background:
	        var(--dynamic-bg-image) center/cover no-repeat,
	        url('bg-gradient.png') center/cover no-repeat;
	    filter: blur(16px) saturate(1.02);
	    opacity: 0.08;
	    z-index: 0;
	    pointer-events: none;
	}
	body[data-background-mode="random"] .main-content::before,
	body[data-background-mode="random"] .profile-page-container::before,
	body[data-background-mode="random"] .research-page-container::before,
	body[data-background-mode="random"] .admin-container::before,
	body[data-background-mode="random"] .chatroom-panel::before {
	    opacity: 0.1;
	}
	.profile-page-container,
	.research-page-container,
	.admin-container,
	.chatroom-panel {
	    position: relative;
	    isolation: isolate;
	    overflow: hidden;
	}
	.profile-page-container::before,
	.research-page-container::before,
	.admin-container::before,
	.chatroom-panel::before {
	    content: '';
	    position: absolute;
	    inset: -60px;
	    background:
	        var(--dynamic-bg-image) center/cover no-repeat,
	        url('bg-gradient.png') center/cover no-repeat;
	    filter: blur(12px) saturate(1.01);
	    opacity: 0.06;
	    z-index: 0;
	    pointer-events: none;
	}
	.profile-header,
	.profile-main,
	.research-header,
	.research-main,
	.admin-header,
	.admin-content,
	.chatroom-header,
	.chatroom-messages,
	.chatroom-input-area {
	    position: relative;
	    z-index: 1;
	}
	.avatar-image {
	    width: 100%;
	    height: 100%;
	    object-fit: cover;
	    border-radius: inherit;
	    display: block;
	}
	.global-toast {
	    position: fixed;
	    left: 50%;
	    bottom: 28px;
	    transform: translateX(-50%);
	    min-width: 180px;
	    max-width: min(420px, calc(100vw - 32px));
	    padding: 12px 16px;
	    border-radius: 14px;
	    background: rgba(17, 24, 39, 0.92);
	    color: #fff;
	    font-size: 13px;
	    text-align: center;
	    box-shadow: var(--shadow-lg);
	    z-index: 2600;
	}
	.global-toast.success {
	    background: rgba(16, 185, 129, 0.92);
	}
	.global-toast.error {
	    background: rgba(239, 68, 68, 0.92);
	}
	.global-toast.hidden {
	    display: none;
	}
	.chat-header {
	    padding: 16px 24px;
	    background: var(--bg-secondary);
	    border-bottom: 1px solid var(--border);
	    display: flex;
	    align-items: center;
	    position: relative;
	    z-index: 1;
	    justify-content: space-between;
	}
	.chat-title-wrapper {
	    display: flex;
	    align-items: center;
	    gap: 10px;
	}
	.chat-title-wrapper h2 {
	    font-size: 18px;
	    font-weight: 600;
	    color: var(--text-primary);
	}
	.edit-title-btn {
	    padding: 6px;
	    border-radius: var(--radius-sm);
	    color: var(--text-muted);
	    transition: all var(--transition-fast);
	}
	.edit-title-btn:hover {
	    background: var(--bg-tertiary);
	    color: var(--text-primary);
	}
	.edit-title-btn svg {
	    width: 16px;
	    height: 16px;
	}
	.header-right {
	    display: flex;
	    align-items: center;
	    gap: 16px;
	}
	.points-display {
	    display: flex;
	    align-items: center;
	    gap: 6px;
	    padding: 6px 12px;
	    background: var(--warning-bg);
	    border-radius: 20px;
	    font-size: 13px;
	    font-weight: 600;
	    color: var(--warning);
	}
	.points-display svg {
	    width: 14px;
	    height: 14px;
	}
/* 聊天消息区 */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px;
    padding-bottom: var(--chat-bottom-space, 120px);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    gap: 20px;
    min-height: 0;
    max-height: 100%;
}
.conversation-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}
.conversation-view.hidden {
    display: none;
}
.conversation-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}
.conversation-view.hidden {
    display: none;
}
.welcome-message {
	    display: flex;
	    flex-direction: column;
	    align-items: center;
	    justify-content: center;
	    text-align: center;
	    padding: 40px 20px;
	    gap: 32px;
	}
	.welcome-icon {
	    width: 15vw;
	    height: 15vw;
	    max-width: 120px;
	    max-height: 120px;
	    min-width: 60px;
	    min-height: 60px;
	    flex-shrink: 0;
	    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
	    border-radius: var(--radius-lg);
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    box-shadow: 0 8px 32px rgba(8, 145, 178, 0.25);
	}
	.welcome-icon svg {
	    width: 50%;
	    height: 50%;
	    stroke: white;
	}
	.welcome-message h3 {
	    font-size: 24px;
	    font-weight: 700;
	    color: var(--text-primary);
	    margin-bottom: 8px;
	}
	.welcome-message > p {
	    color: var(--text-secondary);
	    font-size: 15px;
	    margin-bottom: 16px;
	}
.feature-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 600px;
}
.feature-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-normal);
    cursor: default;
}
.feature-card.clickable {
    cursor: pointer;
    user-select: none;
}
.feature-card.clickable:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--primary-bg);
}
.feature-card.clickable:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}
.feature-card.highlight {
    background: linear-gradient(135deg, var(--primary-bg) 0%, rgba(124, 58, 237, 0.15) 100%);
    border-color: var(--primary-light);
    position: relative;
    overflow: hidden;
}
.feature-card.highlight::before {
    content: 'NEW';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 9px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 2px 6px;
    border-radius: 4px;
}
.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.feature-icon {
    font-size: 22px;
}
.feature-card span:last-child {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

/* SVG渲染容器 */
.svg-render-container {
    margin: 16px 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.svg-render-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}
.svg-render-header svg {
    color: var(--primary);
}
.svg-toggle-btn {
    margin-left: auto;
    padding: 4px 12px;
    background: var(--primary-bg);
    color: var(--primary);
    border: 1px solid var(--primary-light);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.svg-toggle-btn:hover {
    background: var(--primary);
    color: white;
}
.svg-render-content {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    min-height: 100px;
}
.svg-render-content svg {
    max-width: 100%;
    height: auto;
    display: block;
}
.svg-render-code {
    margin: 0;
    padding: 16px;
    background: var(--bg-tertiary);
    max-height: 300px;
    overflow: auto;
}
.svg-render-code pre {
    margin: 0;
    padding: 0;
}
.svg-render-code code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
    word-wrap: break-word;
}

/* SVG预览容器（动态生成时） */
.svg-preview-container {
    margin: 16px 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.svg-preview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--primary-bg);
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 500;
    color: var(--primary);
}
.svg-preview-header::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse-svg 1s ease-in-out infinite;
}
@keyframes pulse-svg {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* 侧边栏遮罩 */
.sidebar-overlay {
    display: none;
}

/* 自定义对话框 */
.custom-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
    padding: 20px;
}
.custom-modal-overlay.hidden {
    display: none;
}
.custom-modal {
    width: 100%;
    max-width: 400px;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: modalSlideIn 0.2s ease;
}
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.custom-modal-header {
    padding: 20px 24px 0;
}
.custom-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}
.custom-modal-body {
    padding: 20px 24px;
}
.custom-modal-body p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
    line-height: 1.6;
}
.custom-modal-body input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: all var(--transition-fast);
}
.custom-modal-body input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-bg);
}
.custom-modal-footer {
    padding: 16px 24px 20px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}
.custom-modal-btn {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.custom-modal-btn.secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.custom-modal-btn.secondary:hover {
    background: var(--bg-hover);
}
.custom-modal-btn.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
}
.custom-modal-btn.primary:hover {
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}
.custom-modal-btn.danger {
    background: var(--error);
    color: white;
    border: none;
}
.custom-modal-btn.danger:hover {
    background: #dc2626;
}

/* 移动端更多菜单 */
.mobile-more-menu {
    position: fixed;
    top: 60px;
    right: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 8px 0;
    min-width: 160px;
    z-index: 1500;
    animation: menuSlideIn 0.15s ease;
    display: none;
}
.mobile-more-menu.hidden {
    display: none;
}
.mobile-more-menu.open {
    display: block;
}
@keyframes menuSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.more-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background var(--transition-fast);
    text-align: left;
}
.more-menu-item:hover {
    background: var(--bg-hover);
}
.more-menu-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.more-menu-item.danger {
    color: var(--error);
}
.more-menu-item.danger svg {
    stroke: var(--error);
}

/* 移动端顶部栏 - 默认隐藏 */
.mobile-header {
    display: none;
}
	/* 消息样式 */
	.message {
	    display: flex;
	    flex-direction: column;
	    gap: 8px;
	    max-width: 85%;
	    min-width: 60px;
	    word-break: break-word;
	    overflow-wrap: break-word;
	}
	.message.user {
	    align-self: flex-end;
	    max-width: 75%;
	    align-items: flex-end;
	    margin-left: auto;
	}
	.message.assistant {
	    align-self: flex-start;
	    max-width: 90%;
	    align-items: flex-start;
	}
	.message-header {
	    display: flex;
	    align-items: center;
	    gap: 10px;
	}
	.message.user .message-header {
	    flex-direction: row-reverse;
	}
	.message-avatar {
	    width: 32px;
	    height: 32px;
	    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
	    border-radius: 50%;
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    color: white;
	    font-weight: 600;
	    font-size: 12px;
	}
	.message.user .message-avatar {
	    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
	}
	.message-role {
	    font-size: 13px;
	    font-weight: 600;
	    color: var(--text-primary);
	}
	.message-content {
	    background: var(--bg-secondary);
	    border-radius: var(--radius-lg);
	    border-bottom-left-radius: 4px;
	    padding: 16px 20px;
	    box-shadow: var(--shadow-sm);
	    border: 1px solid var(--border);
	    word-break: break-word;
	    overflow-wrap: break-word;
	    min-width: 0;
	}
	.message.user .message-content {
	    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
	    border: none;
	    color: white;
	    border-radius: var(--radius-lg);
	    border-bottom-right-radius: 4px;
	}
	.message.user .message-content a {
	    color: white;
	    text-decoration: underline;
	}
	.content-html {
	    font-size: 15px;
	    line-height: 1.7;
	    word-break: break-word;
	    overflow-wrap: break-word;
	}
	.content-html p {
	    margin-bottom: 12px;
	}
	.content-html p:last-child {
	    margin-bottom: 0;
	}
	.content-html ul, .content-html ol {
	    margin: 12px 0;
	    padding-left: 24px;
	}
	.content-html li {
	    margin-bottom: 6px;
	}
	.content-html strong {
	    font-weight: 600;
	}
	.content-html em {
	    font-style: italic;
	}
	/* 代码块样式 */
	.code-block-wrapper {
	    position: relative;
	    margin: 16px 0;
	    border-radius: var(--radius-md);
	    overflow: hidden;
	    background: #1e293b;
	    border: 1px solid #334155;
	}
	.code-block-wrapper pre {
	    margin: 0;
	    padding: 16px;
	    overflow-x: auto;
	}
	.code-block-wrapper code {
	    font-family: 'JetBrains Mono', monospace;
	    font-size: 13px;
	    line-height: 1.6;
	    color: #e2e8f0;
	}
	.code-copy-btn {
	    position: absolute;
	    top: 8px;
	    right: 8px;
	    padding: 6px 10px;
	    background: rgba(255, 255, 255, 0.1);
	    border-radius: var(--radius-sm);
	    color: #94a3b8;
	    font-size: 12px;
	    transition: all var(--transition-fast);
	    display: flex;
	    align-items: center;
	    gap: 4px;
	}
	.code-copy-btn:hover {
	    background: rgba(255, 255, 255, 0.2);
	    color: white;
	}
	.code-copy-btn svg {
	    width: 14px;
	    height: 14px;
	}
	.code-copy-btn .check-icon {
	    display: none;
	}
	.code-copy-btn.copied .copy-icon {
	    display: none;
	}
	.code-copy-btn.copied .check-icon {
	    display: block;
	    stroke: var(--success);
	}
	.code-copy-btn.copied {
	    background: rgba(16, 185, 129, 0.2);
	    color: var(--success);
	}
	/* 行内代码 */
	.content-html code:not(.hljs) {
	    background: var(--bg-tertiary);
	    padding: 2px 6px;
	    border-radius: 4px;
	    font-family: 'JetBrains Mono', monospace;
	    font-size: 13px;
	    color: var(--primary-dark);
	}
	.message.user .content-html code:not(.hljs) {
	    background: rgba(255, 255, 255, 0.2);
	    color: white;
	}
	/* 思考过程样式 */
	.thinking-timeline-container {
	    background: var(--bg-tertiary);
	    border-radius: var(--radius-md);
	    margin-bottom: 16px;
	    overflow: hidden;
	    border: 1px solid var(--border);
	}
	.thinking-header {
	    padding: 12px 16px;
	    display: flex;
	    align-items: center;
	    justify-content: space-between;
	    background: var(--bg-secondary);
	    border-bottom: 1px solid var(--border);
	    cursor: pointer;
	    transition: background var(--transition-fast);
	}
	.thinking-header:hover {
	    background: var(--bg-hover);
	}
	.thinking-header-left {
	    display: flex;
	    align-items: center;
	    gap: 10px;
	}
	.thinking-header-icon {
	    width: 20px;
	    height: 20px;
	    stroke: var(--primary);
	}
	.thinking-header-title {
	    font-size: 13px;
	    font-weight: 600;
	    color: var(--text-primary);
	}
	.thinking-header-toggle {
	    width: 16px;
	    height: 16px;
	    stroke: var(--text-muted);
	    transition: transform var(--transition-fast);
	}
	.thinking-timeline-container.collapsed .thinking-header-toggle {
	    transform: rotate(-90deg);
	}
	.thinking-body {
	    padding: 16px;
	    max-height: 400px;
	    overflow-y: auto;
	    transition: max-height var(--transition-normal);
	}
	.thinking-timeline-container.collapsed .thinking-body {
	    max-height: 0;
	    padding: 0 16px;
	}
	.thinking-step {
	    position: relative;
	    padding-left: 24px;
	    padding-bottom: 16px;
	}
	.thinking-step:last-child {
	    padding-bottom: 0;
	}
	.thinking-step-dot {
	    position: absolute;
	    left: 0;
	    top: 6px;
	    width: 10px;
	    height: 10px;
	    background: var(--primary);
	    border-radius: 50%;
	}
	.thinking-step-line {
	    position: absolute;
	    left: 4px;
	    top: 18px;
	    width: 2px;
	    height: calc(100% - 18px);
	    background: var(--border);
	}
	.thinking-step:last-child .thinking-step-line {
	    display: none;
	}
	.thinking-step-title {
	    font-size: 13px;
	    font-weight: 600;
	    color: var(--text-primary);
	    margin-bottom: 4px;
	}
	.thinking-step-content {
	    font-size: 13px;
	    color: var(--text-secondary);
	    line-height: 1.6;
	    word-break: break-word;
	    overflow-wrap: break-word;
	}
	/* 工具调用样式 */
	.tool-call-block-realtime {
	    background: var(--bg-secondary);
	    border: 1px solid var(--border);
	    border-radius: var(--radius-md);
	    margin: 8px 0;
	    overflow: hidden;
	}
	.tool-call-block-realtime.tool-appearing {
	    animation: toolCallSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
	}
	@keyframes toolCallSlideIn {
	    from {
	        opacity: 0;
	        transform: translateY(-10px);
	    }
	    to {
	        opacity: 1;
	        transform: translateY(0);
	    }
	}
	.tool-call-main {
	    padding: 10px 14px;
	    display: flex;
	    align-items: center;
	    gap: 10px;
	    cursor: pointer;
	    transition: background var(--transition-fast), transform var(--transition-normal);
	}
	.tool-call-main:hover {
	    background: var(--bg-tertiary);
	    transform: translateX(4px);
	}
	.tool-call-main:active {
	    transform: translateX(2px) scale(0.98);
	}
	.tool-call-status {
	    width: 20px;
	    height: 20px;
	    display: flex;
	    align-items: center;
	    justify-content: center;
	}
	.tool-call-spinner {
	    width: 16px;
	    height: 16px;
	    border: 2px solid var(--border);
	    border-top-color: var(--primary);
	    border-radius: 50%;
	    animation: spin 0.8s linear infinite, pulse 1.5s ease-in-out infinite;
	}
	@keyframes pulse {
	    0%, 100% {
	        box-shadow: 0 0 0 0 rgba(8, 145, 178, 0);
	    }
	    50% {
	        box-shadow: 0 0 0 6px rgba(8, 145, 178, 0.3);
	    }
	}
	.tool-call-status-icon {
	    width: 16px;
	    height: 16px;
	}
	.tool-call-status-icon.done {
	    stroke: var(--success);
	}
	.tool-call-status-icon.error {
	    stroke: var(--error);
	}
	@keyframes statusIconShake {
	    0%, 100% {
	        transform: translateX(0) rotate(0);
	    }
	    10%, 30%, 50%, 70%, 90% {
	        transform: translateX(-2px) rotate(-2deg);
	    }
	    20%, 40%, 60%, 80% {
	        transform: translateX(2px) rotate(2deg);
	    }
	}
	.tool-call-info {
	    flex: 1;
	    min-width: 0;
	    display: flex;
	    align-items: center;
	    gap: 8px;
	    transition: transform var(--transition-fast);
	}
	.tool-call-name {
	    font-size: 13px;
	    font-weight: 600;
	    color: var(--text-primary);
	    transition: color var(--transition-fast);
	}
	.tool-call-main:hover .tool-call-name {
	    color: var(--primary);
	}
	.tool-call-params-preview {
	    font-size: 12px;
	    color: var(--text-muted);
	    white-space: nowrap;
	    overflow: hidden;
	    text-overflow: ellipsis;
	    max-width: 150px;
	    transition: color var(--transition-fast), opacity var(--transition-fast);
	}
	.tool-call-main:hover .tool-call-params-preview {
	    color: var(--text-secondary);
	    opacity: 0.8;
	}
	.tool-call-chevron {
	    width: 14px;
	    height: 14px;
	    stroke: var(--text-muted);
	    transition: transform var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
	}
	.tool-call-block-realtime.expanded .tool-call-chevron {
	    transform: rotate(180deg);
	}
	.tool-call-expand {
	    display: none;
	    padding: 0 14px 14px;
	    transition: all var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
	}
	.tool-call-block-realtime.expanded .tool-call-expand {
	    display: block;
	    animation: expandSlideIn 0.3s ease-out forwards;
	}
	@keyframes expandSlideIn {
	    from {
	        opacity: 0;
	        transform: translateY(-10px);
	    }
	    to {
	        opacity: 1;
	        transform: translateY(0);
	    }
	}
	.tool-call-section {
	    margin-top: 12px;
	}
	.tool-call-block-realtime.expanded .tool-call-section {
	    animation: sectionSlideIn 0.3s ease-out forwards;
	}
	.tool-call-section:nth-child(1) {
	    animation-delay: 0.1s;
	}
	.tool-call-section:nth-child(2) {
	    animation-delay: 0.15s;
	}
	@keyframes sectionSlideIn {
	    from {
	        opacity: 0;
	        transform: translateX(-10px);
	    }
	    to {
	        opacity: 1;
	        transform: translateX(0);
	    }
	}
	.tool-call-section-title {
	    font-size: 11px;
	    font-weight: 600;
	    color: var(--text-muted);
	    text-transform: uppercase;
	    letter-spacing: 0.05em;
	    margin-bottom: 6px;
	}
	.tool-call-section-content {
	    font-size: 12px;
	    color: var(--text-secondary);
	    background: var(--bg-tertiary);
	    padding: 10px 12px;
	    border-radius: var(--radius-sm);
	    line-height: 1.5;
	    white-space: pre-wrap;
	    word-break: break-all;
	}
	.tool-call-result-content {
	    min-height: 40px;
	    display: flex;
	    align-items: center;
	}
	.tool-call-result-content.loading {
	    opacity: 0.6;
	    position: relative;
	}
	.tool-call-result-content.loading::after {
	    content: '加载中...';
	    animation: loadingDot 1.5s infinite;
	}
	@keyframes loadingDot {
	    0%, 20% {
	        content: '加载中.';
	    }
	    40% {
	        content: '加载中..';
	    }
	    60% {
	        content: '加载中...';
	    }
	    80%, 100% {
	        content: '加载中...';
	    }
	}
	.tool-call-result-content:not(.loading) {
	    animation: resultFadeIn 0.5s ease-out;
	}
	@keyframes resultFadeIn {
	    from {
	        opacity: 0;
	    }
	    to {
	        opacity: 1;
	    }
	}
	.tool-call-block-realtime.success {
	    border-left: 3px solid var(--success);
	}
	.tool-call-block-realtime.error {
	    border-left: 3px solid var(--error);
	}
	/* 代码锁定块 */
	.code-locked-block {
	    background: var(--bg-tertiary);
	    border: 2px dashed var(--border);
	    border-radius: var(--radius-md);
	    padding: 20px;
	    text-align: center;
	    margin: 16px 0;
	}
	.code-locked-header {
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    gap: 10px;
	    color: var(--text-muted);
	    font-size: 14px;
	    margin-bottom: 12px;
	}
	.code-locked-header svg {
	    width: 20px;
	    height: 20px;
	}
	.code-locked-content p {
	    font-size: 13px;
	    color: var(--text-secondary);
	    margin-bottom: 16px;
	}
	.code-locked-overlay {
	    display: flex;
	    flex-direction: column;
	    align-items: center;
	    gap: 8px;
	}
	.unlock-btn {
	    padding: 10px 24px;
	    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
	    color: white;
	    font-size: 14px;
	    font-weight: 600;
	    border-radius: var(--radius-md);
	    display: flex;
	    align-items: center;
	    gap: 8px;
	    transition: all var(--transition-normal);
	    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
	}
	.unlock-btn:hover {
	    transform: translateY(-2px);
	    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.35);
	}
	.unlock-btn svg {
	    width: 16px;
	    height: 16px;
	}
	.unlock-cost {
	    font-size: 12px;
	    color: var(--text-muted);
	}
/* 输入区域 */
.input-area {
    padding: 12px 24px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}
	.input-container {
	    display: grid;
	    grid-template-columns: minmax(110px, 180px) minmax(0, 1fr) auto;
	    align-items: end;
	    gap: 8px;
	    background: var(--bg-primary);
	    border: 1.5px solid var(--border);
	    border-radius: var(--radius-lg);
	    padding: 8px 10px;
	    transition: all var(--transition-fast);
	    min-width: 0;
	}
	/* 自定义模型选择器 */
	.model-selector-custom {
	    grid-column: 1;
	    position: relative;
	    flex-shrink: 0;
	    min-width: 0;
	    width: 100%;
	    max-width: 180px;
	}
	.model-selector-btn {
	    display: flex;
	    align-items: center;
	    gap: 6px;
	    padding: 5px 10px;
	    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
	    border: none;
	    border-radius: 6px;
	    color: white;
	    font-size: 11px;
	    font-weight: 600;
	    cursor: pointer;
	    transition: all 0.2s ease;
	    box-shadow: 0 1px 3px rgba(99, 102, 241, 0.3);
	    width: 100%;
	    min-width: 0;
	}
	.model-selector-btn:hover {
	    transform: translateY(-1px);
	    box-shadow: 0 3px 8px rgba(99, 102, 241, 0.4);
	}
	.model-selector-btn:active {
	    transform: translateY(0);
	}
	.model-icon {
	    font-size: 12px;
	    flex-shrink: 0;
	}
	.model-name {
	    min-width: 0;
	    overflow: hidden;
	    text-overflow: ellipsis;
	    white-space: nowrap;
	}
	.model-arrow {
	    width: 12px;
	    height: 12px;
	    opacity: 0.8;
	    flex-shrink: 0;
	}
	.model-dropdown {
	    position: absolute;
	    bottom: 100%;
	    left: 0;
	    margin-bottom: 8px;
	    background: var(--bg-secondary);
	    border: 1px solid var(--border);
	    border-radius: var(--radius-lg);
	    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	    min-width: 180px;
	    z-index: 1000;
	    overflow: hidden;
	    animation: dropdownSlideIn 0.2s ease;
	}
	@keyframes dropdownSlideIn {
	    from {
	        opacity: 0;
	        transform: translateY(8px);
	    }
	    to {
	        opacity: 1;
	        transform: translateY(0);
	    }
	}
	.model-dropdown-header {
	    padding: 10px 14px;
	    font-size: 11px;
	    font-weight: 600;
	    color: var(--text-muted);
	    text-transform: uppercase;
	    letter-spacing: 0.5px;
	    border-bottom: 1px solid var(--border-light);
	    background: var(--bg-tertiary);
	}
	.model-options {
	    padding: 6px;
	    max-height: 240px;
	    overflow-y: auto;
	}
	.model-option {
	    display: flex;
	    align-items: center;
	    gap: 10px;
	    padding: 10px 12px;
	    border-radius: var(--radius-md);
	    cursor: pointer;
	    transition: all var(--transition-fast);
	}
	.model-option:hover {
	    background: var(--bg-hover);
	}
	.model-option.active {
	    background: var(--primary-bg);
	}
	.model-option-icon {
	    width: 28px;
	    height: 28px;
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
	    border-radius: var(--radius-sm);
	    font-size: 14px;
	}
	.model-option-info {
	    flex: 1;
	}
	.model-option-name {
	    font-size: 13px;
	    font-weight: 500;
	    color: var(--text-primary);
	}
	.model-option-desc {
	    font-size: 11px;
	    color: var(--text-muted);
	}
	.model-option-check {
	    width: 18px;
	    height: 18px;
	    border-radius: 50%;
	    border: 2px solid var(--border);
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    transition: all var(--transition-fast);
	}
	.model-option.active .model-option-check {
	    background: var(--primary);
	    border-color: var(--primary);
	}
	.model-option.active .model-option-check svg {
	    display: block;
	}
	.model-option-check svg {
	    display: none;
	    width: 12px;
	    height: 12px;
	    stroke: white;
	    stroke-width: 3;
	}
	.input-container:focus-within {
	    border-color: var(--primary);
	    box-shadow: 0 0 0 4px var(--primary-bg);
	}
	.input-container textarea {
	    grid-column: 2;
	    flex: 1;
	    min-width: 0;
	    border: none;
	    background: none;
	    resize: none;
	    font-size: 14px;
	    color: var(--text-primary);
	    line-height: 1.4;
	    max-height: 120px;
	    padding: 7px 0;
	    width: 100%;
	}
	.input-container textarea:focus {
	    outline: none;
	}
	.input-container textarea::placeholder {
	    color: var(--text-placeholder);
	}
	.input-actions {
	    grid-column: 3;
	    display: flex;
	    align-items: center;
	    gap: 8px;
	    flex-shrink: 0;
	    margin-left: auto;
	    align-self: center;
	}
	.voice-btn, .workflow-btn, .send-btn {
	    width: 34px;
	    height: 34px;
	    border-radius: var(--radius-md);
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    transition: all var(--transition-fast);
	    flex-shrink: 0;
	}
	.voice-btn {
	    background: var(--bg-tertiary);
	    color: var(--text-muted);
	}
	.voice-btn:hover {
	    background: var(--primary-bg);
	    color: var(--primary);
	}
	.voice-btn.recording {
	    background: var(--error-bg);
	    color: var(--error);
	    animation: pulse 1.2s infinite;
	}
	.voice-btn svg {
	    width: 18px;
	    height: 18px;
	}
	.workflow-btn {
	    background: var(--bg-tertiary);
	    color: var(--text-muted);
	}
	.workflow-btn:hover {
	    background: var(--primary-bg);
	    color: var(--primary);
	}
	.workflow-btn.active {
	    background: var(--primary);
	    color: white;
	}
	.workflow-btn svg {
	    width: 20px;
	    height: 20px;
	}
	.send-btn {
	    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
	    color: white;
	    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.2);
	}
	.send-btn:hover:not(:disabled) {
	    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
	}
	.send-btn:disabled {
	    background: var(--bg-tertiary);
	    color: var(--text-muted);
	    box-shadow: none;
	    cursor: not-allowed;
	}
	.send-btn svg {
	    width: 18px;
	    height: 18px;
	}
	.input-area .input-hint {
	    text-align: center;
	    font-size: 11px;
	    color: var(--text-muted);
	    margin-top: 4px;
	}
	.input-footer {
	    display: flex;
	    align-items: center;
	    justify-content: space-between;
	    margin-top: 4px;
	}
	.token-stats {
	    display: flex;
	    align-items: center;
	    gap: 12px;
	}
	.token-stat-item {
	    display: flex;
	    align-items: center;
	    gap: 4px;
	    font-size: 11px;
	    color: var(--text-muted);
	    padding: 2px 8px;
	    background: var(--bg-tertiary);
	    border-radius: 10px;
	    transition: all var(--transition-fast);
	}
	.token-stat-item:hover {
	    background: var(--primary-bg);
	    color: var(--primary);
	}
	.token-stat-item svg {
	    opacity: 0.7;
	}
	.token-stat-item.updating {
	    animation: token-pulse 0.5s ease;
	}
	@keyframes token-pulse {
	    0% { transform: scale(1); }
	    50% { transform: scale(1.05); background: var(--primary-bg); }
	    100% { transform: scale(1); }
	}
	/* 网络错误样式 */
	.network-error-container {
	    text-align: center;
	    padding: 32px;
	    background: var(--error-bg);
	    border-radius: var(--radius-md);
	    border: 1px solid rgba(239, 68, 68, 0.2);
	}
	.network-error-icon {
	    width: 48px;
	    height: 48px;
	    margin: 0 auto 16px;
	}
	.network-error-icon svg {
	    width: 100%;
	    height: 100%;
	    stroke: var(--error);
	}
	.network-error-text {
	    font-size: 16px;
	    font-weight: 600;
	    color: var(--text-primary);
	    margin-bottom: 8px;
	}
	.network-error-detail {
	    font-size: 13px;
	    color: var(--text-muted);
	    margin-bottom: 20px;
	}
	.network-retry-btn {
	    display: inline-flex;
	    align-items: center;
	    gap: 8px;
	    padding: 10px 20px;
	    background: var(--error);
	    color: white;
	    font-size: 14px;
	    font-weight: 500;
	    border-radius: var(--radius-md);
	    transition: all var(--transition-fast);
	}
	.network-retry-btn:hover {
	    background: #dc2626;
	}
	.network-retry-btn svg {
	    width: 16px;
	    height: 16px;
	}
	/* ==================== 用户画像页面 ==================== */
	#profilePage {
	    min-height: 100vh;
	    background: var(--bg-primary);
	}
	.profile-page-container {
	    min-height: 100vh;
	    display: flex;
	    flex-direction: column;
	}
	.profile-header {
	    padding: 16px 24px;
	    background: var(--bg-secondary);
	    border-bottom: 1px solid var(--border);
	    display: flex;
	    align-items: center;
	    justify-content: space-between;
	}
	.back-btn {
	    display: flex;
	    align-items: center;
	    gap: 6px;
	    padding: 8px 12px;
	    background: var(--bg-tertiary);
	    border-radius: var(--radius-md);
	    color: var(--text-secondary);
	    font-size: 14px;
	    font-weight: 500;
	    transition: all var(--transition-fast);
	}
	.back-btn:hover {
	    background: var(--bg-hover);
	    color: var(--text-primary);
	}
	.back-btn svg {
	    width: 18px;
	    height: 18px;
	}
	.profile-header h1 {
	    font-size: 20px;
	    font-weight: 600;
	    color: var(--text-primary);
	}
	.profile-header-actions {
	    display: flex;
	    gap: 8px;
	}
	.refresh-btn {
	    padding: 8px;
	    background: var(--bg-tertiary);
	    border-radius: var(--radius-md);
	    color: var(--text-muted);
	    transition: all var(--transition-fast);
	}
	.refresh-btn:hover {
	    background: var(--primary-bg);
	    color: var(--primary);
	}
	.refresh-btn svg {
	    width: 18px;
	    height: 18px;
	}
	.profile-main {
	    flex: 1;
	    display: grid;
	    grid-template-columns: 1fr 1fr;
	    gap: 24px;
	    padding: 24px;
	    max-width: 1400px;
	    margin: 0 auto;
	    width: 100%;
	}
	.profile-left, .profile-right {
	    display: flex;
	    flex-direction: column;
	    gap: 24px;
	}
	.profile-card {
	    background: var(--bg-secondary);
	    border-radius: var(--radius-lg);
	    padding: 24px;
	    box-shadow: var(--shadow-sm);
	    border: 1px solid var(--border);
	}
	.profile-user-card {
	    display: flex;
	    align-items: flex-start;
	    gap: 18px;
	    padding: 22px;
	    background: rgba(255, 255, 255, 0.84);
	    border: 1px solid rgba(148, 163, 184, 0.2);
	    border-radius: var(--radius-xl);
	    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
	    margin-bottom: 22px;
	    backdrop-filter: blur(8px);
	}
	.profile-avatar {
	    width: 88px;
	    height: 88px;
	    border-radius: 24px;
	    overflow: hidden;
	    flex-shrink: 0;
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
	    color: #fff;
	    font-size: 32px;
	    font-weight: 800;
	}
	.profile-avatar img {
	    width: 100%;
	    height: 100%;
	    object-fit: cover;
	    display: block;
	}
	.profile-user-info {
	    min-width: 0;
	    flex: 1;
	}
	.profile-username {
	    display: flex;
	    align-items: center;
	    gap: 10px;
	    flex-wrap: wrap;
	    font-size: 24px;
	    font-weight: 800;
	    color: var(--text-primary);
	    margin-bottom: 8px;
	}
	.profile-color-badge {
	    display: inline-flex;
	    align-items: center;
	    padding: 4px 10px;
	    border-radius: 999px;
	    font-size: 12px;
	    font-weight: 700;
	    background: rgba(14, 165, 233, 0.12);
	    color: var(--primary);
	}
	.profile-uid {
	    color: var(--text-secondary);
	    font-size: 14px;
	    line-height: 1.6;
	    margin-bottom: 14px;
	    word-break: break-word;
	}
	.profile-stats-row {
	    display: grid;
	    grid-template-columns: repeat(4, minmax(0, 1fr));
	    gap: 12px;
	}
	.profile-stat-item {
	    padding: 12px 14px;
	    border-radius: var(--radius-lg);
	    background: rgba(14, 165, 233, 0.08);
	    border: 1px solid rgba(14, 165, 233, 0.12);
	    min-width: 0;
	}
	.profile-stat-item span {
	    display: block;
	    font-size: 12px;
	    color: var(--text-secondary);
	    margin-bottom: 6px;
	}
	.profile-stat-item strong {
	    font-size: 18px;
	    color: var(--text-primary);
	}
	.analysis-section {
	    background: rgba(255, 255, 255, 0.84);
	    border: 1px solid rgba(148, 163, 184, 0.2);
	    border-radius: var(--radius-xl);
	    padding: 22px;
	    margin-bottom: 22px;
	    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
	}
	.analysis-section-title {
	    display: flex;
	    align-items: center;
	    gap: 10px;
	    font-size: 18px;
	    font-weight: 700;
	    color: var(--text-primary);
	    margin-bottom: 16px;
	}
	.analysis-section-title svg {
	    width: 18px;
	    height: 18px;
	    stroke: var(--primary);
	    flex-shrink: 0;
	}
	.contest-stats,
	.rating-summary {
	    display: grid;
	    grid-template-columns: repeat(2, minmax(0, 1fr));
	    gap: 12px;
	}
	.contest-stat-card,
	.rating-summary-item {
	    padding: 14px 16px;
	    border-radius: var(--radius-lg);
	    background: var(--bg-tertiary);
	    min-width: 0;
	}
	.contest-stat-value {
	    font-size: 22px;
	    font-weight: 800;
	    color: var(--text-primary);
	}
	.contest-stat-label {
	    margin-top: 4px;
	    font-size: 12px;
	    color: var(--text-secondary);
	}
	.difficulty-chart,
	.assessment-details,
	.awards-list {
	    display: flex;
	    flex-direction: column;
	    gap: 12px;
	}
	.assessment-card {
	    display: flex;
	    flex-direction: column;
	    gap: 16px;
	}
	.assessment-level-badge {
	    display: inline-flex;
	    padding: 8px 14px;
	    border-radius: 999px;
	    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
	    color: #fff;
	    font-weight: 700;
	}
	.assessment-list {
	    padding: 16px;
	    border-radius: var(--radius-lg);
	    background: var(--bg-tertiary);
	}
	.assessment-list h4 {
	    margin-bottom: 10px;
	    font-size: 14px;
	}
	.assessment-list ul {
	    padding-left: 18px;
	    color: var(--text-secondary);
	}
	.assessment-list li + li {
	    margin-top: 6px;
	}
	.profile-refresh-btn {
	    width: 100%;
	    display: inline-flex;
	    align-items: center;
	    justify-content: center;
	    gap: 10px;
	    padding: 14px 18px;
	    border-radius: var(--radius-lg);
	    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
	    color: #fff;
	    font-weight: 700;
	    box-shadow: 0 12px 28px rgba(8, 145, 178, 0.22);
	}
	.profile-refresh-btn svg {
	    width: 18px;
	    height: 18px;
	}
	.profile-card h3 {
	    display: flex;
	    align-items: center;
	    gap: 10px;
	    font-size: 15px;
	    font-weight: 600;
	    color: var(--text-primary);
	    margin-bottom: 20px;
	    padding-bottom: 12px;
	    border-bottom: 1px solid var(--border-light);
	}
	.profile-card h3 svg {
	    width: 18px;
	    height: 18px;
	    stroke: var(--primary);
	}
	/* 用户信息卡片 */
	.user-basic {
	    display: flex;
	    align-items: center;
	    gap: 20px;
	    margin-bottom: 24px;
	}
	.user-avatar-large {
	    width: 72px;
	    height: 72px;
	    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
	    border-radius: 50%;
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    color: white;
	    font-size: 28px;
	    font-weight: 700;
	    box-shadow: 0 8px 24px rgba(8, 145, 178, 0.25);
	}
	.user-details h2 {
	    font-size: 22px;
	    font-weight: 700;
	    color: var(--text-primary);
	    margin-bottom: 6px;
	}
	.luogu-bindinfo {
	    font-size: 13px;
	    color: var(--text-muted);
	}
	.user-stats {
	    display: grid;
	    grid-template-columns: repeat(3, 1fr);
	    gap: 16px;
	}
	.appearance-actions {
	    display: flex;
	    flex-wrap: wrap;
	    gap: 10px;
	    margin-bottom: 18px;
	}
	.appearance-setting {
	    display: flex;
	    flex-direction: column;
	    gap: 8px;
	    margin-bottom: 16px;
	}
	.appearance-setting label {
	    font-size: 13px;
	    font-weight: 600;
	    color: var(--text-secondary);
	}
	.appearance-setting select {
	    width: 100%;
	    padding: 12px 14px;
	    border: 1px solid var(--border);
	    border-radius: var(--radius-md);
	    background: var(--bg-primary);
	    color: var(--text-primary);
	}
	.appearance-setting select:focus {
	    outline: none;
	    border-color: var(--primary);
	    box-shadow: 0 0 0 3px var(--primary-bg);
	}
	.stat-item {
	    text-align: center;
	    padding: 16px;
	    background: var(--bg-tertiary);
	    border-radius: var(--radius-md);
	}
	.stat-value {
	    display: block;
	    font-size: 24px;
	    font-weight: 700;
	    color: var(--primary);
	    margin-bottom: 4px;
	}
	.stat-label {
	    font-size: 12px;
	    color: var(--text-muted);
	}
	/* 洛谷账号卡片 */
	.luogu-status {
	    margin-bottom: 16px;
	}
	.status-row {
	    display: flex;
	    justify-content: space-between;
	    padding: 10px 0;
	    border-bottom: 1px solid var(--border-light);
	    font-size: 14px;
	}
	.status-row:last-child {
	    border-bottom: none;
	}
	.status-row span:first-child {
	    color: var(--text-muted);
	}
	.status-value {
	    font-weight: 500;
	}
	.status-value.bound {
	    color: var(--success);
	}
	.status-value.unbound {
	    color: var(--text-muted);
	}
	.luogu-actions {
	    display: flex;
	    gap: 10px;
	    margin-bottom: 12px;
	}
	.btn-small {
	    padding: 8px 16px;
	    background: var(--bg-tertiary);
	    border-radius: var(--radius-sm);
	    font-size: 13px;
	    font-weight: 500;
	    color: var(--text-primary);
	    transition: all var(--transition-fast);
	}
	.btn-small:hover {
	    background: var(--bg-hover);
	}
	.luogu-hint {
	    font-size: 12px;
	    color: var(--text-muted);
	}
	/* 模型选择 */
	.model-selector {
	    margin-bottom: 12px;
	}
	.model-selector select {
	    width: 100%;
	    padding: 12px 16px;
	    border: 1px solid var(--border);
	    border-radius: var(--radius-md);
	    background: var(--bg-primary);
	    color: var(--text-primary);
	    font-size: 14px;
	    cursor: pointer;
	    transition: all var(--transition-fast);
	}
	.model-selector select:hover {
	    border-color: var(--primary);
	}
	.model-selector select:focus {
	    outline: none;
	    border-color: var(--primary);
	    box-shadow: 0 0 0 3px var(--primary-bg);
	}
	.model-hint {
	    font-size: 12px;
	    color: var(--text-muted);
	}
	/* 邀请码获取 */
	.invite-input-group {
	    display: flex;
	    gap: 8px;
	    margin-bottom: 12px;
	}
	.invite-input-group input {
	    flex: 1;
	    padding: 10px 14px;
	    border: 1px solid var(--border);
	    border-radius: var(--radius-md);
	    background: var(--bg-primary);
	    color: var(--text-primary);
	    font-size: 13px;
	}
	.invite-input-group input:focus {
	    outline: none;
	    border-color: var(--primary);
	}
	.invite-result {
	    padding: 12px;
	    background: var(--bg-tertiary);
	    border-radius: var(--radius-md);
	    margin-bottom: 10px;
	    font-family: monospace;
	    font-size: 14px;
	    color: var(--accent);
	    word-break: break-all;
	    min-height: 20px;
	}
	.invite-result.error {
	    color: var(--error);
	}
	.invite-result.success {
	    color: #10b981;
	}
	.invite-hint {
	    font-size: 12px;
	    color: var(--text-muted);
	}
	/* 做题记录 */
	.problem-count {
	    margin-left: auto;
	    font-size: 12px;
	    background: var(--primary-bg);
	    padding: 2px 10px;
	    border-radius: 10px;
	    color: var(--primary);
	    font-weight: 600;
	}
	.problems-filter {
	    margin-bottom: 16px;
	}
	.problems-filter select {
	    padding: 8px 12px;
	    border: 1px solid var(--border);
	    border-radius: var(--radius-sm);
	    background: var(--bg-secondary);
	    color: var(--text-primary);
	    font-size: 13px;
	}
	.problems-list {
	    max-height: 300px;
	    overflow-y: auto;
	}
	.problem-group {
	    margin-bottom: 12px;
	}
	.problem-group-header {
	    display: flex;
	    align-items: center;
	    gap: 10px;
	    padding: 10px 12px;
	    background: var(--bg-tertiary);
	    border-radius: var(--radius-sm);
	    cursor: pointer;
	    transition: background var(--transition-fast);
	}
	.problem-group-header:hover {
	    background: var(--bg-hover);
	}
	.group-color {
	    width: 8px;
	    height: 8px;
	    border-radius: 50%;
	}
	.group-name {
	    flex: 1;
	    font-size: 13px;
	    font-weight: 500;
	    color: var(--text-primary);
	}
	.group-count {
	    font-size: 12px;
	    color: var(--text-muted);
	}
	.group-arrow {
	    width: 14px;
	    height: 14px;
	    stroke: var(--text-muted);
	    transition: transform var(--transition-fast);
	}
	.problem-group.collapsed .group-arrow {
	    transform: rotate(-90deg);
	}
	.problem-group-content {
	    display: flex;
	    flex-wrap: wrap;
	    gap: 6px;
	    padding: 12px 0 0 12px;
	}
	.problem-group.collapsed .problem-group-content {
	    display: none;
	}
	.problem-tag {
	    padding: 4px 10px;
	    background: var(--bg-tertiary);
	    border-radius: 4px;
	    font-size: 12px;
	    font-family: 'JetBrains Mono', monospace;
	    color: var(--text-primary);
	    cursor: pointer;
	    transition: all var(--transition-fast);
	}
	.problem-tag:hover {
	    background: var(--primary-bg);
	    color: var(--primary);
	}
	.loading-placeholder {
	    text-align: center;
	    padding: 40px;
	    color: var(--text-muted);
	    font-size: 14px;
	}
	.no-data {
	    text-align: center;
	    padding: 24px;
	    color: var(--text-muted);
	    font-size: 13px;
	}
	/* 比赛成绩 */
	.oierdb-search {
	    display: flex;
	    gap: 8px;
	    margin-bottom: 16px;
	}
	.oierdb-search input {
	    flex: 1;
	    padding: 10px 14px;
	    border: 1px solid var(--border);
	    border-radius: var(--radius-sm);
	    font-size: 14px;
	    color: var(--text-primary);
	    background: var(--bg-secondary);
	}
	.oierdb-search input:focus {
	    outline: none;
	    border-color: var(--primary);
	}
	.oierdb-result {
	    margin-bottom: 16px;
	}
	.oier-item {
	    padding: 12px;
	    background: var(--bg-tertiary);
	    border-radius: var(--radius-sm);
	    margin-bottom: 8px;
	}
	.oier-name {
	    font-weight: 600;
	    color: var(--text-primary);
	    margin-bottom: 4px;
	}
	.oier-record {
	    font-size: 12px;
	    color: var(--text-secondary);
	    margin-top: 2px;
	}
	.contest-scores {
	    display: flex;
	    flex-direction: column;
	    gap: 8px;
	}
	.contest-score-item {
	    display: flex;
	    justify-content: space-between;
	    align-items: center;
	    padding: 12px;
	    background: var(--bg-tertiary);
	    border-radius: var(--radius-sm);
	}
	.contest-name {
	    font-size: 14px;
	    font-weight: 500;
	    color: var(--text-primary);
	}
	.contest-score {
	    font-size: 13px;
	    color: var(--primary);
	    font-weight: 600;
	}
	/* Rating 图表 */
	.rating-chart-container {
	    height: 200px;
	    margin-bottom: 16px;
	}
	.rating-summary {
	    display: grid;
	    grid-template-columns: 1fr 1fr;
	    gap: 12px;
	}
	.rating-item {
	    text-align: center;
	    padding: 12px;
	    background: var(--bg-tertiary);
	    border-radius: var(--radius-sm);
	}
	.rating-label {
	    display: block;
	    font-size: 12px;
	    color: var(--text-muted);
	    margin-bottom: 4px;
	}
	.rating-value {
	    font-size: 20px;
	    font-weight: 700;
	    color: var(--primary);
	}
	/* 快捷操作 */
	.quick-actions {
	    display: flex;
	    flex-direction: column;
	    gap: 10px;
	}
	.quick-action-btn {
	    display: flex;
	    align-items: center;
	    gap: 10px;
	    padding: 12px 16px;
	    background: var(--bg-tertiary);
	    border-radius: var(--radius-md);
	    font-size: 14px;
	    font-weight: 500;
	    color: var(--text-primary);
	    transition: all var(--transition-fast);
	}
	.quick-action-btn:hover {
	    background: var(--primary-bg);
	    color: var(--primary);
	}
	.quick-action-btn svg {
	    width: 18px;
	    height: 18px;
	}
	/* ==================== 深度研究页面 ==================== */
	#researchPage {
	    min-height: 100vh;
	    background: var(--bg-primary);
	}
	.research-page-container {
	    min-height: 100vh;
	    display: flex;
	    flex-direction: column;
	}
	.research-header {
	    padding: 16px 24px;
	    background: var(--bg-secondary);
	    border-bottom: 1px solid var(--border);
	    display: flex;
	    align-items: center;
	    gap: 24px;
	}
	.research-title-area {
	    flex: 1;
	}
	.research-title-area h1 {
	    font-size: 18px;
	    font-weight: 600;
	    color: var(--text-primary);
	    margin-bottom: 4px;
	}
	.research-problem-preview {
	    font-size: 13px;
	    color: var(--text-muted);
	    display: block;
	    white-space: nowrap;
	    overflow: hidden;
	    text-overflow: ellipsis;
	    max-width: 500px;
	}
	.research-status {
	    display: flex;
	    align-items: center;
	    gap: 8px;
	    font-size: 13px;
	    color: var(--text-secondary);
	}
	.status-dot {
	    width: 8px;
	    height: 8px;
	    background: var(--primary);
	    border-radius: 50%;
	    animation: pulse-dot 1.5s ease-in-out infinite;
	}
	@keyframes pulse-dot {
	    0%, 100% { opacity: 1; }
	    50% { opacity: 0.5; }
	}
	.research-main {
	    flex: 1;
	    padding: 32px;
	    overflow: auto;
	}
	.workflow-tree-container {
	    display: flex;
	    flex-direction: column;
	    gap: 24px;
	}
	.tree-level {
	    display: flex;
	    flex-wrap: wrap;
	    gap: 20px;
	    justify-content: center;
	}
	.tree-node-wrapper {
	    flex: 0 0 auto;
	}
	.tree-node-card {
	    width: 280px;
	    background: var(--bg-secondary);
	    border: 2px solid var(--border);
	    border-radius: var(--radius-lg);
	    padding: 20px;
	    cursor: pointer;
	    transition: all var(--transition-normal);
	    box-shadow: var(--shadow-sm);
	}
	.tree-node-card:hover {
	    border-color: var(--primary);
	    transform: translateY(-4px);
	    box-shadow: var(--shadow-md);
	}
	.tree-node-card.root {
	    border-color: var(--primary);
	    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--bg-secondary) 100%);
	}
	.tree-node-card.active-node {
	    border-color: var(--primary);
	    box-shadow: 0 0 0 4px var(--primary-bg);
	}
	.tree-node-card.status-completed {
	    border-left: 4px solid var(--success);
	}
	.tree-node-card.status-thinking {
	    border-left: 4px solid var(--primary);
	}
	.tree-node-card.status-failed {
	    border-left: 4px solid var(--error);
	}
	.node-header {
	    display: flex;
	    justify-content: space-between;
	    align-items: flex-start;
	    margin-bottom: 12px;
	}
	.node-title {
	    font-size: 15px;
	    font-weight: 600;
	    color: var(--text-primary);
	    flex: 1;
	    margin-right: 8px;
	}
	.node-status-icon {
	    width: 22px;
	    height: 22px;
	    background: var(--bg-tertiary);
	    border-radius: 50%;
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    font-size: 12px;
	    color: var(--text-muted);
	}
	.tree-node-card.status-completed .node-status-icon {
	    background: var(--success);
	    color: white;
	}
	.tree-node-card.status-thinking .node-status-icon {
	    background: var(--primary);
	    color: white;
	    animation: spin 1s linear infinite;
	}
	.tree-node-card.status-failed .node-status-icon {
	    background: var(--error);
	    color: white;
	}
	.node-preview {
	    font-size: 13px;
	    color: var(--text-secondary);
	    line-height: 1.5;
	    margin-bottom: 12px;
	    display: -webkit-box;
	    -webkit-line-clamp: 2;
	    -webkit-box-orient: vertical;
	    overflow: hidden;
	}
	.node-meta {
	    display: flex;
	    justify-content: space-between;
	    align-items: center;
	    font-size: 12px;
	    color: var(--text-muted);
	}
	.view-btn {
	    color: var(--primary);
	    font-weight: 500;
	}
	/* 节点聊天弹窗 */
	.node-chat-modal {
	    position: fixed;
	    inset: 0;
	    background: rgba(0, 0, 0, 0.4);
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    z-index: 1000;
	    backdrop-filter: blur(4px);
	}
	.node-chat-container {
	    width: 90%;
	    max-width: 700px;
	    max-height: 80vh;
	    background: var(--bg-secondary);
	    border-radius: var(--radius-xl);
	    display: flex;
	    flex-direction: column;
	    box-shadow: var(--shadow-xl);
	}
	.node-chat-header {
	    padding: 20px 24px;
	    border-bottom: 1px solid var(--border);
	    display: flex;
	    align-items: center;
	    justify-content: space-between;
	}
	.node-chat-title {
	    display: flex;
	    align-items: center;
	    gap: 12px;
	}
	.node-type-badge {
	    padding: 4px 10px;
	    background: var(--primary-bg);
	    border-radius: 12px;
	    font-size: 11px;
	    font-weight: 600;
	    color: var(--primary);
	    text-transform: uppercase;
	    letter-spacing: 0.05em;
	}
	.node-chat-title h3 {
	    font-size: 18px;
	    font-weight: 600;
	    color: var(--text-primary);
	}
	.node-chat-actions {
	    display: flex;
	    align-items: center;
	    gap: 12px;
	}
	.node-status-badge {
	    padding: 4px 12px;
	    background: var(--bg-tertiary);
	    border-radius: 12px;
	    font-size: 12px;
	    font-weight: 500;
	    color: var(--text-secondary);
	}
	.node-status-badge.completed {
	    background: var(--success-bg);
	    color: var(--success);
	}
	.node-status-badge.thinking {
	    background: var(--primary-bg);
	    color: var(--primary);
	}
	.close-btn {
	    padding: 8px;
	    background: var(--bg-tertiary);
	    border-radius: var(--radius-sm);
	    color: var(--text-muted);
	    transition: all var(--transition-fast);
	}
	.close-btn:hover {
	    background: var(--error-bg);
	    color: var(--error);
	}
	.close-btn svg {
	    width: 18px;
	    height: 18px;
	}
	.node-chat-body {
	    flex: 1;
	    overflow-y: auto;
	    padding: 24px;
	    display: flex;
	    flex-direction: column;
	    gap: 20px;
	}
	.chat-message {
	    display: flex;
	    gap: 14px;
	}
	.message-avatar {
	    width: 36px;
	    height: 36px;
	    border-radius: 50%;
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    font-weight: 600;
	    font-size: 14px;
	    flex-shrink: 0;
	}
	.user-context .message-avatar {
	    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
	    color: white;
	}
	.ai-solver .message-avatar {
	    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
	    color: white;
	}
	.message-content-wrapper {
	    flex: 1;
	    min-width: 0;
	}
	.message-sender {
	    font-size: 12px;
	    font-weight: 600;
	    color: var(--text-muted);
	    margin-bottom: 6px;
	}
	.message-bubble {
	    background: var(--bg-tertiary);
	    border-radius: var(--radius-md);
	    padding: 16px;
	    font-size: 14px;
	    color: var(--text-primary);
	    line-height: 1.7;
	}
	.thinking-process {
	    background: var(--warning-bg);
	    border-left: 3px solid var(--warning);
	    padding: 14px;
	    margin-bottom: 12px;
	    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	    font-size: 13px;
	    color: var(--text-secondary);
	}
	.final-answer {
	    font-size: 14px;
	    color: var(--text-primary);
	}
	.node-chat-footer {
	    padding: 16px 24px;
	    border-top: 1px solid var(--border);
	}
	.chat-status-bar {
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    gap: 8px;
	    font-size: 13px;
	    color: var(--text-muted);
	}
	/* ==================== 小型弹窗 ==================== */
	.mini-modal-overlay {
	    position: fixed;
	    inset: 0;
	    background: rgba(0, 0, 0, 0.4);
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    z-index: 1000;
	    backdrop-filter: blur(4px);
	}
	.mini-modal {
	    width: 90%;
	    max-width: 420px;
	    background: var(--bg-secondary);
	    border-radius: var(--radius-xl);
	    padding: 28px;
	    box-shadow: var(--shadow-xl);
	}
	.mini-modal h3 {
	    font-size: 18px;
	    font-weight: 600;
	    color: var(--text-primary);
	    margin-bottom: 20px;
	    text-align: center;
	}
	.mini-modal .form-group {
	    margin-bottom: 20px;
	}
	.mini-modal .form-group label {
	    display: block;
	    font-size: 13px;
	    font-weight: 500;
	    color: var(--text-secondary);
	    margin-bottom: 8px;
	}
	.mini-modal input,
	.mini-modal textarea {
	    width: 100%;
	    padding: 12px 14px;
	    border: 1px solid var(--border);
	    border-radius: var(--radius-md);
	    font-size: 14px;
	    color: var(--text-primary);
	    background: var(--bg-secondary);
	}
	.mini-modal input:focus,
	.mini-modal textarea:focus {
	    outline: none;
	    border-color: var(--primary);
	}
	.mini-modal small {
	    display: block;
	    margin-top: 6px;
	    font-size: 12px;
	    color: var(--text-muted);
	}
	.mini-modal-actions {
	    display: flex;
	    gap: 10px;
	    justify-content: flex-end;
	}
	.cookie-hint {
	    font-size: 13px;
	    color: var(--text-secondary);
	    margin-bottom: 12px;
	}
	.cookie-steps {
	    font-size: 12px;
	    color: var(--text-secondary);
	    margin-bottom: 16px;
	    padding-left: 20px;
	}
	.cookie-steps li {
	    margin-bottom: 4px;
	}
	.cookie-modal {
	    max-width: 500px;
	}
	.contest-modal {
	    max-width: 520px;
	}
	.contest-form {
	    max-height: 400px;
	    overflow-y: auto;
	}
	.contest-section {
	    padding: 16px;
	    background: var(--bg-tertiary);
	    border-radius: var(--radius-md);
	    margin-bottom: 12px;
	}
	.contest-section-title {
	    font-size: 14px;
	    font-weight: 600;
	    color: var(--text-primary);
	    margin-bottom: 12px;
	}
	.contest-row {
	    display: flex;
	    gap: 12px;
	}
	.contest-field {
	    flex: 1;
	}
	.contest-field label {
	    display: block;
	    font-size: 12px;
	    color: var(--text-muted);
	    margin-bottom: 4px;
	}
	.contest-field input,
	.contest-field select {
	    width: 100%;
	    padding: 8px 10px;
	    border: 1px solid var(--border);
	    border-radius: var(--radius-sm);
	    font-size: 13px;
	    background: var(--bg-secondary);
	    color: var(--text-primary);
	}
	/* ==================== KaTeX 样式覆盖 ==================== */
	.katex-block {
	    overflow-x: auto;
	    padding: 12px 0;
	}
	.katex {
	    font-size: 1.1em;
	}
	/* ==================== 滚动条样式 ==================== */
	::-webkit-scrollbar {
	    width: 6px;
	    height: 6px;
	}
	::-webkit-scrollbar-track {
	    background: transparent;
	}
	::-webkit-scrollbar-thumb {
	    background: var(--border);
	    border-radius: 3px;
	}
	::-webkit-scrollbar-thumb:hover {
	    background: var(--text-muted);
	}
/* ==================== 响应式设计 ==================== */
@media (max-width: 1024px) {
    .profile-main {
        grid-template-columns: 1fr;
    }
    .register-side-section {
        display: none;
    }
}
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    .app-container {
        flex-direction: column !important;
    }
    .sidebar {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        right: auto !important;
        bottom: auto !important;
        width: 260px !important;
        height: 100vh !important;
        max-height: 100vh !important;
        min-height: 100vh !important;
        padding: 0 !important;
        margin: 0 !important;
        border-right: 1px solid var(--border) !important;
        border-bottom: none !important;
        display: flex !important;
        flex-direction: column !important;
        flex-shrink: 0 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease !important;
        z-index: 1000 !important;
        background: var(--bg-secondary) !important;
        box-sizing: border-box !important;
    }
    .sidebar.open {
        transform: translateX(0) !important;
    }
    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    .sidebar-overlay.open {
        opacity: 1;
        pointer-events: auto;
    }
    .sidebar-header {
        padding: 20px 16px;
        margin: 0;
        border-bottom: 1px solid var(--border-light);
    }
    .sidebar-header span {
        display: inline;
    }
    .sidebar-header .logo-small {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    .new-chat-btn {
        padding: 14px 18px;
        font-size: 14px;
        flex: 0 0 auto;
        margin: 16px;
    }
    .new-chat-btn svg {
        width: 18px;
        height: 18px;
    }
    .new-chat-btn span {
        display: inline;
    }
    .profile-btn {
        display: flex;
        margin: 0 16px 16px 16px;
    }
    .conversations-list {
        display: block !important;
        flex: 1 !important;
        overflow-y: auto !important;
        max-height: none !important;
        padding: 8px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .conv-item {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        padding: 12px !important;
        border-radius: var(--radius-md) !important;
        cursor: pointer !important;
        transition: background var(--transition-fast) !important;
        margin-bottom: 4px !important;
        background: transparent !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .conv-item-content {
        flex: 1 !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }
    .conv-item-title-row {
        min-width: 0 !important;
    }
    .conv-item-title {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    .conv-item:active {
        background: var(--bg-tertiary);
    }
    .conv-item.active {
        background: var(--primary-bg);
    }
    .conv-item-pin,
    .conv-item-delete {
        opacity: 0.6;
        padding: 8px;
        flex-shrink: 0;
    }
    .conv-item:active .conv-item-pin,
    .conv-item:active .conv-item-delete {
        opacity: 1;
    }
    .sidebar-footer {
        display: flex;
        padding: 16px;
        border-top: 1px solid var(--border);
    }
    .sidebar-footer .user-info span {
        display: inline;
    }
    .logout-btn {
        width: 36px;
        height: 36px;
        padding: 0;
    }
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        position: relative;
        z-index: 1;
    }
    .mobile-menu-btn {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        color: var(--text-primary);
        border-radius: var(--radius-md);
        transition: all var(--transition-fast);
    }
    .mobile-menu-btn:hover {
        background: var(--bg-hover);
    }
    .mobile-menu-btn svg {
        width: 24px;
        height: 24px;
    }
    .mobile-title {
        flex: 1;
        text-align: center;
        font-size: 16px;
        font-weight: 600;
        color: var(--text-primary);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 0 12px;
    }
    .mobile-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .chat-header {
        display: none;
    }
    .chat-messages {
        padding-top: 16px;
        padding-left: 16px;
        padding-right: 16px;
    }
    .message {
        max-width: 100%;
    }
    .message.user {
        max-width: 90%;
    }
    .message.assistant {
        max-width: 95%;
    }
    .input-area {
        padding: 12px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
    }
    .input-container {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "model model"
            "input actions";
        gap: 8px;
        align-items: stretch;
    }
    .model-selector-custom {
        grid-area: model;
        max-width: none;
    }
    .input-actions {
        gap: 6px;
        grid-area: actions;
        margin-left: 0;
        align-self: end;
    }
    .input-container textarea {
        grid-area: input;
        padding: 12px 14px;
        font-size: 14px;
        min-height: 44px;
    }
    .send-btn {
        width: 40px;
        height: 40px;
    }
    .workflow-btn {
        width: 40px;
        height: 40px;
    }
    .feature-cards {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 0 8px;
    }
    .appearance-actions {
        flex-direction: column;
    }
    .appearance-actions .btn-small {
        width: 100%;
        text-align: center;
    }
    .feature-card {
        padding: 12px 14px;
    }
    .welcome-message {
        padding: 24px 16px;
        gap: 24px;
    }
    .welcome-message h3 {
        font-size: 20px;
    }
    .welcome-message > p {
        font-size: 14px;
    }
    .tree-node-card {
        width: 100%;
    }
    .btn-group.three {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .btn-group.three .btn-ghost {
        grid-column: span 2;
    }
    .chat-header {
        padding: 12px 16px;
    }
    .chat-title-wrapper {
        flex: 1;
        min-width: 0;
    }
    .chat-title-wrapper h2 {
        font-size: 16px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .edit-title-btn {
        display: none;
    }
    .header-right {
        gap: 8px;
    }
    .points-display {
        padding: 4px 10px;
    }
    .points-value {
        font-size: 13px;
    }
    .input-hint {
        font-size: 11px;
    }
    .profile-main {
        padding: 14px;
        gap: 14px;
    }
    .profile-card,
    .analysis-section,
    .profile-user-card {
        padding: 16px;
        border-radius: 18px;
    }
    .profile-user-card {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }
    .profile-avatar {
        width: 72px;
        height: 72px;
        border-radius: 20px;
        font-size: 26px;
    }
    .profile-username {
        font-size: 20px;
    }
    .profile-stats-row,
    .contest-stats,
    .rating-summary {
        grid-template-columns: 1fr 1fr;
    }
    .contest-row {
        flex-direction: column;
        gap: 10px;
    }
    .rating-chart-container {
        height: 180px;
    }
    .status-row {
        gap: 10px;
        align-items: flex-start;
    }
    .status-row span:last-child {
        text-align: right;
        word-break: break-word;
    }
    .code-block-wrapper {
        margin: 10px 0;
        border-radius: 12px;
        max-width: 100%;
    }
    .code-block-wrapper pre {
        margin: 0;
        padding: 12px 10px 10px;
        font-size: 11.5px;
        line-height: 1.55;
    }
    .code-block-wrapper code {
        font-size: 11.5px;
        line-height: 1.55;
    }
    .code-copy-btn {
        top: 6px;
        right: 6px;
        padding: 4px 8px;
        font-size: 11px;
    }
    .message-bubble {
        padding: 10px;
        font-size: 14px;
    }
}
@media (max-width: 480px) {
    html {
        font-size: 13px;
    }
    .sidebar {
        width: 260px !important;
        height: 100vh !important;
        max-height: 100vh !important;
        min-height: 100vh !important;
        padding: 0 !important;
    }
    .new-chat-btn {
        width: calc(100% - 32px);
        padding: 12px 16px;
        font-size: 13px;
    }
    .new-chat-btn span {
        display: inline;
    }
    .chat-messages {
        padding-top: 12px;
        padding-left: 12px;
        padding-right: 12px;
    }
    .input-area {
        padding: 10px;
    }
    .model-selector-custom {
        max-width: none;
    }
    .input-container textarea {
        padding: 10px 12px;
        font-size: 13px;
    }
    .voice-btn,
    .workflow-btn,
    .send-btn {
        width: 40px;
        height: 40px;
    }
    .profile-main {
        padding: 12px;
    }
    .profile-stats-row,
    .contest-stats,
    .rating-summary {
        grid-template-columns: 1fr;
    }
    .profile-uid {
        font-size: 13px;
    }
    .profile-stat-item strong {
        font-size: 16px;
    }
    .feature-cards {
        gap: 8px;
    }
    .feature-card {
        padding: 10px 12px;
        font-size: 13px;
    }
    .feature-icon {
        font-size: 18px;
    }
    .welcome-icon {
        width: 60px;
        height: 60px;
    }
    .code-block-wrapper {
        margin: 8px 0;
        border-radius: 10px;
    }
    .code-block-wrapper pre {
        padding: 10px 8px 8px;
        font-size: 10.5px;
        line-height: 1.5;
    }
    .code-block-wrapper code {
        font-size: 10.5px;
        line-height: 1.5;
    }
    .code-copy-btn {
        top: 5px;
        right: 5px;
        padding: 4px 7px;
        font-size: 10px;
    }
    .message-bubble {
        padding: 9px;
    }
}
	/* ==================== 动画辅助 ==================== */
	@keyframes fadeIn {
	    from { opacity: 0; }
	    to { opacity: 1; }
	}
	@keyframes slideUp {
	    from { 
	        opacity: 0;
	        transform: translateY(20px);
	    }
	    to {
	        opacity: 1;
	        transform: translateY(0);
	    }
	}
	.fade-in {
	    animation: fadeIn 0.3s ease;
	}
	.slide-up {
	    animation: slideUp 0.4s ease;
	}
	/* 加载动画 */
	.loading-spinner {
	    width: 32px;
	    height: 32px;
	    border: 3px solid var(--border);
	    border-top-color: var(--primary);
	    border-radius: 50%;
	    animation: spin 0.8s linear infinite;
	    margin: 0 auto;
	}
	.profile-loading {
	    text-align: center;
	    padding: 60px 20px;
	}
	.loading-text {
	    margin-top: 16px;
	    color: var(--text-muted);
	    font-size: 14px;
	}

	/* ==================== 聊天室 ==================== */
	.chatroom-fab {
	    position: fixed;
	    bottom: 90px;
	    right: 24px;
	    width: 50px;
	    height: 50px;
	    border-radius: 50%;
	    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
	    color: white;
	    border: none;
	    cursor: pointer;
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    box-shadow: 0 4px 16px rgba(8, 145, 178, 0.35);
	    z-index: 900;
	    transition: all var(--transition-fast);
	}
	.chatroom-fab:hover {
	    transform: scale(1.1);
	    box-shadow: 0 6px 24px rgba(8, 145, 178, 0.45);
	}
	.chatroom-fab svg {
	    width: 22px;
	    height: 22px;
	}
	/* 口令弹窗 */
	.chatroom-pass-overlay {
	    position: fixed;
	    inset: 0;
	    background: rgba(0, 0, 0, 0.4);
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    z-index: 1100;
	    backdrop-filter: blur(4px);
	}
	.chatroom-pass-overlay.hidden { display: none; }
	/* 聊天室面板 - 全屏 */
	.chatroom-panel {
	    position: fixed;
	    inset: 0;
	    background: var(--bg-primary);
	    display: flex;
	    flex-direction: column;
	    z-index: 1000;
	    animation: chatroom-fade-in 0.2s ease;
	}
	.chatroom-panel.hidden { display: none; }
	@keyframes chatroom-fade-in {
	    from { opacity: 0; }
	    to { opacity: 1; }
	}
	.chatroom-header {
	    display: flex;
	    align-items: center;
	    justify-content: space-between;
	    padding: 14px 24px;
	    background: var(--bg-secondary);
	    border-bottom: 1px solid var(--border);
	    flex-shrink: 0;
	}
	.chatroom-title {
	    display: flex;
	    align-items: center;
	    gap: 10px;
	    font-size: 16px;
	    font-weight: 600;
	    color: var(--text-primary);
	}
	.chatroom-online-count {
	    font-size: 12px;
	    font-weight: 400;
	    color: var(--success);
	    background: var(--success-bg);
	    padding: 2px 10px;
	    border-radius: 10px;
	}
	.chatroom-close-btn {
	    width: 34px;
	    height: 34px;
	    border-radius: 50%;
	    border: none;
	    background: transparent;
	    color: var(--text-muted);
	    cursor: pointer;
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    transition: all var(--transition-fast);
	}
	.chatroom-close-btn:hover {
	    background: var(--bg-hover);
	    color: var(--text-primary);
	}
	/* 消息区 */
	.chatroom-messages {
	    flex: 1;
	    overflow-y: auto;
	    overflow-x: hidden;
	    padding: 20px 24px;
	    display: flex;
	    flex-direction: column;
	    gap: 10px;
	    min-height: 0;
	}
	.cr-msg {
	    display: flex;
	    flex-direction: column;
	    max-width: 65%;
	    gap: 3px;
	}
	.cr-msg.self {
	    align-self: flex-end;
	}
	.cr-msg.other {
	    align-self: flex-start;
	}
	.cr-msg-sender {
	    font-size: 12px;
	    color: var(--text-muted);
	    padding: 0 6px;
	}
	.cr-msg.self .cr-msg-sender {
	    text-align: right;
	}
	.cr-msg-bubble {
	    padding: 10px 14px;
	    border-radius: var(--radius-lg);
	    font-size: 14px;
	    line-height: 1.6;
	    word-break: break-word;
	}
	.cr-msg.other .cr-msg-bubble {
	    background: var(--bg-secondary);
	    color: var(--text-primary);
	    border: 1px solid var(--border);
	    border-bottom-left-radius: 4px;
	}
	.cr-msg.self .cr-msg-bubble {
	    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
	    color: white;
	    border-bottom-right-radius: 4px;
	}
	/* 文件消息 */
	.cr-file-msg {
	    display: flex;
	    align-items: center;
	    gap: 10px;
	    padding: 12px 14px;
	    border-radius: var(--radius-lg);
	    cursor: pointer;
	    text-decoration: none;
	    transition: all var(--transition-fast);
	}
	.cr-msg.other .cr-file-msg {
	    background: var(--bg-secondary);
	    color: var(--text-primary);
	    border: 1px solid var(--border);
	    border-bottom-left-radius: 4px;
	}
	.cr-msg.self .cr-file-msg {
	    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
	    color: white;
	    border-bottom-right-radius: 4px;
	}
	.cr-file-msg:hover { opacity: 0.85; }
	.cr-file-icon {
	    width: 36px;
	    height: 36px;
	    border-radius: var(--radius-sm);
	    background: rgba(255,255,255,0.15);
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    flex-shrink: 0;
	}
	.cr-msg.other .cr-file-icon {
	    background: var(--primary-bg);
	    color: var(--primary);
	}
	.cr-file-info {
	    display: flex;
	    flex-direction: column;
	    min-width: 0;
	}
	.cr-file-name {
	    font-size: 13px;
	    font-weight: 500;
	    overflow: hidden;
	    text-overflow: ellipsis;
	    white-space: nowrap;
	}
	.cr-file-hint {
	    font-size: 11px;
	    opacity: 0.7;
	}
	/* 输入区 */
	.chatroom-input-area {
	    padding: 12px 24px;
	    border-top: 1px solid var(--border);
	    background: var(--bg-secondary);
	    flex-shrink: 0;
	}
	.chatroom-input-row {
	    display: flex;
	    align-items: center;
	    gap: 8px;
	    background: var(--bg-primary);
	    border: 1.5px solid var(--border);
	    border-radius: var(--radius-lg);
	    padding: 6px 10px;
	    transition: border-color var(--transition-fast);
	}
	.chatroom-input-row:focus-within {
	    border-color: var(--primary);
	}
	.chatroom-input-row input[type="text"] {
	    flex: 1;
	    border: none;
	    background: none;
	    font-size: 14px;
	    color: var(--text-primary);
	    padding: 8px 4px;
	    outline: none;
	    min-width: 0;
	}
	.chatroom-input-row input[type="text"]::placeholder {
	    color: var(--text-placeholder);
	}
	.chatroom-file-btn {
	    width: 34px;
	    height: 34px;
	    border-radius: var(--radius-sm);
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    cursor: pointer;
	    color: var(--text-muted);
	    transition: all var(--transition-fast);
	    flex-shrink: 0;
	}
	.chatroom-file-btn:hover {
	    background: var(--primary-bg);
	    color: var(--primary);
	}
	.chatroom-send-btn {
	    width: 34px;
	    height: 34px;
	    border-radius: var(--radius-sm);
	    border: none;
	    background: var(--primary);
	    color: white;
	    cursor: pointer;
	    display: flex;
	    align-items: center;
	    justify-content: center;
	    transition: all var(--transition-fast);
	    flex-shrink: 0;
	}
	.chatroom-send-btn:hover {
	    background: var(--primary-dark);
	}
	/* 上传进度 */
	.cr-uploading {
	    font-size: 13px;
	    color: var(--text-muted);
	    padding: 6px 12px;
	    text-align: center;
	}

/* ==================== 管理面板样式 ==================== */
.admin-btn {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%) !important;
}
.admin-btn:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
}

.admin-container {
    min-height: 100vh;
    background: var(--bg-primary);
    padding: 0;
}

.admin-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 32px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.admin-header-actions {
    display: flex;
    gap: 12px;
}

.admin-refresh-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.admin-refresh-btn:hover {
    background: var(--primary-dark);
}

.admin-content {
    padding: 32px;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-section {
    margin-bottom: 32px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(10px);
}

.admin-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.admin-stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition-fast);
}

.admin-stat-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-icon.tokens {
    background: rgba(124, 58, 237, 0.1);
    color: var(--primary);
}

.stat-icon.users {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.stat-icon.active {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.stat-icon.convs {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
}

.stat-icon.msgs {
    background: rgba(236, 72, 153, 0.1);
    color: #ec4899;
}

.stat-icon.uptime {
    background: rgba(20, 184, 166, 0.1);
    color: #14b8a6;
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

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

.admin-table-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    background: var(--bg-tertiary);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table td {
    font-size: 14px;
    color: var(--text-primary);
}

.admin-table tbody tr:hover {
    background: var(--bg-hover);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.user-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.user-status-badge.online {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.user-status-badge.offline {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.user-status-badge.banned {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.user-status-badge.admin {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.admin-action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-right: 6px;
}

.admin-action-btn:last-child {
    margin-right: 0;
}

.admin-action-btn.ban {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.admin-action-btn.ban:hover {
    background: var(--error);
    color: white;
}

.admin-action-btn.unban {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.admin-action-btn.unban:hover {
    background: #22c55e;
    color: white;
}

.admin-action-btn.kick {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
}

.admin-action-btn.kick:hover {
    background: #f97316;
    color: white;
}

.admin-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.admin-action-btn.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
}

.admin-create-user-form {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(255, 255, 255, 0.92));
    border: 1px solid rgba(14, 165, 233, 0.18);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.admin-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-form-field label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

.admin-form-field input {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.96);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    padding: 10px 12px;
}

.admin-form-field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.admin-form-actions {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.admin-form-hint {
    font-size: 13px;
    color: var(--text-secondary);
}

.leaderboard-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.leaderboard-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    font-weight: 700;
}

.leaderboard-user-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.leaderboard-name {
    font-weight: 600;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .admin-header {
        padding: 16px;
    }
    .admin-header h1 {
        font-size: 18px;
    }
    .admin-content {
        padding: 16px;
    }
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .admin-table th,
    .admin-table td {
        padding: 10px 12px;
        font-size: 12px;
    }
    .admin-form-grid {
        grid-template-columns: 1fr;
    }
}
