/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    /* 天蓝色主题颜色 */
    --primary-blue: #1890ff;
    --primary-blue-light: #69c0ff;
    --primary-blue-dark: #0050b3;
    --secondary-blue: #91d5ff;
    --accent-blue: #40a9ff;
    
    /* 背景颜色 */
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-lighter: #f0f2f5;
    
    /* 文字颜色 */
    --text-primary: #262626;
    --text-secondary: #595959;
    --text-tertiary: #8c8c8c;
    --text-white: #ffffff;
    
    /* 边框颜色 */
    --border-light: #e8e8e8;
    --border-medium: #d9d9d9;
    --border-dark: #bfbfbf;
    
    /* 功能颜色 */
    --success: #52c41a;
    --warning: #faad14;
    --error: #ff4d4f;
    --info: #1890ff;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    
    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* 过渡动画 */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* 暗色模式 */
[data-theme="dark"] {
    --bg-white: #1a1a1a;
    --bg-light: #262626;
    --bg-lighter: #434343;
    --text-primary: #f5f5f5;
    --text-secondary: #d9d9d9;
    --text-tertiary: #a6a6a6;
    --border-light: #434343;
    --border-medium: #595959;
    --border-dark: #8c8c8c;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-white);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    overflow-x: hidden;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-blue);
}

.logo i {
    font-size: 24px;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--primary-blue);
    background: var(--bg-lighter);
}

.nav-link.active {
    color: var(--primary-blue);
    background: rgba(24, 144, 255, 0.1);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    user-select: none;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.btn-primary:hover {
    background: var(--primary-blue-dark);
    border-color: var(--primary-blue-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--primary-blue);
    border: 1px solid var(--primary-blue);
}

.btn-outline:hover {
    background: rgba(24, 144, 255, 0.1);
    transform: translateY(-1px);
}

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

.btn-block {
    width: 100%;
}

/* 主题切换按钮 */
.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
    background: var(--bg-lighter);
    color: var(--primary-blue);
    transform: rotate(15deg);
}

/* 用户区域 */
.user-section {
    display: flex;
    gap: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--radius-lg);
    background: var(--bg-light);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--primary-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-name {
    font-weight: 500;
    font-size: 14px;
}

.user-dropdown {
    position: relative;
}

.user-menu-btn {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 200px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 1000;
}

.user-dropdown:hover .user-dropdown-menu {
    display: block;
}

.user-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background var(--transition-fast);
}

.user-dropdown-menu a:hover {
    background: var(--bg-lighter);
}

.user-dropdown-menu hr {
    margin: 8px 0;
    border: none;
    border-top: 1px solid var(--border-light);
}

/* 主容器 */
.main-container {
    display: flex;
    max-width: 1400px;
    margin: 64px auto 0;
    min-height: calc(100vh - 64px);
}

/* 侧边栏 */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    border-right: 1px solid var(--border-light);
    background: var(--bg-light);
    display: flex;
    flex-direction: column;
    transition: width var(--transition-normal);
}

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

.sidebar-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.conversation-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: 4px;
    color: var(--text-secondary);
}

.conversation-item:hover {
    background: var(--bg-lighter);
}

.conversation-item.active {
    background: rgba(24, 144, 255, 0.1);
    color: var(--primary-blue);
    font-weight: 500;
}

.conversation-item i {
    font-size: 14px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-light);
}

.feature-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.feature-card:hover {
    background: var(--bg-lighter);
    border-color: var(--primary-blue-light);
    transform: translateY(-2px);
}

.feature-card i {
    font-size: 20px;
    color: var(--primary-blue);
}

.feature-card span {
    font-size: 12px;
    color: var(--text-secondary);
}

.app-info {
    text-align: center;
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.4;
}

/* 聊天容器 */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.welcome-screen {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.welcome-content {
    max-width: 600px;
    text-align: center;
}

.welcome-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
}

