* { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            min-height: 100vh;
            color: #e4e4e4;
        }
        .is-hidden { display: none !important; }
        .container { max-width: 1400px; margin: 0 auto; padding: 20px; }
        
        /* Header */
        .header {
            text-align: center;
            padding: 30px 0;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            margin-bottom: 30px;
        }
        .header h1 {
            font-size: 2.5em;
            background: linear-gradient(90deg, #667eea, #764ba2);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 10px;
        }
        .header .subtitle { color: #888; font-size: 1.1em; }
        .header .backend-url {
            margin-top: 10px;
            padding: 8px 16px;
            background: rgba(255,255,255,0.05);
            border-radius: 20px;
            display: inline-block;
            font-family: monospace;
            font-size: 0.9em;
        }
        
        /* Stats Cards */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }
        .stat-card {
            background: rgba(255,255,255,0.05);
            border-radius: 16px;
            padding: 24px;
            text-align: center;
            border: 1px solid rgba(255,255,255,0.1);
            transition: transform 0.2s, box-shadow 0.2s;
        }
        .stat-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 30px rgba(0,0,0,0.3);
        }
        .stat-card .number {
            font-size: 3em;
            font-weight: 700;
            margin-bottom: 8px;
        }
        .stat-card .label { color: #888; font-size: 0.95em; }
        .stat-card.total .number { color: #667eea; }
        .stat-card.success .number { color: #4ade80; }
        .stat-card.failed .number { color: #f87171; }
        .stat-card.rate .number { color: #fbbf24; }
        
        /* Sessions Section */
        .sessions-section {
            background: rgba(255,255,255,0.03);
            border-radius: 16px;
            border: 1px solid rgba(255,255,255,0.1);
            margin-bottom: 30px;
            overflow: hidden;
        }
        .sessions-header {
            padding: 20px 24px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 12px;
        }
        .sessions-header h2 { font-size: 1.3em; }
        .sessions-header .actions { display: flex; gap: 10px; flex-wrap: wrap; }
        .sessions-header .btn {
            padding: 8px 16px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.9em;
            border: none;
            transition: all 0.2s;
        }
        .btn-success { background: rgba(74, 222, 128, 0.2); color: #4ade80; }
        .btn-success:hover { background: rgba(74, 222, 128, 0.3); }
        .btn-primary { background: rgba(102, 126, 234, 0.3); color: #667eea; }
        .btn-primary:hover { background: rgba(102, 126, 234, 0.5); }
        .btn-secondary { background: rgba(255,255,255,0.1); color: #e4e4e4; }
        .btn-secondary:hover { background: rgba(255,255,255,0.2); }
        .btn-danger { background: rgba(248, 113, 113, 0.2); color: #f87171; }
        .btn-danger:hover { background: rgba(248, 113, 113, 0.3); }
        
        .sessions-stats {
            padding: 16px 24px;
            background: rgba(255,255,255,0.02);
            display: flex;
            gap: 24px;
            flex-wrap: wrap;
            font-size: 0.9em;
        }
        .sessions-stats span { color: #888; }
        .sessions-stats .value { color: #e4e4e4; font-weight: 500; }
        
        .sessions-table {
            width: 100%;
            border-collapse: collapse;
        }
        .sessions-table th {
            text-align: left;
            padding: 12px 16px;
            background: rgba(255,255,255,0.03);
            color: #888;
            font-weight: 500;
            font-size: 0.85em;
        }
        .sessions-table td {
            padding: 12px 16px;
            border-top: 1px solid rgba(255,255,255,0.05);
        }
        .sessions-table tr:hover { background: rgba(255,255,255,0.02); }

        /* 分页样式 */
        .pagination-container {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 20px;
            flex-wrap: wrap;
        }
        .page-btn {
            padding: 6px 12px;
            border-radius: 6px;
            border: 1px solid rgba(255,255,255,0.1);
            background: rgba(255,255,255,0.05);
            color: #e4e4e4;
            cursor: pointer;
            font-size: 0.9em;
            transition: all 0.2s;
        }
        .page-btn:hover:not(:disabled) {
            background: rgba(102, 126, 234, 0.3);
            border-color: rgba(102, 126, 234, 0.5);
        }
        .page-btn.active {
            background: rgba(102, 126, 234, 0.4);
            border-color: rgba(102, 126, 234, 0.8);
            color: #fff;
        }
        .page-btn:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }
        .page-ellipsis {
            color: #666;
            padding: 0 4px;
        }
        .page-info {
            color: #888;
            font-size: 0.85em;
            margin-left: 12px;
        }

        .session-id {
            font-family: monospace;
            font-size: 0.85em;
            color: #888;
        }
        .session-email { color: #e4e4e4; }
        .session-fail {
            font-weight: 500;
        }
        .session-fail.warning { color: #fbbf24; }
        .session-fail.danger { color: #f87171; }
        .session-status {
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 0.8em;
            font-weight: 500;
        }
        .session-status.enabled { background: rgba(74, 222, 128, 0.2); color: #4ade80; }
        .session-status.disabled { background: rgba(248, 113, 113, 0.2); color: #f87171; }
        
        .toggle-btn {
            padding: 4px 12px;
            border-radius: 6px;
            border: none;
            cursor: pointer;
            font-size: 0.8em;
            transition: all 0.2s;
        }
        .toggle-btn.enable { background: rgba(74, 222, 128, 0.2); color: #4ade80; }
        .toggle-btn.disable { background: rgba(248, 113, 113, 0.2); color: #f87171; }
        .toggle-btn:hover { opacity: 0.8; }
        
        /* Upload Area */
        .upload-area {
            padding: 30px;
            border: 2px dashed rgba(255,255,255,0.2);
            border-radius: 12px;
            text-align: center;
            margin: 20px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .upload-area:hover, .upload-area.dragover {
            border-color: #667eea;
            background: rgba(102, 126, 234, 0.1);
        }
        .upload-area input { display: none; }
        .upload-area .icon { font-size: 2em; margin-bottom: 10px; }
        .upload-area p { color: #888; margin: 5px 0; }
        .helper-text { font-size: 0.85em; }
        
        /* Settings Modal */
        .settings-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.8);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }
        .settings-modal.active { display: flex; }
        .settings-content {
            background: #1a1a2e;
            border-radius: 16px;
            padding: 30px;
            width: 90%;
            max-width: 400px;
            border: 1px solid rgba(255,255,255,0.1);
        }
        .settings-content h3 {
            margin-bottom: 20px;
            font-size: 1.3em;
        }
        .settings-content label {
            display: block;
            margin-bottom: 8px;
            color: #888;
            font-size: 0.9em;
        }
        .settings-text-input,
        .settings-content input[type="number"] {
            width: 100%;
            padding: 12px;
            border-radius: 8px;
            border: 1px solid rgba(255,255,255,0.2);
            background: rgba(255,255,255,0.05);
            color: #e4e4e4;
            font-size: 1em;
            margin-bottom: 20px;
        }
        .settings-content input:focus {
            outline: none;
            border-color: #667eea;
        }
        .settings-buttons {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
        }
        
        /* Connection Status */
        .connection-status {
            position: fixed;
            top: 20px;
            right: 20px;
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 0.85em;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .connection-status.connected { background: rgba(74, 222, 128, 0.2); color: #4ade80; }
        .connection-status.disconnected { background: rgba(248, 113, 113, 0.2); color: #f87171; }
        .status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            animation: pulse 2s infinite;
        }
        .connected .status-dot { background: #4ade80; }
        .disconnected .status-dot { background: #f87171; }
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }
        
        /* Calls Table */
        .calls-section {
            background: rgba(255,255,255,0.03);
            border-radius: 16px;
            border: 1px solid rgba(255,255,255,0.1);
            overflow: hidden;
        }
        .calls-header {
            padding: 20px 24px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .calls-header h2 { font-size: 1.3em; }
        .calls-header .clear-btn {
            background: rgba(248, 113, 113, 0.2);
            color: #f87171;
            border: none;
            padding: 8px 16px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.9em;
            transition: background 0.2s;
        }
        .calls-header .clear-btn:hover { background: rgba(248, 113, 113, 0.3); }
        
        .calls-table {
            width: 100%;
            border-collapse: collapse;
            table-layout: fixed;
        }
        .calls-table th {
            text-align: left;
            padding: 14px 16px;
            background: rgba(255,255,255,0.03);
            color: #888;
            font-weight: 500;
            font-size: 0.85em;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .calls-table td {
            padding: 12px 16px;
            border-top: 1px solid rgba(255,255,255,0.05);
            vertical-align: top;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .calls-table td:nth-child(1) { width: 200px; } /* 请求 ID */
        .calls-table td:nth-child(2) { width: 140px; } /* 时间 */
        .calls-table td:nth-child(3) { width: 90px; } /* 模型 */
        .calls-table td:nth-child(4) { width: 100px; } /* Session */
        .calls-table td:nth-child(5) { width: 25%; max-width: 300px; } /* 提示词 */
        .calls-table td:nth-child(6) { width: 70px; } /* 状态 */
        .calls-table td:nth-child(7) { width: 70px; } /* 耗时 */
        .calls-table td:nth-child(8) { width: 180px; } /* 结果/错误 */
        .calls-table tr:hover { background: rgba(255,255,255,0.02); }
        
        .call-id {
            font-family: monospace;
            background: rgba(102, 126, 234, 0.2);
            color: #667eea;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.85em;
        }
        .call-time { color: #888; font-size: 0.9em; }
        .call-model {
            background: rgba(255,255,255,0.1);
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 0.85em;
        }
        .call-prompt {
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            display: block;
        }
        .session-id {
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            display: block;
        }
        .call-status {
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 0.85em;
            font-weight: 500;
        }
        .call-status.success { background: rgba(74, 222, 128, 0.2); color: #4ade80; }
        .call-status.failed { background: rgba(248, 113, 113, 0.2); color: #f87171; }
        .call-duration { font-family: monospace; color: #fbbf24; }
        .call-result a {
            color: #667eea;
            text-decoration: none;
            font-size: 0.9em;
        }
        .call-result a:hover { text-decoration: underline; }
        .call-result img {
            max-width: 80px;
            max-height: 60px;
            border-radius: 8px;
            margin-top: 8px;
            cursor: pointer;
            transition: transform 0.2s;
        }
        .call-result img:hover { transform: scale(1.1); }
        
        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: #666;
        }
        .empty-state .icon { font-size: 3em; margin-bottom: 16px; }
        .empty-subtext { font-size: 0.9em; margin-top: 8px; }
        .empty-cell { text-align: center; padding: 40px; color: #666; }
        .muted { color: #666; }
        .error-text { color: #f87171; font-size: 0.85em; }
        .last-used { color: #888; font-size: 0.85em; }
        
        /* New call animation */
        @keyframes slideIn {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .calls-table tr.new-call { animation: slideIn 0.3s ease-out; }
        
        /* Image Modal */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.9);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }
        .modal.active { display: flex; }
        .modal img {
            max-width: 90%;
            max-height: 90%;
            border-radius: 8px;
        }
        .modal-close {
            position: absolute;
            top: 20px;
            right: 30px;
            color: #fff;
            font-size: 2em;
            cursor: pointer;
        }
