* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    background: #ffffff !important;
    border: none !important;
    outline: none !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: #ffffff;
    color: #1a1a1a;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    padding-bottom: env(safe-area-inset-bottom);
}

/* 背景装饰元素（已移除） */

.container {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    border-radius: 0;
    border: none;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* 移除容器顶部光效 */
.container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 0%, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.08);
    background: transparent;
    flex-shrink: 0;
    position: relative;
    backdrop-filter: none;
    width: 100%;
}

/* 头部装饰线 */
header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(102, 126, 234, 0.15) 20%, 
        rgba(118, 75, 162, 0.15) 50%, 
        rgba(102, 126, 234, 0.15) 80%, 
        transparent 100%);
    pointer-events: none;
}

.header-left,
.header-right {
    display: flex;
    gap: 8px;
}

.header-center {
    text-align: center;
}

.header-center h1 {
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 3px;
    letter-spacing: 0.5px;
}

.header-center p {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 400;
}

.icon-button {
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #4b5563;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.icon-button svg {
    width: 20px;
    height: 20px;
}

.icon-button:hover {
    background: linear-gradient(145deg, #ffffff, #f3f4f6);
    border-color: rgba(102, 126, 234, 0.3);
    color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.15);
}

.icon-button:active {
    transform: translateY(0);
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    position: relative;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.chat-messages {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 40px;
    overflow-y: auto;
    max-height: calc(100vh - 140px);
    background: transparent !important;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    border: none !important;
    outline: none !important;
}

/* 滚动条透明 */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

.welcome-message {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease-out;
    max-width: 900px;
    width: 100%;
    padding: 30px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.08),
                0 0 20px rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* 欢迎区域光效 */
.welcome-message::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(102, 126, 234, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.welcome-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3),
                0 0 20px rgba(102, 126, 234, 0.2),
                inset 0 0 20px rgba(255, 255, 255, 0.2);
    animation: float 3s ease-in-out infinite, glow 2s ease-in-out infinite alternate;
    position: relative;
}

.welcome-icon::after {
    content: '';
    position: absolute;
    inset: -5px;
    background: inherit;
    background-size: 200% 200%;
    border-radius: inherit;
    filter: blur(15px);
    opacity: 0.5;
    z-index: -1;
    animation: gradientShift 5s ease infinite;
}

