/* ==========================================================================
   在线调试台 · v3 视觉重做（覆写 styles.css 中的 pgc-* 旧样式）
   全部规则以 #page-playground 前缀提高优先级，不改动原有类名与 JS 逻辑
   ========================================================================== */

/* 高优先级覆盖旧样式后，必须保证 .hidden 仍然生效（Tailwind 的 .hidden 优先级不足） */
#page-playground .hidden { display: none !important; }

#page-playground {
    padding-bottom: 1rem;
    background:
        radial-gradient(900px 380px at 10% -12%, rgba(79, 70, 229, .07), transparent 68%),
        radial-gradient(760px 340px at 92% -14%, rgba(16, 185, 129, .06), transparent 70%);
    animation: pgcFade .45s ease both;
}

@keyframes pgcFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pgcIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pgcDot { 0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .5); } 70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); } }

#page-playground .pgc-shell { max-width: 1320px; margin: 0 auto; padding: 1.6rem 1.25rem 3.2rem; }

/* ---------------- 顶部工具条 ---------------- */
#page-playground .pgc-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap; margin-bottom: 1.05rem;
}
#page-playground .pgc-toolbar-left { display: flex; align-items: center; gap: .8rem; }

#page-playground .pgc-toolbar-icon {
    position: relative; width: 2.85rem; height: 2.85rem; flex: 0 0 auto;
    border-radius: .95rem; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(155deg, #27303f 0%, #0b1220 55%, #131a26 100%);
    color: #fff; font-size: 1.02rem;
    box-shadow: 0 14px 28px -14px rgba(17, 24, 39, .8), inset 0 1px 0 rgba(255, 255, 255, .22);
    overflow: hidden;
}
#page-playground .pgc-toolbar-icon::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(70% 60% at 72% 12%, rgba(99, 102, 241, .6), transparent 68%);
}
#page-playground .pgc-toolbar-icon i { position: relative; z-index: 1; }

#page-playground .pgc-toolbar-text { min-width: 0; }
#page-playground .pgc-toolbar-title {
    display: flex; align-items: center; gap: .5rem;
    font-size: 1.22rem; font-weight: 800; letter-spacing: -.02em; color: #0f1520; line-height: 1.25;
}
#page-playground .pgc-live {
    font-style: normal; font-size: .57rem; font-weight: 800; letter-spacing: .14em;
    padding: .16rem .4rem; border-radius: 999px; transform: translateY(1px);
    color: #047857; background: rgba(16, 185, 129, .1); border: 1px solid rgba(16, 185, 129, .22);
}
#page-playground .pgc-toolbar-sub { font-size: .78rem; color: #8b93a1; margin-top: .18rem; }

#page-playground .pgc-toolbar-right { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }

/* 能力标签 */
#page-playground .pgc-mode-chip {
    display: inline-flex; align-items: center; gap: .4rem; height: 2.55rem; padding: 0 .8rem;
    border-radius: .8rem; background: rgba(17, 24, 39, .05); border: 1px solid rgba(17, 24, 39, .07);
    font-size: .76rem; font-weight: 700; color: #38414f; white-space: nowrap;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}
#page-playground .pgc-mode-chip i { font-size: .78rem; color: #4f46e5; }
#page-playground .pgc-mode-chip b { display: none; font-weight: 700; }
#page-playground .pgc-shell[data-mode="chat"] .m-chat,
#page-playground .pgc-shell[data-mode="image"] .m-image,
#page-playground .pgc-shell[data-mode="speech"] .m-speech,
#page-playground .pgc-shell[data-mode="ocr"] .m-ocr { display: inline; }
#page-playground .pgc-shell[data-mode="image"] .pgc-mode-chip { background: rgba(236, 72, 153, .08); border-color: rgba(236, 72, 153, .18); color: #9d174d; }
#page-playground .pgc-shell[data-mode="image"] .pgc-mode-chip i { color: #db2777; }
#page-playground .pgc-shell[data-mode="speech"] .pgc-mode-chip { background: rgba(13, 148, 136, .08); border-color: rgba(13, 148, 136, .18); color: #115e59; }
#page-playground .pgc-shell[data-mode="speech"] .pgc-mode-chip i { color: #0d9488; }
#page-playground .pgc-shell[data-mode="ocr"] .pgc-mode-chip { background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .2); color: #92400e; }
#page-playground .pgc-shell[data-mode="ocr"] .pgc-mode-chip i { color: #d97706; }

