/* --- AI 助手页专属样式（专业产品风 + 新疆元素克制点缀） --- */

:root {
    --ai-bg: rgba(255, 255, 255, 0.58);
    --ai-card: rgba(255, 255, 255, 0.82);
    --ai-line: rgba(31, 47, 82, 0.12);
    --ai-muted: rgba(31, 47, 82, 0.62);
}

/* 模式切换 */
.mode-switcher {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: var(--ai-card);
    padding: 8px;
    border-radius: 14px;
    border: 1px solid var(--ai-line);
    box-shadow: 0 14px 28px rgba(26, 43, 76, 0.08);
}
.mode-btn {
    padding: 10px 12px;
    border: 1px solid transparent;
    background: rgba(31, 47, 82, 0.03);
    border-radius: 12px;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 15px;
    letter-spacing: 1px;
    color: #1f2f52;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.mode-btn.active {
    background: rgba(31, 47, 82, 0.95);
    color: rgba(255, 255, 255, 0.95);
    border-color: rgba(31, 47, 82, 0.35);
    box-shadow: 0 12px 22px rgba(26, 43, 76, 0.18);
}
.mode-btn:hover:not(.active) {
    transform: translateY(-1px);
    background: rgba(197, 160, 89, 0.08);
    border-color: rgba(197, 160, 89, 0.35);
}

/* 页面壳 */
.ai-shell {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 26px;
    padding: 28px 0 80px;
    /* 让左右两列底部更容易对齐 */
    align-items: stretch;
}

/* --- 左侧边栏 (图1 & 图4 风格) --- */
.ai-sidebar {
    position: sticky;
    top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* 让左侧花纹与右侧“AI 教学助手”标题更齐平 */
    padding-top: 18px;
}

.ai-side-ornament {
    display: block;
    width: 100%;
    height: 52px;
    background-image: url('../images/side-ornament.png');
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: 300px auto;
    opacity: 1;
    margin: -6px auto 8px;
    pointer-events: none;
}

.mode-switcher{
    margin-bottom: 2px;
}

/* 模式切换下方花纹：收紧与下一块的距离 */
.mode-switcher + .ai-side-ornament{
    margin: -10px auto 4px;
    height: 46px;
    background-size: 280px auto;
    opacity: 0.98;
}

.ai-side-ornament--bottom {
    margin: 10px auto 0;
    transform: scaleY(-1);
}

.ai-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 2px 2px 0;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    position: relative;
    overflow: visible;
}

.ai-brand-mark { display: none; }

.ai-brand::after {
    content: "";
    display: block;
    width: 100%;
    height: 46px;
    margin: 10px auto 0;
    background-image: url('../images/side-ornament.png');
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: 280px auto;
    opacity: 0.98;
    pointer-events: none;
}

.ai-brand-text {
    padding-bottom: 0;
}

.ai-brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.96);
    background: linear-gradient(135deg, rgba(31, 47, 82, 0.98) 0%, rgba(197, 160, 89, 0.95) 100%);
    box-shadow: 0 12px 18px rgba(26, 43, 76, 0.18);
}

.ai-brand-title {
    color: #1f2f52;
    letter-spacing: 2px;
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 2px;
}

.ai-brand-sub {
    color: rgba(31, 47, 82, 0.62);
    font-size: 12px;
    letter-spacing: 1px;
}

.sidebar-menu {
    background: rgba(255, 255, 255, 0.70);
    border-radius: 16px;
    padding: 16px 16px 14px;
    box-shadow: 0 12px 24px rgba(26, 43, 76, 0.06);
    border: 1px solid rgba(31, 47, 82, 0.12);
    position: relative;
}

.sidebar-menu::before{
    content: none;
}

.sidebar-ornament{
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -56%);
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 0;
    pointer-events: none;
    opacity: 0.9;
}

.sidebar-ornament-img{
    display: block;
    width: min(780px, 100%);
    height: 112px;
    object-fit: contain;
}

.ai-filter {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.ai-filter-row {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 10px;
    align-items: center;
}

.ai-filter-label {
    color: rgba(31, 47, 82, 0.70);
    font-size: 12px;
    letter-spacing: 1px;
    font-weight: 700;
}

.ai-select {
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(31, 47, 82, 0.14);
    background: rgba(255, 255, 255, 0.80);
    color: rgba(31, 47, 82, 0.88);
    padding: 0 10px;
    font-family: var(--font-main);
    letter-spacing: 1px;
    outline: none;
}

.ai-select:focus {
    border-color: rgba(197, 160, 89, 0.75);
    box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.14);
}

.ai-filter-hint {
    margin-top: 10px;
    color: rgba(31, 47, 82, 0.62);
    font-size: 12px;
    letter-spacing: 1px;
    line-height: 1.7;
}

.menu-header {
    color: #1f2f52;
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 800;
}

