/* 管理页面样式 - BI扁平化风格 */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #1a1a2e;
    --primary-light: #2d2d44;
    --accent: #55afab;
    --accent-hover: #57cfc5;
    --success: #040505;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg: #f5f7fa;
    --card-bg: #ffffff;
    --text: #1a1a2e;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --sidebar-width: 240px;
}

body { 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; 
    background: var(--bg); 
    color: var(--text);
    display: flex;
    min-height: 100vh;
    justify-content: center;
}

/* 页面容器宽度限制 */
.admin-container {
    width: 80%;
    max-width: 2000px;
    margin: 0 auto;
    display: flex;
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(0,0,0,0.1);
    position: relative;
}

/* Bootstrap Icons 样式 */
.bi {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    fill: currentColor;
}

/* 侧边栏 - 固定定位 */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #ffffff 0%, #95dfe9 50%, #ffffff 100%);
    color: #1e3a8a;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 4px;
}

.sidebar-logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #1e3a8a;
}

.sidebar-logo-text {
    font-size: 20px;
    font-weight: 600;
    color: #1e3a8a;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 13px;
    text-transform: uppercase;
    color: #1e3a8a;
    padding: 0 12px;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: #1e3a8a;
    font-size: 16px;
    margin-bottom: 2px;
}

.nav-item:hover {
    background: rgba(30, 58, 138, 0.1);
    color: #1e3a8a;
}

.nav-item.active {
    background: rgba(30, 58, 138, 0.15);
    color: #1e3a8a;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nav-item-icon {
    width: 20px;
    text-align: center;
    font-size: 18px;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(30, 58, 138, 0.2);
    margin-top: auto;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #1e3a8a;
}