/* 下拉胶囊 */
#page-playground .pgc-pill {
    position: relative; display: flex; align-items: center; height: 2.55rem;
    background: #fff; border: 1px solid #e6e8ee; border-radius: .8rem;
    box-shadow: 0 1px 2px rgba(17, 24, 39, .04);
    transition: border-color .2s ease, box-shadow .2s ease;
}
#page-playground .pgc-pill:hover { border-color: #d3d7e1; }
#page-playground .pgc-pill:focus-within { border-color: #9ca3af; box-shadow: 0 0 0 3.5px rgba(17, 24, 39, .07); }
#page-playground .pgc-pill-icon {
    position: absolute; left: .78rem; font-size: .78rem; color: #8b93a1; pointer-events: none;
}
#page-playground .pgc-pill-key .pgc-pill-icon { color: #d97706; }
#page-playground .pgc-pill-caret {
    position: absolute; right: .72rem; font-size: .68rem; color: #a3aab6; pointer-events: none;
}
#page-playground .pgc-select {
    -webkit-appearance: none; appearance: none; border: none; background: transparent;
    height: 100%; padding: 0 2rem 0 2.15rem; max-width: 15.5rem;
    font-size: .83rem; font-weight: 600; color: #111827; font-family: inherit;
    cursor: pointer; outline: none; border-radius: inherit;
}
#page-playground .pgc-pill-key .pgc-select { max-width: 13rem; color: #4b5563; }

/* 次级按钮 */
#page-playground .pgc-btn-ghost {
    display: inline-flex; align-items: center; gap: .4rem; height: 2.55rem; padding: 0 .95rem;
    background: #fff; border: 1px solid #e6e8ee; border-radius: .8rem;
    font-size: .82rem; font-weight: 600; color: #4b5563; cursor: pointer;
    box-shadow: 0 1px 2px rgba(17, 24, 39, .04);
    transition: all .18s ease;
}
#page-playground .pgc-btn-ghost:hover {
    color: #111827; border-color: #c9cdd6; transform: translateY(-1px);
    box-shadow: 0 8px 18px -12px rgba(17, 24, 39, .6);
}

/* 密钥提醒 */
#page-playground .pgc-key-warn {
    display: flex; align-items: center; gap: .55rem; margin-bottom: 1rem;
    padding: .62rem .85rem; border-radius: .85rem;
    background: rgba(245, 158, 11, .07); border: 1px solid rgba(245, 158, 11, .22);
    font-size: .8rem; color: #92400e;
}
#page-playground .pgc-key-warn-dot {
    width: 7px; height: 7px; border-radius: 50%; background: #f59e0b; flex: 0 0 auto;
    animation: pgcDot 2s infinite;
}
#page-playground .pgc-inline-link {
    margin-left: auto; border: none; background: none; padding: 0;
    font-size: .78rem; font-weight: 700; color: #b45309; cursor: pointer;
}
#page-playground .pgc-inline-link:hover { color: #78350f; }

/* ---------------- 三栏布局 ---------------- */
#page-playground .pgc-body {
    display: grid; grid-template-columns: 222px minmax(0, 1fr) 348px;
    gap: 1rem; align-items: start;
}

