/* ===================================================
   游戏攻略工具样式 - game_strategy.css
   =================================================== */

/* ---- 基础容器 ---- */
.gs-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 140px);
    min-height: 500px;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

/* ---- 顶部工具栏 ---- */
.gs-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
    flex-wrap: wrap;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.toolbar-group:not(:last-child) {
    margin-right: 6px;
    padding-right: 12px;
    border-right: 1px solid rgba(255,255,255,0.15);
}

/* 全屏按钮组推到工具栏最右侧 */
.toolbar-group:last-child {
    margin-left: auto;
}

.toolbar-title {
    font-size: 13px;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.toolbar-btn {
    padding: 5px 11px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 5px;
    color: #e2e8f0;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.toolbar-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.35);
    color: #fff;
}

.toolbar-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.toolbar-btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    border-color: #7c3aed !important;
    font-weight: 600;
    color: #fff !important;
}

.toolbar-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
    box-shadow: 0 2px 8px rgba(99,102,241,0.5);
}

.toolbar-btn-primary.gs-btn-generating {
    opacity: 0.75;
    cursor: not-allowed;
    pointer-events: none;
}

.toolbar-btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    border-color: #b91c1c !important;
    color: #fff !important;
}

.toolbar-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
}

/* ---- 三栏主布局 ---- */
.gs-main-content {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* ---- 左栏：历史记录 ---- */
.gs-history-panel {
    width: 220px;
    min-width: 160px;
    max-width: 260px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    min-height: 0;
}

.history-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(to bottom, #fafafa, #f5f5f5);
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.history-panel-header h3 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.history-count {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 400;
    margin-left: 4px;
}

.history-clear-btn {
    background: #fff0f0;
    border: none;
    color: #ef4444;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 7px;
    border-radius: 3px;
    transition: all 0.2s;
    white-space: nowrap;
}

.history-clear-btn:hover {
    background: #fde8e8;
}

.history-search {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
}

.history-search input {
    width: 100%;
    padding: 5px 9px;
    font-size: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    outline: none;
    background: #f8f9fa;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.history-search input:focus {
    border-color: #6366f1;
    background: #fff;
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
}

.history-list::-webkit-scrollbar {
    width: 4px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.history-list::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.history-empty {
    padding: 24px 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.7;
}

.history-item {
    padding: 9px 32px 9px 13px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
    position: relative;
}

.history-item:hover {
    background: #f8faff;
}

.history-item.active {
    background: #eef2ff;
    border-left: 3px solid #6366f1;
    padding-left: 10px;
}

.history-item-game {
    font-size: 11px;
    font-weight: 700;
    color: #4f46e5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.history-item-question {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.history-item-meta {
    font-size: 10px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
}

.history-item-delete {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 4px;
    border-radius: 3px;
    opacity: 0;
    transition: all 0.15s;
}

.history-item:hover .history-item-delete {
    opacity: 1;
    color: #ef4444;
}

/* ---- 中栏：输入配置 ---- */
.gs-input-panel {
    width: 330px;
    min-width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    min-height: 0;
}

.panel-header {
    padding: 13px 16px 11px;
    background: linear-gradient(to bottom, #fafafa, #f7f8ff);
    border-bottom: 1px solid #e8ebf4;
    flex-shrink: 0;
}

.panel-header h3 {
    margin: 0 0 3px;
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    background: none;
    border: none;
    padding: 0;
}

.panel-tip {
    font-size: 11px;
    color: #94a3b8;
}

.gs-input-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.gs-input-body::-webkit-scrollbar {
    width: 4px;
}

.gs-input-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.gs-input-body::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.gs-input-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ---- 表单字段 ---- */
.gs-field-group {
    position: relative;
}

.gs-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.required-mark {
    color: #ef4444;
    font-weight: 700;
}

.optional-mark {
    color: #94a3b8;
    font-weight: 400;
    font-size: 11px;
}

.gs-text-input {
    width: 100%;
    padding: 8px 11px;
    font-size: 13px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    outline: none;
    background: #fafafa;
    box-sizing: border-box;
    transition: all 0.2s;
    color: #1e293b;
}

.gs-text-input:focus {
    border-color: #6366f1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.08);
}

.gs-textarea {
    width: 100%;
    padding: 8px 11px;
    font-size: 13px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    outline: none;
    background: #fafafa;
    box-sizing: border-box;
    resize: vertical;
    min-height: 80px;
    transition: all 0.2s;
    color: #1e293b;
    line-height: 1.6;
    word-break: break-word;
}

.gs-textarea:focus {
    border-color: #6366f1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.08);
}

.gs-char-counter {
    text-align: right;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 3px;
}

.gs-char-counter.warning {
    color: #f59e0b;
}

.gs-char-counter.danger {
    color: #ef4444;
    font-weight: 600;
}

/* ---- 快捷游戏标签 ---- */
.gs-quick-tags {
    margin-top: -6px;
}

.gs-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.gs-quick-tag {
    padding: 4px 9px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 11px;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.gs-quick-tag:hover,
.gs-quick-tag.active {
    background: #eef2ff;
    border-color: #6366f1;
    color: #4f46e5;
    font-weight: 600;
}

/* ---- 选项组 ---- */
.gs-option-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

/* ---- 攻略类型网格 ---- */
.gs-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

/* 7个选项时最后一个独占一行 */
.gs-type-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.gs-type-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 6px;
    background: #f8f9fa;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
    text-align: center;
}

.gs-type-option:hover {
    background: #f0f2ff;
    border-color: #a5b4fc;
}

.gs-type-option.selected {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border-color: #6366f1;
    box-shadow: 0 2px 6px rgba(99,102,241,0.15);
}

.gs-opt-icon {
    font-size: 18px;
    line-height: 1;
    margin-bottom: 3px;
}

.gs-opt-name {
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.2;
}

.gs-type-option.selected .gs-opt-name {
    color: #4338ca;
}

.gs-opt-hint {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 1px;
}

/* ---- 难度选项 ---- */
.gs-difficulty-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.gs-diff-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    background: #f8f9fa;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
    text-align: center;
}

.gs-diff-option:hover {
    background: #f0f2ff;
    border-color: #a5b4fc;
}

.gs-diff-option.selected {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border-color: #6366f1;
    box-shadow: 0 2px 6px rgba(99,102,241,0.15);
}

.gs-diff-option.selected .gs-opt-name {
    color: #4338ca;
}

/* ---- 使用说明 ---- */
.gs-tips-box {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 11px 13px;
}

.gs-tips-box p {
    margin: 0 0 7px;
    font-size: 12px;
    font-weight: 600;
    color: #0369a1;
}

.gs-tips-box ul {
    margin: 0;
    padding-left: 16px;
    list-style: disc;
}

.gs-tips-box li {
    font-size: 11px;
    color: #0c4a6e;
    margin-bottom: 3px;
    line-height: 1.5;
}

.gs-tips-box kbd {
    background: #fff;
    border: 1px solid #bae6fd;
    border-radius: 3px;
    padding: 1px 4px;
    font-size: 10px;
    color: #0369a1;
}

/* ---- 右栏：攻略展示 ---- */
.gs-result-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    min-height: 0;
    min-width: 0;
}

.gs-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 16px;
    background: linear-gradient(to bottom, #fafafa, #f7f8ff);
    border-bottom: 1px solid #e8ebf4;
    flex-shrink: 0;
}

.gs-result-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    background: none;
    border: none;
    padding: 0;
}

.result-actions-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.gs-regenerate-btn {
    padding: 5px 12px;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-radius: 5px;
    color: #0369a1;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.gs-regenerate-btn:hover {
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    border-color: #0ea5e9;
}

.gs-result-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.gs-result-body::-webkit-scrollbar {
    width: 5px;
}

.gs-result-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.gs-result-body::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.gs-result-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ---- 占位提示 ---- */
.result-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    text-align: center;
    color: #94a3b8;
}

