/* AI 聚合台 — 科技感主题 */
:root {
    --bg-deep: #131b2e;
    --bg-mid: #1a2438;
    --surface: rgba(30, 40, 64, 0.68);
    --surface-solid: #1e2a42;
    --border: rgba(56, 189, 248, 0.18);
    --border-strong: rgba(129, 140, 248, 0.35);
    --text: #e8eef8;
    --text-dim: #94a3b8;
    --muted: #7c8aa6;
    --accent: #22d3ee;
    --accent-2: #a78bfa;
    --accent-glow: rgba(34, 211, 238, 0.45);
    --accent-violet-glow: rgba(167, 139, 250, 0.4);
    --primary-gradient: linear-gradient(120deg, #06b6d4 0%, #3b82f6 45%, #8b5cf6 100%);
    --sidebar-bg: rgba(18, 24, 44, 0.82);
    --hint: #fb923c;
    --error: #f87171;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 32px rgba(34, 211, 238, 0.12);
    --radius: 14px;
    --radius-sm: 10px;
}

* { box-sizing: border-box; }

html {
    color-scheme: dark;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background-color: var(--bg-deep);
    background-image:
        radial-gradient(ellipse 120% 80% at 20% -20%, rgba(34, 211, 238, 0.1), transparent 50%),
        radial-gradient(ellipse 100% 60% at 100% 0%, rgba(139, 92, 246, 0.08), transparent 45%),
        radial-gradient(ellipse 80% 50% at 50% 100%, rgba(59, 130, 246, 0.06), transparent 50%),
        linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 55%, #161f32 100%);
    background-attachment: fixed;
}

/* 细腻网格 */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.28;
    background-image:
        linear-gradient(rgba(34, 211, 238, 0.032) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.032) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 75%);
}

.app-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-bar {
    position: relative;
    z-index: 60;
    overflow: visible;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: linear-gradient(180deg, rgba(26, 34, 58, 0.9) 0%, rgba(20, 28, 48, 0.86) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), var(--shadow-glow);
}

.brand-title {
    font-weight: 700;
    font-size: 17px;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #e0f2fe 0%, #22d3ee 40%, #c4b5fd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 40px rgba(34, 211, 238, 0.15);
}

.user-entry { text-decoration: none; color: inherit; }

.user-entry {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.user-name {
    font-size: 13px;
    color: var(--text-dim);
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
}

.recharge-link {
    font-size: 13px;
    color: #ef4444;
    text-decoration: none;
    font-weight: 700;
}

.recharge-link:hover {
    color: #f87171;
    text-decoration: underline;
}

.user-balance {
    margin-left: 6px;
    color: #fbbf24;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.25);
}

.auth-btn {
    border: 1px solid rgba(34, 211, 238, 0.35);
    background: rgba(34, 211, 238, 0.12);
    color: #e6faff;
    border-radius: 10px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.auth-btn.ghost {
    border-color: rgba(148, 163, 184, 0.35);
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-dim);
}

.user-menu-wrap {
    position: relative;
    z-index: 70;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.user-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.user-menu-caret {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    opacity: 0.8;
    margin-top: -2px;
}

.user-menu-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 170px;
    padding: 6px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(10, 16, 36, 0.96);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 80;
}

.user-menu-dropdown[hidden] {
    display: none !important;
}

.user-menu-item {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    color: var(--text-dim);
    text-decoration: none;
    text-align: left;
    font-size: 13px;
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
}

.user-menu-item:hover {
    background: rgba(34, 211, 238, 0.12);
    color: #e2e8f0;
}

.user-menu-item.danger:hover {
    background: rgba(248, 113, 113, 0.16);
    color: #fecaca;
}

.login-modal[hidden] { display: none !important; }

.recharge-modal[hidden] { display: none !important; }

.recharge-modal {
    position: fixed;
    inset: 0;
    z-index: 85;
}

.recharge-mask {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.7);
}

.recharge-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(460px, calc(100% - 30px));
    transform: translate(-50%, -50%);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: linear-gradient(160deg, rgba(30, 41, 72, 0.95) 0%, rgba(18, 26, 48, 0.98) 100%);
    box-shadow: var(--shadow), 0 0 40px rgba(34, 211, 238, 0.12);
    padding: 18px;
}

.recharge-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
    color: #f1f5f9;
}

.recharge-row {
    margin-bottom: 12px;
}