.welcome-icon svg {
    width: 40px;
    height: 40px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes glow {
    from {
        box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3),
                    0 0 20px rgba(102, 126, 234, 0.2),
                    inset 0 0 20px rgba(255, 255, 255, 0.2);
    }
    to {
        box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4),
                    0 0 30px rgba(102, 126, 234, 0.3),
                    inset 0 0 30px rgba(255, 255, 255, 0.3);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.welcome-message h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.message {
    padding: 14px 18px;
    border-radius: 20px;
    word-wrap: break-word;
    margin-bottom: 15px;
    animation: messageSlide 0.3s ease-out;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.message.user-message {
    max-width: fit-content;
    width: auto;
}

.message.ai-message {
    max-width: 80%;
}

.ai-message {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    padding: 14px 18px;
    max-width: 80%;
    color: #1f2937;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.08),
                0 0 15px rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(102, 126, 234, 0.1);
    backdrop-filter: blur(10px);
    animation: messageSlideIn 0.4s ease-out;
    overflow: visible;
}

.user-message {
    align-self: flex-end;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3),
                0 0 15px rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 14px 18px;
}

.user-message .message-content,
.user-message .message-content p {
    direction: ltr !important;
    unicode-bidi: normal !important;
    transform: scaleX(1) !important;
    -webkit-transform: scaleX(1) !important;
    writing-mode: horizontal-tb !important;
    text-align: left !important;
}



.message-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

/* 消息内容排版优化 */
.message-content {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #1f2937;
    overflow: visible;
    max-width: 100%;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* 用户消息的 message-content 不限制宽度 */
.user-message .message-content {
    width: auto;
    max-width: none;
}

.user-message .message-content p {
    margin: 0;
    white-space: normal;
}

.message-content p:first-child {
    margin-top: 0;
}

.message-content p:last-child {
    margin-bottom: 0;
}

/* 列表样式 */
.message-content ul {
    margin: 12px 0;
    padding-left: 24px;
    list-style-type: disc;
}

.message-content ul li {
    margin: 6px 0;
    line-height: 1.6;
    color: #374151;
}

.message-content ul li::marker {
    color: #667eea;
}

/* 列表后的段落增加间距 */
.message-content ul + p {
    margin-top: 16px;
}

.message-content p + ul {
    margin-top: 16px;
}

/* 代码块样式 */
.message-content .code-block {
    background: #faf8f5 !important;
    color: #1f2937 !important;
    padding: 16px;
    border-radius: 8px;
    overflow: auto;
    margin: 12px 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    max-height: 500px;
}

.message-content pre {
    background: #faf8f5 !important;
    color: #1f2937 !important;
    padding: 16px;
    border-radius: 8px;
    overflow: auto;
    margin: 12px 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    max-height: 500px;
}

.message-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-family: inherit;
    white-space: pre;
    word-wrap: normal;
}

.message-content .code-block code {
    font-family: inherit;
}

/* 行内代码样式 */
.message-content .inline-code {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85em;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

/* AI 消息特殊样式 */
.ai-message {
    position: relative;
    padding: 8px 0;
}

/* 消息操作按钮（复制等） */
.message-actions {
    position: absolute;
    top: -8px;
    right: 0;
    display: none;
    gap: 4px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.ai-message:hover .message-actions {
    display: flex;
}

.message-action-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s ease;
}

.message-action-btn:hover {
    background: #f3f4f6;
    color: #667eea;
}

.message-action-btn svg {
    width: 16px;
    height: 16px;
}

.message-action-btn.copied {
    color: #10b981;
}

.ai-message .message-content {
    padding: 8px 0;
}

/* 段落样式 */
.message-content p {
    margin: 1em 0;
    line-height: 1.8;
}

.message-content p:first-child {
    margin-top: 0;
}

.message-content p:last-child {
    margin-bottom: 0;
}

/* 标题样式 */
.message-content h1 {
    font-size: 1.5em;
    font-weight: 700;
    color: #111827;
    margin: 1.5em 0 0.8em 0;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.message-content h2 {
    font-size: 1.3em;
    font-weight: 600;
    color: #111827;
    margin: 1.3em 0 0.7em 0;
    line-height: 1.4;
}

.message-content h3 {
    font-size: 1.15em;
    font-weight: 600;
    color: #1f2937;
    margin: 1.2em 0 0.6em 0;
    line-height: 1.4;
}

.message-content h4 {
    font-size: 1em;
    font-weight: 600;
    color: #374151;
    margin: 1em 0 0.5em 0;
}

/* 列表样式 */
.message-content ul,
.message-content ol {
    margin: 1em 0;
    padding-left: 24px;
}

.message-content ul li,
.message-content ol li {
    margin: 8px 0;
    line-height: 1.7;
    position: relative;
}

.message-content ul {
    list-style: none;
}

.message-content ul li::before {
    content: "•";
    color: #667eea;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

.message-content ol {
    counter-reset: item;
    list-style-type: none;
}

.message-content ol li::before {
    content: counter(item) ".";
    counter-increment: item;
    color: #667eea;
    font-weight: 600;
    display: inline-block;
    width: 1.5em;
    margin-left: -1.5em;
}

/* 代码块样式 */
.message-content pre {
    background: #faf8f5 !important;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 16px 0;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #24292e !important;
    white-space: pre;
    word-wrap: normal;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

/* 复制按钮样式 */
.code-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 6px 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    opacity: 0;
    z-index: 10;
}

.message-content pre:hover .code-copy-btn {
    opacity: 1;
}

.code-copy-btn:hover {
    background: #f3f4f6;
    border-color: #667eea;
    color: #667eea;
}

.code-copy-btn svg {
    width: 14px;
    height: 14px;
}

.code-copy-btn.copied {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.message-content pre::-webkit-scrollbar {
    height: 8px;
}

.message-content pre::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.message-content pre::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.message-content pre::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.message-content code {
    background: #f8f9fa;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    color: #e83e8c;
    word-break: break-word;
}

.message-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
    word-break: normal;
}

/* 引用样式 */
.message-content blockquote {
    border-left: 4px solid #667eea;
    margin: 16px 0;
    padding: 12px 16px;
    background: #f8f9fa;
    color: #555;
    border-radius: 0 8px 8px 0;
}

/* 分隔线 */
.message-content hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 20px 0;
}

/* 表格样式 */
.message-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 16px 0;
    font-size: 0.9em;
    overflow-x: auto;
    display: block;
}

.message-content table thead {
    background: #f8f9fa;
}

.message-content table th,
.message-content table td {
    border: 1px solid #e5e7eb;
    padding: 12px 16px;
    text-align: left;
}

.message-content table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #1f2937;
}

.message-content table tr:nth-child(even) {
    background: #f9fafb;
}

.message-content table tr:hover {
    background: #f3f4f6;
}

/* 强调文本 */
.message-content strong {
    font-weight: 600;
    color: #111827;
}

.message-content em {
    font-style: italic;
    color: #4b5563;
}

/* 链接样式 */
.message-content a {
    color: #667eea;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.message-content a:hover {
    border-bottom-color: #667eea;
}

/* 行内代码高亮 */
.message-content p code,
.message-content li code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    color: #e83e8c;
    border: 1px solid #e9ecef;
}