.placeholder-icon {
    font-size: 52px;
    margin-bottom: 16px;
    opacity: 0.6;
    animation: gsPlaceholderPulse 2.8s ease-in-out infinite;
}

@keyframes gsPlaceholderPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.08); opacity: 0.85; }
}

.placeholder-title {
    font-size: 16px;
    font-weight: 600;
    color: #64748b;
    margin: 0 0 10px;
}

.placeholder-desc {
    font-size: 13px;
    color: #94a3b8;
    margin: 0 0 4px;
    line-height: 1.6;
}

/* ---- 加载状态 ---- */
.result-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    text-align: center;
}

.loading-dots {
    display: flex;
    gap: 7px;
    margin-bottom: 16px;
}

.loading-dots span {
    width: 10px;
    height: 10px;
    background: #6366f1;
    border-radius: 50%;
    animation: gsDotBounce 1.2s infinite ease-in-out;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes gsDotBounce {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
    40% { transform: scale(1.1); opacity: 1; }
}

.loading-text {
    font-size: 14px;
    color: #475569;
    margin: 0 0 6px;
    font-weight: 500;
}

.loading-game {
    font-size: 12px;
    color: #6366f1;
    font-weight: 600;
    margin: 0;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border: 1px solid #c7d2fe;
    border-radius: 20px;
    padding: 3px 12px;
    display: inline-block;
}

/* ---- 结果内容区 ---- */
.result-content {
    animation: gsFadeIn 0.35s ease-out;
}

@keyframes gsFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- 错误提示 ---- */
.result-error-wrap {
    flex-shrink: 0;
    padding: 8px 0;
}

.gs-error-card {
    background: linear-gradient(135deg, #fff5f5, #fee2e2);
    border: 1px solid #fca5a5;
    border-radius: 10px;
    padding: 24px;
    text-align: center;
}

.gs-error-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.gs-error-msg {
    font-size: 14px;
    color: #dc2626;
    margin: 0 0 8px;
    font-weight: 500;
    word-break: break-word;
}

.gs-error-hint {
    font-size: 12px;
    color: #ef4444;
    margin: 0;
}

.error-retry-btn {
    margin-top: 14px;
    padding: 7px 18px;
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}

.error-retry-btn:hover {
    background: #dc2626;
}

/* ---- 攻略内容样式 ---- */
.gs-strategy-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gs-strategy-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
    border-radius: 10px;
    padding: 18px 20px;
    color: #fff;
}

.gs-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.gs-strategy-title {
    font-size: 17px;
    font-weight: 700;
    color: #f0f4ff;
    margin: 0;
    line-height: 1.4;
    word-break: break-word;
}

.gs-header-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.gs-tag {
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.gs-tag-game {
    background: rgba(99,102,241,0.35);
    color: #c7d2fe;
    border: 1px solid rgba(99,102,241,0.4);
}

.gs-tag-type {
    background: rgba(16,185,129,0.25);
    color: #6ee7b7;
    border: 1px solid rgba(16,185,129,0.3);
}

.gs-tag-diff {
    background: rgba(245,158,11,0.25);
    color: #fcd34d;
    border: 1px solid rgba(245,158,11,0.3);
}

.gs-overview {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.7;
    margin: 12px 0 0;
    word-break: break-word;
}

/* ---- 各内容区块 ---- */
.gs-section {
    border-radius: 10px;
    padding: 16px 18px;
    border: 1px solid #e2e8f0;
}

.gs-section-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #1e293b;
    padding: 0;
    background: none;
    border: none;
}

/* 核心要点 */
.gs-key-points {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-color: #bae6fd;
}

.gs-key-points .gs-section-title {
    color: #0369a1;
}

.gs-key-points-grid {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.gs-key-point-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.7);
    border-radius: 7px;
    border: 1px solid rgba(186,230,253,0.6);
}