.recharge-row > label {
    display: block;
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.recharge-amounts {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.recharge-amount {
    border: 1px solid var(--border);
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-dim);
    border-radius: 10px;
    padding: 7px 12px;
    font-size: 12px;
    cursor: pointer;
}

.recharge-amount.active {
    border-color: rgba(34, 211, 238, 0.45);
    background: rgba(34, 211, 238, 0.12);
    color: #e6faff;
}

.recharge-input {
    width: 100%;
    margin-top: 8px;
    border-radius: 10px;
    border: 1px solid var(--border);
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    background: rgba(8, 12, 26, 0.65);
    color: var(--text);
}

.recharge-paytypes {
    display: flex;
    gap: 14px;
}

.recharge-paytype {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text);
}

.recharge-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.wxpay-modal[hidden] { display: none !important; }

.wxpay-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
}

.wxpay-mask {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.7);
}

.wxpay-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(380px, calc(100% - 30px));
    transform: translate(-50%, -50%);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: linear-gradient(160deg, rgba(30, 41, 72, 0.95) 0%, rgba(18, 26, 48, 0.98) 100%);
    box-shadow: var(--shadow), 0 0 40px rgba(34, 211, 238, 0.12);
    padding: 18px;
}

.wxpay-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #f1f5f9;
}

.wxpay-body {
    text-align: center;
}

.wxpay-qrcode {
    width: 210px;
    height: 210px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    padding: 10px;
}

.wxpay-tip {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text);
}

.wxpay-tip.muted {
    color: var(--text-dim);
    font-size: 12px;
}

.wxpay-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
}

.login-modal {
    position: fixed;
    inset: 0;
    z-index: 40;
}

.login-mask {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.7);
}

.login-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(420px, calc(100% - 30px));
    transform: translate(-50%, -50%);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: linear-gradient(160deg, rgba(30, 41, 72, 0.95) 0%, rgba(18, 26, 48, 0.98) 100%);
    box-shadow: var(--shadow), 0 0 40px rgba(34, 211, 238, 0.12);
    padding: 18px;
}

.login-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
    color: #f1f5f9;
}

.login-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.login-tab {
    border: 1px solid var(--border);
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-dim);
    border-radius: 10px;
    padding: 7px 12px;
    font-size: 12px;
    cursor: pointer;
}

.login-tab.active {
    border-color: rgba(34, 211, 238, 0.45);
    background: rgba(34, 211, 238, 0.12);
    color: #e6faff;
}

.login-row { margin-bottom: 10px; }

.login-row label {
    display: block;
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.login-row input {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--border);
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    background: rgba(8, 12, 26, 0.65);
    color: var(--text);
}

.captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-row input {
    flex: 1;
}

.captcha-img {
    width: 140px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(8, 12, 26, 0.65);
    cursor: pointer;
    user-select: none;
}

.login-err {
    color: var(--error);
    font-size: 12px;
    margin: 6px 0 10px;
}

.login-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.register-link {
    margin-right: auto;
    align-self: center;
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
}

.register-link:hover {
    color: #67e8f9;
    text-decoration: underline;
}

.avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px var(--accent-glow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.avatar-circle:hover {
    transform: scale(1.05);
    box-shadow: 0 0 28px var(--accent-violet-glow);
}

.back-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s ease;
}
.back-link:hover { color: #67e8f9; }

.layout { display: flex; flex: 1; min-height: 0; }

.sidebar {
    width: 252px;
    background: var(--sidebar-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-right: 1px solid var(--border);
    box-shadow: inset -1px 0 0 rgba(34, 211, 238, 0.06);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.sidebar-brands {
    flex: 0 0 auto;
    min-height: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-brands .brand-list {
    flex: 0 0 auto;
    min-height: auto;
    overflow-y: visible;
}

.history-session-block {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border);
    margin-top: 4px;
    padding-top: 4px;
}

/* 折叠：仍在「分类」区块下方（DOM 顺序），只占一行高度，不再用 flex 顶满侧栏底部 */
.history-session-block.is-collapsed {
    flex: 0 0 auto;
    min-height: 0;
}

.history-session-block.is-collapsed .history-session-list {
    display: none;
}

.history-session-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 12px 18px 10px;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    opacity: 0.95;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    flex-shrink: 0;
}

.history-session-toggle:hover {
    background: rgba(255, 255, 255, 0.04);
}

.history-session-toggle:focus-visible {
    outline: 2px solid rgba(34, 211, 238, 0.5);
    outline-offset: 2px;
}

.history-session-toggle-label {
    flex: 1;
    min-width: 0;
}

.history-session-toggle-chevron {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    margin-right: 2px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    opacity: 0.85;
}

.history-session-block.is-collapsed .history-session-toggle-chevron {
    transform: rotate(-45deg);
}

.sidebar.sidebar-history-collapsed .sidebar-brands {
    max-height: none;
    flex: 0;
    /*min-height: 0;*/
}

.history-session-list {
    list-style: none;
    margin: 0;
    padding: 4px 10px 12px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.history-session-item {
    display: flex;
    align-items: flex-start;
    gap: 2px;
    padding: 4px 4px 4px 8px;
    margin-bottom: 6px;
    border-radius: var(--radius-sm);
    cursor: default;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.02);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.history-session-item:hover {
    background: rgba(34, 211, 238, 0.06);
    border-color: rgba(34, 211, 238, 0.12);
}

.history-session-item.is-active {
    border-color: var(--border-strong);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.1) 0%, rgba(139, 92, 246, 0.08) 100%);
}

.history-session-item-main {
    flex: 1;
    min-width: 0;
    padding: 6px 4px 6px 4px;
    cursor: pointer;
    border-radius: 6px;
}

.history-session-item-main:hover {
    background: rgba(255, 255, 255, 0.03);
}

.history-session-item-main:focus-visible {
    outline: 2px solid rgba(34, 211, 238, 0.45);
    outline-offset: 1px;
}

.history-session-delete {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    margin-top: 4px;
    padding: 0;
    line-height: 1;
    font-size: 18px;
    font-weight: 600;
    color: var(--muted);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.15s ease, background 0.15s ease;
}

.history-session-delete:hover {
    color: #f87171;
    background: rgba(248, 113, 113, 0.12);
}

.history-session-delete:focus-visible {
    outline: 2px solid rgba(248, 113, 113, 0.5);
    outline-offset: 1px;
}

.history-session-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.history-session-meta {
    margin-top: 4px;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.4;
}

.history-session-empty {
    padding: 12px 14px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
}

.sidebar-head {
    padding: 12px 14px 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    opacity: 0.9;
}

.brand-list {
    list-style: none;
    margin: 0;
    padding: 6px 8px 10px;
    overflow-y: auto;
}

.brand-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-bottom: 6px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.02);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.brand-item:hover {
    background: rgba(34, 211, 238, 0.06);
    border-color: rgba(34, 211, 238, 0.15);
}

.brand-item.active {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.12) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-color: var(--border-strong);
    box-shadow: 0 0 24px rgba(34, 211, 238, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: linear-gradient(145deg, rgba(34, 211, 238, 0.15), rgba(139, 92, 246, 0.12));
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: var(--accent);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.brand-logo img { width: 100%; height: 100%; object-fit: cover; }

.sidebar-brands--category-icons .brand-logo .category-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.sidebar-brands--category-icons .brand-item {
    justify-content: flex-start;
}

.sidebar-brands--category-icons .brand-text {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip-path: none;
    white-space: normal;
}

.sidebar-brands--category-icons .brand-text .sub {
    display: none;
}

.brand-text .name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

.brand-text .sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 3px;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: rgba(14, 20, 38, 0.32);
}