.chat-input-area {
    padding: 16px 24px;
    background: transparent !important;
    margin: 0;
    border-radius: 0;
    border-top: none !important;
    box-shadow: none !important;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    width: 100%;
    display: flex;
    justify-content: center;
}

.input-wrapper {
    background: #ffffff;
    border: 2px solid rgba(102, 126, 234, 0.15);
    border-radius: 28px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
    padding: 12px 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 900px;
}

.input-wrapper:focus-within {
    border-color: #667eea;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
}

/* 输入框圆角优化 */
#user-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    line-height: 1.5;
    background: transparent;
    padding: 10px 12px;
    border-radius: 16px;
    color: #1f2937;
}

#user-input::placeholder {
    color: #9ca3af;
}

#user-input:focus {
    background: rgba(102, 126, 234, 0.03);
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-input {
    width: 100%;
    padding: 12px 16px;
    border: none;
    font-size: 0.95rem;
    outline: none;
    resize: none;
    background: transparent;
    color: #1f2937;
    font-family: inherit;
}

.chat-input::placeholder {
    color: #9ca3af;
}

.input-bottom {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(102, 126, 234, 0.08);
}

.input-actions {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;  /* Firefox */
    -ms-overflow-style: none;  /* IE/Edge */
}

.input-actions::-webkit-scrollbar {
    display: none;  /* Chrome/Safari */
}

/* 操作按钮统一样式 */
.input-actions .action-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid rgba(102, 126, 234, 0.12);
    border-radius: 20px;
    color: #4b5563;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.input-actions .action-button:hover {
    background: linear-gradient(135deg, #eef2ff 0%, #f8f9fa 100%);
    border-color: rgba(102, 126, 234, 0.3);
    color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.15);
}

.input-actions .action-button:active {
    transform: translateY(0);
}

/* 添加按钮 */
.add-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f3f4f6 0%, #ffffff 100%);
    border: 1px solid rgba(102, 126, 234, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.add-button:hover {
    background: linear-gradient(135deg, #e0e7ff 0%, #f3f4f6 100%);
    border-color: #667eea;
    transform: rotate(90deg);
}

/* 分割线 */
.divider {
    width: 1px;
    height: 24px;
    background: rgba(102, 126, 234, 0.15);
    margin: 0 4px;
    flex-shrink: 0;
}

/* 发送按钮 */
.send-button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.send-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.send-button:active {
    transform: scale(0.95);
}

/* 麦克风按钮 */
.mic-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f3f4f6 0%, #ffffff 100%);
    border: 1px solid rgba(102, 126, 234, 0.15);
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mic-button:hover {
    background: linear-gradient(135deg, #fee2e2 0%, #fef3f2 100%);
    border-color: #ef4444;
    color: #ef4444;
    transform: scale(1.05);
}
    gap: 8px;
    padding: 4px;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 126, 234, 0.3) transparent;
    min-width: 0;
}

.input-actions::-webkit-scrollbar {
    height: 4px;
}

.input-actions::-webkit-scrollbar-track {
    background: transparent;
}

.input-actions::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 10px;
}

.input-actions::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

.action-button {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 500;
    /* 触摸优化 */
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    /* 按钮阴影 */
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
}

