@font-face {
    font-family: 'Asliya';
    src: url('fonts/asliya.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.waiting-notification {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.waiting-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.waiting-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #6f6d6d;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

.waiting-text {
    font-size: 18px;
    margin-bottom: 10px;
}

.queue-position {
    font-size: 16px;
    color: #666;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #E6F3F8 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    height: 100vh;
}

.chat-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    height: 90vh;
    display: flex;
    flex-direction: column;
    border: 1px solid white; /* Changed to white */
}

.chat-header {
    background: #6f6d6d;
    color: white;
    padding: 12px;  /* Reduced from 20px */
    text-align: center;
    border-bottom: 1px solid white; /* Changed to white */
    font-family: 'Asliya', sans-serif;
    height: 45px;  /* Added fixed height */
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-header h1 {
    font-size: 1.2rem;  /* Reduced from 1.5rem */
    font-weight: 500;
    font-family: 'Asliya', sans-serif;
    line-height: 1;  /* Added to reduce vertical spacing */
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.message {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.user-message {
    align-items: flex-end;
}

.bot-message {
    align-items: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 15px;
    border-radius: 15px;
    margin: 5px 0;
}

.user-message .message-content {
    background: #6f6d6d;
    color: white;
    border: 1px solid white; /* Changed to white */
    font-family: 'Asliya', sans-serif;
}

.bot-message .message-content {
    background: #fff;
    border: 1px solid white; /* Changed to white */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-family: 'Asliya', sans-serif;
    text-align: right;
    direction: rtl;
}

.chat-input-container {
    padding: 20px;
    background: white;
    border-top: 1px solid white; /* Changed to white */
    display: flex;
    gap: 10px;
}

textarea {
    flex: 1;
    padding: 15px;
    border: 1px solid white; /* Changed to white */
    border-radius: 10px;
    resize: none;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
    font-family: 'Asliya', sans-serif;
}

textarea:focus {
    border-color: white; /* Changed to white */
}

button {
    padding: 0 25px;
    background: #6f6d6d;
    color: white;
    border: 1px solid white; /* Changed to white */
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
    font-family: 'Asliya', sans-serif;
}

button:hover {
    background: #5c5a5a;
}

#sendButton {
    width: 50px; /* 与 record-btn 的宽度一致 */
    height: 50px; /* 与 record-btn 的高度一致 */
    border-radius: 30%; /* 与 record-btn 的圆角一致 */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0; /* 移除默认 padding */
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .chat-container {
        height: 95vh;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .chat-header h1 {
        font-size: 1rem;  /* Further reduced for mobile */
    }
    
    .chat-header {
        padding: 8px;  /* Reduced padding for mobile */
        height: 40px;  /* Reduced height for mobile */
    }
}

.language-hint {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 5px;
    font-family: 'Asliya', sans-serif;
}

.message-toolbar {
    display: flex;
    gap: 10px;
    margin-top: 5px;
    opacity: 0;
    transition: opacity 0.3s;
}

.message:hover .message-toolbar {
    opacity: 1;
}

.toolbar-btn {
    padding: 4px 8px;
    font-size: 12px;
    background: transparent;
    border: 1px solid white; /* Changed to white */
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    font-family: 'Asliya', sans-serif;
}

.toolbar-btn:hover {
    background: #E6F3F8;
    color: #6f6d6d;
}

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(111, 109, 109, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    z-index: 1000;
    font-family: 'Asliya', sans-serif;
}

pre {
    background: #f6f8fa;
    border-radius: 6px;
    padding: 16px;
    margin: 10px 0;
    position: relative;
    overflow: hidden;
    border: 1px solid white; /* Changed to white */
}

code {
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
}

.record-btn {
    padding: 0 25px;
    background: #ff4d4d;
    color: white;
    border: 1px solid white; /* Changed to white */
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
    font-family: 'Asliya', sans-serif;
}

.record-btn:hover {
    background: #cc0000;
}

.record-btn {
    -webkit-touch-callout: none;    /* iOS Safari */
    -webkit-user-select: none;      /* Safari */
    -khtml-user-select: none;       /* Konqueror HTML */
    -moz-user-select: none;         /* Firefox */
    -ms-user-select: none;          /* Internet Explorer/Edge */
    user-select: none;              /* 非前缀版本 */
}

.record-btn {
    width: 20px;
    height: 50px;
    border-radius: 30%;
    background-color: #ff0000;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s; /* 添加0.3秒的颜色过渡效果 */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.record-btn:active {  /* 按下状态 */
    background-color: #00ff00;
}