.menu-header::after {
    content: none;
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px;
    background: rgba(31, 47, 82, 0.03);
    border: 1px solid rgba(31, 47, 82, 0.08);
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    margin-bottom: 8px;
}
.menu-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 18px rgba(26, 43, 76, 0.08);
    border-color: rgba(197, 160, 89, 0.22);
    background: rgba(197, 160, 89, 0.06);
}

.item-text { font-size: 14px; color: rgba(31, 47, 82, 0.88); font-family: var(--font-main); letter-spacing: 1px; }

/* 图5分割线 (花纹) */
.item-divider {
    display: none;
}

/* 口语话题样式 (图4) */
.speaking-topic {
    background: rgba(31, 47, 82, 0.04);
    justify-content: center;
}
.speaking-topic .item-text { font-family: var(--font-main); font-weight: 700; color: #1f2f52; }
.speaking-topic:hover { background: rgba(31, 47, 82, 0.06); }

/* 右侧主面板 */
.ai-main {
    min-width: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* 右侧留白区装饰：冬不拉（仅备课助手显示） */
.ai-deco-right {
    display: none;
}

.ai-deco-right__img {
    display: none;
}

/* 语音纠正：爱捷克稍小一些 */
.ai-deco-right__img--speaking {
    display: none;
}

body.mode-wordscene .ai-deco-right {
    display: none;
}

.ai-deco-right__img--assistant { display: block; }
.ai-deco-right__img--speaking { display: none; }
body.mode-wordscene .ai-deco-right__img--assistant { display: none; }
body.mode-wordscene .ai-deco-right__img--speaking { display: block; }

.ai-main-head,
.chat-card {
    position: relative;
    z-index: 1;
}
@media (max-width: 980px) {
    .mode-switcher { max-width: none; }
    .chat-card { max-width: 100%; }
    /* 小屏也显示冬不拉（缩小并靠右放置） */
    .ai-deco-right {
        display: none;
        z-index: 2;
    }
    .ai-main { grid-template-columns: 1fr; }
}

.ai-main-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    /* 反馈框铺满右侧区域（不再留大空白） */
    max-width: none;
    width: 100%;
    margin-right: 0;
}

.ai-head-title {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 2px;
    color: #1f2f52;
}

.ai-head-sub {
    margin-top: 6px;
    color: rgba(31, 47, 82, 0.62);
    font-size: 13px;
    letter-spacing: 1px;
    line-height: 1.7;
    max-width: 520px;
}

.ai-head-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ai-action {
    height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(197, 160, 89, 0.55);
    background: rgba(197, 160, 89, 0.14);
    color: rgba(109, 91, 53, 0.95);
    letter-spacing: 1px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ai-action.ghost {
    border-color: rgba(31, 47, 82, 0.14);
    background: rgba(31, 47, 82, 0.04);
    color: #1f2f52;
}

.ai-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 20px rgba(26, 43, 76, 0.10);
}

.chat-card {
    background: var(--ai-card);
    border: 1px solid var(--ai-line);
    border-radius: 18px;
    box-shadow: 0 26px 40px rgba(26, 43, 76, 0.10);
    overflow: hidden;
    backdrop-filter: blur(10px);
    /* 反馈框铺满右侧区域（不再留大空白） */
    max-width: none;
    width: 100%;
    margin-right: 0;
    display: flex;
    flex-direction: column;
    /* 在备课模式下，反馈框底部与左侧菜单底部齐平 */
    flex: 1 1 auto;
    min-height: 0;
}

.chat-card-ornate {
    height: 16px;
    background-image: url('../images/border-top-pattern.svg');
    background-repeat: repeat-x;
    background-position: center;
    background-size: auto 14px;
    opacity: 0.85;
}

/* 聊天内容层 */
.chat-content {
    background: transparent;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1 1 auto;
    min-height: 0;
}

/* 口语模式：不需要聊天高度，改为自适应，避免底部大空白 */
body.mode-wordscene .chat-content {
    height: auto;
    overflow: visible;
}

body.mode-wordscene .chat-messages {
    display: none !important;
}

body.mode-wordscene .ai-sidebar {
    padding-top: 0;
}

body.mode-wordscene .ai-side-ornament,
body.mode-wordscene .ai-side-ornament--bottom {
    margin-left: auto;
    margin-right: auto;
}

/* 口语模式：左右两侧“框框”上/下齐平 */
body.mode-wordscene .ai-shell {
    align-items: stretch;
}

body.mode-wordscene #menuWordScene {
    display: flex;
    flex-direction: column;
    flex: 1;
}

body.mode-wordscene .word-scene-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1 1 auto;
    min-height: 0;
    /* 口语模式：内容在框内垂直居中显示 */
    padding: 28px 22px;
}

body.mode-wordscene .ai-sidebar {
    display: flex;
    flex-direction: column;
}

