/* 全局样式 */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
}

/* 卡片样式 */
.card {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 按钮样式 */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 语音控制按钮样式 */
.btn-voice {
    min-width: 120px;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    position: relative;
    overflow: hidden;
}

/* 语音唤醒按钮样式 */
#voice-wake-button {
    position: relative;
    transition: all 0.3s ease;
}

/* 语音唤醒激活状态 */
#voice-wake-button.active {
    background-color: #28a745;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.5);
    animation: pulse 2s infinite;
}

/* 发言中状态 */
.speaking-status {
    position: relative;
}

/* 发言指示器动画 */
.speaking-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #dc3545;
    animation: pulse 1.5s infinite;
    margin-right: 8px;
}

/* 网络状态指示器 */
.network-status {
    position: fixed;
    top: 70px;
    right: 10px;
    z-index: 1000;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.network-status.good {
    background-color: rgba(25, 135, 84, 0.9);
    color: white;
}

.network-status.medium {
    background-color: rgba(255, 193, 7, 0.9);
    color: #212529;
}

.network-status.poor {
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
}

/* 响应式调整 */
@media (max-width: 768px) {
    /* 语音控制区域调整 */
    .card-body {
        padding: 1.5rem;
    }
    
    /* 按钮间距调整 */
    .d-flex.flex-column {
        gap: 1rem;
    }
    
    /* 发言状态调整 */
    .speaking-status {
        margin-top: 1rem;
    }
    
    /* 网络状态指示器调整 */
    .network-status {
        top: 60px;
        right: 5px;
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
    }
}

/* 响应式按钮调整 */
@media (max-width: 768px) {
    .btn {
        min-height: 56px;
        font-size: 1.1rem;
        padding: 1rem;
    }
    
    .btn-voice {
        min-width: 140px;
    }
    
    .d-flex.justify-content-center {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .d-flex.justify-content-center .btn {
        margin: 0 !important;
    }
}

/* 表单样式 */
.form-control {
    border-radius: 4px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* 聊天消息样式 */
.chat-message {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
    max-width: 80%;
}

.chat-message.user {
    background-color: #e3f2fd;
    align-self: flex-end;
    margin-left: auto;
}

.chat-message.other {
    background-color: #f8f9fa;
    align-self: flex-start;
}

.chat-message.system {
    background-color: #f3e5f5;
    font-style: italic;
    align-self: center;
    max-width: 90%;
}

.chat-message.join-message {
    background-color: #dc3545;
    color: white;
    font-style: italic;
    align-self: center;
    max-width: 90%;
}

.chat-message.leave-message {
    background-color: #343a40;
    color: white;
    font-style: italic;
    align-self: center;
    max-width: 90%;
}

/* 参与者列表样式 */
.list-group-item {
    transition: background-color 0.2s ease;
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

.list-group-item.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* 发言状态样式 */
.speaking-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #dc3545;
    animation: pulse 1.5s infinite;
    margin-right: 8px;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(0.8);
        opacity: 1;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .col-md-8,
    .col-md-6 {
        margin-bottom: 20px;
    }

    .chat-message {
        max-width: 90%;
    }

    .card-header h3,
    .card-header h4 {
        font-size: 1.2rem;
    }
}

/* 加载动画 */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
}

/* 错误消息样式 */
.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* 成功消息样式 */
.success-message {
    color: #198754;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* 表情选择器样式 */
.emoji-picker {
    position: absolute;
    bottom: 70px;
    left: 15px;
    width: 300px;
    max-height: 200px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow-y: auto;
}

.emoji-container {
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
}

.emoji-item {
    font-size: 24px;
    text-align: center;
    padding: 5px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.emoji-item:hover {
    background-color: #f0f0f0;
}