/* ---------------- 会话栏 ---------------- */
#page-playground .pgc-sessions {
    border: 1px solid #eceef3; border-radius: 1.2rem; padding: .8rem .6rem;
    background: rgba(255, 255, 255, .72); backdrop-filter: blur(10px);
    max-height: 66vh; display: flex; flex-direction: column;
}
#page-playground .pgc-sessions-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 .3rem .55rem; margin-bottom: .35rem; border-bottom: 1px solid #f2f4f8;
}
#page-playground .pgc-sessions-label {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #9aa1ae;
}
#page-playground .pgc-session-new {
    width: 1.6rem; height: 1.6rem; border-radius: .5rem; cursor: pointer; font-size: .66rem;
    border: 1px solid #e6e8ee; background: #fff; color: #4b5563;
    transition: all .18s ease;
}
#page-playground .pgc-session-new:hover { background: #111827; border-color: #111827; color: #fff; }
#page-playground .pgc-session-list { overflow-y: auto; display: flex; flex-direction: column; gap: .2rem; flex: 1; padding-right: .1rem; }
#page-playground .pgc-session-item {
    position: relative; display: flex; align-items: flex-start; gap: .3rem;
    padding: .52rem .55rem; border-radius: .7rem; border: 1px solid transparent;
    cursor: pointer; transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
#page-playground .pgc-session-item:hover { background: rgba(17, 24, 39, .04); }
#page-playground .pgc-session-item.active {
    background: #fff; border-color: #e9ebf0;
    box-shadow: 0 6px 16px -12px rgba(17, 24, 39, .6);
}
#page-playground .pgc-session-item.active::before {
    content: ''; position: absolute; left: -1px; top: 50%; transform: translateY(-50%);
    width: 3px; height: 58%; border-radius: 0 3px 3px 0; background: #111827;
}
#page-playground .pgc-session-main { flex: 1; min-width: 0; }
#page-playground .pgc-session-title {
    font-size: .8rem; font-weight: 600; color: #1f2937;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#page-playground .pgc-session-meta {
    font-size: .66rem; color: #a3aab6; margin-top: .18rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#page-playground .pgc-session-del {
    border: none; background: transparent; color: #cbd0d9; cursor: pointer;
    font-size: .68rem; padding: .1rem .15rem; opacity: 0; transition: all .16s ease;
}
#page-playground .pgc-session-item:hover .pgc-session-del { opacity: 1; }
#page-playground .pgc-session-del:hover { color: #ef4444; }
#page-playground .pgc-session-empty { font-size: .76rem; color: #a3aab6; text-align: center; padding: 1.2rem 0; }

/* ---------------- 对话主区 ---------------- */
#page-playground .pgc-main {
    display: flex; flex-direction: column; min-height: 66vh;
    background: #fff; border: 1px solid #eceef3; border-radius: 1.35rem;
    box-shadow: 0 30px 70px -50px rgba(17, 24, 39, .55);
    overflow: hidden;
}
#page-playground .pgc-chat-head {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    padding: .72rem 1.05rem; border-bottom: 1px solid #f2f4f8;
    background: linear-gradient(180deg, #ffffff, #fcfdfe);
}
#page-playground .pgc-chat-head-left { display: flex; align-items: center; gap: .5rem; min-width: 0; }
#page-playground .pgc-chat-head-label {
    font-size: .66rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #a3aab6;
}
#page-playground .pgc-chat-head-model {
    font-size: .8rem; font-weight: 700; color: #111827;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#page-playground .pgc-chat-head-model::before {
    content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%;
    background: #6366f1; margin-right: .42rem; transform: translateY(-2px);
}
#page-playground .pgc-chat-head-right { display: flex; align-items: center; gap: .55rem; }
#page-playground .pgc-status {
    display: inline-flex; align-items: center; gap: .35rem;
    font-size: .7rem; font-weight: 600; color: #6b7280;
}
#page-playground .pgc-status i {
    width: 6px; height: 6px; border-radius: 50%; background: #10b981;
    animation: pgcDot 2.4s infinite;
}
#page-playground .pgc-chat-head-sep { width: 1px; height: 14px; background: #eceef3; }
#page-playground .pgc-head-btn {
    width: 1.55rem; height: 1.55rem; border-radius: .5rem; cursor: pointer; font-size: .68rem;
    border: 1px solid #e9ebf0; background: #fff; color: #6b7280; transition: all .16s ease;
}
#page-playground .pgc-head-btn:hover { background: #111827; border-color: #111827; color: #fff; }