.gs-kp-num {
    min-width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #0ea5e9, #0369a1);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gs-kp-text {
    font-size: 13px;
    color: #0c4a6e;
    line-height: 1.5;
    word-break: break-word;
}

/* 详细步骤 */
.gs-steps {
    background: #fff;
}

.gs-step-card {
    background: #f8faff;
    border: 1px solid #e8ebf4;
    border-left: 3px solid #6366f1;
    border-radius: 8px;
    padding: 13px 15px;
    margin-bottom: 10px;
    transition: box-shadow 0.2s, border-color 0.2s;
    animation: gsFadeIn 0.4s ease-out both;
}

.gs-step-card:last-child {
    margin-bottom: 0;
}

.gs-step-card:hover {
    box-shadow: 0 2px 10px rgba(99,102,241,0.12);
    border-left-color: #4f46e5;
}

.gs-step-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.gs-step-num {
    min-width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gs-step-phase {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    word-break: break-word;
}

.gs-step-content {
    font-size: 13px;
    color: #475569;
    line-height: 1.7;
    margin: 0 0 8px;
    padding-left: 36px;
    word-break: break-word;
}

.gs-step-content:last-child {
    margin-bottom: 0;
}

.gs-step-tip {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    background: linear-gradient(135deg, #fffbeb, #fef9c3);
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    color: #92400e;
    line-height: 1.5;
    margin-left: 36px;
    word-break: break-word;
}

.gs-tip-icon {
    font-size: 13px;
    flex-shrink: 0;
}

/* 注意事项 */
.gs-warnings {
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    border-color: #fed7aa;
}

.gs-warnings .gs-section-title {
    color: #c2410c;
}

/* 进阶技巧 */
.gs-pro-tips {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-color: #bbf7d0;
}

.gs-pro-tips .gs-section-title {
    color: #15803d;
}

.gs-list {
    margin: 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gs-list li {
    font-size: 13px;
    line-height: 1.6;
    word-break: break-word;
}

.gs-warning-list li {
    color: #92400e;
}

.gs-pro-list li {
    color: #166534;
}

/* 表格样式 */
.gs-result-body table,
.result-content table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    margin: 10px 0;
    font-size: 13px;
}

.gs-result-body table th,
.result-content table th {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #fff;
    padding: 9px 12px;
    text-align: left;
    font-weight: 600;
}

.gs-result-body table td,
.result-content table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #374151;
}

.gs-result-body table tr:nth-child(even) td,
.result-content table tr:nth-child(even) td {
    background: #f8faff;
}

.gs-result-body table tr:hover td,
.result-content table tr:hover td {
    background: #eef2ff;
}

/* ---- 示例模态框 ---- */
.gs-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 10000;
    display: none;
    backdrop-filter: blur(2px);
}