.welcome-content h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.welcome-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.quick-action {
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

.quick-action:hover {
    background: var(--bg-lighter);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.action-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    background: rgba(24, 144, 255, 0.1);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary-blue);
}

.quick-action h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.quick-action p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.welcome-tips {
    text-align: left;
    background: var(--bg-light);
    padding: 24px;
    border-radius: var(--radius-lg);
}

.welcome-tips h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.welcome-tips ul {
    list-style: none;
    padding-left: 0;
}

.welcome-tips li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.welcome-tips li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-blue);
    font-weight: bold;
}

/* 聊天消息区域 */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.message {
    display: flex;
    gap: 16px;
    max-width: 85%;
    animation: fadeIn 0.3s ease;
}

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

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message.assistant {
    align-self: flex-start;
}

.message-avatar {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.message.user .message-avatar {
    background: var(--primary-blue);
    color: white;
}

.message.assistant .message-avatar {
    background: var(--bg-lighter);
    color: var(--primary-blue);
}

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

.message-bubble {
    padding: 16px;
    border-radius: var(--radius-lg);
    background: var(--bg-light);
    position: relative;
    word-wrap: break-word;
}

.message.user .message-bubble {
    background: var(--primary-blue);
    color: white;
    border-bottom-right-radius: var(--radius-sm);
}

.message.assistant .message-bubble {
    background: var(--bg-light);
    border-bottom-left-radius: var(--radius-sm);
}

.message-text {
    line-height: 1.6;
    font-size: 15px;
}

.message-text p {
    margin-bottom: 12px;
}

.message-text p:last-child {
    margin-bottom: 0;
}

.message-time {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 8px;
    text-align: right;
}

.message.user .message-time {
    color: rgba(255, 255, 255, 0.8);
}

/* 代码块样式 */
.code-block {
    margin: 16px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #f6f8fa;
    border: 1px solid var(--border-light);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: #f0f2f5;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
}

.code-language {
    color: var(--text-secondary);
    font-weight: 500;
}

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

.code-action-btn {
    background: none;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 4px;
}

.code-action-btn:hover {
    background: var(--bg-lighter);
    color: var(--primary-blue);
    border-color: var(--primary-blue-light);
}

.code-content {
    padding: 16px;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    background: white;
}

.code-content pre {
    margin: 0;
}

/* Markdown 表格 */
.markdown-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

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

.markdown-table th {
    background: var(--bg-lighter);
    font-weight: 600;
    color: var(--text-primary);
}

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

.markdown-table tr:hover {
    background: var(--bg-light);
}

/* 输入区域 */
.chat-input-area {
    padding: 20px 24px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-white);
}

.input-container {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 12px;
    transition: all var(--transition-fast);
}

.input-container:focus-within {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

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

.input-action-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: transparent;
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.input-action-btn:hover {
    background: var(--bg-lighter);
    color: var(--primary-blue);
    border-color: var(--primary-blue-light);
}

.message-input {
    flex: 1;
    min-height: 40px;
    max-height: 200px;
    padding: 10px 0;
    border: none;
    background: transparent;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-primary);
    resize: none;
    outline: none;
    font-family: inherit;
}

.message-input::placeholder {
    color: var(--text-tertiary);
}

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

.send-btn, .stop-btn {
    min-width: 80px;
}

.btn-text {
    display: inline;
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-tertiary);
}

.model-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.model-tag {
    background: rgba(24, 144, 255, 0.1);
    color: var(--primary-blue);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.input-tips i {
    margin-right: 4px;
}

/* 工具面板 */
.tools-panel {
    width: 320px;
    flex-shrink: 0;
    border-left: 1px solid var(--border-light);
    background: var(--bg-light);
    display: flex;
    flex-direction: column;
    transition: width var(--transition-normal);
}

.tools-header {
    padding: 24px 20px 16px;
    border-bottom: 1px solid var(--border-light);
}

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

.tools-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.tool-section {
    margin-bottom: 24px;
}

.tool-section h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-item {
    margin-bottom: 16px;
}

.tool-item label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.tool-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    background: var(--bg-white);
    color: var(--text-primary);
    font-size: 14px;
    transition: all var(--transition-fast);
}