#page-playground .pgc-chat {
    flex: 1; overflow-y: auto; padding: 1.2rem 1.25rem 1.5rem;
    background-color: #fff;
    background-image:
        radial-gradient(rgba(17, 24, 39, .045) 1px, transparent 1px),
        linear-gradient(180deg, #fbfcfe 0%, #ffffff 46%);
    background-size: 22px 22px, 100% 100%;
    display: flex; flex-direction: column; gap: 1.05rem;
    min-height: 40vh; max-height: 58vh;
}
#page-playground .pgc-chat::-webkit-scrollbar,
#page-playground .pgc-session-list::-webkit-scrollbar,
#page-playground .pgc-code-pre::-webkit-scrollbar { width: 8px; height: 8px; }
#page-playground .pgc-chat::-webkit-scrollbar-thumb,
#page-playground .pgc-session-list::-webkit-scrollbar-thumb,
#page-playground .pgc-code-pre::-webkit-scrollbar-thumb {
    background: rgba(17, 24, 39, .13); border-radius: 99px;
    border: 2px solid transparent; background-clip: padding-box;
}

#page-playground .pgc-msg { display: flex; align-items: flex-start; gap: .65rem; animation: pgcIn .3s ease both; }
#page-playground .pgc-msg-avatar {
    width: 1.85rem; height: 1.85rem; flex: 0 0 auto; border-radius: .62rem;
    display: flex; align-items: center; justify-content: center; font-size: .7rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}
#page-playground .pgc-msg-assistant .pgc-msg-avatar {
    background: linear-gradient(150deg, #2b3444, #10151f); color: #fff;
    box-shadow: 0 8px 18px -12px rgba(17, 24, 39, .9);
}
#page-playground .pgc-msg-user { flex-direction: row-reverse; }
#page-playground .pgc-msg-user .pgc-msg-avatar { display: none; }
#page-playground .pgc-msg-system { justify-content: center; }
#page-playground .pgc-msg-system .pgc-msg-avatar { display: none; }

#page-playground .pgc-msg-body {
    max-width: 100%; font-size: .89rem; line-height: 1.82; color: #1f2937;
    word-break: break-word; white-space: pre-wrap;
}
#page-playground .pgc-msg-assistant .pgc-msg-body { padding: .12rem 0; background: transparent; border: none; }
#page-playground .pgc-msg-user .pgc-msg-body {
    max-width: 78%; padding: .6rem .9rem; border-radius: 1rem 1rem .3rem 1rem;
    background: linear-gradient(150deg, #1a212d, #0f141d); color: #f3f4f6;
    box-shadow: 0 12px 26px -20px rgba(17, 24, 39, .9);
}
#page-playground .pgc-msg-system .pgc-msg-body {
    padding: .3rem .8rem; border-radius: 999px; font-size: .74rem; color: #8b93a1;
    background: rgba(17, 24, 39, .04); border: 1px solid rgba(17, 24, 39, .05);
    line-height: 1.6; max-width: 88%; text-align: center;
}
#page-playground .pgc-msg-typing .pgc-msg-body::after {
    content: '▋'; margin-left: 2px; color: #6366f1;
    animation: pgcBlink 1s steps(2) infinite;
}
@keyframes pgcBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
#page-playground .pgc-blocked { margin-top: .55rem; font-size: .76rem; color: #dc2626; }
#page-playground .pgc-usage {
    margin-top: .85rem; font-size: .78rem; color: #047857;
    background: rgba(16, 185, 129, .07); border: 1px solid rgba(16, 185, 129, .2);
    border-radius: .7rem; padding: .5rem .8rem;
}