.action-button svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.action-button:hover {
    background: #ffffff;
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.action-button:active {
    transform: translateY(0);
}

.action-button span {
    font-size: 0.8rem;
}

.add-button {
    position: relative;
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-button.has-files::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 9px;
    height: 9px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
}

.divider {
    width: 1px;
    height: 28px;
    background: linear-gradient(to bottom, transparent, rgba(102, 126, 234, 0.2), transparent);
    margin: 0 8px;
    flex-shrink: 0;
    border-radius: 2px;
}

.mic-button {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #4b5563;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
    /* 触摸优化 */
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.mic-button svg {
    width: 18px;
    height: 18px;
}

.mic-button:hover {
    background: #ffffff;
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.mic-button.listening {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-color: transparent;
    color: white;
    animation: pulse 1.5s infinite;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
    }
}

.send-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3),
                0 0 10px rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
    /* 触摸优化 */
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.send-button svg {
    width: 18px;
    height: 18px;
}

.send-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

.send-button:active {
    transform: translateY(0);
}

/* 滚动条样式 */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #c1c1c1, #a1a1c1);
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.03);
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #a1a1c1, #8181b1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        max-width: 100%;
        box-shadow: none;
    }
    
    header {
        padding: 12px 16px;
    }
    
    .header-center h1 {
        font-size: 1.1rem;
    }
    
    main {
        padding: 0;
    }
    
    .chat-container {
        padding: 0;
    }
    
    .chat-messages {
        padding: 16px 16px 100px 16px;
        max-height: calc(100vh - 120px);
    }
    
    .chat-input-area {
        padding: 12px 16px;
    }
    
    .welcome-icon {
        width: 60px;
        height: 60px;
    }
    
    .welcome-icon svg {
        width: 32px;
        height: 32px;
    }
    
    .welcome-message h2 {
        font-size: 1.4rem;
    }
    
    .welcome-features {
        grid-template-columns: 1fr;
    }
    
    .feature-item {
        padding: 12px;
    }
    
    .feature-item h3 {
        font-size: 0.95rem;
    }
    
    .feature-item p {
        font-size: 0.8rem;
    }
}

@media (max-width: 640px) {
    /* 隐藏按钮文字，只显示图标 */
    .action-button span {
        display: none;
    }
    
    .action-button {
        padding: 10px;
        min-width: 44px;
        height: 44px;
    }
    
    .action-button svg {
        width: 20px;
        height: 20px;
    }
    
    .mic-button, .send-button {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }
    
    .mic-button svg, .send-button svg {
        width: 20px;
        height: 20px;
    }
    
    /* 优化输入框 */
    #user-input {
        font-size: 16px; /* 防止 iOS 自动缩放 */
        min-height: 44px;
    }
    
    /* 优化消息气泡 */
    .message-content {
        max-width: 85%;
        font-size: 0.95rem;
        padding: 10px 14px;
    }
    
    /* 优化代码块 */
    .message-content pre {
        padding: 12px;
        font-size: 0.8rem;
    }
    
    .code-copy-btn {
        padding: 4px 10px;
        font-size: 0.75rem;
    }
}