.tool-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-medium);
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-blue);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.history-controls {
    display: flex;
    gap: 8px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-item {
    text-align: center;
    padding: 12px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
}

.stat-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-tertiary);
}

.tools-footer {
    padding: 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
    animation: fadeIn var(--transition-normal);
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: slideUp var(--transition-normal);
}

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

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

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-tertiary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-lighter);
    color: var(--text-primary);
}

/* 认证模态框 */
.auth-tabs {
    display: flex;
    padding: 0 24px;
    margin-top: 8px;
    border-bottom: 1px solid var(--border-light);
}

.auth-tab {
    flex: 1;
    padding: 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.auth-tab.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

.auth-form {
    padding: 24px;
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    background: var(--bg-white);
    color: var(--text-primary);
    font-size: 15px;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.checkbox input {
    width: 16px;
    height: 16px;
}

.forgot-link {
    font-size: 14px;
    color: var(--primary-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.forgot-link:hover {
    color: var(--primary-blue-dark);
    text-decoration: underline;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.switch-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.switch-link:hover {
    color: var(--primary-blue-dark);
    text-decoration: underline;
}

/* 验证码模态框 */
.verification-content {
    padding: 24px;
    text-align: center;
}

.verification-code-display {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: 8px;
    color: var(--primary-blue);
    padding: 20px;
    background: rgba(24, 144, 255, 0.1);
    border-radius: var(--radius-md);
    margin: 0 auto 24px;
    max-width: 280px;
    animation: pulse 2s infinite;
}

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

.verification-tip {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.verification-footer {
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-tertiary);
}

/* 反馈模态框 */
.feedback-content {
    padding: 24px;
}

.rating-stars {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 16px 0;
}

.star {
    font-size: 32px;
    color: var(--border-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.star:hover,
.star.active {
    color: #ffc107;
    transform: scale(1.2);
}

.feedback-types {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.radio {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.radio input {
    width: 16px;
    height: 16px;
}

.feedback-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
    font-size: 13px;
    color: var(--text-tertiary);
    text-align: center;
}

/* 代码预览模态框 */
.preview-modal {
    max-width: 900px;
}

.modal-body {
    padding: 0;
    height: 600px;
}

#previewFrame {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

/* 通知 */
.notification-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 3000;
}

.notification {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--success);
    min-width: 300px;
    max-width: 400px;
    animation: slideInRight 0.3s ease;
    margin-bottom: 12px;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification.error {
    border-left-color: var(--error);
}

.notification.warning {
    border-left-color: var(--warning);
}

.notification.info {
    border-left-color: var(--info);
}

.notification-icon {
    font-size: 20px;
    color: var(--success);
}

.notification.error .notification-icon {
    color: var(--error);
}

.notification.warning .notification-icon {
    color: var(--warning);
}

.notification.info .notification-icon {
    color: var(--info);
}

.notification-content {
    flex: 1;
}

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

.notification-message {
    font-size: 13px;
    color: var(--text-secondary);
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 20px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.notification-close:hover {
    background: var(--bg-lighter);
    color: var(--text-primary);
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 4000;
    backdrop-filter: blur(4px);
}

[data-theme="dark"] .loading-overlay {
    background: rgba(26, 26, 26, 0.9);
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary-blue);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

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

/* 流式输出光标 */
.streaming-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: var(--primary-blue);
    animation: blink 1s infinite;
    margin-left: 2px;
    vertical-align: middle;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* 网络状态指示器 */
.network-status {
    position: fixed;
    bottom: 20px;
    left: 20px;
    padding: 8px 12px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 1000;
}

.network-status.online {
    color: var(--success);
    border: 1px solid var(--success);
}

.network-status.offline {
    color: var(--error);
    border: 1px solid var(--error);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-dark);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .tools-panel {
        display: none;
    }
    
    .sidebar {
        width: 240px;
    }
}

@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        left: -280px;
        top: 64px;
        bottom: 0;
        z-index: 900;
        background: var(--bg-white);
        box-shadow: var(--shadow-lg);
        transition: left var(--transition-normal);
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .tools-panel {
        position: fixed;
        right: -320px;
        top: 64px;
        bottom: 0;
        z-index: 900;
        background: var(--bg-white);
        box-shadow: var(--shadow-lg);
        transition: right var(--transition-normal);
    }
    
    .tools-panel.active {
        right: 0;
    }
    
    .nav-links {
        display: none;
    }
    
    .btn-text {
        display: none;
    }
    
    .send-btn, .stop-btn {
        min-width: auto;
        width: 40px;
        height: 40px;
        padding: 0;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 16px;
    }
    
    .welcome-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .welcome-content h1 {
        font-size: 24px;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .quick-action {
        padding: 16px;
    }
    
    .action-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .chat-messages {
        padding: 16px;
    }
    
    .chat-input-area {
        padding: 16px;
    }
    
    .input-container {
        padding: 10px;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .message {
        max-width: 95%;
    }
}

@media (max-width: 576px) {
    .logo-text {
        display: none;
    }
    
    .user-name {
        display: none;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .verification-code-display {
        font-size: 24px;
        letter-spacing: 6px;
        padding: 16px;
    }
    
    .feedback-types {
        flex-direction: column;
        gap: 8px;
    }
    
    .notification {
        min-width: 280px;
    }
}

/* 工具按钮 */
.toggle-sidebar-btn,
.toggle-tools-btn {
    display: none;
}

@media (max-width: 992px) {
    .toggle-sidebar-btn,
    .toggle-tools-btn {
        display: flex;
        width: 40px;
        height: 40px;
        border-radius: var(--radius-full);
        background: var(--bg-light);
        border: 1px solid var(--border-light);
        color: var(--text-secondary);
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all var(--transition-fast);
    }
    
    .toggle-sidebar-btn:hover,
    .toggle-tools-btn:hover {
        background: var(--bg-lighter);
        color: var(--primary-blue);
    }
    
    .toggle-sidebar-btn {
        margin-right: 8px;
    }
    
    .toggle-tools-btn {
        margin-left: 8px;
    }
}

/* 骨架屏 */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-light) 25%,
        var(--bg-lighter) 50%,
        var(--bg-light) 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-text:last-child {
    margin-bottom: 0;
    width: 80%;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 24px;
    color: var(--text-tertiary);
}

.empty-state-icon {
    font-size: 48px;
    color: var(--border-light);
    margin-bottom: 16px;
}

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

/* 高亮.js 自定义主题 */
.hljs {
    background: transparent !important;
    padding: 0 !important;
}

/* 打印样式 */
@media print {
    .navbar,
    .sidebar,
    .tools-panel,
    .chat-input-area {
        display: none !important;
    }
    
    .chat-container {
        padding: 0;
    }
    
    .chat-messages {
        padding: 0;
        overflow: visible;
        height: auto;
    }
    
    .message {
        break-inside: avoid;
    }
}

/* 辅助类 */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }

.bg-white { background: var(--bg-white); }
.bg-light { background: var(--bg-light); }
.bg-lighter { background: var(--bg-lighter); }

.border { border: 1px solid var(--border-light); }
.border-t { border-top: 1px solid var(--border-light); }
.border-b { border-bottom: 1px solid var(--border-light); }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }

.p-4 { padding: 16px; }
.p-6 { padding: 24px; }

.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }

.text-sm { font-size: 12px; }
.text-base { font-size: 14px; }
.text-lg { font-size: 16px; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }

.hidden { display: none; }