/* ---------------- 输入区 ---------------- */
#page-playground .pgc-compose {
    border-top: 1px solid #f2f4f8; padding: .85rem 1rem 1rem; background: #fff;
}
#page-playground .pgc-input {
    width: 100%; resize: none; box-sizing: border-box; font-family: inherit;
    padding: .78rem .9rem; font-size: .88rem; line-height: 1.6; color: #111827;
    background: #fbfcfe; border: 1px solid #e6e8ee; border-radius: .9rem;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
#page-playground .pgc-input::placeholder { color: #b0b6c1; }
#page-playground .pgc-input:focus {
    outline: none; background: #fff; border-color: rgba(17, 24, 39, .22);
    box-shadow: 0 0 0 3.5px rgba(17, 24, 39, .05);
}
#page-playground .pgc-compose-bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .7rem; }
#page-playground .pgc-ctx-hint { font-size: .72rem; color: #a3aab6; }
#page-playground .pgc-send {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    border: none; border-radius: .78rem; padding: .6rem 1.25rem;
    font-size: .85rem; font-weight: 700; color: #fff; cursor: pointer;
    background: linear-gradient(150deg, #1e2532, #0d121a);
    box-shadow: 0 12px 24px -14px rgba(17, 24, 39, .95), inset 0 1px 0 rgba(255, 255, 255, .14);
    transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}
#page-playground .pgc-send:hover { transform: translateY(-1px); box-shadow: 0 16px 30px -16px rgba(17, 24, 39, .95), inset 0 1px 0 rgba(255, 255, 255, .18); }
#page-playground .pgc-send:active { transform: translateY(0); }
#page-playground .pgc-send:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

#page-playground .pgc-inline-fields { display: flex; gap: .9rem; align-items: center; flex-wrap: wrap; }
#page-playground .pgc-inline-fields label { display: flex; align-items: center; gap: .4rem; font-size: .74rem; color: #8b93a1; }
#page-playground .pgc-upload-row { display: flex; align-items: center; gap: .7rem; margin-bottom: .7rem; flex-wrap: wrap; }
#page-playground .pgc-upload-btn {
    display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
    padding: .52rem .9rem; border-radius: .72rem; font-size: .8rem; font-weight: 700;
    background: rgba(17, 24, 39, .05); border: 1px solid rgba(17, 24, 39, .07); color: #38414f;
    transition: all .18s ease;
}
#page-playground .pgc-upload-btn:hover { background: #111827; border-color: #111827; color: #fff; }
#page-playground .pgc-file-name { font-size: .78rem; color: #8b93a1; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#page-playground .pgc-img-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .6rem; }
#page-playground .pgc-img-item img { width: 100%; border-radius: .8rem; display: block; box-shadow: 0 14px 30px -24px rgba(17, 24, 39, .8); }
#page-playground .pgc-img-note { font-size: .72rem; color: #a3aab6; margin-top: .5rem; }