/* 小屏手机优化 (320px - 480px) */
@media (max-width: 480px) {
    header {
        padding: 10px 14px;
    }
    
    .header-center h1 {
        font-size: 1rem;
    }
    
    .chat-messages {
        padding: 12px 12px 90px 12px;
        max-height: calc(100vh - 110px);
    }
    
    .chat-input-area {
        padding: 10px 14px;
    }
    
    .welcome-message {
        padding: 0 8px;
    }
    
    .welcome-icon {
        width: 50px;
        height: 50px;
    }
    
    .welcome-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .welcome-message h2 {
        font-size: 1.2rem;
        margin: 12px 0 8px;
    }
    
    .welcome-subtitle {
        font-size: 0.85rem;
        margin-bottom: 16px;
    }
    
    .feature-item {
        padding: 10px;
    }
    
    .feature-item svg {
        width: 28px;
        height: 28px;
    }
    
    .feature-item h3 {
        font-size: 0.9rem;
    }
    
    .feature-item p {
        font-size: 0.75rem;
    }
    
    /* 消息样式优化 */
    .message {
        margin-bottom: 12px;
    }
    
    .message-content {
        padding: 8px 12px;
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* 代码块优化 */
    .message-content pre {
        padding: 10px;
        font-size: 0.75rem;
        margin: 10px 0;
    }
    
    .code-copy-btn {
        top: 6px;
        right: 6px;
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    /* 复制按钮优化 */
    .message-action-btn {
        width: 32px;
        height: 32px;
    }
    
    .message-action-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* 超小屏幕 (320px) */
@media (max-width: 360px) {
    header {
        padding: 8px 12px;
    }
    
    .header-center h1 {
        font-size: 0.95rem;
    }
    
    .chat-messages {
        padding: 10px 10px 85px 10px;
        max-height: calc(100vh - 105px);
    }
    
    .chat-input-area {
        padding: 8px 12px;
    }
    
    .welcome-icon {
        width: 45px;
        height: 45px;
    }
    
    .welcome-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .welcome-message h2 {
        font-size: 1.1rem;
    }
    
    .welcome-subtitle {
        font-size: 0.8rem;
    }
    
    .feature-item {
        padding: 8px;
    }
    
    .feature-item svg {
        width: 24px;
        height: 24px;
    }
    
    .feature-item h3 {
        font-size: 0.85rem;
    }
    
    .feature-item p {
        font-size: 0.7rem;
    }
    
    /* 按钮最小尺寸 */
    .action-button,
    .mic-button,
    .send-button {
        min-width: 40px;
        height: 40px;
    }
    
    .action-button svg,
    .mic-button svg,
    .send-button svg {
        width: 18px;
        height: 18px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.2);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ai-message .loading {
    border-top-color: #667eea;
    border-bottom-color: #667eea;
}

/* 消息列表动画 */
.chat-messages:not(:empty) .welcome-message {
    display: none;
}

/* ===== 功能卡片美化 ===== */
.welcome-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 30px;
    padding: 0 10px;
}

.feature-item {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: 18px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.08),
                0 0 10px rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.feature-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.feature-item:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.2),
                0 0 20px rgba(102, 126, 234, 0.1);
}

.feature-item:hover::before {
    transform: scaleX(1);
}

.feature-item:hover::after {
    opacity: 1;
}

.feature-item:active {
    transform: translateY(-2px) scale(0.98);
}

.feature-item svg {
    width: 36px;
    height: 36px;
    color: #667eea;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.3));
    transition: all 0.4s ease;
}

.feature-item:hover svg {
    color: #764ba2;
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.4));
}

.feature-item-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.feature-item h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    line-height: 1.4;
    word-break: break-word;
    background: linear-gradient(135deg, #1f2937 0%, #4b5563 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.feature-item:hover h3 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feature-item p {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.feature-item:hover p {
    color: #9ca3af;
}

/* 功能卡片依次进入动画 */
.feature-item:nth-child(1) { animation: slideInLeft 0.6s ease-out 0.1s both; }
.feature-item:nth-child(2) { animation: fadeInUp 0.6s ease-out 0.2s both; }
.feature-item:nth-child(3) { animation: slideInRight 0.6s ease-out 0.3s both; }
.feature-item:nth-child(4) { animation: slideInLeft 0.6s ease-out 0.4s both; }
.feature-item:nth-child(5) { animation: fadeInUp 0.6s ease-out 0.5s both; }
.feature-item:nth-child(6) { animation: slideInRight 0.6s ease-out 0.6s both; }

/* ===== 按钮美化 ===== */
.action-button {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
}

.action-button:hover {
    background: linear-gradient(145deg, #f8faff 0%, #ffffff 100%);
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2),
                0 0 10px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.action-button:active {
    transform: translateY(0) scale(0.98);
}

/* 发送按钮美化 */
.send-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3),
                0 0 10px rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
}

.send-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.send-button:hover::before {
    opacity: 1;
}

.send-button:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4),
                0 0 15px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.send-button:active {
    transform: translateY(0) scale(0.95);
}

/* 麦克风按钮美化 */
.mic-button {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
}

.mic-button:hover {
    background: linear-gradient(145deg, #fff5f5 0%, #ffffff 100%);
    border-color: #ef4444;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

.mic-button.listening {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #ef4444;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4),
                0 0 15px rgba(239, 68, 68, 0.3);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4),
                    0 0 15px rgba(239, 68, 68, 0.3);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 6px 25px rgba(239, 68, 68, 0.5),
                    0 0 20px rgba(239, 68, 68, 0.4);
    }
}

