        :root {
            --bg-primary: #0f0f0f;
            --bg-secondary: #1a1a1a;
            --bg-tertiary: #242424;
            --bg-hover: #2a2a2a;
            --border-color: #333;
            --text-primary: #f0f0f0;
            --text-secondary: #a0a0a0;
            --text-muted: #666;
            --accent: #6366f1;
            --accent-hover: #818cf8;
            --accent-glow: rgba(99, 102, 241, 0.3);
            --success: #22c55e;
            --warning: #f59e0b;
        }

        * {
            box-sizing: border-box;
        }

        /* GeoGebra 加载提示样式 */
        .ggb-loading-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--bg-tertiary);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10;
            transition: opacity 0.3s ease;
        }

        .ggb-loading-overlay.hidden {
            opacity: 0;
            pointer-events: none;
        }

        .ggb-loading-content {
            text-align: center;
            color: var(--text-secondary);
        }

        .ggb-loading-spinner {
            width: 48px;
            height: 48px;
            border: 3px solid var(--border-color);
            border-top-color: var(--accent);
            border-radius: 50%;
            animation: ggb-spin 1s linear infinite;
            margin: 0 auto 16px;
        }

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

        .ggb-loading-content p {
            margin: 0 0 8px;
            font-size: 16px;
            color: var(--text-primary);
        }

        .ggb-loading-hint {
            font-size: 13px;
            color: var(--text-muted);
        }

        html,
        body {
            margin: 0;
            height: 100%;
            overflow: hidden;
            background: var(--bg-primary);
            color: var(--text-primary);
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        }

        .navbar {
            background: var(--bg-secondary) !important;
            border-bottom: 1px solid var(--border-color);
        }

        .navbar .nav-link {
            color: var(--text-secondary) !important;
        }

        .navbar .nav-link:hover,
        .navbar .nav-link.active {
            color: var(--text-primary) !important;
        }

        .navbar .nav-logo span {
            color: var(--text-primary) !important;
        }

        /* 主布局 */
        .ai-container {
            display: flex;
            height: calc(100vh - 70px);
            /* 减去导航栏高度 */
            margin-top: 70px;
            /* 导航栏高度 */
        }

        /* 左侧控制面板 */
        .control-panel {
            width: 520px;
            min-width: 480px;
            background: var(--bg-secondary);
            border-right: 1px solid var(--border-color);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .panel-header {
            padding: 12px 20px;
            border-bottom: 1px solid var(--border-color);
            background: var(--bg-tertiary);
        }

        .panel-header .mode-toggle {
            margin: 0;
            padding: 0;
            width: 100%;
        }

        /* 命令控制按钮（命令面板顶部） */
        .cmd-controls-header {
            display: flex;
            gap: 8px;
            padding: 12px 16px;
            background: var(--bg-secondary);
            border-bottom: 1px solid var(--border-color);
        }

        /* 头部积分显示 */
        .header-credits {
            display: flex;
            align-items: center;
            gap: 8px;
            height: 34px;
            padding: 0 14px;
            background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(16, 185, 129, 0.15) 100%);
            border: 1px solid rgba(34, 197, 94, 0.3);
            border-radius: 20px;
            font-size: 13px;
            white-space: nowrap;
            flex-shrink: 0;
            box-sizing: border-box;
        }

        .header-credits i {
            color: var(--success);
            font-size: 14px;
        }

        /* 购买按钮 - 橙色 */
        .ggb-action-btn.buy-btn {
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            border-color: #f59e0b;
            color: white;
            font-weight: 700;
        }

        .ggb-action-btn.buy-btn:hover {
            background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
        }

        /* 保存按钮 - 蓝色 */
        .ggb-action-btn.save-btn {
            background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
            border-color: #3b82f6;
            color: white;
            font-weight: 700;
        }

        .ggb-action-btn.save-btn:hover {
            background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
        }

        /* 下载按钮 - 灰色 */
        .ggb-action-btn.download-btn {
            background: linear-gradient(135deg, #64748b 0%, #475569 100%);
            border-color: #64748b;
            color: white;
            font-weight: 700;
        }

        .ggb-action-btn.download-btn:hover {
            background: linear-gradient(135deg, #475569 0%, #334155 100%);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(100, 116, 139, 0.4);
        }

        .header-credits .credits-value {
            color: var(--success);
            font-weight: 700;
        }

        .header-credits.low-credits {
            background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(234, 88, 12, 0.15) 100%);
            border-color: rgba(245, 158, 11, 0.3);
        }

        .header-credits.low-credits i,
        .header-credits.low-credits .credits-value {
            color: var(--warning);
        }

        /* 云端存储显示 */
        .header-storage {
            display: flex;
            align-items: center;
            gap: 8px;
            height: 34px;
            padding: 0 14px;
            background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
            border: 1px solid rgba(59, 130, 246, 0.3);
            border-radius: 20px;
            font-size: 13px;
            white-space: nowrap;
            cursor: default;
            flex-shrink: 0;
            box-sizing: border-box;
        }

        .header-storage i {
            color: #3b82f6;
            font-size: 14px;
        }

        .header-storage .storage-value {
            color: #3b82f6;
            font-weight: 700;
        }

        .header-storage.storage-warning {
            background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(234, 88, 12, 0.15) 100%);
            border-color: rgba(245, 158, 11, 0.3);
        }

        .header-storage.storage-warning i,
        .header-storage.storage-warning .storage-value {
            color: var(--warning);
        }

        .header-storage.storage-full {
            background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
            border-color: rgba(239, 68, 68, 0.3);
        }

        .header-storage.storage-full i,
        .header-storage.storage-full .storage-value {
            color: #ef4444;
        }

        /* 头部右侧容器 */
        .header-right {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        /* 对话轮数显示 */
        .conversation-counter {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 12px;
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
            border: 1px solid rgba(99, 102, 241, 0.3);
            border-radius: 16px;
            font-size: 12px;
            color: var(--accent);
            white-space: nowrap;
        }

        .conversation-counter i {
            font-size: 12px;
        }

        /* 新对话按钮 */
        .new-chat-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 12px;
            background: transparent;
            border: 1px solid var(--border-color);
            border-radius: 16px;
            font-size: 12px;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
        }

        .new-chat-btn:hover {
            background: rgba(239, 68, 68, 0.1);
            border-color: rgba(239, 68, 68, 0.5);
            color: #ef4444;
        }

        .new-chat-btn i {
            font-size: 11px;
        }

        .panel-body {
            flex: 1;
            overflow-y: auto;
            padding: 24px;
        }

        /* 模式切换 */
        .mode-toggle {
            display: flex;
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 4px;
        }

        .panel-body .mode-toggle {
            margin-bottom: 24px;
        }

        .mode-btn {
            flex: 1;
            padding: 12px 16px;
            border: none;
            background: transparent;
            color: var(--text-secondary);
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            border-radius: 8px;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .mode-btn:hover {
            color: var(--text-primary);
        }

        .mode-btn.active {
            background: var(--accent);
            color: white;
            box-shadow: 0 2px 8px var(--accent-glow);
        }

        /* 表单区块 */
        .form-section {
            margin-bottom: 24px;
        }

        .form-section.form-inline {
            display: flex;
            align-items: center;
            gap: 12px;
        }

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

        .form-label.inline-label {
            margin-bottom: 0;
            white-space: nowrap;
            flex-shrink: 0;
        }

        .form-label .required {
            color: #ef4444;
            margin-left: 2px;
        }

        /* 标签行布局（描述 + 学科选择并排） */
        .form-label-row {
            display: flex;
            align-items: center;
            margin-bottom: 8px;
            gap: 24px;
        }

        .subject-inline {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }

        .subject-inline .subject-select {
            min-width: 140px;
            padding: 6px 12px;
            font-size: 13px;
        }

        /* 输入框 */
        .prompt-input {
            width: 100%;
            min-height: 120px;
            padding: 14px 16px;
            background: var(--bg-tertiary);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            color: var(--text-primary);
            font-size: 14px;
            line-height: 1.6;
            resize: vertical;
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        .prompt-input:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px var(--accent-glow);
        }

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

        /* 文本框包装器 */
        .textarea-wrapper {
            position: relative;
        }

        .textarea-hint {
            position: absolute;
            bottom: 32px;
            left: 14px;
            right: 14px;
            font-size: 13px;
            pointer-events: none;
            line-height: 1.7;
            color: #FCD34D;
            opacity: 0.6;
        }

        .textarea-hint .hint-line {
            margin-bottom: 1px;
        }

        .char-counter {
            position: absolute;
            bottom: 10px;
            right: 12px;
            font-size: 12px;
            color: var(--text-muted);
            background: var(--card-bg);
            padding: 2px 6px;
            border-radius: 4px;
            pointer-events: none;
            transition: color 0.2s;
        }

        .char-counter.warning {
            color: #f59e0b;
        }

        .char-counter.danger {
            color: #ef4444;
        }

        /* 输入区域垂直布局（上：文字输入，下：图片上传） */
        .input-row {
            display: flex;
            flex-direction: column;
            gap: 16px;
            margin-bottom: 24px;
        }

        .input-row .prompt-section {
            width: 100%;
        }

        .input-row .upload-section {
            width: 100%;
        }

        .input-row .form-label {
            margin-bottom: 8px;
        }

        .input-row .prompt-input {
            min-height: 240px;
            height: 240px;
            resize: none;
        }

        /* 多图上传网格 - 横向4列 */
        .upload-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 12px;
        }

        .upload-slot {
            position: relative;
            border: 2px dashed var(--border-color);
            border-radius: 8px;
            aspect-ratio: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            background: var(--bg-tertiary);
            box-sizing: border-box;
            overflow: hidden;
            min-height: 80px;
        }

        .upload-slot:hover {
            border-color: var(--accent);
            background: rgba(99, 102, 241, 0.05);
        }

        .upload-slot.has-image {
            border-style: solid;
            border-color: var(--accent);
            cursor: default;
        }

        .upload-slot.dragover {
            border-color: var(--accent);
            background: rgba(99, 102, 241, 0.1);
        }

        .upload-slot .slot-icon {
            font-size: 24px;
            color: var(--text-muted);
            margin-bottom: 6px;
        }

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

        .upload-slot .slot-preview {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            display: none;
        }

        .upload-slot.has-image .slot-preview {
            display: block;
        }

        .upload-slot.has-image .slot-icon,
        .upload-slot.has-image .slot-text {
            display: none;
        }

        .upload-slot .slot-preview img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .upload-slot .slot-remove {
            position: absolute;
            top: 4px;
            right: 4px;
            width: 22px;
            height: 22px;
            border-radius: 50%;
            background: rgba(239, 68, 68, 0.9);
            color: white;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            opacity: 0;
            transition: opacity 0.2s;
            z-index: 10;
        }

        .upload-slot:hover .slot-remove {
            opacity: 1;
        }

        .upload-input {
            display: none;
        }

        .upload-hint-text {
            font-size: 11px;
            color: var(--text-muted);
            text-align: center;
            margin-top: 8px;
        }

        /* 图片上传区域标签样式 */
        .upload-section .form-label {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .preview-container.active {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .preview-image {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            border-radius: 6px;
        }

        .preview-remove {
            position: absolute;
            top: 4px;
            right: 4px;
            width: 22px;
            height: 22px;
            background: rgba(0, 0, 0, 0.8);
            border: none;
            border-radius: 50%;
            color: white;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
        }

        .preview-remove:hover {
            background: #ef4444;
        }

        /* 学科选择下拉菜单 */
        .subject-select {
            width: 100%;
            padding: 10px 14px;
            padding-right: 36px;
            background: var(--bg-tertiary);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 14px;
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 12px center;
            transition: all 0.2s ease;
        }

        .subject-select:hover {
            border-color: var(--accent);
        }

        .subject-select:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
        }

        .subject-select option {
            background: var(--bg-secondary);
            color: var(--text-primary);
            padding: 8px;
        }

        /* 布局按钮 - 一排4个 */
        .layout-buttons {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 6px;
        }

        .layout-btn {
            padding: 8px 4px;
            background: var(--bg-tertiary);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            color: var(--text-secondary);
            font-size: 10px;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            text-align: center;
            line-height: 1.2;
        }

        .layout-btn i {
            font-size: 14px;
        }

        .layout-btn span {
            white-space: nowrap;
        }

        .layout-btn:hover {
            border-color: var(--accent);
            color: var(--text-primary);
        }

        .layout-btn.active {
            background: rgba(99, 102, 241, 0.15);
            border-color: var(--accent);
            color: var(--accent);
        }

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

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .option-btn {
            padding: 8px 14px;
            background: var(--bg-tertiary);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            color: var(--text-secondary);
            font-size: 13px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .option-btn:hover {
            border-color: var(--accent);
            color: var(--text-primary);
        }

        .option-btn.selected {
            background: rgba(99, 102, 241, 0.15);
            border-color: var(--accent);
            color: var(--accent);
        }

        /* 变量输入 */
        .variables-input {
            width: 100%;
            padding: 10px 14px;
            background: var(--bg-tertiary);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 13px;
            font-family: 'Monaco', 'Menlo', monospace;
        }

        .variables-input:focus {
            outline: none;
            border-color: var(--accent);
        }

        .variables-hint {
            font-size: 11px;
            color: var(--text-muted);
            margin-top: 6px;
        }

        /* 复选框样式 */
        .checkbox-group {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .checkbox-item {
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
        }

        .checkbox-item input {
            width: 18px;
            height: 18px;
            accent-color: var(--accent);
            cursor: pointer;
        }

        .checkbox-item span {
            font-size: 13px;
            color: var(--text-secondary);
        }

        /* 生成按钮 */
        .panel-footer {
            padding: 20px 24px;
            border-top: 1px solid var(--border-color);
            background: var(--bg-tertiary);
        }

        .generate-btn {
            flex: 1;
            padding: 14px 24px;
            background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
            border: none;
            border-radius: 12px;
            color: white;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            transition: all 0.2s ease;
            box-shadow: 0 4px 15px var(--accent-glow);
        }

        .generate-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 20px var(--accent-glow);
        }

        .generate-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }

        .generate-btn i {
            font-size: 16px;
        }

        /* 帮助按钮样式 */
        .panel-footer {
            display: flex;
            gap: 12px;
        }

        .help-guide-btn {
            padding: 0 16px;
            height: 48px;
            border: 1px solid var(--border-color);
            border-radius: 12px;
            background: var(--bg-secondary);
            color: var(--text-secondary);
            font-size: 14px;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            flex-shrink: 0;
            white-space: nowrap;
        }

        .help-guide-btn i {
            font-size: 16px;
        }

        .help-guide-btn:hover {
            border-color: var(--accent);
            color: var(--accent);
            background: rgba(99, 102, 241, 0.1);
        }

        /* AI帮助弹窗 */
        .ai-help-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            z-index: 10000;
            align-items: center;
            justify-content: center;
        }

        .ai-help-modal.show {
            display: flex;
        }

        .ai-help-content {
            background: var(--bg-primary);
            border-radius: 16px;
            width: 92%;
            max-width: 1100px;
            max-height: 85vh;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
            display: flex;
            flex-direction: column;
            font-size: 13px;
        }

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

        .ai-help-title {
            font-weight: 600;
            font-size: 18px;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .ai-help-title i {
            color: var(--accent);
        }

        .ai-help-close {
            background: none;
            border: none;
            color: var(--text-muted);
            font-size: 24px;
            cursor: pointer;
            padding: 0;
            line-height: 1;
        }

        .ai-help-close:hover {
            color: var(--text-primary);
        }

        .ai-help-body {
            padding: 24px;
            overflow-y: auto;
            flex: 1;
            display: flex;
            gap: 24px;
        }

        .ai-help-column {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        @media (max-width: 768px) {
            .ai-help-body {
                flex-direction: column;
            }
        }

        .ai-help-section {
            margin-bottom: 0;
        }

        .ai-help-section-title {
            font-weight: 600;
            color: var(--accent);
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
        }

        .ai-help-section-content {
            color: var(--text-secondary);
            line-height: 1.6;
            font-size: 13px;
        }

        .ai-help-section-content ul {
            padding-left: 20px;
            margin: 8px 0;
        }

        .ai-help-section-content li {
            margin-bottom: 6px;
        }

        .ai-help-example {
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 12px 16px;
            margin: 10px 0;
            font-family: 'Consolas', 'Monaco', monospace;
            font-size: 13px;
            color: var(--text-primary);
        }

        .ai-help-tip {
            background: rgba(99, 102, 241, 0.1);
            border-left: 3px solid var(--accent);
            padding: 12px 16px;
            border-radius: 0 8px 8px 0;
            margin-top: 12px;
            font-size: 13px;
        }

        .ai-help-keywords {
            margin-top: 16px;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .keyword-group {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 8px;
        }

        .keyword-label {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-secondary);
            min-width: 60px;
        }

        .keyword-tag {
            background: rgba(251, 191, 36, 0.15);
            color: #FCD34D;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 12px;
            white-space: nowrap;
        }

        .ai-help-footer {
            padding: 16px 24px;
            border-top: 1px solid var(--border-color);
            text-align: right;
        }

        .ai-help-close-btn {
            padding: 10px 24px;
            background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
            border: none;
            border-radius: 8px;
            color: white;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .ai-help-close-btn:hover {
            transform: translateY(-1px);
        }

        /* 右侧GGB展示区 */
        .ggb-panel {
            flex: 1;
            display: flex;
            flex-direction: column;
            background: var(--bg-primary);
            overflow: hidden;
            min-height: 0;
            /* 允许flex子元素收缩 */
        }

        .ggb-header {
            padding: 12px 24px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: var(--bg-tertiary);
            flex-shrink: 0;
            position: relative;
            z-index: 10;
            flex-wrap: wrap;
            /* 允许换行 */
            gap: 10px;
            /* 换行后的间距 */
        }

        .ggb-title-section {
            display: flex;
            align-items: center;
            gap: 20px;
            flex-shrink: 0;
            /* 防止被压缩 */
        }

        .ggb-main-title {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 18px;
            font-weight: 600;
            margin: 0;
            color: var(--text-primary);
            white-space: nowrap;
            /* 防止文字换行 */
            flex-shrink: 0;
            /* 防止被压缩 */
        }

        .ggb-main-title i {
            color: var(--accent);
            font-size: 20px;
        }

        .contact-btn {
            font-size: 13px;
            font-weight: 600;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            height: 34px;
            padding: 0 14px;
            background: linear-gradient(135deg, #07c160 0%, #06ad56 100%);
            border: none;
            border-radius: 20px;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
            flex-shrink: 0;
            box-sizing: border-box;
        }

        .contact-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(7, 193, 96, 0.4);
        }

        .contact-btn i {
            font-size: 14px;
        }

        /* 联系站主弹窗 */
        .contact-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.6);
            z-index: 10000;
            justify-content: center;
            align-items: center;
        }

        .contact-modal.show {
            display: flex;
        }

        .contact-modal-content {
            position: relative;
            background: white;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            padding: 20px;
            text-align: center;
        }

        .contact-modal-text {
            color: #1e3a5f;
            font-size: 15px;
            font-weight: 600;
            margin-bottom: 16px;
        }

        .contact-modal-content img {
            display: block;
            max-width: 300px;
            max-height: 80vh;
            border-radius: 8px;
        }

        .contact-modal-close {
            position: absolute;
            top: 8px;
            right: 8px;
            width: 28px;
            height: 28px;
            background: rgba(0, 0, 0, 0.5);
            border: none;
            border-radius: 50%;
            color: white;
            font-size: 12px;
            cursor: pointer;
            transition: background 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .contact-modal-close:hover {
            background: rgba(0, 0, 0, 0.7);
        }

        .ggb-title {
            font-size: 16px;
            font-weight: 500;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .ggb-title i {
            color: var(--success);
        }

        .ggb-actions {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
            /* 允许换行 */
        }

        .ggb-actions .header-credits {
            margin-right: 4px;
        }

        .ggb-action-btn {
            height: 34px;
            padding: 0 14px;
            background: var(--bg-tertiary);
            border: 1px solid var(--border-color);
            border-radius: 20px;
            color: var(--text-secondary);
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            transition: all 0.2s ease;
            white-space: nowrap;
            flex-shrink: 0;
            box-sizing: border-box;
        }

        .ggb-action-btn:hover {
            border-color: var(--accent);
            color: var(--text-primary);
        }

        .ggb-container {
            flex: 1;
            display: flex;
            align-items: stretch;
            justify-content: stretch;
            padding: 0;
            min-height: 0;
            overflow: hidden;
            box-sizing: border-box;
            position: relative;
        }

        #ggb-applet,
        .ggb-applet-wrapper {
            width: 100% !important;
            height: 100% !important;
            border-radius: 0;
            overflow: hidden;
            background: #1a1a1a;
            border: none;
            box-sizing: border-box;
        }

        /* 确保 GGB 内部元素也正确适应 */
        #ggb-applet article,
        #ggb-applet>div {
            width: 100% !important;
            height: 100% !important;
        }

        /* 防止 GeoGebra 内部双重缩放 - 关键修复 */
        #ggb-applet .applet_scaler,
        #ggb-applet .ggbTransform {
            transform: none !important;
            transform-origin: left top !important;
        }

        /* 隐藏GGB右上角的搜索和菜单按钮 */
        /* 方法1：通过 rightButtonPanel 中的位置（保留撤消/恢复按钮） */
        #ggb-applet .rightButtonPanel>button:not(.undoButton):not(.redoButton) {
            display: none !important;
            visibility: hidden !important;
            width: 0 !important;
            height: 0 !important;
            overflow: hidden !important;
        }

        /* 方法2：通用选择器（备用） */
        #ggb-applet [class*="searchButton"],
        #ggb-applet [class*="SearchButton"],
        #ggb-applet [class*="openSearchButton"],
        #ggb-applet button[aria-label="Search"],
        #ggb-applet button[aria-label="搜索"],
        #ggb-applet .gwt-PopupPanel .searchPanel,
        #ggb-applet [data-test="openSearchButton"],
        /* 隐藏菜单按钮 */
        #ggb-applet [class*="menuButton"],
        #ggb-applet [class*="MenuButton"],
        #ggb-applet button[aria-label="Menu"],
        #ggb-applet button[aria-label="菜单"] {
            display: none !important;
            visibility: hidden !important;
            width: 0 !important;
            height: 0 !important;
            overflow: hidden !important;
        }

        /* 修复GeoGebra工具面板下拉区域的圆角问题 */
        #ggb-applet .gwt-PopupPanel,
        #ggb-applet [class*="subToolPanel"],
        #ggb-applet [class*="SubToolPanel"],
        #ggb-applet [class*="toolPanel"],
        #ggb-applet [class*="ToolPanel"],
        #ggb-applet [class*="popupPanel"],
        #ggb-applet [class*="PopupPanel"],
        #ggb-applet [class*="dropdown"],
        #ggb-applet [class*="Dropdown"] {
            border-radius: 0 !important;
        }

        /* 页面美化面板 */
        .beautify-panel {
            display: none;
            flex-direction: column;
            flex: 1;
            overflow: hidden;
        }

        .beautify-panel.show {
            display: flex;
        }

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

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

        .beautify-group-title {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-secondary);
            margin-bottom: 10px;
            padding-bottom: 6px;
            border-bottom: 1px solid var(--border-color);
        }

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

        .beautify-option {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            background: var(--bg-tertiary);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
            user-select: none;
        }

        .beautify-option:hover {
            background: var(--bg-hover);
        }

        .beautify-option input[type="checkbox"] {
            display: none;
        }

        .beautify-checkbox {
            width: 18px;
            height: 18px;
            border: 2px solid var(--border-color);
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            flex-shrink: 0;
        }

        .beautify-checkbox::after {
            content: '\f00c';
            font-family: 'Font Awesome 6 Free';
            font-weight: 900;
            font-size: 10px;
            color: white;
            opacity: 0;
            transform: scale(0);
            transition: all 0.2s;
        }

        .beautify-option input[type="checkbox"]:checked+.beautify-checkbox {
            background: var(--accent);
            border-color: var(--accent);
        }

        .beautify-option input[type="checkbox"]:checked+.beautify-checkbox::after {
            opacity: 1;
            transform: scale(1);
        }

        .beautify-option span:last-child {
            font-size: 13px;
            color: var(--text-primary);
        }

        /* Toast 提示 */
        .toast-message {
            position: fixed;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%) translateY(20px);
            padding: 14px 40px 14px 20px;
            border-radius: 10px;
            font-size: 14px;
            font-weight: 500;
            z-index: 10000;
            opacity: 0;
            transition: all 0.3s ease;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
            max-width: 90%;
            line-height: 1.5;
        }

        .toast-message.show {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }

        .toast-close {
            position: absolute;
            top: 50%;
            right: 10px;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: inherit;
            font-size: 18px;
            cursor: pointer;
            opacity: 0.7;
            padding: 0 5px;
            line-height: 1;
        }

        .toast-close:hover {
            opacity: 1;
        }

        .toast-info {
            background: var(--bg-tertiary);
            color: var(--text-primary);
            border: 1px solid var(--border-color);
        }

        .toast-success {
            background: #166534;
            color: #dcfce7;
        }

        .toast-warning {
            background: #854d0e;
            color: #fef9c3;
        }

        .toast-error {
            background: #991b1b;
            color: #fee2e2;
        }

        /* 模型提示文字 */
        .model-hint {
            font-size: 10px;
            color: var(--text-muted);
            font-weight: 400;
        }

        /* 模型分组标签 */
        .model-section-label {
            font-size: 11px;
            color: var(--text-secondary);
            margin-bottom: 6px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .model-section-label .badge {
            font-size: 9px;
            background: linear-gradient(135deg, var(--accent) 0%, #8B5CF6 100%);
            color: white;
            padding: 1px 6px;
            border-radius: 8px;
            font-weight: 600;
        }

        /* 其他模型折叠区域 */
        .other-models-toggle {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 6px 10px;
            background: var(--bg-tertiary);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            cursor: pointer;
            margin-top: 8px;
            margin-bottom: 6px;
            transition: all 0.2s ease;
        }

        .other-models-toggle:hover {
            border-color: var(--accent);
            background: rgba(99, 102, 241, 0.05);
        }

        .other-models-toggle .toggle-label {
            font-size: 11px;
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .other-models-toggle .toggle-icon {
            font-size: 10px;
            color: var(--text-muted);
            transition: transform 0.3s ease;
        }

        .other-models-toggle.expanded .toggle-icon {
            transform: rotate(180deg);
        }

        .model-grid.other-models-grid {
            display: none;
            animation: fadeIn 0.3s ease;
        }

        .model-grid.other-models-grid.show {
            display: grid;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(-5px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* 模型选择 - 横向布局 */
        .model-selector-row {
            display: flex;
            gap: 10px;
            align-items: stretch;
        }

        .model-card-compact {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 14px;
            background: var(--bg-tertiary);
            border: 2px solid var(--border-color);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
        }

        .model-card-compact:hover {
            border-color: var(--accent);
            background: rgba(99, 102, 241, 0.05);
        }

        .model-card-compact.selected {
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
            border-color: var(--accent);
            box-shadow: 0 0 0 1px var(--accent-glow);
        }

        .model-card-compact i {
            font-size: 16px;
        }

        .model-card-compact .model-name {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-primary);
        }

        .model-card-compact .model-credits {
            font-size: 11px;
            padding: 2px 6px;
            background: var(--bg-secondary);
            border-radius: 4px;
            color: var(--text-muted);
        }

        .model-card-compact.selected .model-credits {
            background: var(--accent);
            color: white;
        }

        .model-card-compact .tag {
            font-size: 10px;
            padding: 2px 5px;
        }

        .model-dropdown-wrapper {
            flex: 1;
            min-width: 0;
        }

        .model-dropdown {
            width: 100%;
            padding: 10px 12px;
            background: var(--bg-tertiary);
            border: 2px solid var(--border-color);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 13px;
            cursor: pointer;
            transition: all 0.2s ease;
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 12px center;
            padding-right: 32px;
        }

        .model-dropdown:hover {
            border-color: var(--accent);
        }

        .model-dropdown:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 2px var(--accent-glow);
        }

        .model-dropdown.has-selection {
            border-color: var(--accent);
            background-color: rgba(99, 102, 241, 0.1);
        }

        .model-dropdown option {
            background: #1e1e2e;
            color: #e5e5e5;
            padding: 10px 12px;
        }

        .model-dropdown option:hover,
        .model-dropdown option:checked {
            background: #3b3b5c;
            color: #fff;
        }

        .model-hint-text {
            font-size: 11px;
            color: var(--text-muted);
            margin-top: 6px;
        }

        /* 模型选择卡片 - 紧凑版（保留兼容） */
        .model-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            /* 4列 */
            gap: 5px;
        }

        .model-card {
            padding: 6px;
            background: var(--bg-tertiary);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .model-card:hover {
            border-color: var(--accent);
            background: rgba(99, 102, 241, 0.05);
            transform: translateY(-1px);
        }

        .model-card.selected {
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
            border-color: var(--accent);
            box-shadow: 0 0 0 1px var(--accent-glow);
        }

        .model-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 4px;
        }

        .model-icon {
            font-size: 12px;
        }

        .model-credits {
            font-size: 9px;
            color: var(--accent);
            background: rgba(99, 102, 241, 0.15);
            padding: 1px 6px;
            border-radius: 8px;
            font-weight: 600;
        }

        .model-card.selected .model-credits {
            background: var(--accent);
            color: white;
        }

        .model-name {
            font-size: 10px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 1px;
        }

        .model-desc {
            font-size: 9px;
            color: var(--text-muted);
            margin-bottom: 3px;
        }

        .model-tags {
            display: flex;
            gap: 3px;
            flex-wrap: wrap;
        }

        .tag {
            font-size: 8px;
            padding: 1px 4px;
            border-radius: 3px;
            font-weight: 500;
        }

        .tag-green {
            background: rgba(16, 185, 129, 0.15);
            color: #10B981;
        }

        .tag-purple {
            background: rgba(139, 92, 246, 0.15);
            color: #8B5CF6;
        }

        .tag-cyan {
            background: rgba(6, 182, 212, 0.15);
            color: #06B6D4;
        }

        .tag-blue {
            background: rgba(59, 130, 246, 0.15);
            color: #3B82F6;
        }

        .tag-orange {
            background: rgba(245, 158, 11, 0.15);
            color: #F59E0B;
        }

        .tag-pink {
            background: rgba(236, 72, 153, 0.15);
            color: #EC4899;
        }

        .tag-teal {
            background: rgba(20, 184, 166, 0.15);
            color: #14B8A6;
        }

        .tag-gray {
            background: rgba(156, 163, 175, 0.15);
            color: #9CA3AF;
        }

        .tag-indigo {
            background: rgba(99, 102, 241, 0.15);
            color: #6366F1;
        }

        .tag-yellow {
            background: rgba(251, 191, 36, 0.15);
            color: #FBBF24;
        }

        .tag-red {
            background: rgba(239, 68, 68, 0.15);
            color: #EF4444;
        }

        /* 图片上传禁用状态 */
        .upload-section.disabled {
            opacity: 0.4;
            pointer-events: none;
        }

        .upload-section.disabled .upload-area {
            background: var(--bg-tertiary);
            border-style: dashed;
            cursor: not-allowed;
        }

        .upload-disabled-hint {
            font-size: 10px;
            color: var(--text-muted);
            margin-top: 4px;
            text-align: center;
        }

        /* 提示词模式开关 */
        .prompt-mode-toggle {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 16px;
            background: var(--bg-tertiary);
            border-radius: 8px;
            border: 1px solid var(--border-color);
        }

        .toggle-switch {
            position: relative;
            width: 48px;
            height: 26px;
            flex-shrink: 0;
        }

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

        .toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #374151;
            border-radius: 26px;
            transition: 0.3s;
        }

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

        .toggle-switch input:checked+.toggle-slider {
            background-color: var(--accent);
        }

        .toggle-switch input:checked+.toggle-slider:before {
            transform: translateX(22px);
        }

        .toggle-label {
            font-weight: 500;
            color: var(--text);
        }

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

        /* ========== 响应式设计 ========== */

        /* 大平板/小桌面（iPad Pro 横屏、笔记本） */
        @media (max-width: 1200px) {
            .control-panel {
                width: 460px;
                min-width: 420px;
            }

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

            .form-label {
                font-size: 12px;
            }

            .prompt-input {
                font-size: 13px;
                padding: 12px 14px;
            }

            .model-name {
                font-size: 10px;
            }

            .model-desc {
                font-size: 9px;
            }

            .generate-btn {
                font-size: 14px;
                padding: 12px 20px;
            }
        }

        /* 平板竖屏（iPad 竖屏） */
        @media (max-width: 1024px) {
            .control-panel {
                width: 400px;
                min-width: 360px;
            }

            .panel-content {
                padding: 14px 16px;
            }

            .form-section {
                margin-bottom: 16px;
            }

            .form-label {
                font-size: 11px;
                margin-bottom: 6px;
            }

            .prompt-input {
                font-size: 12px;
                min-height: 100px;
                padding: 10px 12px;
            }

            .input-row .prompt-input {
                min-height: 120px;
                height: 120px;
            }

            .upload-grid {
                gap: 10px;
            }

            .upload-slot .slot-icon {
                font-size: 20px;
            }

            .upload-slot .slot-text {
                font-size: 10px;
            }

            .model-grid {
                gap: 5px;
            }

            .model-card {
                padding: 6px;
            }

            .model-icon {
                font-size: 12px;
            }

            .model-credits {
                font-size: 9px;
                padding: 1px 5px;
            }

            .model-name {
                font-size: 10px;
            }

            .model-desc {
                font-size: 8px;
            }

            .tag {
                font-size: 7px;
                padding: 1px 3px;
            }

            .layout-btn {
                padding: 10px 6px;
                font-size: 10px;
            }

            .layout-btn i {
                font-size: 16px;
            }

            .generate-btn {
                font-size: 13px;
                padding: 11px 18px;
            }

            .help-guide-btn {
                padding: 0 12px;
                height: 44px;
                font-size: 12px;
            }
        }

        /* 小平板/大手机横屏 */
        @media (max-width: 850px) {
            .ai-container {
                flex-direction: column;
            }

            .control-panel {
                width: 100%;
                min-width: 100%;
                height: auto;
                max-height: 50vh;
                border-right: none;
                border-bottom: 1px solid var(--border-color);
            }

            .panel-content {
                padding: 12px 16px;
                overflow-y: auto;
            }

            .preview-panel {
                flex: 1;
                min-height: 50vh;
            }

            .input-row {
                gap: 12px;
                margin-bottom: 16px;
            }

            .input-row .prompt-input {
                min-height: 80px;
                height: 80px;
            }

            .upload-grid {
                gap: 8px;
            }

            .upload-slot {
                min-height: 60px;
            }

            .upload-slot .slot-icon {
                font-size: 18px;
                margin-bottom: 4px;
            }

            .upload-slot .slot-text {
                font-size: 9px;
            }

            .model-grid {
                grid-template-columns: repeat(3, 1fr);
                /* 中等屏幕3列 */
            }

            .layout-buttons {
                grid-template-columns: repeat(4, 1fr);
            }

            /* GGB 面板响应式 - 避免重叠 */
            .ggb-panel {
                overflow: hidden;
                min-height: 300px;
            }

            .ggb-container {
                position: relative;
                overflow: hidden;
            }

            /* GGB 头部响应式 */
            .ggb-header {
                flex-wrap: wrap;
                gap: 10px;
                padding: 10px 16px;
                position: relative;
                z-index: 10;
            }

            .ggb-title-section {
                width: 100%;
                flex-wrap: wrap;
                gap: 8px;
            }

            .ggb-main-title {
                font-size: 15px;
            }

            .ggb-main-title i {
                font-size: 17px;
            }

            .contact-btn {
                height: 30px;
                padding: 0 10px;
                font-size: 11px;
            }

            .ggb-actions {
                width: 100%;
                justify-content: flex-start;
                gap: 8px;
                flex-wrap: wrap;
            }

            .ggb-action-btn {
                height: 30px;
                padding: 0 10px;
                font-size: 12px;
            }

            .header-credits {
                height: 30px;
                padding: 0 10px;
                font-size: 12px;
            }

            .header-storage {
                height: 30px;
                padding: 0 10px;
                font-size: 12px;
            }
        }

        /* 手机端 */
        @media (max-width: 600px) {
            .ai-container {
                height: auto;
                min-height: calc(100vh - 60px);
                margin-top: 60px;
            }

            .control-panel {
                max-height: 60vh;
            }

            .panel-header {
                padding: 10px 14px;
            }

            .panel-content {
                padding: 12px 14px;
            }

            .form-label {
                font-size: 11px;
            }

            .input-row {
                flex-direction: column;
                gap: 12px;
            }

            .input-row .prompt-input {
                min-height: 100px;
                height: auto;
            }

            /* 手机端图片上传保持4列但更紧凑 */
            .upload-grid {
                gap: 6px;
            }

            .upload-slot {
                min-height: 50px;
            }

            .upload-slot .slot-icon {
                font-size: 16px;
                margin-bottom: 2px;
            }

            .upload-slot .slot-text {
                font-size: 8px;
            }

            .upload-slot .slot-remove {
                width: 18px;
                height: 18px;
                font-size: 9px;
            }

            .upload-hint-text {
                font-size: 9px;
                margin-top: 6px;
            }

            .model-grid {
                grid-template-columns: repeat(3, 1fr);
                /* 小屏幕保持3列 */
            }

            .model-card {
                padding: 5px;
            }

            .model-name {
                font-size: 9px;
            }

            .model-desc {
                font-size: 8px;
            }

            .tag {
                font-size: 7px;
            }

            .generate-btn {
                font-size: 14px;
                padding: 12px 16px;
            }

            .preview-panel {
                min-height: 40vh;
            }

            /* GGB 面板手机端优化 */
            .ggb-panel {
                min-height: 250px;
            }

            .ggb-header {
                padding: 8px 12px;
                z-index: 10;
            }

            .ggb-main-title {
                font-size: 14px;
            }

            .contact-btn {
                height: 28px;
                padding: 0 8px;
                font-size: 10px;
            }

            .contact-btn span {
                display: none;
            }

            .ggb-actions {
                gap: 6px;
            }

            .ggb-action-btn {
                height: 28px;
                padding: 0 8px;
                font-size: 11px;
            }

            .ggb-action-btn span {
                display: none;
            }

            .header-credits {
                height: 28px;
                padding: 0 8px;
                font-size: 11px;
            }

            .header-storage {
                height: 28px;
                padding: 0 8px;
                font-size: 11px;
            }
        }

        /* 超小屏幕 */
        @media (max-width: 480px) {

            .header-credits,
            .header-storage {
                height: 26px;
                padding: 0 6px;
                gap: 4px;
                font-size: 10px;
            }

            .header-credits i,
            .header-storage i {
                font-size: 11px;
            }

            .model-grid {
                grid-template-columns: repeat(2, 1fr);
                /* 超小屏幕2列 */
            }

            .model-card {
                padding: 4px;
            }

            .model-icon {
                font-size: 10px;
            }

            .model-name {
                font-size: 8px;
            }

            .model-desc {
                display: none;
                /* 超小屏幕隐藏描述 */
            }

        }

        /* 积分提示 */
        .credits-hint {
            font-size: 12px;
            color: var(--text-muted);
            font-weight: normal;
            margin-left: 8px;
        }

        /* 用户下拉菜单深色主题适配 */
        .user-dropdown {
            background: var(--bg-secondary) !important;
            border: 1px solid var(--border-color) !important;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
        }

        .user-dropdown-header {
            border-bottom: 1px solid var(--border-color) !important;
        }

        .user-dropdown-header .username {
            color: var(--text-primary) !important;
        }

        .user-dropdown-header .expire-info {
            color: var(--text-secondary) !important;
        }

        .user-dropdown-item {
            color: var(--text-secondary) !important;
        }

        .user-dropdown-item:hover {
            background: var(--bg-hover) !important;
            color: var(--accent) !important;
        }

        .user-dropdown-divider {
            background: var(--border-color) !important;
        }

        /* 移动端下拉菜单深色主题适配 */
        .mobile-dropdown-menu {
            background: var(--bg-secondary) !important;
            border: 1px solid var(--border-color) !important;
        }

        .mobile-menu-item {
            background: var(--bg-tertiary) !important;
            color: var(--text-primary) !important;
            border: 1px solid var(--border-color) !important;
        }

        .mobile-menu-item:hover {
            background: var(--bg-hover) !important;
            border-color: var(--accent) !important;
        }

        .mobile-menu-item.active {
            background: var(--accent) !important;
            border-color: var(--accent) !important;
            color: white !important;
        }

        .mobile-menu-item i,
        .mobile-menu-item span {
            color: inherit !important;
        }

        /* 指令模式按钮样式 */
        .cmd-mode-btn {
            position: relative;
        }

        .cmd-mode-btn .cmd-badge {
            position: absolute;
            top: -6px;
            right: -6px;
            background: #ef4444;
            color: white;
            font-size: 10px;
            padding: 2px 6px;
            border-radius: 10px;
            font-weight: 600;
            min-width: 18px;
            text-align: center;
        }

        /* 命令面板包装器（覆盖在设置内容上，但不覆盖顶部模式切换） */
        .command-panel-wrapper {
            display: none;
            position: absolute;
            top: 53px;
            /* panel-header 高度 */
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--bg-primary);
            flex-direction: column;
            z-index: 10;
        }

        .command-panel-wrapper.show {
            display: flex;
        }

        /* 控制面板需要相对定位来容纳命令面板 */
        .control-panel {
            position: relative;
        }

        /* 加载动画 */
        .cmd-loading {
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 60px 20px;
            text-align: center;
            flex: 1;
        }

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

        .loading-spinner {
            width: 50px;
            height: 50px;
            border: 3px solid var(--border-color);
            border-top-color: var(--accent);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-bottom: 20px;
        }

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

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

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

        /* 命令内容区 */
        .cmd-content {
            display: none;
            flex-direction: column;
            flex: 1;
            overflow: hidden;
        }

        .cmd-content.show {
            display: flex;
        }

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

        .cmd-ctrl-btn {
            padding: 8px 12px;
            background: var(--bg-tertiary);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            color: var(--text-secondary);
            font-size: 12px;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .cmd-ctrl-btn:hover {
            background: var(--bg-hover);
            color: var(--text-primary);
        }

        .cmd-ctrl-btn.primary {
            background: var(--accent);
            border-color: var(--accent);
            color: white;
        }

        .cmd-ctrl-btn.primary:hover {
            background: #7c3aed;
        }

        .cmd-list {
            flex: 1;
            overflow-y: auto;
            padding: 12px;
            font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
            font-size: 12px;
        }

        .cmd-empty {
            color: var(--text-muted);
            text-align: center;
            padding: 40px 20px;
            font-family: inherit;
        }

        .cmd-empty i {
            font-size: 40px;
            margin-bottom: 12px;
            opacity: 0.5;
        }

        .cmd-empty p {
            margin: 0;
        }

        .cmd-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 10px;
            margin-bottom: 4px;
            background: var(--bg-secondary);
            border-radius: 6px;
            border-left: 3px solid var(--border-color);
            transition: all 0.2s;
        }

        .cmd-item.pending {
            border-left-color: var(--text-muted);
        }

        .cmd-item.executing {
            border-left-color: var(--warning);
            background: rgba(245, 158, 11, 0.15);
            animation: pulse 1s ease-in-out infinite;
        }

        @keyframes pulse {

            0%,
            100% {
                opacity: 1;
            }

            50% {
                opacity: 0.7;
            }
        }

        .cmd-item.success {
            border-left-color: var(--success);
        }

        .cmd-item.error {
            border-left-color: #ef4444;
            background: rgba(239, 68, 68, 0.15);
        }

        /* 流式显示容器 */
        .stream-container {
            padding: 12px;
            background: var(--bg-tertiary);
            border-radius: 8px;
            max-height: 400px;
            overflow-y: auto;
            font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
            font-size: 12px;
            line-height: 1.6;
        }

        .stream-text {
            white-space: pre-wrap;
            word-break: break-all;
            color: var(--text-primary);
        }

        .stream-cursor {
            display: inline-block;
            width: 10px;
            height: 18px;
            background: var(--accent);
            animation: cursor-glow 1s ease-in-out infinite;
            vertical-align: middle;
            margin-left: 4px;
            border-radius: 2px;
            box-shadow: 0 0 8px var(--accent), 0 0 16px var(--accent);
        }

        @keyframes cursor-glow {

            0%,
            100% {
                opacity: 1;
                box-shadow: 0 0 8px var(--accent), 0 0 16px var(--accent);
            }

            50% {
                opacity: 0.3;
                box-shadow: 0 0 4px var(--accent), 0 0 8px var(--accent);
            }
        }

        /* AI生成状态提示 */
        .stream-status {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 14px;
            margin-bottom: 12px;
            background: rgba(139, 92, 246, 0.15);
            border: 1px solid var(--accent);
            border-radius: 8px;
            color: var(--accent);
            font-size: 13px;
            font-weight: 500;
            animation: pulse-border 2s ease-in-out infinite;
        }

        .stream-status i {
            font-size: 16px;
            animation: bounce 1s ease-in-out infinite;
        }

        .stream-status span {
            animation: text-pulse 2s ease-in-out infinite;
        }

        @keyframes pulse-border {

            0%,
            100% {
                border-color: var(--accent);
                box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
            }

            50% {
                border-color: rgba(139, 92, 246, 0.5);
                box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
            }
        }

        @keyframes bounce {

            0%,
            100% {
                transform: translateY(0);
            }

            50% {
                transform: translateY(-3px);
            }
        }

        @keyframes text-pulse {

            0%,
            100% {
                opacity: 1;
            }

            50% {
                opacity: 0.7;
            }
        }

        .cmd-index {
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--bg-tertiary);
            border-radius: 50%;
            font-size: 10px;
            font-weight: 600;
            color: var(--text-secondary);
            flex-shrink: 0;
        }

        .cmd-item.success .cmd-index {
            background: var(--success);
            color: white;
        }

        .cmd-item.error .cmd-index {
            background: #ef4444;
            color: white;
        }

        .cmd-text {
            flex: 1;
            color: var(--text-primary);
            word-break: break-all;
            line-height: 1.4;
            font-size: 11px;
        }

        .cmd-item.error .cmd-text {
            color: #fca5a5;
        }

        .cmd-actions {
            display: flex;
            gap: 4px;
            opacity: 0;
            transition: opacity 0.2s;
        }

        .cmd-item:hover .cmd-actions {
            opacity: 1;
        }

        .cmd-action {
            padding: 4px 8px;
            background: transparent;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            color: var(--text-secondary);
            font-size: 10px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .cmd-action:hover {
            background: var(--accent);
            border-color: var(--accent);
            color: white;
        }

        .cmd-action.edit-btn:hover {
            background: #6366f1;
            border-color: #6366f1;
        }

        /* 失败命令样式 */
        .cmd-item.error {
            cursor: pointer;
        }

        .cmd-item.error:hover {
            background: rgba(239, 68, 68, 0.25);
        }

        /* 命令编辑模态框 */
        .cmd-edit-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            z-index: 10000;
            align-items: center;
            justify-content: center;
        }

        .cmd-edit-modal.show {
            display: flex;
        }

        .cmd-edit-content {
            background: var(--bg-primary);
            border-radius: 12px;
            width: 90%;
            max-width: 600px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
        }

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

        .cmd-edit-title {
            font-weight: 600;
            color: var(--text-primary);
        }

        .cmd-edit-close {
            background: none;
            border: none;
            color: var(--text-muted);
            font-size: 24px;
            cursor: pointer;
            padding: 0;
            line-height: 1;
        }

        .cmd-edit-close:hover {
            color: var(--text-primary);
        }

        .cmd-edit-body {
            padding: 20px;
        }

        .cmd-edit-input {
            width: 100%;
            padding: 12px;
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            color: var(--text-primary);
            font-family: 'Monaco', 'Consolas', monospace;
            font-size: 14px;
            margin-bottom: 12px;
        }

        .cmd-edit-input:focus {
            outline: none;
            border-color: var(--accent);
        }

        .cmd-edit-error {
            background: rgba(239, 68, 68, 0.1);
            border: 1px solid rgba(239, 68, 68, 0.3);
            border-radius: 8px;
            padding: 12px;
            margin-bottom: 12px;
            color: #fca5a5;
            font-size: 13px;
        }

        .cmd-edit-error i {
            margin-right: 8px;
            color: #ef4444;
        }

        .cmd-edit-footer {
            padding: 16px 20px;
            border-top: 1px solid var(--border-color);
            display: flex;
            justify-content: flex-end;
            gap: 12px;
        }

        .cmd-edit-btn {
            padding: 10px 20px;
            border-radius: 8px;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .cmd-edit-btn.cancel {
            background: transparent;
            border: 1px solid var(--border-color);
            color: var(--text-secondary);
        }

        .cmd-edit-btn.cancel:hover {
            background: var(--bg-secondary);
        }

        .cmd-edit-btn.execute {
            background: var(--accent);
            border: none;
            color: white;
        }

        .cmd-edit-btn.execute:hover {
            background: #2563eb;
        }

        /* 积分购买弹窗 */
        .credits-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(4px);
            z-index: 10000;
            align-items: center;
            justify-content: center;
        }

        .credits-modal.show {
            display: flex;
        }

        .credits-modal-content {
            background: white;
            border-radius: 16px;
            width: 95%;
            max-width: 580px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            animation: creditsModalSlideIn 0.3s ease;
        }

        @keyframes creditsModalSlideIn {
            from {
                opacity: 0;
                transform: translateY(-20px) scale(0.95);
            }

            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .credits-modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 1.25rem;
            border-bottom: 1px solid #e5e7eb;
            background: white;
            border-radius: 16px 16px 0 0;
        }

        .credits-modal-header h3 {
            margin: 0;
            font-size: 1.1rem;
            color: #374151;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .credits-modal-close {
            background: #f3f4f6;
            border: 1px solid #e5e7eb;
            color: #6b7280;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }

        .credits-modal-close:hover {
            background: #e5e7eb;
            color: #374151;
        }

        .credits-modal-body {
            padding: 1.25rem;
        }

        .credits-desc {
            text-align: center;
            color: #6b7280;
            font-size: 0.9rem;
            margin: 0 0 1rem;
        }

        .credits-options {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 0.6rem;
            margin-bottom: 1rem;
        }

        @media (max-width: 500px) {
            .credits-options {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        .credits-option {
            cursor: pointer;
        }

        .credits-option input {
            display: none;
        }

        .credits-card {
            background: #f9fafb;
            border: 2px solid #e5e7eb;
            border-radius: 12px;
            padding: 1rem 0.5rem;
            text-align: center;
            transition: all 0.2s;
            position: relative;
        }

        .credits-option input:checked+.credits-card {
            border-color: #6366f1;
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
        }

        .credits-card:hover {
            border-color: #6366f1;
        }

        .credits-badge {
            position: absolute;
            top: -8px;
            right: -8px;
            background: linear-gradient(135deg, #ef4444, #f97316);
            color: white;
            font-size: 0.65rem;
            padding: 2px 6px;
            border-radius: 8px;
            font-weight: 600;
        }

        /* 新人礼包样式 - 与普通卡片一致 */
        .credits-card.newbie-card {
            border: 2px solid #e5e7eb;
            background: #f9fafb;
        }

        .credits-option input:checked+.credits-card.newbie-card {
            border-color: #6366f1;
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
        }

        .credits-badge.newbie-badge {
            background: linear-gradient(135deg, #ef4444, #f97316);
        }

        /* 已购买遮罩 */
        .purchased-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(255, 255, 255, 0.9);
            border-radius: 10px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: #10b981;
            font-weight: 600;
            font-size: 0.85rem;
            gap: 4px;
        }

        .purchased-overlay i {
            font-size: 1.5rem;
        }

        .credits-option.disabled {
            pointer-events: none;
            opacity: 0.8;
        }

        .credits-amount {
            font-size: 1.1rem;
            font-weight: 600;
            color: #374151;
            margin-bottom: 4px;
        }

        .credits-price {
            font-size: 1.25rem;
            font-weight: 700;
            color: #6366f1;
        }

        .credits-tag {
            font-size: 0.75rem;
            color: #9ca3af;
            margin-top: 4px;
        }

        .credits-summary {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.75rem 1rem;
            background: #f3f4f6;
            border-radius: 8px;
            margin-bottom: 1rem;
        }

        .credits-summary span:last-child {
            font-size: 1.25rem;
            font-weight: 700;
            color: #6366f1;
        }

        .credits-tip {
            background: #f0f9ff;
            border: 1px solid #bae6fd;
            border-radius: 8px;
            padding: 12px;
        }

        .credits-tip p {
            margin: 0;
            font-size: 0.85rem;
            color: #0369a1;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .credits-modal-footer {
            display: flex;
            gap: 0.75rem;
            padding: 1rem 1.25rem;
            border-top: 1px solid #e5e7eb;
            background: #f9fafb;
            border-radius: 0 0 16px 16px;
        }

        .credits-btn-cancel {
            flex: 1;
            padding: 0.75rem;
            background: #e5e7eb;
            color: #374151;
            border: none;
            border-radius: 8px;
            font-size: 0.95rem;
            cursor: pointer;
            transition: background 0.2s;
        }

        .credits-btn-cancel:hover {
            background: #d1d5db;
        }

        .credits-btn-confirm {
            flex: 2;
            padding: 0.75rem;
            background: linear-gradient(135deg, #1677ff 0%, #0958d9 100%);
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 0.95rem;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            transition: all 0.2s;
        }

        .credits-btn-confirm:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(22, 119, 255, 0.4);
        }

        .credits-btn-confirm:disabled {
            background: #9ca3af;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        /* 保存到云端模态框 */
        .save-cloud-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            z-index: 10000;
            align-items: center;
            justify-content: center;
        }

        .save-cloud-modal.show {
            display: flex;
        }

        .save-cloud-content {
            background: var(--bg-primary);
            border-radius: 12px;
            width: 90%;
            max-width: 420px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
        }

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

        .save-cloud-title {
            font-weight: 600;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .save-cloud-title i {
            color: var(--accent);
        }

        .save-cloud-close {
            background: none;
            border: none;
            color: var(--text-muted);
            font-size: 24px;
            cursor: pointer;
            padding: 0;
            line-height: 1;
        }

        .save-cloud-close:hover {
            color: var(--text-primary);
        }

        .save-cloud-body {
            padding: 20px;
        }

        .save-form-group {
            margin-bottom: 16px;
        }

        .save-form-label {
            display: block;
            font-size: 13px;
            color: var(--text-secondary);
            margin-bottom: 6px;
        }

        .save-form-label .required {
            color: #ef4444;
        }

        .save-form-input {
            width: 100%;
            padding: 10px 12px;
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 14px;
        }

        .save-form-input:focus {
            outline: none;
            border-color: var(--accent);
        }

        .save-form-readonly {
            width: 100%;
            padding: 10px 12px;
            background: var(--bg-tertiary);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            color: var(--text-secondary);
            font-size: 14px;
        }

        .save-cloud-info {
            background: rgba(99, 102, 241, 0.1);
            border: 1px solid rgba(99, 102, 241, 0.2);
            border-radius: 8px;
            padding: 12px;
            color: var(--text-secondary);
            font-size: 12px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .save-cloud-info i {
            color: var(--accent);
        }

        .save-cloud-footer {
            padding: 16px 20px;
            border-top: 1px solid var(--border-color);
            display: flex;
            justify-content: flex-end;
            gap: 12px;
        }

        .save-cloud-btn {
            padding: 10px 20px;
            border-radius: 8px;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .save-cloud-btn.cancel {
            background: transparent;
            border: 1px solid var(--border-color);
            color: var(--text-secondary);
        }

        .save-cloud-btn.cancel:hover {
            background: var(--bg-secondary);
        }

        .save-cloud-btn.save {
            background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
            border: none;
            color: white;
        }

        .save-cloud-btn.save:hover {
            background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
        }

        .save-cloud-btn.save:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        /* 响应式 - 平板 */
        @media (max-width: 1024px) {

            html,
            body {
                height: auto;
                overflow-y: auto;
                overflow-x: hidden;
            }

            .ai-container {
                flex-direction: column;
                height: auto;
                min-height: calc(100vh - 70px);
            }

            .control-panel {
                width: 100%;
                min-width: auto;
                border-right: none;
                border-bottom: 1px solid var(--border-color);
                overflow: visible;
            }

            .control-panel .panel-body {
                overflow: visible;
                max-height: none;
            }

            .ggb-panel {
                min-height: 500px;
            }
        }

        /* 响应式 - 手机 */
        @media (max-width: 768px) {
            .left-panel-area {
                width: 100%;
                min-width: 0;
            }

            .panel-tab span {
                display: none;
            }

            .panel-tab {
                padding: 10px;
            }

            .ai-container {
                margin-top: 60px;
                min-height: auto;
            }

            .ggb-panel {
                min-height: 400px;
            }
        }

        @media (max-width: 600px) {
            .panel-body {
                padding: 16px;
            }
        }

        /* ========== 检测支付状态弹窗 ========== */
        .payment-checking-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: 10001;
        }

        .payment-checking-content {
            background: white;
            border-radius: 16px;
            padding: 2rem;
            text-align: center;
            max-width: 320px;
            width: 90%;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            animation: modalSlideIn 0.3s ease;
        }

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

            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .checking-icon {
            width: 70px;
            height: 70px;
            background: linear-gradient(135deg, #3b82f6, #1d4ed8);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 1rem;
        }

        .checking-icon i {
            font-size: 32px;
            color: white;
        }

        .payment-checking-content h3 {
            font-size: 1.2rem;
            color: #1f2937;
            margin: 0 0 0.5rem;
        }

        .payment-checking-content p {
            color: #6b7280;
            font-size: 0.9rem;
            margin: 0 0 1rem;
        }

        .checking-progress {
            height: 4px;
            background: #e5e7eb;
            border-radius: 2px;
            overflow: hidden;
        }

        .checking-progress .progress-bar {
            height: 100%;
            background: linear-gradient(90deg, #3b82f6, #1d4ed8);
            width: 0%;
            transition: width 0.5s ease;
            border-radius: 2px;
        }

        /* ========== 支付失败弹窗 ========== */
        .payment-failed-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: 10000;
        }

        .payment-failed-content {
            background: white;
            border-radius: 16px;
            padding: 2rem;
            text-align: center;
            max-width: 340px;
            width: 90%;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            animation: modalSlideIn 0.3s ease;
        }

        .failed-icon {
            width: 70px;
            height: 70px;
            background: linear-gradient(135deg, #ef4444, #dc2626);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 1rem;
        }

        .failed-icon i {
            font-size: 32px;
            color: white;
        }

        .payment-failed-content h3 {
            font-size: 1.25rem;
            color: #1f2937;
            margin: 0 0 0.5rem;
        }

        .payment-failed-content p {
            color: #6b7280;
            font-size: 0.9rem;
            margin: 0 0 0.75rem;
        }

        .payment-failed-content .failed-hint {
            font-size: 0.8rem;
            color: #9ca3af;
            margin-bottom: 1.25rem;
        }

        .failed-buttons {
            display: flex;
            justify-content: center;
        }

        .btn-retry {
            background: #3b82f6;
            color: white;
            border: none;
            padding: 0.75rem 2rem;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-retry:hover {
            background: #1f2937;
        }