/* ---------------- 右侧参数 / 代码 ---------------- */
#page-playground .pgc-side { display: flex; flex-direction: column; gap: .9rem; }
#page-playground .pgc-side-block {
    background: #fff; border: 1px solid #eceef3; border-radius: 1.2rem;
    padding: 1rem 1.05rem; box-shadow: 0 18px 40px -36px rgba(17, 24, 39, .6);
}
#page-playground .pgc-side-title {
    display: flex; align-items: center; gap: .45rem; margin-bottom: .9rem;
    font-size: .8rem; font-weight: 800; color: #111827;
}
#page-playground .pgc-side-title i { font-size: .76rem; color: #9aa1ae; }
#page-playground .pgc-field { display: block; margin-bottom: .85rem; }
#page-playground .pgc-field:last-child { margin-bottom: 0; }
#page-playground .pgc-field > span {
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    font-size: .73rem; color: #8b93a1; margin-bottom: .4rem;
}
#page-playground .pgc-field > span b {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .7rem;
    color: #111827; background: #f4f5f8; border-radius: .35rem; padding: .08rem .38rem;
}
#page-playground .pgc-field input[type=range] {
    -webkit-appearance: none; appearance: none; width: 100%; height: 4px;
    border-radius: 99px; background: #e2e6ee; outline: none; cursor: pointer;
}
#page-playground .pgc-field input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 14px; height: 14px; border-radius: 50%;
    background: #fff; border: 2px solid #111827; cursor: pointer;
    box-shadow: 0 2px 8px rgba(17, 24, 39, .3); transition: transform .16s ease, border-color .16s ease;
}
#page-playground .pgc-field input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.15); border-color: #6366f1; }
#page-playground .pgc-field input[type=range]::-moz-range-thumb {
    width: 12px; height: 12px; border-radius: 50%; background: #fff;
    border: 2px solid #111827; box-shadow: 0 2px 8px rgba(17, 24, 39, .3); cursor: pointer;
}
#page-playground .pgc-select-sm,
#page-playground .pgc-input-sm {
    width: 100%; box-sizing: border-box; font-family: inherit;
    padding: .46rem .62rem; font-size: .78rem; color: #111827;
    background: #fbfcfe; border: 1px solid #e6e8ee; border-radius: .6rem;
    transition: border-color .18s ease, box-shadow .18s ease;
}
#page-playground .pgc-select-sm { width: auto; cursor: pointer; }
#page-playground .pgc-input-sm { resize: vertical; }
#page-playground .pgc-select-sm:focus,
#page-playground .pgc-input-sm:focus {
    outline: none; background: #fff; border-color: rgba(99, 102, 241, .5);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .08);
}

#page-playground .pgc-code-block {
    padding: 0; overflow: hidden; border: 1px solid rgba(255, 255, 255, .06);
    background: #0b0f17; box-shadow: 0 26px 50px -40px rgba(2, 6, 23, .95);
}
#page-playground .pgc-code-head {
    display: flex; align-items: center; gap: .6rem;
    padding: .58rem .72rem; border-bottom: 1px solid rgba(255, 255, 255, .07);
    background: #0f1420;
}
#page-playground .pgc-code-dots { display: inline-flex; gap: 5px; }
#page-playground .pgc-code-dots i { width: 7px; height: 7px; border-radius: 50%; background: #3a4354; }
#page-playground .pgc-code-dots i:nth-child(1) { background: #ff5f57; }
#page-playground .pgc-code-dots i:nth-child(2) { background: #febc2e; }
#page-playground .pgc-code-dots i:nth-child(3) { background: #28c840; }
#page-playground .pgc-code-tabs { display: flex; gap: .15rem; margin-left: auto; }
#page-playground .pgc-code-tab {
    border: none; background: transparent; padding: .3rem .55rem; border-radius: .45rem;
    font-size: .72rem; font-weight: 600; color: #8b95a7; cursor: pointer;
    transition: background .16s ease, color .16s ease;
}
#page-playground .pgc-code-tab:hover { color: #d7dce6; }
#page-playground .pgc-code-tab.active { background: rgba(255, 255, 255, .1); color: #fff; }
#page-playground .pgc-code-copy {
    border: none; background: transparent; color: #8b95a7; cursor: pointer; font-size: .8rem;
    padding: .2rem .3rem; border-radius: .4rem; transition: color .16s ease, background .16s ease;
}
#page-playground .pgc-code-copy:hover { color: #fff; background: rgba(255, 255, 255, .08); }
#page-playground .pgc-code-pre {
    margin: 0; padding: .9rem .95rem; max-height: 320px; overflow: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .72rem; line-height: 1.68; white-space: pre;
    color: #cbd5e1; background: #0b0f17;
}