.model-strip {
    flex: 0 0 auto;
    padding: 12px 16px 10px;
    background: rgba(24, 32, 54, 0.48);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.strip-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 8px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.model-panel.is-hidden { display: none; }

.model-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.model-card {
    position: relative;
    min-width: 168px;
    max-width: 228px;
    padding: 10px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: linear-gradient(160deg, rgba(30, 41, 72, 0.9) 0%, rgba(18, 26, 48, 0.95) 100%);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.2s ease, background 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.model-card:hover {
    z-index: 4;
    border-color: rgba(34, 211, 238, 0.45);
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.12), 0 8px 24px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

.model-card.selected {
    border-color: rgba(34, 211, 238, 0.65);
    background: linear-gradient(160deg, rgba(34, 211, 238, 0.12) 0%, rgba(139, 92, 246, 0.1) 50%, rgba(18, 26, 48, 0.95) 100%);
    box-shadow: 0 0 36px rgba(34, 211, 238, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.model-card:focus-within {
    z-index: 5;
}

.model-card .title {
    font-weight: 600;
    font-size: 14px;
    color: #f1f5f9;
}

.model-card .type-tag {
    display: inline-block;
    margin-top: 8px;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
    color: var(--accent);
    border: 1px solid rgba(34, 211, 238, 0.25);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.model-card .price {
    margin-top: 10px;
    font-size: 12px;
    color: var(--muted);
}

.model-card .price .price-tiered {
    margin-top: 4px;
    max-height: 54px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
}

.model-card .price .price-tier-line {
    font-size: 10px;
    line-height: 1.35;
}

.model-card .price .price-tiered::-webkit-scrollbar {
    width: 4px;
}

.model-card .price .price-tiered::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 999px;
}

/* 有说明图标时给右下角留白，避免与价格文字重叠 */
.model-card:has(.model-card-info-anchor) {
    padding-bottom: 12px;
}

.model-card:has(.model-card-info-anchor) .price {
    padding-right: 30px;
}

.model-card-info-anchor {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 2;
}

.model-card-info-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(34, 211, 238, 0.35);
    border-radius: 50%;
    background: rgba(12, 18, 36, 0.75);
    color: var(--accent);
    cursor: help;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.model-card-info-btn:hover,
.model-card-info-btn:focus-visible {
    outline: none;
    border-color: rgba(34, 211, 238, 0.55);
    background: rgba(34, 211, 238, 0.14);
    color: #e0faff;
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.2);
}

.model-card-info-svg {
    width: 15px;
    height: 15px;
}

.model-card-info-tip {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    width: min(300px, calc(100vw - 40px));
    max-height: min(280px, 42vh);
    overflow-y: auto;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: rgba(16, 22, 42, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow), 0 0 24px rgba(34, 211, 238, 0.12);
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-dim);
    white-space: pre-wrap;
    word-break: break-word;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
    z-index: 30;
}

.model-card-info-anchor:hover .model-card-info-tip,
.model-card-info-anchor:focus-within .model-card-info-tip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 12px 16px 14px;
    gap: 10px;
    min-height: 0;
}

.messages {
    flex: 0 0 auto;
    height: 550px;
    max-height: 550px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    background: linear-gradient(165deg, rgba(22, 32, 56, 0.92) 0%, rgba(12, 18, 36, 0.94) 55%, rgba(10, 14, 28, 0.96) 100%);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 4px 24px rgba(0, 0, 0, 0.35),
        0 0 40px rgba(34, 211, 238, 0.04);
    scrollbar-color: rgba(100, 116, 139, 0.45) rgba(15, 23, 42, 0.35);
}

.messages::-webkit-scrollbar {
    width: 8px;
}

.messages::-webkit-scrollbar-track {
    background: rgba(8, 12, 26, 0.5);
    border-radius: 6px;
}

.messages::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.45);
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.messages::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.55);
    background-clip: padding-box;
}

.messages a {
    color: #67e8f9;
}

.messages a:hover {
    color: #a5f3fc;
}

.bubble {
    max-width: 720px;
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.bubble.user {
    margin-left: auto;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.14) 0%, rgba(59, 130, 246, 0.1) 100%);
    border: 1px solid rgba(34, 211, 238, 0.38);
    color: #ecfeff;
    box-shadow: 0 4px 18px rgba(34, 211, 238, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.bubble.sys {
    background: rgba(30, 41, 72, 0.55);
    border: 1px dashed rgba(148, 163, 184, 0.32);
    color: var(--text-dim);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.bubble .bubble-body {
    white-space: pre-wrap;
    word-break: break-word;
}

/* 助手气泡：处理中「思考中」与正文区切换 */
.bubble.sys.is-thinking .bubble-body {
    display: none;
}

.bubble.sys:not(.is-thinking) .bubble-thinking-wrap {
    display: none;
}

.bubble-thinking-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 2px 0;
}

.think-txt {
    color: var(--text);
    font-weight: 600;
}

.think-dots {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.think-dots i {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.5;
    animation: think-bounce 1.1s ease-in-out infinite;
}

.think-dots i:nth-child(2) {
    animation-delay: 0.15s;
}

.think-dots i:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes think-bounce {
    0%, 70%, 100% {
        transform: translateY(0);
        opacity: 0.35;
    }
    35% {
        transform: translateY(-7px);
        opacity: 1;
    }
}

.bubble-caption {
    margin-bottom: 10px;
    color: var(--text);
    line-height: 1.5;
}

.bubble-image-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.bubble-image-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.32);
}

