/* 全局样式 - 仿QQ界面 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

/* 卡片样式 */
.welcome-card,
.login-card,
.join-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    font-size: 64px;
    text-align: center;
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

h1,
h2 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
}

h1 {
    font-size: 28px;
}

h2 {
    font-size: 24px;
}

p {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

/* 按钮组 */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 25px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #ccc;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
}

.btn-small {
    padding: 8px 15px;
    font-size: 14px;
}

.btn-block {
    width: 100%;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 消息提示 */
.message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: #764ba2;
}

/* 管理员面板 */
.admin-panel {
    background: #f5f5f5;
    min-height: 100vh;
}

.admin-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.admin-header h1 {
    color: white;
    margin: 0;
    font-size: 24px;
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.admin-section h2 {
    text-align: left;
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    margin: 0;
}

.button-group-inline {
    display: flex;
    gap: 10px;
    align-items: center;
}

.result-box {
    margin-top: 20px;
    padding: 20px;
    border-radius: 8px;
    display: none;
}

.result-box.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    display: block;
}

.result-box h3 {
    margin-bottom: 15px;
    color: #155724;
}

.result-box p {
    text-align: left;
    margin: 8px 0;
    color: #155724;
}

.result-box input[type="text"] {
    margin: 10px 0;
}

.list-container {
    margin-top: 15px;
}