/* ---------------- 深色模式 ---------------- */
.dark #page-playground {
    background:
        radial-gradient(900px 380px at 10% -12%, rgba(99, 102, 241, .13), transparent 68%),
        radial-gradient(760px 340px at 92% -14%, rgba(16, 185, 129, .09), transparent 70%);
}
.dark #page-playground .pgc-toolbar-title { color: #f9fafb; }
.dark #page-playground .pgc-toolbar-sub { color: #8b93a1; }
.dark #page-playground .pgc-pill { background: #111827; border-color: #2a3441; }
.dark #page-playground .pgc-pill:hover { border-color: #3b4757; }
.dark #page-playground .pgc-select { color: #f3f4f6; }
.dark #page-playground .pgc-pill-key .pgc-select { color: #d1d5db; }
.dark #page-playground .pgc-btn-ghost { background: #111827; border-color: #2a3441; color: #d1d5db; }
.dark #page-playground .pgc-btn-ghost:hover { background: #1a2231; color: #fff; border-color: #3b4757; }
.dark #page-playground .pgc-mode-chip { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .08); color: #cbd5e1; }
.dark #page-playground .pgc-key-warn { background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .28); color: #fcd34d; }
.dark #page-playground .pgc-sessions { background: rgba(17, 24, 39, .55); border-color: #232d3b; }
.dark #page-playground .pgc-sessions-head { border-color: #232d3b; }
.dark #page-playground .pgc-session-new { background: #111827; border-color: #2a3441; color: #cbd5e1; }
.dark #page-playground .pgc-session-new:hover { background: #f3f4f6; border-color: #f3f4f6; color: #111827; }
.dark #page-playground .pgc-session-item:hover { background: rgba(255, 255, 255, .05); }
.dark #page-playground .pgc-session-item.active { background: #151d2a; border-color: #2a3441; }
.dark #page-playground .pgc-session-item.active::before { background: #e5e7eb; }
.dark #page-playground .pgc-session-title { color: #e5e7eb; }
.dark #page-playground .pgc-main { background: #0f1520; border-color: #232d3b; }
.dark #page-playground .pgc-chat-head { background: linear-gradient(180deg, #111825, #0f1520); border-color: #232d3b; }
.dark #page-playground .pgc-chat-head-model { color: #f3f4f6; }
.dark #page-playground .pgc-chat-head-sep { background: #2a3441; }
.dark #page-playground .pgc-head-btn { background: #111827; border-color: #2a3441; color: #9ca3af; }
.dark #page-playground .pgc-head-btn:hover { background: #f3f4f6; border-color: #f3f4f6; color: #111827; }
.dark #page-playground .pgc-chat {
    background-color: #0f1520;
    background-image:
        radial-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(180deg, #0c121b 0%, #0f1520 50%);
    background-size: 22px 22px, 100% 100%;
}
.dark #page-playground .pgc-msg-body { color: #e2e8f0; }
.dark #page-playground .pgc-msg-user .pgc-msg-body { background: linear-gradient(150deg, #2b3444, #1b2330); color: #f1f5f9; }
.dark #page-playground .pgc-msg-system .pgc-msg-body { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .06); color: #94a3b8; }
.dark #page-playground .pgc-compose { background: #0f1520; border-color: #232d3b; }
.dark #page-playground .pgc-input,
.dark #page-playground .pgc-input-sm,
.dark #page-playground .pgc-select-sm { background: #0b1118; border-color: #28313f; color: #e5e7eb; }
.dark #page-playground .pgc-input:focus,
.dark #page-playground .pgc-input-sm:focus { background: #0d141d; border-color: #3b4757; box-shadow: 0 0 0 3.5px rgba(255, 255, 255, .05); }
.dark #page-playground .pgc-side-block { background: #111827; border-color: #232d3b; }
.dark #page-playground .pgc-side-title { color: #f3f4f6; }
.dark #page-playground .pgc-field > span { color: #94a3b8; }
.dark #page-playground .pgc-field > span b { background: #1a2231; color: #e5e7eb; }
.dark #page-playground .pgc-field input[type=range] { background: #2a3441; }
.dark #page-playground .pgc-field input[type=range]::-webkit-slider-thumb { background: #111827; border-color: #e5e7eb; }
.dark #page-playground .pgc-upload-btn { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .08); color: #cbd5e1; }
.dark #page-playground .pgc-upload-btn:hover { background: #f3f4f6; border-color: #f3f4f6; color: #111827; }
.dark #page-playground .pgc-send { background: linear-gradient(150deg, #f3f4f6, #d7dce6); color: #111827; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1280px) {
    #page-playground .pgc-body { grid-template-columns: minmax(0, 1fr) 334px; }
    #page-playground .pgc-sessions { display: none; }
}
@media (max-width: 1024px) {
    #page-playground .pgc-body { grid-template-columns: minmax(0, 1fr); }
    #page-playground .pgc-side { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
    #page-playground .pgc-chat { max-height: 54vh; }
}
@media (max-width: 720px) {
    #page-playground .pgc-shell { padding: 1.15rem .9rem 2.4rem; }
    #page-playground .pgc-toolbar-title { font-size: 1.08rem; }
    #page-playground .pgc-toolbar-right { width: 100%; }
    #page-playground .pgc-pill { flex: 1; min-width: 0; }
    #page-playground .pgc-pill .pgc-select { max-width: 100%; width: 100%; }
    #page-playground .pgc-pill-key { flex: 1.2; }
    #page-playground .pgc-mode-chip { display: none; }
    #page-playground .pgc-btn-ghost span { display: none; }
    #page-playground .pgc-side { grid-template-columns: 1fr; }
    #page-playground .pgc-chat { min-height: 38vh; max-height: 50vh; padding: 1rem .9rem 1.2rem; }
    #page-playground .pgc-msg-user .pgc-msg-body { max-width: 88%; }
}