body.mode-wordscene .ai-main {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

body.mode-wordscene .chat-card {
    /* 口语模式：右侧与左侧同高，底部齐平 */
    flex: 1 1 auto;
    min-height: 0;
}

body.mode-wordscene .chat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    /* 让面板占满高度，再由面板内部做居中 */
    justify-content: stretch;
    min-height: 0;
}

/* 欢迎界面 (图2) */
.welcome-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 44px 28px;
}

.welcome-mark {
    width: 70px;
    height: 70px;
    border-radius: 22px;
    margin-bottom: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.96);
    background: linear-gradient(135deg, rgba(31, 47, 82, 0.98) 0%, rgba(197, 160, 89, 0.95) 100%);
    box-shadow: 0 18px 26px rgba(26, 43, 76, 0.16);
}

.welcome-screen h2 { font-size: 26px; color: var(--primary-dark); margin-bottom: 10px; }
.welcome-screen p { color: #888; margin-bottom: 30px; max-width: 400px; line-height: 1.6; }

.welcome-bubbles { display: flex; gap: 15px; flex-wrap: wrap; justify-content: center; }
.bubble {
    padding: 10px 16px;
    border: 1px solid rgba(31, 47, 82, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    cursor: pointer;
    font-size: 14px;
    color: rgba(31, 47, 82, 0.82);
    letter-spacing: 1px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.bubble:hover {
    transform: translateY(-1px);
    border-color: rgba(197, 160, 89, 0.55);
    background: rgba(197, 160, 89, 0.10);
    box-shadow: 0 14px 18px rgba(26, 43, 76, 0.08);
}

/* 消息列表 */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.message { max-width: 92%; padding: 12px 16px; border-radius: 12px; font-size: 14px; line-height: 1.6; }
.message.user { align-self: flex-end; background: var(--primary-dark); color: #fff; border-bottom-right-radius: 2px; }
.message.ai { align-self: flex-start; background: #fff; color: #333; border: 1px solid #eee; border-bottom-left-radius: 2px; box-shadow: 0 2px 5px rgba(0,0,0,0.03); }

/* AI 回复：保留模型输出的换行，段落层次更清晰 */
.message-body { margin: 0; }
.message-body--ai {
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.75;
    font-size: 14px;
    letter-spacing: 0.02em;
}
.message.user .message-body {
    white-space: pre-wrap;
    word-break: break-word;
}

/* 输入区 */
.chat-input-area {
    padding: 20px;
    background: #fff;
    border-top: 1px solid rgba(31, 47, 82, 0.10);
    display: flex;
    gap: 15px;
    align-items: flex-end;
}
#messageInput {
    flex: 1;
    padding: 12px;
    border: 1px solid rgba(31, 47, 82, 0.16);
    border-radius: 12px;
    resize: none;
    height: 50px;
    font-family: var(--font-main);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#messageInput:focus {
    border-color: rgba(197, 160, 89, 0.75);
    box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.14);
}
.send-btn {
    padding: 0 18px;
    height: 50px;
    background: rgba(197, 160, 89, 0.95);
    color: rgba(255, 255, 255, 0.96);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 900;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.send-btn:hover { transform: translateY(-1px); box-shadow: 0 18px 26px rgba(26, 43, 76, 0.14); background: rgba(176, 141, 75, 0.98); }

/* 单词情境画面板 */
.word-scene-panel {
    padding: 22px 18px 28px;
    background: rgba(255, 255, 255, 0.78);
    border-top: none;
    text-align: center;
}

.word-scene-form .ai-filter-row {
    align-items: center;
}

.word-scene-form .ai-filter-row--block {
    grid-template-columns: 1fr;
    gap: 6px;
}

.ai-input {
    flex: 1;
    min-width: 0;
    height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid rgba(31, 47, 82, 0.14);
    background: rgba(255, 255, 255, 0.95);
    font-family: var(--font-main);
    font-size: 14px;
    color: #1f2f52;
}

.word-scene-generate-btn {
    width: 100%;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(197, 160, 89, 0.55);
    background: linear-gradient(180deg, rgba(197, 160, 89, 0.22), rgba(197, 160, 89, 0.12));
    color: rgba(80, 62, 28, 0.98);
    font-weight: 900;
    letter-spacing: 2px;
    cursor: pointer;
    font-family: var(--font-main);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.word-scene-generate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(26, 43, 76, 0.12);
}

.word-scene-placeholder__t {
    font-size: 16px;
    font-weight: 800;
    color: #1f2f52;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.word-scene-placeholder__s {
    font-size: 13px;
    color: rgba(31, 47, 82, 0.58);
    line-height: 1.75;
    max-width: 520px;
    margin: 0 auto;
}

.word-scene-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 16px;
    color: rgba(31, 47, 82, 0.72);
    font-size: 15px;
    letter-spacing: 1px;
}

.word-scene-loading__dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(197, 160, 89, 0.9);
    animation: wordScenePulse 1s ease-in-out infinite;
}

@keyframes wordScenePulse {
    0%, 100% { opacity: 0.35; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1); }
}

.word-scene-result {
    max-width: 720px;
    margin: 0 auto;
}

.word-scene-figure {
    margin: 0 auto 16px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(26, 43, 76, 0.12);
    border: 1px solid rgba(31, 47, 82, 0.08);
    background: rgba(31, 47, 82, 0.04);
}

.word-scene-figure img {
    display: block;
    width: 100%;
    max-width: 640px;
    height: auto;
    margin: 0 auto;
}

.word-scene-word {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 900;
    letter-spacing: 0.12em;
    color: #1f2f52;
    margin: 8px 0 14px;
}

.word-scene-cap {
    margin: 6px auto;
    max-width: 560px;
    line-height: 1.75;
    letter-spacing: 0.5px;
}

.word-scene-cap--en {
    font-size: 15px;
    color: rgba(31, 47, 82, 0.88);
    font-style: italic;
}

.word-scene-cap--zh {
    font-size: 14px;
    color: rgba(31, 47, 82, 0.62);
}

.word-scene-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.speak-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(197, 160, 89, 0.55);
    background: rgba(197, 160, 89, 0.10);
    color: rgba(109, 91, 53, 0.95);
    font-weight: 800;
    letter-spacing: 2px;
    font-size: 12px;
    margin-bottom: 12px;
}