/* ===== 输入框美化 ===== */
#user-input {
    background: linear-gradient(145deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid rgba(102, 126, 234, 0.15);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.05);
}

#user-input:focus {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15),
                0 0 10px rgba(102, 126, 234, 0.1);
    background: #ffffff;
}

/* ===== 消息气泡美化 ===== */
.user-message {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3),
                0 0 10px rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
}

.user-message::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.ai-message {
    background: transparent;
}

/* ===== 滚动条美化 ===== */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    border: 2px solid rgba(102, 126, 234, 0.05);
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #764ba2 0%, #f093fb 100%);
}

/* ===== 头部按钮美化 ===== */
.header-btn {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
}

.header-btn:hover {
    background: linear-gradient(145deg, #f8faff 0%, #ffffff 100%);
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.header-btn:active {
    transform: translateY(0) scale(0.95);
}

/* ===== 认证菜单美化 ===== */
.auth-menu {
    background: linear-gradient(145deg, #ffffff 0%, #f8faff 100%);
    border: 1px solid rgba(102, 126, 234, 0.15);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.15),
                0 0 20px rgba(102, 126, 234, 0.1);
    border-radius: 16px;
}

.auth-menu-item {
    transition: all 0.3s ease;
}

.auth-menu-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    color: #667eea;
}

/* ===== 用户头像美化 ===== */
.user-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3),
                0 0 10px rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
}

.user-avatar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.2) 0%, transparent 70%);
    pointer-events: none;
}

/* ===== 加载动画美化 ===== */
.loading {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

/* ===== 代码块美化 ===== */
.message-content pre {
    background: #faf8f5 !important;
    border: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.code-copy-btn {
    background: linear-gradient(145deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.code-copy-btn:hover {
    background: linear-gradient(145deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    border-color: #667eea;
}

/* ===== 分割线美化 ===== */
.divider {
    background: linear-gradient(180deg, transparent 0%, rgba(102, 126, 234, 0.2) 50%, transparent 100%);
}

/* ===== 语音通话小窗 ===== */
.voice-call-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15),
                0 0 40px rgba(102, 126, 234, 0.1),
                inset 0 0 60px rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 24px;
    z-index: 10000;
    animation: callWindowIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    cursor: move;  /* 可拖动光标 */
    user-select: none;  /* 禁止选中内容 */
}

@keyframes callWindowIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.voice-call-header {
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

.voice-call-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
}

.voice-call-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1f2937;
}

.voice-call-avatar {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
    animation: avatarFloat 3s ease-in-out infinite;
}

@keyframes avatarFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.voice-call-status {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.loading-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

#callStatusText {
    font-size: 0.95rem;
    color: #6b7280;
    font-weight: 500;
}

.voice-call-messages {
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    padding: 12px;
    background: #f9fafb;
    border-radius: 12px;
    margin: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.voice-call-message {
    padding: 10px 14px;
    border-radius: 12px;
    max-width: 85%;
    animation: messageSlideIn 0.3s ease-out;
    word-wrap: break-word;
    font-size: 0.9rem;
    line-height: 1.5;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.voice-call-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.voice-call-message.ai {
    align-self: flex-start;
    background: white;
    color: #1f2937;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.voice-call-controls {
    display: flex;
    gap: 12px;
    width: 100%;
    justify-content: center;
}

.control-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #f3f4f6;
    color: #4b5563;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.control-btn:hover {
    background: #e5e7eb;
    transform: scale(1.05);
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn.hangup {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.control-btn.hangup:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
    transform: scale(1.05);
}

.control-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ===== 输入区域美化 ===== */
.chat-input-area {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 255, 0.95) 100%);
    border-top: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 -4px 20px rgba(102, 126, 234, 0.08),
                0 0 10px rgba(102, 126, 234, 0.05);
}

.input-wrapper {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid rgba(102, 126, 234, 0.15);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.08);
}

.input-wrapper:focus-within {
    border-color: #667eea;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15),
                0 0 15px rgba(102, 126, 234, 0.1);
}

/* ===== 响应式优化 ===== */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 20px;
    }
    
    .welcome-message {
        padding: 20px;
    }
    
    .welcome-icon {
        width: 60px;
        height: 60px;
    }
    
    .welcome-features {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .feature-item {
        padding: 16px;
    }
}