.list-item {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-info {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
}

.item-info strong {
    color: #333;
}

.item-actions {
    display: flex;
    gap: 10px;
}

.empty-message {
    text-align: center;
    color: #999;
    padding: 30px;
    /* 让空消息提示占据整个父容器的高度并居中 */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
}

.form-box {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
}

.form-box input {
    display: block;
    width: 100%;
    margin-bottom: 10px;
}

/* 设置表单样式 */
.settings-form {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.settings-note {
    font-size: 12px;
    color: #999;
    font-weight: normal;
}

.setting-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.setting-item:last-of-type {
    border-bottom: none;
}

.setting-item label {
    display: block;
    margin-bottom: 10px;
}

.setting-item label strong {
    display: block;
    color: #333;
    margin-bottom: 5px;
}

.setting-desc {
    display: block;
    font-size: 12px;
    color: #666;
    font-weight: normal;
}

.input-with-unit {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-with-unit input {
    flex: 0 0 150px;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.input-with-unit input:focus {
    outline: none;
    border-color: #667eea;
}

.input-with-unit input:disabled {
    background: #f0f0f0;
    color: #999;
    cursor: not-allowed;
}

.input-with-unit .unit {
    color: #666;
    font-size: 14px;
}

/* 聊天界面 - 深色主题 */
.chat-body {
    background: #000000;
}

.chat-container {
    width: 100%;
    max-width: 600px;
    height: 100vh;
    background: #000000;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.chat-header {
    background: #1a1a1a;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid #2a2a2a;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.back-btn,
.destroy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn:hover,
.destroy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-title {
    font-size: 18px;
    font-weight: 600;
}

/* 消息区域 - 深色 */
.message-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #000000;
}

.message-area::-webkit-scrollbar {
    width: 6px;
}

.message-area::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

.message-item {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    animation: messageIn 0.3s ease;
    align-items: flex-start;
}

@keyframes messageIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-item.own {
    justify-content: flex-end;
    flex-direction: row;
}

.message-item.system {
    justify-content: center;
}

/* 头像 */
.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* 消息包装器 */
.message-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 60%;
}

/* 消息气泡 - 深色主题 */
.message-bubble {
    padding: 12px 16px;
    border-radius: 12px;
    word-wrap: break-word;
    white-space: pre-wrap;
    /* 保留换行符 */
    text-align: left;
    /* 强制文字左对齐 */
    position: relative;
    display: inline-block;
}

.message-item.other .message-bubble {
    background: #2a2a2a;
    color: #ffffff;
    border-radius: 0 12px 12px 12px;
}

.message-item.own .message-bubble {
    background: #3a3a3a;
    color: #ffffff;
    border-radius: 12px 0 12px 12px;
}

/* 系统消息 */
.system-message {
    background: rgba(255, 255, 255, 0.1);
    color: #999;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 12px;
    display: inline-block;
}

.message-sender {
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}

/* 时间戳 */
.message-time {
    font-size: 10px;
    color: #666;
    margin-top: 4px;
}

.message-item.own .message-time {
    text-align: right;
}

.message-image {
    max-width: 200px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.message-image:hover {
    transform: scale(1.05);
}

.message-video {
    max-width: 300px;
    max-height: 400px;
    border-radius: 8px;
    display: block;
}

/* 不支持的视频格式样式 */
.video-unsupported {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    max-width: 300px;
}

.unsupported-icon {
    font-size: 32px;
    opacity: 0.8;
}

.unsupported-text {
    flex: 1;
}

.unsupported-title {
    font-weight: bold;
    color: #FFC107;
    margin-bottom: 5px;
    font-size: 14px;
}

.unsupported-format {
    color: #ccc;
    font-size: 12px;
    margin-bottom: 10px;
}

.video-download-link {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.video-download-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 上传进度样式 */
.upload-progress-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white;
    min-width: 280px;
    max-width: 350px;
}

.upload-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.upload-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.upload-details {
    flex: 1;
    min-width: 0;
}

.upload-filename {
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-filesize {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.progress-bar-container {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 10px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.upload-status {
    font-size: 13px;
    font-weight: 500;
    text-align: right;
}

/* 语音消息样式 */
.voice-bubble {
    background: transparent !important;
    padding: 0 !important;
}

.voice-player {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #3a3a3a;
    padding: 8px 12px;
    border-radius: 20px;
    min-width: 150px;
    position: relative;
}

.voice-play-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s ease;
}

.voice-play-btn:hover {
    transform: scale(1.1);
}

.voice-play-btn svg {
    display: block;
}

/* 音波动画 */
.voice-waveform {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 20px;
    flex: 1;
}

.voice-waveform span {
    width: 3px;
    background: #888;
    border-radius: 2px;
    /* 默认不播放动画 */
}

/* 播放时才显示动画 */
.voice-player.playing .voice-waveform span {
    animation: wave 1.2s ease-in-out infinite;
}

.voice-waveform span:nth-child(1) {
    height: 8px;
}

.voice-player.playing .voice-waveform span:nth-child(1) {
    animation-delay: 0s;
}

.voice-waveform span:nth-child(2) {
    height: 14px;
}

.voice-player.playing .voice-waveform span:nth-child(2) {
    animation-delay: 0.1s;
}

.voice-waveform span:nth-child(3) {
    height: 18px;
}

.voice-player.playing .voice-waveform span:nth-child(3) {
    animation-delay: 0.2s;
}

.voice-waveform span:nth-child(4) {
    height: 12px;
}

.voice-player.playing .voice-waveform span:nth-child(4) {
    animation-delay: 0.3s;
}

.voice-waveform span:nth-child(5) {
    height: 10px;
}

.voice-player.playing .voice-waveform span:nth-child(5) {
    animation-delay: 0.4s;
}

@keyframes wave {

    0%,
    100% {
        transform: scaleY(1);
        background: #888;
    }

    50% {
        transform: scaleY(1.5);
        background: #fff;
    }
}

.voice-duration {
    color: #ccc;
    font-size: 12px;
    min-width: 20px;
    text-align: right;
}

/* 进度条 */
.voice-progress {
    position: absolute;
    bottom: 2px;
    left: 50px;
    right: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1px;
    overflow: hidden;
}

.voice-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.1s linear;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}


/* 输入区域 - 深色 */
.chat-footer {
    background: #1a1a1a;
    border-top: 1px solid #2a2a2a;
    padding: 10px;
    /* 在移动端固定在底部 */
    position: relative;
    /* 桌面端使用相对定位 */
}

/* 移动端固定输入框在底部 */
@media (max-width: 768px) {
    .chat-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        max-width: 600px;
        /* 保持最大宽度 */
        margin: 0 auto;
        /* 居中 */
    }

    /* 为message-area添加底部padding，避免被输入框遮挡 */
    .message-area {
        padding-bottom: 80px;
        /* 根据输入框高度调整 */
    }
}

.input-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    justify-content: flex-start;
}

.toolbar-btn {
    background: #2a2a2a;
    border: none;
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toolbar-btn:hover {
    background: #3a3a3a;
    transform: scale(1.05);
}

.toolbar-btn.active {
    background: #667eea;
}

.input-box {
    display: flex;
    gap: 10px;
    align-items: center;
}

.voice-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.voice-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.voice-btn.active {
    background: #667eea;
    animation: pulse 1s infinite;
}

.voice-btn svg {
    width: 24px;
    height: 24px;
}

#messageInput {
    flex: 1;
    padding: 12px;
    border: 1px solid #2a2a2a;
    background: #2a2a2a;
    color: #ffffff;
    border-radius: 20px;
    font-size: 14px;
    resize: none;
    max-height: 100px;
    overflow: hidden;
    font-family: inherit;
}

#messageInput::-webkit-scrollbar {
    display: none;
}

#messageInput {
    scrollbar-width: none;
}

#messageInput:focus {
    outline: none;
    border-color: #667eea;
}