.speak-subline {
    color: rgba(31, 47, 82, 0.62);
    font-size: 13px;
    letter-spacing: 1px;
    line-height: 1.7;
    margin: 0 auto 14px;
    max-width: 560px;
}

.lesson-info {
    max-width: 760px;
    margin: 0 auto;
}

.lesson-info h4 {
    color: #1f2f52;
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 900;
}

.lesson-info .speak-guide {
    font-size: 13px;
    color: rgba(31, 47, 82, 0.62);
    margin-bottom: 18px;
    line-height: 1.85;
    letter-spacing: 1px;
}

.speak-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 360px));
    gap: 18px;
    margin: 16px auto 0;
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
}

.speak-action {
    display: grid;
    gap: 12px;
    justify-items: center;
    padding: 16px 14px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(31, 47, 82, 0.10);
    box-shadow: 0 14px 26px rgba(26, 43, 76, 0.06);
}

.flower-btn {
    height: 54px;
    width: min(320px, 100%);
    border-radius: 999px;
    border: 1px solid rgba(31, 47, 82, 0.14);
    background: rgba(255, 255, 255, 0.88);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    box-shadow: 0 16px 24px rgba(26, 43, 76, 0.08);
}

.flower-btn__orn {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    background-image: url('../images/AI花花按钮.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 42px 42px;
    opacity: 0.92;
    pointer-events: none;
}

.flower-btn__text {
    position: relative;
    z-index: 1;
    display: inline-flex;
    height: 100%;
    width: 100%;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    letter-spacing: 2px;
    color: #1f2f52;
    font-size: 15px;
}

/* 让按钮文字真正居中（花花不影响排版） */
.flower-btn__text { padding-left: 0; }

.flower-trigger {
    width: 66px;
    height: 66px;
    border-radius: 0;
    border: none;
    background-color: transparent;
    background-image: url('../images/AI花花按钮.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 66px 66px;
    box-shadow: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.flower-trigger:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: none;
    background-color: transparent;
}

.flower-trigger:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.flower-btn--demo {
    border-color: rgba(197, 160, 89, 0.45);
    background: rgba(197, 160, 89, 0.08);
}

.flower-btn--test {
    border-color: rgba(31, 47, 82, 0.14);
    background: rgba(31, 47, 82, 0.04);
}

body.mode-wordscene .chat-card-ornate {
    opacity: 0.65;
}

.flower-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 24px 34px rgba(26, 43, 76, 0.12);
    border-color: rgba(197, 160, 89, 0.65);
}

.flower-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.score-result {
    background: #fff; padding: 15px; border-radius: 8px; border: 1px solid #eee;
}
.score { font-size: 24px; font-weight: bold; color: #10b981; }
.feedback { font-size: 13px; color: #666; margin-top: 5px; }

/* 响应式 */
@media (max-width: 768px) {
    .ai-shell { grid-template-columns: 1fr; }
    .ai-sidebar { position: static; }
    .ai-sidebar { padding-top: 0; }
    .chat-content { height: 560px; }
    .ai-main-head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
    .ai-shell { padding: 18px 0 64px; gap: 16px; }
    .chat-content { height: 500px; }
    .chat-input-area { padding: 14px; gap: 10px; }
    #messageInput { height: 46px; }
    .send-btn { height: 46px; }
}