/* ---------------- 空态引导 ---------------- */
#page-playground .pgc-empty {
    margin: auto; max-width: 30rem; padding: .5rem 1rem; text-align: center;
    animation: pgcIn .4s ease both;
}
#page-playground .pgc-empty-icon {
    width: 3.1rem; height: 3.1rem; margin: 0 auto .95rem; border-radius: 1rem;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(150deg, #2b3444, #10151f);
    color: #fff; font-size: 1.05rem;
    box-shadow: 0 18px 34px -20px rgba(17, 24, 39, .9), inset 0 1px 0 rgba(255, 255, 255, .2);
}
#page-playground .pgc-empty-title { font-size: 1rem; font-weight: 800; letter-spacing: -.01em; color: #111827; }
#page-playground .pgc-empty-sub { margin-top: .38rem; font-size: .79rem; line-height: 1.7; color: #8b93a1; }
#page-playground .pgc-empty-chips { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: center; margin-top: 1.05rem; }
#page-playground .pgc-empty-chips button {
    border: 1px solid #e6e8ee; background: #fff; border-radius: 999px;
    padding: .38rem .82rem; font-size: .75rem; font-weight: 600; color: #4b5563;
    cursor: pointer; transition: all .18s ease;
}
#page-playground .pgc-empty-chips button:hover {
    color: #111827; border-color: #111827; transform: translateY(-1px);
    box-shadow: 0 10px 20px -16px rgba(17, 24, 39, .9);
}
.dark #page-playground .pgc-empty-title { color: #f3f4f6; }
.dark #page-playground .pgc-empty-sub { color: #94a3b8; }
.dark #page-playground .pgc-empty-chips button { background: #151d2a; border-color: #2a3441; color: #cbd5e1; }
.dark #page-playground .pgc-empty-chips button:hover { color: #fff; border-color: #4b5563; }