#messageInput::placeholder {
    color: #666;
}

.send-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.send-btn:active {
    transform: translateY(0);
}

.loading {
    text-align: center;
    color: #666;
    padding: 20px;
}

/* 性别选择 */
.gender-selection {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
}

.gender-option {
    cursor: pointer;
}

.gender-option input[type="radio"] {
    display: none;
}

.gender-label {
    display: inline-block;
    padding: 15px 30px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.gender-option input[type="radio"]:checked+.gender-label {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.gender-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 头像网格 */
.avatar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 20px 0;
    max-height: 400px;
    overflow-y: auto;
}

.avatar-item {
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 12px;
    padding: 5px;
    transition: all 0.3s ease;
}

.avatar-item:hover {
    transform: scale(1.05);
    border-color: #667eea;
}

.avatar-item.selected {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.avatar-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

/* 录音界面 */
.recording-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.recording-panel {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
}

.recording-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: pulse 1s infinite;
}

.recording-text {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
}

.recording-time {
    font-size: 24px;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 30px;
}

.recording-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* 响应式设计与移动端适配 */
@media (max-width: 768px) {
    .chat-container {
        max-width: 100%;
        height: 100vh;
        /* 改回100vh以确保占据整个视口高度 */
        box-shadow: none;
    }

    .message-wrapper {
        max-width: 85%;
        /* 增加移动端消息宽度占比 */
    }

    .message-bubble {
        max-width: 100%;
        /* 让气泡填满wrapper */
        padding: 10px 14px;
        font-size: 15px;
    }

    .message-item {
        margin-bottom: 15px;
    }

    /* 优化输入框区域 */
    .input-box {
        padding: 8px;
        gap: 8px;
    }

    .voice-btn,
    .menu-btn,
    .send-btn {
        width: 36px;
        height: 36px;
        padding: 0;
    }

    #messageInput {
        padding: 8px;
        font-size: 15px;
    }
}

/* 全局图片消息优化 */
.message-image {
    max-width: 100%;
    /* 确保图片不超出气泡 */
    width: auto;
    height: auto;
    display: block;
    /* 消除底部间隙 */
    border-radius: 8px;
    object-fit: contain;
    /* 限制最大显示尺寸，防止过大 */
    max-height: 300px;
}

/* 针对纯图片消息，去除气泡背景，让图片自适应 */
.message-bubble:has(.message-image) {
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* 兼容不支持 :has 的浏览器 */
.message-bubble img.message-image {
    margin: -4px;
    /* 如果保留padding，抵消padding */
    width: calc(100% + 8px);
    /* 撑满容器 */
    max-width: calc(100% + 8px);
}

/* 移动端特殊处理图片 */
@media (max-width: 600px) {
    .message-image {
        max-width: 100% !important;
        margin: 0 !important;
        width: 100% !important;
    }

    /* 强制移除图片气泡的内边距 */
    .message-bubble:has(.message-image),
    .message-bubble:has(img) {
        padding: 0 !important;
        background: transparent !important;
    }
}
/* ͷѡʽ */
.avatar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px 0;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.avatar-grid::-webkit-scrollbar {
    display: none;
}

.avatar-item {
    border: 3px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    aspect-ratio: 1;
}

.avatar-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-item:hover {
    transform: scale(1.05);
    border-color: rgba(102, 126, 234, 0.5);
}

.avatar-item.selected {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.btn-block {
    width: 100%;
    margin-bottom: 12px;
}

.btn-block:last-child {
    margin-bottom: 0;
}

/* ƵϢʽ */
.message-video {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    max-height: 400px;
    object-fit: contain;
}

/* ԴƵϢȥݱ */
.message-bubble:has(.message-video) {
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* ݲ֧ :has  */
.message-bubble video.message-video {
    margin: 0;
}
