/* AI对话相关样式，原start.responsive.css迁移 */
.ai-chat-dialog {
    background: rgba(255,255,255,0.85);
    border-radius: 2em;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    width: 100%;
    max-width: 420px;
    min-width: 320px;
    min-height: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    position: relative;
    padding: 1.2em 1.2em 1.1em 1.2em;
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), opacity 0.35s cubic-bezier(0.4,0,0.2,1);
    opacity: 0;
    transform: scale(0.96) translateY(40px);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    z-index: 3100;
}
.ai-chat-dialog.show {
    opacity: 1;
    transform: scale(1) translateY(0);
}
.ai-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.2em;
    font-weight: 700;
    margin-bottom: 0.7em;
    color: #222;
}
.ai-chat-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.2em;
    border-radius: 50%;
    transition: background 0.2s;
}
.ai-chat-close:hover {
    background: rgba(255,80,80,0.13);
}
.ai-chat-content {
    flex: 1 1 0;
    overflow-y: auto;
    padding: 0.2em 0.1em 0.7em 0.1em;
    margin-bottom: 0.7em;
    max-height: 65vh;
    min-height: 6em;
    scrollbar-width: thin;
    scrollbar-color: #b3b3b3 #f0f0f0;
}
.ai-chat-content::-webkit-scrollbar {
    width: 7px;
    background: #f0f0f0;
    border-radius: 8px;
}
.ai-chat-content::-webkit-scrollbar-thumb {
    background: #b3b3b3;
    border-radius: 8px;
}
.ai-chat-content::-webkit-scrollbar-thumb:hover {
    background: #888;
}
.ai-chat-msg-row {
    display: flex;
    align-items: flex-end;
    margin-bottom: 1.1em;
    gap: 0.7em;
}
.ai-chat-msg-row.ai {
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-end;
}
.ai-chat-msg-row.user {
    flex-direction: row;
    justify-content: flex-end;
}
.ai-chat-msg-row.user .ai-chat-bubble {
    order: 1;
}
.ai-chat-msg-row.user .ai-chat-avatar {
    order: 2;
    margin-left: 0.5em;
    margin-right: 0;
}
.ai-chat-msg-row.ai .ai-chat-avatar {
    order: 1;
    margin-right: 0.5em;
    margin-left: 0;
}
.ai-chat-msg-row.ai .ai-chat-bubble {
    order: 2;
    position: relative;
}
.ai-chat-msg-row.ai .ai-chat-send {
    order: 3;
    margin-left: 0.7em;
    margin-right: 0;
    align-self: flex-end;
    height: 2.1em;
    padding: 0.2em 1.1em;
    font-size: 0.98em;
}
.ai-chat-avatar {
    width: 2.2em;
    height: 2.2em;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    object-fit: cover;
}
.ai-chat-bubble {
    max-width: 70vw;
    font-size: 1.08em;
    line-height: 1.7;
    padding: 0.9em 1.2em;
    border-radius: 1.3em;
    background: #f5f7fa;
    color: #222;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    word-break: break-word;
    white-space: pre-line;
    margin: 0;
}
.ai-chat-msg-row.ai .ai-chat-bubble {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: inherit !important;
    padding: 0.7em 0.2em 0.7em 0.2em !important;
    font-size: 1.08em;
    border-radius: 0 !important;
    text-align: left;
}
.ai-chat-msg-row.user .ai-chat-bubble {
    border: none;
    background: #f5f7fa;
    border-radius: 1.3em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    color: #222;
    padding: 0.9em 1.2em;
    text-align: right;
}
body.night .ai-chat-msg-row.user .ai-chat-bubble {
    background: #23272f !important;
    color: #f3f3f3 !important;
}
.ai-chat-input-row {
    display: flex;
    align-items: center;
    gap: 0.7em;
    margin-top: 0.2em;
}
.ai-chat-user-avatar {
    width: 2em;
    height: 2em;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    object-fit: cover;
}
.ai-chat-input {
    flex: 1 1 0;
    font-size: 1.08em;
    padding: 0.7em 1.1em;
    border-radius: 1.2em;
    border: 1px solid #ccc;
    outline: none;
    transition: border 0.2s;
    background: #fff;
    margin-right: 0.2em;
}
.ai-chat-send {
    padding: 0.6em 1.5em;
    font-size: 1.08em;
    border: none;
    border-radius: 1.2em;
    background: #0099ff;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    cursor: pointer;
    transition: background 0.2s;
}
.ai-chat-send:disabled {
    background: #b3b3b3;
    cursor: not-allowed;
}
@media (max-width: 600px) {
    .ai-chat-dialog {
        min-width: 0;
        width: 100vw;
        max-width: 100vw;
        min-height: 60vw;
        max-height: 98vh;
        padding: 0.7em 0.2em 0.7em 0.2em;
    }
    .ai-chat-content {
        max-height: 80vh;
    }
}
@media (max-width: 700px) {
    #ai-chat-mask {
        align-items: stretch !important;
        justify-content: stretch !important;
    }
    .ai-chat-dialog {
        width: 100vw !important;
        max-width: 100vw !important;
        min-width: 0 !important;
        min-height: 90vh !important;
        max-height: 90vh !important;
        border-radius: 1.2em !important;
        margin-top: 5vh !important;
        margin-bottom: 5vh !important;
        padding: 0.7em 0.1em 0.7em 0.1em !important;
    }
    .ai-chat-content {
        max-height: calc(90vh - 8em) !important;
        min-height: 6em !important;
    }
    .ai-chat-input-row {
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
}
@media (min-width: 701px) {
    #ai-chat-mask {
        align-items: center !important;
        justify-content: center !important;
    }
    .ai-chat-dialog {
        border-radius: 2em !important;
        min-width: 340px !important;
        max-width: 1200px !important;
        width: 100% !important;
        min-height: 676px !important;
        max-height: 104vh !important;
        padding: 1.2em 1.2em 1.1em 1.2em !important;
    }
    .ai-chat-content {
        max-height: 85vh !important;
    }
}
.ai-chat-clear-btn {
    margin-left: 1em;
    background: rgba(0,153,255,0.08);
    border: none;
    color: #0099ff;
    font-size: 0.98em;
    border-radius: 0.8em;
    padding: 0.3em 1.1em;
    cursor: pointer;
    transition: background 0.18s;
}
.ai-chat-clear-btn:hover {
    background: rgba(0,153,255,0.18);
}
/* <think>样式 */
.ai-chat-bubble.think {
    color: #888;
    background: #f3f3f3;
    border: 1px dashed #bbb;
    font-size: 0.92em;
    font-style: italic;
    padding: 0.6em 1em;
}
.ai-chat-bubble .think {
    color: #888;
    background: #f3f3f3;
    border: 1px dashed #bbb;
    font-size: 0.92em;
    font-style: italic;
    padding: 0.1em 0.4em;
    border-radius: 0.7em;
    margin: 0 0.2em;
    display: inline-block;
}
/* 聊天气泡下方时间 */
.ai-chat-msg-row.ai .ai-chat-time {
    text-align: right;
    margin-left: auto;
    margin-right: 0.7em;
    margin-top: 0.1em;
    margin-bottom: 0;
    display: block;
}
.ai-chat-msg-row.user .ai-chat-time {
    text-align: right;
    margin-left: 0.5em;
    margin-right: 0.5em;
    margin-top: 0.2em;
    margin-bottom: 0;
    display: block;
}
body.night #ai-chat-mask {
    background: rgba(0,0,0,0.82) !important;
}
body.night .ai-chat-dialog {
    background: rgba(30,35,45,0.98) !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.38) !important;
}
body.night .ai-chat-bubble {
    background: #23272f !important;
    color: #f3f3f3 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18) !important;
}
body.night .ai-chat-msg-row.ai .ai-chat-bubble {
    border: none !important;
    background: none !important;
    color: #fff !important;
}
body.night .ai-chat-msg-row.user .ai-chat-bubble {
    border: none !important;
    background: #23272f !important;
    color: #f3f3f3 !important;
}
body.night .ai-chat-bubble .think {
    color: #bbb !important;
    background: #23272f !important;
    border: 1px dashed #444 !important;
}
body.night .ai-chat-time {
    color: #666 !important;
}
body.night .ai-chat-clear-btn {
    background: rgba(0,153,255,0.13) !important;
    color: #7ecbff !important;
}
body.night .ai-chat-clear-btn:hover {
    background: rgba(0,153,255,0.22) !important;
}
body.night .ai-chat-send {
    background: #222 !important;
    color: #7ecbff !important;
}
body.night .ai-chat-send:disabled {
    background: #444 !important;
    color: #888 !important;
}
/* AI对话空状态样式 */
.ai-chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 18em;
  color: #888;
  user-select: none;
  pointer-events: none;
  text-align: center;
  padding: 2.5em 0 2em 0;
}
.ai-chat-empty-title {
  font-size: 1.35em;
  font-weight: 600;
  color: #222;
  margin-bottom: 0.7em;
  letter-spacing: 0.01em;
}
.ai-chat-empty-sub {
  font-size: 0.98em;
  color: #aaa;
  margin-top: 0.2em;
  line-height: 1.7;
}
body.night .ai-chat-empty-title {
  color: #f3f3f3;
}
body.night .ai-chat-empty-sub {
  color: #666;
}
body.night .ai-chat-empty {
  color: #666;
}
@media (max-width: 700px) {
  .ai-chat-empty {
    min-height: 12em;
    padding: 1.5em 0 1em 0;
  }
  .ai-chat-empty-title {
    font-size: 1.08em;
  }
  .ai-chat-empty-sub {
    font-size: 0.92em;
  }
}
body.night .ai-chat-header, body.night #ai-chat-title {
    color: #f3f3f3 !important;
} 