.user-name {
    font-size: 16px;
    font-weight: 500;
    color: #1e3a8a;
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* 顶部导航 */
.topbar {
    background: var(--card-bg);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-title {
    font-size: 20px;
    font-weight: 600;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-btn {
    padding: 10px 18px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 15px;
    color: var(--text-secondary);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.topbar-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.topbar-btn.primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.topbar-btn.primary:hover {
    background: var(--primary-light);
}

/* 内容区域 */
.content {
    padding: 32px;
    flex: 1;
    font-size: 16px;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stat-card-title {
    font-size: 16px;
    color: var(--text-secondary);
}

.stat-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.stat-card-icon.blue { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.stat-card-icon.green { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.stat-card-icon.purple { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.stat-card-icon.orange { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }

.stat-card-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
}

.stat-card-change {
    font-size: 12px;
    color: var(--success);
    margin-top: 4px;
}

/* 卡片容器 */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
}

.card-body {
    padding: 24px;
    font-size: 16px;
}

/* 表格 */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 16px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 16px;
}

th {
    background: #f9fafb;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 15px;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: #f9fafb;
}

/* 状态标签 */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.badge-success { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.badge-info { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }

/* API Key显示 */
.api-key-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.api-key-text {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    background: #f3f4f6;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 14px;
}

.copy-btn {
    padding: 4px 8px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.copy-btn:hover {
    background: var(--accent-hover);
}

/* 按钮 */
.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-light); }
.btn-success { background: var(--success); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-outline {
    background: white;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active { display: flex; }

.modal-content {
    background: white;
    padding: 32px;
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 8px;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: var(--primary);
    color: white;
    padding: 16px 28px;
    border-radius: 8px;
    z-index: 2000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* 选项卡 */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.tab {
    padding: 14px 26px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    color: var(--text-secondary);
    font-size: 16px;
}

.tab:hover {
    color: var(--text);
}

.tab.active {
    border-bottom-color: var(--accent);
    color: var(--accent);
    font-weight: 500;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 16px;
}

/* 通知条 */
.notice-bar {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    color: var(--text);
}

.notice-bar-icon {
    color: var(--accent);
}

.notice-bar a {
    color: var(--accent);
    text-decoration: none;
}

.notice-bar a:hover {
    text-decoration: underline;
}

/* API文档样式 */
.doc-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.doc-section:last-child {
    border-bottom: none;
}

.doc-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.doc-section h4 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    margin: 20px 0 12px;
}

.doc-section p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.doc-table th, .doc-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
}

.doc-table th {
    background: #f9fafb;
    font-weight: 500;
    color: var(--text-secondary);
}

.doc-table td code {
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 14px;
    color: var(--accent);
}

.endpoint {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
    font-size: 16px;
}

.method {
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
}

.method.post {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.method.get {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.code-block {
    position: relative;
    background: #1a1a2e;
    border-radius: 8px;
    padding: 16px;
    margin: 12px 0;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 15px;
    line-height: 1.5;
    color: #e5e7eb;
}

.code-block code {
    font-family: inherit;
}

.copy-code-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.1);
    color: #e5e7eb;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.copy-code-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* 竞技场样式 */
.arena-config {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
}

/* 竞技场聊天区 */
.arena-chat-section {
    display: flex;
    flex-direction: column;
    height: 600px;
}

.arena-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 16px;
}

.arena-chat-welcome {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.arena-chat-welcome i {
    font-size: 48px;
    color: var(--accent);
    margin-bottom: 16px;
}

.arena-chat-welcome h3 {
    font-size: 20px;
    color: var(--text);
    margin-bottom: 8px;
}

.arena-chat-welcome p {
    font-size: 14px;
}

/* 消息气泡 */
.arena-message {
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
}

.arena-message.user {
    flex-direction: row-reverse;
}

.arena-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.arena-message.user .arena-message-avatar {
    background: var(--accent);
    color: white;
}

.arena-message.assistant .arena-message-avatar {
    background: var(--primary);
    color: white;
}

.arena-message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.arena-message.user .arena-message-content {
    background: var(--accent);
    color: white;
    border-bottom-right-radius: 4px;
}

.arena-message.assistant .arena-message-content {
    background: white;
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

/* 竞技场结果网格 - 列数由JS动态设置 */
.arena-results {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.arena-result-card {
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.arena-result-header {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 14px;
}

.arena-result-body {
    padding: 12px;
    min-height: 80px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

/* 输入区 */
.arena-chat-input {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 12px;
}

.arena-input-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.arena-tool-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f3f4f6;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.arena-tool-btn:hover {
    background: var(--accent);
    color: white;
}

.arena-image-preview-small {
    min-height: 0;
}

.arena-image-preview-container {
    position: relative;
    display: inline-block;
    max-width: 200px;
}

.arena-preview-img {
    max-width: 100%;
    max-height: 150px;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: block;
}

.arena-image-delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
}

.arena-image-delete-btn:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

.arena-image-name {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* 图片预览弹窗 */
.image-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.image-preview-modal-content {
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background: white;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.image-preview-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f9fafb;
    border-bottom: 1px solid var(--border);
}

.image-preview-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.image-preview-modal-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.image-control-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.image-control-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.image-preview-modal-close {
    width: 36px;
    height: 36px;
    background: rgba(239, 68, 68, 0.1);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #ef4444;
    transition: all 0.2s;
    margin-left: 8px;
}

.image-preview-modal-close:hover {
    background: #ef4444;
    color: white;
}

.image-preview-modal-body {
    flex: 1;
    overflow: auto;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a2e;
}

#modalPreviewImg {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    transition: transform 0.3s ease;
    border-radius: 4px;
}

.arena-input-box {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.arena-input-box textarea {
    flex: 1;
    border: none;
    resize: none;
    font-size: 15px;
    padding: 8px;
    outline: none;
    max-height: 120px;
    font-family: inherit;
}

.arena-send-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--accent);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
}

.arena-send-btn:hover {
    background: var(--accent-hover);
}

.arena-send-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.arena-model-card {
    background: #f9fafb;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.arena-model-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.arena-model-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.arena-model-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.arena-model-badge.primary {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.arena-model-badge.secondary {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.arena-model-badge.tertiary {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.arena-model-required {
    font-size: 12px;
    color: var(--danger);
    font-weight: 500;
}

.arena-model-form .form-group {
    margin-bottom: 12px;
}

.arena-model-form .form-group label {
    font-size: 14px;
    margin-bottom: 4px;
}

.arena-model-form .form-group input,
.arena-model-form .form-group select {
    padding: 10px 12px;
    font-size: 14px;
}

/* 开关样式 */
.arena-toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.arena-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.arena-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #d1d5db;
    border-radius: 24px;
    transition: 0.3s;
}

.arena-toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.arena-toggle-switch input:checked + .arena-toggle-slider {
    background: #10b981;
}

.arena-toggle-switch input:checked + .arena-toggle-slider::before {
    transform: translateX(20px);
}

/* 输入区样式 */
.arena-input-section {
    margin-bottom: 24px;
}

.arena-input-section textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    resize: vertical;
    min-height: 100px;
    transition: all 0.2s;
}

.arena-input-section textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.arena-image-upload {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.arena-image-upload:hover {
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.02);
}

.arena-image-placeholder {
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.arena-image-placeholder i {
    font-size: 32px;
    opacity: 0.5;
}

.arena-image-preview {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    margin-top: 12px;
}

.arena-submit-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    margin-top: 16px;
}

/* 结果展示区 - 列数由JS动态设置 */
.arena-results {
    display: grid;
    gap: 20px;
}

.arena-result-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.arena-result-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 16px;
}

.arena-result-header.mce {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
    color: #3b82f6;
}

.arena-result-header.custom1 {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    color: #10b981;
}

.arena-result-header.custom2 {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.05));
    color: #8b5cf6;
}

.arena-result-time {
    font-size: 12px;
    font-weight: 400;
    opacity: 0.7;
}

.arena-result-body {
    padding: 20px;
    min-height: 150px;
    max-height: 400px;
    overflow-y: auto;
    font-size: 15px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.arena-model-select-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.arena-model-select-wrapper select {
    flex: 1;
}

/* MegaCity Eye 模型介绍样式 */
.mce-intro-card {
    border: 2px solid rgba(59, 130, 246, 0.2);
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
}

.mce-intro-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.mce-logo-section {
    flex-shrink: 0;
}

.mce-intro-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.mce-intro-text h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.mce-intro-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

/* 核心指标 */
.mce-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.mce-metric-card {
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    color: white;
}

.mce-metric-card.primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.mce-metric-card.success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.mce-metric-card.accent {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.mce-metric-value {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
}

.mce-metric-label {
    font-size: 14px;
    opacity: 0.9;
}

/* 能力表格 */
.mce-capability-table {
    margin-bottom: 32px;
}

.mce-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.mce-table th {
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
    color: white;
    padding: 16px;
    text-align: left;
    font-size: 15px;
}

.mce-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.mce-table tr:last-child td {
    border-bottom: none;
}

.mce-table tr:hover td {
    background: #f8fafc;
}

.mce-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.mce-tag.green { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.mce-tag.yellow { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.mce-tag.orange { background: rgba(249, 115, 22, 0.1); color: #f97316; }
.mce-tag.red { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.mce-tag.blue { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }

.mce-accuracy {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 14px;
}

.mce-accuracy.high { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.mce-accuracy.medium { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.mce-accuracy.low { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

/* 模型训练流程 */
.mce-training-section {
    margin-bottom: 32px;
}

.mce-training-section h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mce-training-steps {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.mce-step {
    background: white;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    min-width: 140px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
}

.mce-step-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin: 0 auto 8px;
}

.mce-step-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.mce-step-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.mce-step-arrow {
    color: var(--accent);
    font-size: 20px;
}

/* 核心能力 */
.mce-core-abilities h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mce-abilities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.mce-ability-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.mce-ability-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-color: var(--accent);
}

.mce-ability-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--accent);
    margin: 0 auto 12px;
}

.mce-ability-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.mce-ability-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* 响应式 */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .mce-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    .mce-abilities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    .sidebar-logo-text, .nav-section-title, .nav-item span, .user-name {
        display: none;
    }
    .main-content {
        margin-left: 60px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .mce-metrics {
        grid-template-columns: 1fr;
    }
    .mce-abilities-grid {
        grid-template-columns: 1fr;
    }
    .mce-intro-header {
        flex-direction: column;
        text-align: center;
    }
    .mce-training-steps {
        flex-direction: column;
    }
    .mce-step-arrow {
        transform: rotate(90deg);
    }
}