.bubble-image-card img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 360px;
    object-fit: contain;
}

.bubble-image-actions {
    padding: 8px 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    border-top: 1px solid var(--border);
    background: rgba(8, 12, 26, 0.55);
}

.bubble-dl-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.bubble-dl-link:hover {
    text-decoration: underline;
}

.bubble-dl-hint {
    font-size: 11px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.bubble-audio-list {
    display: grid;
    gap: 10px;
}

.bubble-video-wrap video {
    max-width: 100%;
    border-radius: var(--radius-sm);
    margin-top: 8px;
}

.bubble-video-pending {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
    margin: 0;
}

.composer-video-t2v-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--muted);
}

.composer-inline-select {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 12px;
}

.bubble-audio-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.28);
}

.bubble-audio-item audio {
    width: 100%;
    display: block;
    padding: 10px;
}

.composer {
    flex: 0 0 auto;
    background: rgba(26, 34, 56, 0.68);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow), 0 0 40px rgba(139, 92, 246, 0.06);
}

.chat-option-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
    user-select: none;
}

.composer-actions-right .chat-option-item {
    margin-right: 6px;
}

.risk-modal[hidden] { display: none; }

.risk-modal {
    position: fixed;
    inset: 0;
    z-index: 1900;
}

.risk-mask {
    position: absolute;
    inset: 0;
    background: rgba(5, 10, 22, 0.62);
    backdrop-filter: blur(2px);
}

.risk-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(420px, calc(100vw - 28px));
    border-radius: 14px;
    border: 1px solid var(--border-strong);
    background: rgba(20, 30, 50, 0.98);
    box-shadow: var(--shadow), 0 0 30px rgba(34, 211, 238, 0.12);
    padding: 16px;
}

.risk-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.risk-body {
    margin-top: 10px;
    color: var(--text-dim);
    line-height: 1.55;
}

.risk-actions {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
}

.upload-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }

.attachments {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px;
}

.attach-item { display: inline-flex; align-items: center; gap: 6px; margin-right: 10px; }

.upload-progress-wrap {
    margin: 6px 0 10px;
}

.upload-progress-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(8, 12, 26, 0.5);
    overflow: hidden;
}

.upload-progress-bar {
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #22d3ee, #3b82f6 60%, #8b5cf6);
    transition: width 0.2s ease;
}

.upload-progress-text {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-dim);
}

#inputBox {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    padding: 10px 12px;
    font-size: 14px;
    resize: vertical;
    outline: none;
    background: rgba(8, 12, 26, 0.65);
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#inputBox::placeholder { color: var(--muted); }

#inputBox:focus {
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12), 0 0 24px rgba(34, 211, 238, 0.08);
}

.composer-extra {
    margin-top: 12px;
}

.composer-extra-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.composer-extra-label-spaced {
    margin-top: 14px;
}

.composer-extra-optional {
    font-weight: 500;
    color: var(--muted);
}

.composer-extra-desc {
    font-size: 12px;
    line-height: 1.5;
    margin: 0 0 8px;
}