.gs-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 640px;
    max-height: 80vh;
    display: none;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    overflow: hidden;
}

.gs-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #fff;
    flex-shrink: 0;
}

.gs-modal-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    background: none;
    border: none;
    padding: 0;
    color: #fff;
}

.gs-modal-close {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #e2e8f0;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 9px;
    border-radius: 5px;
    transition: all 0.2s;
}

.gs-modal-close:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.gs-modal-body {
    padding: 16px 20px;
    overflow-y: auto;
}

.example-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.example-card {
    padding: 13px 14px;
    background: #f8f9fa;
    border: 2px solid #e2e8f0;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.2s;
}

.example-card:hover {
    background: #eef2ff;
    border-color: #6366f1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99,102,241,0.12);
}

.example-card-icon {
    font-size: 22px;
    margin-bottom: 5px;
}

.example-card-label {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 3px;
}

.example-card-desc {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.4;
    word-break: break-word;
}

/* ---- 全屏模式（CSS 模拟，无需浏览器权限）---- */
.gs-container.gs-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    border: none;
    margin: 0;
}

/* ---- 响应式 ---- */
@media (max-width: 900px) {
    .gs-main-content {
        flex-direction: column;
        overflow-y: auto;
    }

    .gs-history-panel {
        width: 100%;
        max-width: 100%;
        min-width: unset;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        max-height: 180px;
    }

    .gs-input-panel {
        width: 100%;
        min-width: unset;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        min-height: 0;
    }

    .gs-result-panel {
        min-height: 300px;
    }

    .gs-container {
        height: auto;
    }
}

@media (max-width: 600px) {
    .gs-toolbar {
        padding: 7px 10px;
    }

    .toolbar-title {
        display: none;
    }

    .example-grid {
        grid-template-columns: 1fr;
    }

    .gs-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media print {
    .gs-toolbar,
    .gs-history-panel,
    .gs-input-panel,
    .gs-result-header {
        display: none !important;
    }

    .gs-container {
        height: auto;
        border: none;
    }

    .gs-result-panel {
        flex: none;
        width: 100%;
    }

    .gs-result-body {
        overflow: visible;
    }
}
