@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-container {
    width: 90%;
    max-width: 600px;
    min-width: 300px;
    height: 80vh;
    min-height: 520px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
    font-size: 1.5em;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.chat-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f8f9fc;
}

.message {
    max-width: 75%;
    padding: 12px 18px;
    border-radius: 20px;
    line-height: 1.5;
    word-wrap: break-word;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.user-message {
    align-self: flex-end;
    background: #667eea;
    color: white;
    border-bottom-right-radius: 6px;
}

.bot-message {
    align-self: flex-start;
    background: white;
    color: #333;
    border-bottom-left-radius: 6px;
    border: 1px solid #e8e8e8;
}

.message img {
    max-width: 100%;
    border-radius: 16px;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.chat-input-container {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #eee;
}

.chat-input {
    display: flex;
    align-items: center;
    background: #f1f3f5;
    border-radius: 30px;
    padding: 8px 12px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.attach-btn {
    font-size: 1.6em;
    cursor: pointer;
    padding: 8px 12px;
    user-select: none;
    color: #667eea;
    transition: transform 0.2s;
}

.attach-btn:hover {
    transform: scale(1.15);
}

#messageInput {
    flex: 1;
    padding: 14px 18px;
    border: none;
    background: transparent;
    font-size: 1.1em;
    outline: none;
    color: #333;
}

#sendBtn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
}

#sendBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.5);
}

#sendBtn:active {
    transform: translateY(0);
}

/* 響應式 */
@media (max-width: 480px) {
    .chat-container {
        height: 100vh;
        width: 100%;
        border-radius: 0;
    }
    .chat-header {
        border-radius: 0;
    }
    .chat-input-container {
        padding: 12px 16px;
    }
}