.composer-extra-input {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    padding: 10px 12px;
    font-size: 13px;
    resize: vertical;
    outline: none;
    min-height: 72px;
    background: rgba(8, 12, 26, 0.65);
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.composer-extra-input::placeholder {
    color: var(--muted);
}

.composer-extra-input:focus {
    border-color: rgba(167, 139, 250, 0.45);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

.composer-extra-foot {
    font-size: 11px;
    margin-top: 6px;
    text-align: right;
}

.composer-inline-code {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(8, 12, 26, 0.85);
    border: 1px solid var(--border);
}

.composer-size-hints {
    font-size: 12px;
    line-height: 1.55;
    margin: 0 0 10px 1.1em;
    padding: 0;
}

.composer-size-hints li {
    margin-bottom: 2px;
}

.composer-extra-select {
    width: 100%;
    max-width: 420px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    padding: 10px 12px;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    background: rgba(8, 12, 26, 0.65);
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.composer-extra-select:focus {
    border-color: rgba(34, 211, 238, 0.45);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.composer-extra-select-narrow {
    max-width: 220px;
}

.composer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.composer-actions-right {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* 文生图等仅文本发送：无上传提示时右对齐发送 */
.composer-actions-send-only {
    justify-content: flex-end;
    margin-bottom: 4px;
}

.composer-actions-send-only.composer-actions-with-advanced {
    margin-bottom: 0;
}

/* 发送行末尾：新会话 + 发送 + 高级选项（高级与发送略拉开） */
.composer-actions-row-end {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.composer-advanced-inline {
    margin-left: 14px;
    flex-shrink: 0;
    align-self: center;
}

.composer-advanced-inline .composer-advanced-summary {
    padding: 2px;
}

.composer-advanced-inline[open] {
    flex: 1 0 100%;
    margin-left: 0;
    margin-top: 4px;
    align-self: stretch;
}

.composer-advanced {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(148, 163, 184, 0.06);
    padding: 0 12px 12px;
}

.composer-advanced-summary {
    cursor: pointer;
    list-style: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    padding: 12px 2px;
    user-select: none;
    margin-top: 8px;
}

.composer-advanced-summary::-webkit-details-marker {
    display: none;
}

.composer-advanced-summary::after {
    content: "▼";
    float: right;
    font-size: 10px;
    color: var(--muted);
    transform: translateY(2px);
}

.composer-advanced[open] .composer-advanced-summary::after {
    content: "▲";
}

.composer-advanced-body {
    padding-top: 4px;
}

.btn {
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.15s ease;
}

.btn.primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 20px rgba(34, 211, 238, 0.35), 0 2px 8px rgba(139, 92, 246, 0.2);
}

.btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 28px rgba(34, 211, 238, 0.45), 0 4px 12px rgba(139, 92, 246, 0.25);
}

.btn.primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn.ghost {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    border: 1px solid var(--border);
}

.btn.ghost:hover {
    background: rgba(34, 211, 238, 0.1);
    border-color: rgba(34, 211, 238, 0.35);
    color: #e2e8f0;
}

.hint { color: var(--hint); font-size: 12px; font-weight: 500; }

.hint-inline {
    color: var(--hint);
    font-size: 13px;
    margin: 0 12px;
    font-weight: 500;
}

.err { color: var(--error); font-size: 13px; font-weight: 500; }

/* 个人中心 */
.profile-page .top-bar { justify-content: flex-start; gap: 16px; }

.profile-card {
    max-width: 720px;
    margin: 36px auto;
    background: linear-gradient(165deg, rgba(30, 41, 72, 0.85) 0%, rgba(18, 26, 48, 0.92) 100%);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 28px 32px;
    box-shadow: var(--shadow), 0 0 48px rgba(34, 211, 238, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.profile-card h2 {
    margin-top: 0;
    font-size: 1.35rem;
    background: linear-gradient(90deg, #f1f5f9, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.muted { color: var(--muted); }

.profile-list {
    padding-left: 18px;
    color: var(--text-dim);
    line-height: 1.75;
}

.profile-list code {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.2);
    color: var(--accent);
}

@media (max-width: 900px) {
    .layout { flex-direction: column; }
    .sidebar {
        width: 100%;
        flex-direction: column;
        max-height: 48vh;
        overflow-y: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .sidebar-brands {
        max-height: none;
    }
    .sidebar-brands .brand-list {
        display: flex;
        flex-wrap: wrap;
        overflow-x: auto;
        overflow-y: visible;
    }
    .brand-item { white-space: nowrap; }
    .history-session-block {
        max-height: 200px;
    }
    .history-session-block.is-collapsed {
        max-height: none;
    }
    .messages {
        height: 300px;
        max-height: 300px;
    }
}

/* ========== 会员中心：浅色后台布局（与对话页深色主题隔离） ========== */
body.user-center {
    color-scheme: light;
    color: #334155;
    background: #e8ecf1;
    background-image: none;
}

body.user-center::before {
    display: none;
}

.user-center .uc-app {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.user-center .uc-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 0 20px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.user-center .uc-back {
    justify-self: start;
    color: #2563eb;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.user-center .uc-back:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.user-center .uc-header-title {
    margin: 0;
    justify-self: center;
    font-size: 17px;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: 0.02em;
}

.user-center .uc-header-meta {
    justify-self: end;
    font-size: 13px;
    color: #64748b;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-center .uc-frame {
    flex: 1;
    display: flex;
    min-height: 0;
    align-items: stretch;
}

.user-center .uc-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    padding: 20px 0 24px;
}

.user-center .uc-sidebar-caption {
    padding: 0 20px 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.user-center .uc-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 12px;
}

.user-center .uc-nav-item {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.user-center .uc-nav-item:hover {
    background: #fff;
    color: #0f172a;
}

.user-center .uc-nav-item.is-active {
    background: #fff;
    color: #1d4ed8;
    border-left-color: #2563eb;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.user-center .uc-main {
    flex: 1;
    min-width: 0;
    padding: 20px 24px 32px;
    overflow-x: auto;
}

.user-center .uc-panel {
    max-width: 1100px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 24px 28px 28px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.user-center .uc-panel-title {
    margin: 0 0 16px;
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
}

.user-center .uc-panel-lead {
    margin-top: 0;
}

.user-center .uc-muted {
    margin: 0 0 10px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
}

.user-center .uc-muted strong {
    color: #334155;
}

.user-center .uc-muted-note {
    margin-top: 4px;
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.5;
}

.user-center .uc-pending {
    color: #b45309;
}

.user-center .uc-balance {
    color: #0f766e;
}

.user-center .uc-list {
    margin: 20px 0 0;
    padding-left: 20px;
    color: #475569;
    line-height: 1.8;
    font-size: 14px;
}

.user-center .uc-list a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.user-center .uc-list a:hover {
    text-decoration: underline;
}

.user-center .uc-table-wrap {
    margin-top: 16px;
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.user-center .uc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.user-center .uc-table th,
.user-center .uc-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.user-center .uc-table tbody tr:last-child td {
    border-bottom: none;
}

.user-center .uc-table th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 1px solid #e2e8f0;
}

.user-center .uc-table tbody tr:hover td {
    background: #fafbfc;
}

.user-center .uc-cell-ellipsis {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-center .uc-cell-error {
    min-width: 280px;
    max-width: 520px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.5;
}

.user-center .uc-pager {
    margin-top: 20px;
    font-size: 13px;
    color: #64748b;
}

.user-center .uc-pager ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.user-center .uc-pager li {
    display: inline-block;
    margin: 0;
}

.user-center .uc-pager a,
.user-center .uc-pager span {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    color: #475569;
    text-decoration: none;
    background: #fff;
}

.user-center .uc-pager a:hover {
    border-color: #93c5fd;
    color: #1d4ed8;
}

.user-center .uc-pager .active > span,
.user-center .uc-pager span.current {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
}

/* —— AI 介绍主页 —— */
.ai-home-body .ai-home {
    max-width: 1560px;
    margin: 0 auto;
    padding: 14px 24px 22px;
    min-height: calc(100vh - 50px);
    overflow: hidden;
    width: 100%;
}

.brand-title-link {
    display: inline-block;
    text-decoration: none;
    color: inherit;
}

.brand-title-link:link,
.brand-title-link:visited,
.brand-title-link:hover,
.brand-title-link:active {
    text-decoration: none;
    color: inherit;
}

.brand-title-link:hover {
    opacity: 0.92;
}

.brand-title-link:focus-visible {
    outline: 2px solid rgba(34, 211, 238, 0.6);
    outline-offset: 4px;
    border-radius: 6px;
}

.ai-home-hero {
    margin-bottom: 14px;
    padding: 30px 32px;
    border-radius: var(--radius);
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(34, 211, 238, 0.16), transparent 46%),
        radial-gradient(120% 120% at 100% 0%, rgba(167, 139, 250, 0.18), transparent 42%),
        var(--surface);
    border: 1px solid rgba(99, 102, 241, 0.28);
    box-shadow: var(--shadow);
}

.ai-home-hero-badge {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    color: #c7d2fe;
    background: rgba(79, 70, 229, 0.22);
    border: 1px solid rgba(129, 140, 248, 0.35);
    margin-bottom: 10px;
}

.ai-home-hero h1 {
    margin: 0 0 12px;
    font-size: 2rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ai-home-lead {
    margin: 0 0 16px;
    line-height: 1.65;
    color: var(--text-dim);
    font-size: 1.03rem;
}

.ai-home-cta {
    margin: 0;
}

.ai-home-section {
    margin-bottom: 28px;
    padding: 22px 24px;
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, rgba(31, 41, 67, 0.58), rgba(23, 31, 51, 0.45));
    border: 1px solid var(--border);
}

.ai-home-switcher {
    display: flex;
    gap: 14px;
    min-height: 0;
    height: calc(100vh - 188px);
}

.ai-home-tabs {
    width: 220px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ai-home-tab {
    border: 1px solid var(--border);
    background: rgba(30, 40, 64, 0.45);
    color: var(--text-dim);
    border-radius: 10px;
    height: 42px;
    text-align: left;
    padding: 0 12px;
    cursor: pointer;
    transition: all .2s ease;
}

.ai-home-tab.is-active {
    color: var(--text);
    border-color: rgba(99, 102, 241, 0.45);
    background: rgba(79, 70, 229, 0.24);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.ai-home-panels {
    position: relative;
    flex: 1;
    min-height: 0;
}

.ai-home-panel {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity .24s ease, transform .24s ease;
    overflow: auto;
    padding-right: 4px;
}

.ai-home-panel.is-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.ai-home-section h2 {
    margin: 0 0 12px;
    font-size: 1.1rem;
    color: var(--accent);
}

.ai-home-section--warn {
    border-color: rgba(251, 146, 60, 0.35);
    background: rgba(120, 53, 15, 0.12);
}

.ai-home-list {
    margin: 0;
    padding-left: 1.2rem;
    line-height: 1.75;
    color: var(--text-dim);
    font-size: 0.92rem;
}

.ai-home-list li {
    margin-bottom: 8px;
}

.ai-home-p {
    margin: 0;
    line-height: 1.7;
    color: var(--text-dim);
    font-size: 0.92rem;
}

.ai-home-model-group {
    margin-top: 14px;
}

.ai-home-model-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
}

.ai-home-model-cat {
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-dim);
    background: rgba(30, 40, 64, 0.45);
    cursor: pointer;
    transition: all .2s ease;
}

.ai-home-model-cat.is-active {
    color: var(--text);
    border-color: rgba(99, 102, 241, 0.45);
    background: rgba(79, 70, 229, 0.24);
}

.ai-home-model-group.is-hidden {
    display: none;
}

.ai-home-model-group-title {
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 600;
}

.ai-home-model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.ai-home-model-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(19, 27, 46, 0.78), rgba(24, 34, 56, 0.62));
    padding: 14px;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.ai-home-model-card:hover {
    transform: translateY(-1px);
    border-color: rgba(99, 102, 241, 0.42);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.ai-home-model-name {
    font-weight: 600;
    margin-bottom: 6px;
}

.ai-home-model-meta {
    color: var(--text-dim);
    font-size: 12px;
    line-height: 1.55;
}

.ai-home-model-intro {
    margin-top: 6px;
    color: #a5b4fc;
    font-size: 12px;
    line-height: 1.5;
    min-height: 36px;
}

.ai-home-model-btn {
    display: inline-block;
    margin-top: 8px;
    text-decoration: none;
}

.upload-login-hint {
    font-size: 0.85rem;
    display: inline-block;
    padding: 4px 0;
}

@media (max-width: 768px) {
    .ai-home-body .ai-home {
        max-width: 100%;
        min-height: auto;
        overflow: visible;
        padding: 10px 12px 16px;
    }

    .ai-home-switcher {
        height: auto;
        display: block;
    }

    .ai-home-tabs {
        width: auto;
        flex-direction: row;
        flex-wrap: wrap;
        margin-bottom: 10px;
    }

    .ai-home-tab {
        height: 34px;
        padding: 0 10px;
    }

    .ai-home-panels {
        position: static;
    }

    .ai-home-panel,
    .ai-home-panel.is-active {
        position: static;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        overflow: visible;
        padding-right: 0;
        display: none;
    }

    .ai-home-panel.is-active {
        display: block;
    }

    .user-center .uc-frame {
        flex-direction: column;
    }

    .user-center .uc-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding: 12px 0 16px;
    }

    .user-center .uc-nav {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 0 12px;
        gap: 8px;
    }

    .user-center .uc-nav-item {
        border-left: none;
        border-bottom: 2px solid transparent;
        padding: 8px 12px;
    }

    .user-center .uc-nav-item.is-active {
        border-left-color: transparent;
        border-bottom-color: #2563eb;
        box-shadow: none;
    }

    .user-center .uc-main {
        padding: 16px 14px 24px;
    }

    .user-center .uc-header-meta {
        display: none;
    }
}
