* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* 禁用移动端长按选择和上下文菜单 */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* 禁用移动端长按高亮 */
    -webkit-tap-highlight-color: transparent;
}

/* 管理员消息：五彩边框 + 粉色背景 */
.admin-message .message-content {
    background: linear-gradient(135deg, #fed7e2, #f9a8d4);
    border-radius: 12px;
    padding: 8px 10px;
    border: 2px solid transparent;
    background-image:
        linear-gradient(135deg, #fed7e2, #f9a8d4),
        linear-gradient(120deg, #f97316, #ec4899, #8b5cf6, #22c55e, #06b6d4);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    background-size: 200% 200%, 400% 400%;
    animation: admin-border-rainbow 5s ease-in-out infinite;
    color: #312e81;
}

.admin-message.self .message-content {
    box-shadow: 0 0 14px rgba(236, 72, 153, 0.55);
}

/* 清空聊天确认弹窗 - 毛玻璃样式 */
.glass-modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    z-index: 9999;
}

.glass-modal {
    min-width: 260px;
    max-width: 90%;
    padding: 16px 18px;
    border-radius: 14px;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
}

.glass-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.glass-modal-text {
    font-size: 13px;
    line-height: 1.6;
    color: #dddddd;
    margin-bottom: 16px;
}

.glass-modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.glass-btn {
    min-width: 88px;
    padding: 8px 14px;
    border-radius: 999px;
    border: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(14px);
    transition: all 0.15s ease;
}

.glass-btn-danger {
    background: rgba(255, 71, 87, 0.18);
    border: 1px solid rgba(255, 71, 87, 0.7);
    color: #ff6b81;
}

.glass-btn-danger:hover {
    background: rgba(255, 71, 87, 0.28);
}

.glass-btn-safe {
    background: rgba(46, 213, 115, 0.16);
    border: 1px solid rgba(46, 213, 115, 0.65);
    color: #7bed9f;
}

.glass-btn-safe:hover {
    background: rgba(46, 213, 115, 0.27);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #2c2c2c;
    min-height: 100vh;
    color: #f9fafb;
}

/* 启动过渡页 */
.boot-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2c2c2c;
    z-index: 999;
}

.boot-content {
    text-align: center;
}

/* 登录界面容器：居中显示 */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

/* 房间列表界面：改为整屏页面布局 */
.rooms-screen {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #2c2c2c;
    padding: 0;
}

.login-card {
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    padding: 32px 24px 28px;
    border-radius: 24px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.35);
    text-align: left;
    max-width: 420px;
    width: 100%;
}

/* 房间列表主容器：与聊天页统一背景 & 布局 */
.rooms-card {
    background: #2c2c2c;
    padding: 15px 20px 16px;
    border-radius: 0;
    box-shadow: none;
    border: none;
    text-align: left;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* 房间页头部与聊天页头部间距保持一致 */
.rooms-header {
    margin-bottom: 12px;
    padding: 8px 10px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: rgba(15, 23, 42, 0.9);
}

/* 桌面端：恢复房间页为居中卡片样式，手机端保持全屏 */
@media (min-width: 768px) {
    .rooms-screen {
        align-items: center;
        justify-content: center;
        padding: 20px;
    }

    .rooms-card {
        max-width: 420px;
        height: auto;
        max-height: 90vh;
        border-radius: 24px;
        box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65);
        border: 1px solid rgba(148, 163, 184, 0.35);
    }
}

.logo {
    font-size: 42px;
    margin-bottom: 8px;
}

h1 {
    font-size: 26px;
    color: #e5e7eb;
    margin-bottom: 4px;
}

.subtitle {
    color: #9ca3af;
    font-size: 13px;
    margin-bottom: 24px;
}

.login-section {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 16px;
    padding: 14px 14px 16px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    margin-bottom: 18px;
}

.login-section-title {
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 8px;
}

.rooms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.rooms-header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.rooms-user-info-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.logout-btn {
    background: none;
    border: 1px solid rgba(148, 163, 184, 0.6);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    color: #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: rgba(248, 113, 113, 0.15);
    border-color: rgba(248, 113, 113, 0.7);
    color: #fecaca;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f9fafb;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
}

.current-nickname {
    font-size: 14px;
    color: #aaa;
    white-space: nowrap;
}

/* 管理员昵称：彩虹渐变闪烁效果 */
.admin-nickname {
    background: linear-gradient(90deg, #f97316, #facc15, #22c55e, #38bdf8, #a855f7, #f97316);
    background-size: 400% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: admin-rainbow 3s linear infinite;
}

@keyframes admin-rainbow {
    0% { background-position: 0% 0; }
    100% { background-position: 400% 0; }
}

@keyframes admin-border-rainbow {
    /* 第一层（粉色背景）保持不动，第二层（彩虹边框）不规则流动 */
    0%   { background-position: 0% 0, 0% 0; }
    18%  { background-position: 0% 0, 120% 0; }
    37%  { background-position: 0% 0, 220% 10%; }
    59%  { background-position: 0% 0, 310% -5%; }
    78%  { background-position: 0% 0, 360% 5%; }
    100% { background-position: 0% 0, 420% 0; }
}

.edit-nickname-btn {
    background: none;
    border: none;
    color: #667eea;
    padding: 6px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.edit-nickname-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: scale(1.1);
}

.input-group, .create-room {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.input-row {
    margin-bottom: 10px;
}

.auth-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.auth-btn {
    flex: 1;
}

.create-room-container {
    margin-top: 20px;
    margin-bottom: 20px;
}

.btn-show-create {
    width: 100%;
    background: rgba(102, 126, 234, 0.15);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 16px 24px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

/* 手机端适配：缩小设置弹窗按钮文字，避免被截断 */
@media (max-width: 480px) {
    .modal-btn {
        font-size: 13px;
        padding: 10px;
    }
}

.btn-show-create::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.btn-show-create:hover {
    background: rgba(102, 126, 234, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.btn-show-create:active {
    transform: translateY(0);
    background: rgba(102, 126, 234, 0.2);
}

.create-room-buttons {
    display: flex;
    gap: 10px;
}

.create-room-buttons .btn-primary,
.create-room-buttons .btn-cancel {
    flex: 1;
}

.btn-cancel {
    background: rgba(158, 158, 158, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-cancel:hover {
    background: rgba(158, 158, 158, 0.35);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

input[type="text"], input[type="password"], input[type="email"] {
    padding: 14px;
    border: 1px solid #4b5563;
    border-radius: 999px;
    font-size: 14px;
    background: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
    width: 100%;
}

input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.6);
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 16px 35px rgba(37, 99, 235, 0.55);
}

.divider {
    margin: 20px 0;
    position: relative;
    text-align: center;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #555;
}

.divider span {
    background: #3a3a3a;
    padding: 0 15px;
    color: #aaa;
    font-size: 14px;
    position: relative;
}

.room-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-top: 6px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.room-list::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.room-item {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    margin-bottom: 10px;
    transition: all 0.3s;
    text-align: left;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.room-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: white;
}

.room-item-content {
    flex: 1;
    padding: 15px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.room-item-content:hover {
    transform: translateX(5px);
}

.room-edit-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    padding: 0 15px;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.room-edit-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.room-item-name {
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.room-lock-icon {
    font-size: 16px;
    color: #ffc107;
}

.room-item-info {
    font-size: 12px;
    color: #aaa;
    margin-top: 4px;
}

.room-item:hover .room-item-info {
    color: #ccc;
}

/* 房间复选框 */
.room-checkbox {
    margin: 0 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

/* 房间操作按钮 */
.room-actions {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.room-actions .btn-batch-mode,
.room-actions .btn-show-create {
    flex: 1 1 0;
}

.room-actions .btn-clean {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* 房间 / 好友 顶部切换 */
.rooms-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 10px 0 14px 0;
    padding: 4px;
    background: rgba(17, 24, 39, 0.85);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.rooms-tab {
    flex: 1;
    border: none;
    border-radius: 999px;
    padding: 8px 0;
    font-size: 13px;
    font-weight: 600;
    color: #9ca3af;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rooms-tab.active {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
}

.rooms-tab:not(.active):hover {
    color: #e5e7eb;
}

/* 好友列表面板 */
.friends-panel {
    margin-top: 4px;
    padding: 10px 0 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.friends-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.friends-title {
    font-size: 14px;
    font-weight: 600;
    color: #e5e7eb;
}

.friends-add-btn {
    border: none;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.15);
    color: #bfdbfe;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;        /* 按钮文字保持单行显示，避免在手机端被拆成多行 */
    text-overflow: ellipsis;
    overflow: hidden;
}

.friends-add-btn:hover {
    background: rgba(59, 130, 246, 0.3);
    color: #eff6ff;
}

.friends-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.friends-list::-webkit-scrollbar {
    display: none;
}

.friend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.35);
    cursor: pointer;
    transition: all 0.2s;
}

.friend-item:hover {
    background: rgba(30, 64, 175, 0.75);
    border-color: rgba(191, 219, 254, 0.7);
    transform: translateY(-1px);
}

.friend-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #ffffff;
    flex-shrink: 0;
}

.friend-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.friend-name {
    font-size: 14px;
    font-weight: 600;
    color: #f9fafb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-status {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 2px;
}

.friend-tag {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    margin-left: auto;
}

.btn-batch-mode,
.btn-clean {
    flex: 1;
    padding: 12px 16px;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.btn-batch-mode {
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-batch-mode::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.btn-batch-mode:hover {
    background: rgba(102, 126, 234, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.btn-batch-mode.active {
    background: rgba(255, 152, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-batch-mode.active:hover {
    background: rgba(255, 152, 0, 0.3);
}

.btn-clean {
    background: rgba(245, 87, 108, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-clean::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.btn-clean:hover {
    background: rgba(245, 87, 108, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.btn-batch-mode:active,
.btn-clean:active {
    transform: translateY(0);
}

/* 批量操作按钮 */
.batch-actions {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.btn-select-all,
.btn-delete-selected,
.btn-cancel-batch {
    flex: 1;
    padding: 12px 16px;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.btn-select-all {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-select-all::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.btn-select-all:hover {
    background: rgba(76, 175, 80, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.btn-delete-selected {
    background: rgba(245, 87, 108, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-delete-selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.btn-delete-selected:hover {
    background: rgba(245, 87, 108, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.btn-cancel-batch {
    background: rgba(158, 158, 158, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-cancel-batch::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.btn-cancel-batch:hover {
    background: rgba(158, 158, 158, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.btn-select-all:active,
.btn-delete-selected:active,
.btn-cancel-batch:active {
    transform: translateY(0);
}

.hint {
    color: #aaa;
    font-size: 14px;
}

/* 加载提示 */
.loading-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #aaa;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #555;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

.loading-hint p {
    margin: 0;
    font-size: 14px;
}

/* 空状态提示 */
.empty-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 60px;
    margin-bottom: 15px;
    opacity: 0.6;
}

.empty-hint p {
    margin: 5px 0;
    color: #aaa;
    font-size: 16px;
}

.empty-sub {
    font-size: 14px !important;
    color: #888 !important;
}

/* 聊天界面 */
.chat-screen {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #2c2c2c;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #2c2c2c;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-right {
    display: flex;
    gap: 12px;
    position: relative;
}

.action-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
    color: white;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    outline: none;
    user-select: none;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.action-btn:active {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.95);
}

.back-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    color: white;
}

.room-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.room-name {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

/* 在线用户悬浮窗 - 透明容器 */
.online-users-bar {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background: transparent;
    padding: 6px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    max-width: 100%;
}

/* 当有通话或屏幕共享状态栏时，向下移动 */
.call-status-bar ~ .chat-screen .online-users-bar,
.screen-share-status-bar ~ .chat-screen .online-users-bar {
    top: 115px;
}

.online-users-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    white-space: nowrap;
    align-items: center;
    max-width: 100%;
}

.online-users-list::before,
.online-users-list::after {
    content: '';
    margin: auto;
}

.online-users-list::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.online-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    color: #ddd;
    font-weight: 400;
    white-space: nowrap;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.online-user-chip:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

.online-user-chip.self {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-weight: 500;
    color: rgb(243, 181, 10);
}

.online-user-chip.connected {
    border-color: rgba(76, 175, 80, 0.6);
    background: rgba(76, 175, 80, 0.1);
}

.user-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    display: inline-block;
    animation: pulse 2s infinite;
}

.user-status-dot.connected {
    background: #4CAF50;
    box-shadow: 0 0 4px rgba(76, 175, 80, 0.6);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* 连接状态对话框样式 */
.connection-content {
    max-width: 400px;
    width: 90%;
}

.connection-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 15px 0;
    /* 隐藏滚动条 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.connection-list::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.connection-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.connection-item.disconnected {
    border-color: rgba(255, 82, 82, 0.4);
}

.connection-item:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.4);
    transform: translateX(4px);
}

.connection-item.disconnected:hover {
    background: rgba(255, 82, 82, 0.1);
    border-color: rgba(255, 82, 82, 0.6);
}

.connection-item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #5a5a5a;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 18px;
}

.connection-item-info {
    flex: 1;
}

.connection-item-name {
    font-weight: 600;
    margin-bottom: 4px;
    color: white;
}

.connection-item-status {
    font-size: 12px;
    color: #aaa;
}

.connection-item-action {
    margin-left: 10px;
}

.connection-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.connect-btn {
    background: rgba(76, 175, 80, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(76, 175, 80, 0.4);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.connect-btn:hover {
    background: rgba(76, 175, 80, 0.35);
    border-color: rgba(76, 175, 80, 0.6);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.disconnect-btn {
    background: rgba(255, 82, 82, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 82, 82, 0.4);
    box-shadow: 0 2px 8px rgba(255, 82, 82, 0.3);
}

.disconnect-btn:hover {
    background: rgba(255, 82, 82, 0.35);
    border-color: rgba(255, 82, 82, 0.6);
    box-shadow: 0 4px 12px rgba(255, 82, 82, 0.4);
}

.connection-status-connected {
    color: #4caf50;
}

.connection-status-connecting {
    color: #ffa726;
}

.connection-status-disconnected {
    color: #ff5252;
}

/* 在线计数点击效果 */
.online-count {
    font-size: 18px;
    color: #4caf50;
}

.room-name {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

/* 设置菜单图标 */
.settings-menu-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.settings-menu-icon .line {
    width: 24px;
    height: 2px;
    background-color: #fff;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

.settings-menu-icon:hover .line {
    background-color: #ccc;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 60px 20px 20px 20px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    transition: background 0.3s ease;
    position: relative;
}

.messages::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* 拖拽文件提示 */
.messages::after {
    content: '拖放文件到这里发送';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    color: #667eea;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    z-index: -1;
}

.message {
    margin-bottom: 15px;
    animation: slideIn 0.3s ease;
}

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

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.message-author {
    font-weight: 600;
    font-size: 14px;
    color: #90caf9;
}

.message-time {
    font-size: 11px;
    color: #aaa;
}

.message-content {
    background: white;
    padding: 10px 14px;
    border-radius: 10px;
    color: #111827;
    display: inline-block;
    max-width: 60%;
    min-width: 50px;
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* 文件消息容器：覆盖white-space，避免布局异常 */
.message-content.file-message-content {
    white-space: normal;
    padding: 10px 12px;
}

.message.self {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.message.self .message-header {
    flex-direction: row-reverse;
}

.message.self .message-author {
    color: #4caf50;
}

.message.self .message-content {
    background: #95ec69;
    color: #111827;
}

/* 管理员自己的消息：覆盖默认绿色气泡，使用管理员统一样式 */
.message.self.admin-message .message-content {
    background: linear-gradient(135deg, #fed7e2, #f9a8d4);
    border-radius: 12px;
    padding: 8px 10px;
    border: 2px solid transparent;
    background-image:
        linear-gradient(135deg, #fed7e2, #f9a8d4),
        linear-gradient(120deg, #f97316, #ec4899, #8b5cf6, #22c55e, #06b6d4);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    background-size: 200% 200%, 400% 400%;
    animation: admin-border-rainbow 5s ease-in-out infinite;
    color: #312e81;
}

.system-msg {
    text-align: center;
    color: #aaa;
    font-size: 12px;
    margin: 15px 0;
    padding: 0;
    background: none;
}

.system-msg .user-name {
    color: #667eea;
    font-weight: 500;
}

/* 确保聊天气泡中的管理员昵称也使用渐变效果，而不是被后面的颜色规则覆盖 */
.message-author.admin-nickname,
.message.self .message-author.admin-nickname {
    color: transparent !important;
}

.input-area {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    background: #2c2c2c;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
}

.pending-area {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 20px;
    background: #2c2c2c;
    border-top: 1px solid #3a3a3a;
}

.pending-clear-all {
    margin-left: auto;
    padding: 4px 10px;
    border-radius: 12px;
    border: none;
    background: transparent;
    color: #da5353;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.pending-clear-all:hover {
    color: #f16262;
    background: #3a3a3a;
}

.pending-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #3a3a3a;
    border: 1px solid #555;
    border-radius: 16px;
    color: #fff;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.pending-item * {
    -webkit-tap-highlight-color: transparent;
}

.pending-item:active,
.pending-item:hover {
    background: #3a3a3a;
    box-shadow: none;
    transform: none;
}

.pending-icon {
    font-size: 16px;
}

.pending-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pending-file-name {
    font-size: 12px;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pending-actions {
    font-size: 11px;
    color: #07c160;
    -webkit-tap-highlight-color: transparent;
}

.pending-remove {
    background: transparent;
    border: none;
    color: #ccc;
    font-size: 16px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.pending-remove:hover {
    color: #fff;
}

.waiting-target {
    color: #f44336;
}

.input-area input,
.input-area textarea {
    flex: 1;
    min-width: 100px;
    padding: 12px 16px;
    border: 1px solid #555;
    border-radius: 24px;
    font-size: 14px;
    background: #3a3a3a;
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    resize: none;
    max-height: 120px;
    overflow-y: auto;
    line-height: 1.5;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.input-area textarea::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.input-area textarea:focus {
    outline: none;
}

.send-btn {
    background: rgba(7, 193, 96, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(7, 193, 96, 0.4);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    user-select: none;
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.3);
}

.send-btn:hover {
    background: rgba(7, 193, 96, 0.35);
    border-color: rgba(7, 193, 96, 0.6);
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(7, 193, 96, 0.4);
}

.voice-btn {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    outline: none;
    user-select: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.voice-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.voice-btn svg {
    width: 24px;
    height: 24px;
    color: white;
}

button {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.voice-btn:hover {
    background: #4a4a4a;
}

.voice-btn:active {
    background: #4a4a4a;
}

.voice-btn.recording {
    background: #ff4444;
    color: white;
    animation: pulse 1s infinite;
}

.voice-btn.recording svg {
    color: white;
}

.plus-btn {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    outline: none;
    user-select: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.plus-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

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

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* 语音录制状态提示 */
.voice-recording {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: white;
    padding: 30px;
    border-radius: 50%;
    z-index: 10000;
    text-align: center;
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.recording-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.recording-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
    animation: pulse 1s infinite;
}

.recording-text {
    font-size: 16px;
    margin-bottom: 8px;
}

.recording-time {
    font-size: 14px;
    margin-bottom: 8px;
    font-family: monospace;
}

.recording-hint {
    font-size: 12px;
    color: #ccc;
}

/* 语音消息气泡 */
.voice-message {
    background: #f0f0f0;
    padding: 12px;
    border-radius: 18px;
    margin: 8px 0;
    display: inline-block;
    max-width: 250px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    user-select: none;
}

.voice-message:hover {
    background: #e8e8e8;
}

.voice-message.self {
    background: #95ec69;
}

.voice-message.self:hover {
    background: #7ed658;
}

.voice-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.voice-icon {
    font-size: 24px;
    color: #333;
}

.voice-duration {
    font-size: 14px;
    color: #666;
}

.voice-waves {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}

.voice-wave {
    width: 3px;
    background: #333;
    border-radius: 3px;
    height: 10px;
    transform: scaleY(0.5);
}

.voice-wave:nth-child(1) { height: 10px; }
.voice-wave:nth-child(2) { height: 15px; }
.voice-wave:nth-child(3) { height: 12px; }
.voice-wave:nth-child(4) { height: 18px; }
.voice-wave:nth-child(5) { height: 14px; }

@keyframes wave {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1); }
}

.voice-message.self .voice-icon,
.voice-message.self .voice-duration,
.voice-message.self .voice-wave {
    color: #333;
}

.voice-message.playing .voice-wave {
    animation: wave 0.8s infinite ease-in-out;
}

.voice-message.playing .voice-wave:nth-child(1) { animation-delay: 0s; }
.voice-message.playing .voice-wave:nth-child(2) { animation-delay: 0.1s; }
.voice-message.playing .voice-wave:nth-child(3) { animation-delay: 0.2s; }
.voice-message.playing .voice-wave:nth-child(4) { animation-delay: 0.3s; }
.voice-message.playing .voice-wave:nth-child(5) { animation-delay: 0.4s; }

.file-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 24px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
}

.file-btn:hover {
    background: #5568d3;
}

/* 三个点菜单按钮样式 */
.dots-menu-btn {
    background: none;
    border: none;
    color: #333;
    font-size: 22px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.dots-menu-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

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

/* 三个点菜单样式 */
.dots-menu {
    position: fixed;
    /* 毛玻璃效果：风格接近 plus-btn 的浅色玻璃，文字保持高对比度 */
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    padding: 8px 0;
    margin-top: 10px;
    min-width: 180px;
    display: none; /* 默认隐藏 */
    z-index: 9999;
    transform-origin: bottom left;
    bottom: 80px; /* 从输入框上方弹出 */
    left: 20px; /* 从左侧弹出 */
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.dots-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* 手机端适配 */
@media (max-width: 600px) {
    .dots-menu-btn {
        font-size: 20px;
        padding: 6px;
    }
    
    .dots-menu {
        min-width: 160px;
    }
}

.menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #f0f0f0;
    transition: background 0.2s;
    white-space: nowrap;
    font-weight: 600;
    gap: 8px; /* 统一图标和文字间距，避免看起来多一个空格 */
    line-height: 1.2; /* 让图标与文字垂直居中更自然 */
}

.dots-menu svg {
    flex-shrink: 0;
}

/* 仅在加号菜单中增强文字和图标的边缘对比度，防止毛玻璃背景下发虚 */
.dots-menu .menu-item {
    /* 细黑边缘，让文字稍微更立体，但不过分发光 */
    text-shadow:
        0 0 1px #000,
        0 0 2px #000;
}

.dots-menu svg {
    /* 保持布局不变，只给图标加一点黑色投影边缘 */
    filter: drop-shadow(0 0 1px #000);
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.16);
}

.menu-item:active {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0.98);
}

.menu-item:first-child {
    border-radius: 12px 12px 0 0;
}

.menu-item:last-child {
    border-radius: 0 0 12px 12px;
}

/* 加号按钮旋转动画 */
#dotsMenuBtn {
    transition: transform 0.2s ease;
}

#dotsMenuBtn.active {
    transform: rotate(45deg);
}

/* 文件消息 - 时尚设计 */
.file-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    margin: 0;
    min-width: 240px;
    max-width: 280px;
}

.file-icon {
    font-size: 40px;
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.message.self .file-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.3);
}

.file-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-name {
    font-weight: 500;
    font-size: 14px;
    color: #333;
    word-break: break-word;
    line-height: 1.3;
    margin: 0;
}

.message.self .file-name {
    color: #333;
}

.file-size {
    font-size: 11px;
    color: #999;
    margin: 0;
}

.message.self .file-size {
    color: #888;
}

.file-progress {
    width: 100%;
    height: 3px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    margin-top: 2px;
}

.message.self .file-progress {
    background: rgba(0, 0, 0, 0.12);
}

.file-progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.message.self .file-progress-bar {
    background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
}

.file-status {
    font-size: 11px;
    color: #999;
    margin: 0;
}

.message.self .file-status {
    color: #888;
}

.file-download-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
    margin-top: 4px;
    margin-right: 6px;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
    transition: all 0.2s ease;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.4s ease forwards;
}

.file-download-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.file-download-btn:active {
    transform: translateY(0);
}

.message.self .file-download-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 2px 6px rgba(245, 87, 108, 0.3);
}

.message.self .file-download-btn:hover {
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

/* 转发按钮样式 */
.file-forward-btn {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
    margin-top: 4px;
    box-shadow: 0 2px 6px rgba(17, 153, 142, 0.3);
    transition: all 0.2s ease;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.4s ease forwards;
    animation-delay: 0.1s;
}

.file-forward-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.4);
}

.file-forward-btn:active {
    transform: translateY(0);
}

.message.self .file-forward-btn {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    box-shadow: 0 2px 6px rgba(250, 112, 154, 0.3);
}

.message.self .file-forward-btn:hover {
    box-shadow: 0 4px 12px rgba(250, 112, 154, 0.4);
}

/* 按钮淡入动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 用户选择对话框样式 */
.user-select-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 20px 0;
    /* 隐藏滚动条 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.user-select-list::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.user-select-item {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-select-item:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.4);
    transform: translateX(4px);
}

.user-select-item .user-name {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

/* 响应式 */
@media (max-width: 600px) {
    .login-card, .rooms-card {
        padding: 30px 20px;
    }

    .message-content {
        max-width: 85%;
    }
    
    .file-message {
        min-width: 200px;
        max-width: 240px;
        gap: 10px;
    }
    
    .file-icon {
        width: 45px;
        height: 45px;
        font-size: 36px;
    }
    
    .file-name {
        font-size: 13px;
    }
    
    .file-size {
        font-size: 10px;
    }
    
    .file-status {
        font-size: 10px;
    }
    .pending-file-name {
        max-width: 120px;
    }
}

/* 通话界面 */
.call-ui {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #2c2c2c;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.call-overlay {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 40px 20px;
}

.call-header {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
}

.call-back-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.call-back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.call-info {
    text-align: center;
    color: white;
}

.call-avatar {
    font-size: 80px;
    margin-bottom: 20px;
}

.call-name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
}

.call-status {
    font-size: 18px;
    color: #aaa;
    margin-bottom: 20px;
    text-align: center;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

#remoteVideo {
    width: 100%;
    height: 100%;
    max-height: 600px;
    background: #1a1a1a;
    border-radius: 12px;
    object-fit: cover;
}

#localVideo {
    position: fixed;
    top: 10px;
    right: 20px;
    width: 120px;
    height: 160px;
    background: #2a2a2a;
    border-radius: 12px;
    border: 3px solid #333;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 1000;
}

#localVideo:hover {
    transform: scale(1.05);
}

.call-controls {
    display: flex;
    gap: 20px;
    padding: 20px;
}

.control-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.control-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    color: white;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    outline: none;
}

.control-btn:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

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

.control-btn.muted {
    background: rgba(158, 158, 158, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
}

.control-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    white-space: nowrap;
}

.end-btn {
    background: rgba(244, 67, 54, 0.3) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(244, 67, 54, 0.5) !important;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4) !important;
}

.end-btn:hover {
    background: rgba(244, 67, 54, 0.5) !important;
    border-color: rgba(244, 67, 54, 0.7) !important;
    box-shadow: 0 6px 16px rgba(244, 67, 54, 0.5) !important;
}

.mute-btn.muted {
    background: #616161;
}

.camera-btn.off {
    background: #616161;
}

.switch-camera-btn {
    background: #2196f3;
    width: 56px;
    height: 56px;
    font-size: 22px;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    outline: none;
}

.switch-camera-btn:hover {
    background: #1976d2;
}

.switch-camera-btn:active {
    background: #1976d2;
}

@media (max-width: 600px) {
    .call-overlay {
        padding: 20px 10px;
        height: 100vh;
        display: flex;
        flex-direction: column;
    }
    
    .call-avatar {
        font-size: 60px;
    }
    
    .call-name {
        font-size: 22px;
    }
    
    .video-container {
        position: relative;
        width: 100%;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 10px 0;
        min-height: 300px;
    }
    
    #localVideo {
        width: 120px;
        height: 160px;
        background: #2a2a2a;
        border-radius: 12px;
        border: 3px solid #333;
        object-fit: cover;
        cursor: pointer;
        transition: transform 0.3s ease;
        position: fixed;
        top: 10px;
        right: 20px;
        z-index: 1000;
    }
    
    #localVideo:hover {
        transform: scale(1.05);
    }
    
    #remoteVideo {
        width: 100%;
        height: 100%;
        object-fit: cover;
        position: absolute;
        top: 0;
        left: 0;
    }
    
    .control-btn {
        width: 48px;
        height: 48px;
        font-size: 20px;
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        outline: none;
    }
    
    .control-btn:active {
        background: rgba(255, 255, 255, 0.25);
    }
    
    .end-btn {
        width: 48px;
        height: 48px;
        font-size: 20px;
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        outline: none;
    }
    
    .end-btn:active {
        background: rgba(244, 67, 54, 1);
    }
    
    .switch-camera-btn {
        width: 48px;
        height: 48px;
        font-size: 20px;
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        outline: none;
    }
    
    .switch-camera-btn:active {
        background: rgba(33, 150, 243, 0.9);
    }
}

/* 通话状态栏 - 可拖动悬浮窗样式 */
.call-status-bar {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(76, 175, 80, 0.2);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    color: white;
    padding: 8px 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    cursor: move;
    transition: box-shadow 0.3s;
    border-radius: 20px;
    max-width: 90%;
    border: 1px solid rgba(76, 175, 80, 0.4);
    touch-action: none;
    user-select: none;
}

.call-status-bar:hover {
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.5);
}

.call-status-bar.dragging {
    transition: none;
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.6);
}

.call-status-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.call-status-icon {
    font-size: 16px;
}

.call-status-text {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.call-status-timer {
    font-size: 12px;
    font-weight: 400;
    opacity: 0.9;
    font-family: monospace;
}

/* 提示框 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    white-space: nowrap;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toast.show {
    opacity: 1;
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: #3a3a3a;
    border-radius: 16px;
    padding: 20px;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: white;
    margin-bottom: 16px;
}

.modal-message {
    font-size: 15px;
    color: #aaa;
    margin-bottom: 24px;
    line-height: 1.5;
    white-space: pre-line;
}

.modal-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #555;
    border-radius: 8px;
    font-size: 15px;
    margin-bottom: 24px;
    background: #2c2c2c;
    color: white;
}

.modal-input:focus {
    outline: none;
    border-color: #667eea;
}

.modal-buttons {
    display: flex;
    gap: 12px;
}

.modal-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;        /* 按钮文字保持单行显示，避免在手机端拆成多行 */
    text-overflow: ellipsis;
    overflow: hidden;
}

.modal-btn.cancel {
    background: #4a4a4a;
    color: white;
}

.modal-btn.cancel:hover {
    background: #5a5a5a;
}

.modal-btn.confirm {
    background: #667eea;
    color: white;
}

.modal-btn.confirm:hover {
    background: #5568d3;
}

/* 用户操作菜单 */
.user-action-content {
    max-width: 320px;
    width: 90%;
}

.user-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.action-menu-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    text-align: left;
}

.action-menu-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.action-menu-btn .action-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}

.action-menu-btn .action-icon svg {
    width: 100%;
    height: 100%;
    color: inherit;
}

.action-menu-btn .action-text {
    flex: 1;
}

.action-menu-btn.voice-action:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.4);
}

.action-menu-btn.video-action:hover {
    background: rgba(76, 175, 80, 0.15);
    border-color: rgba(76, 175, 80, 0.4);
}

.action-menu-btn.remote-action:hover {
    background: rgba(255, 152, 0, 0.15);
    border-color: rgba(255, 152, 0, 0.4);
}

/* 来电通知 */
.incoming-call {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #2c2c2c;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
}

.incoming-call-content {
    text-align: center;
    color: white;
}

.incoming-call-avatar {
    font-size: 80px;
    margin-bottom: 20px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.incoming-call-name {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.incoming-call-type {
    font-size: 16px;
    color: #aaa;
    margin-bottom: 40px;
}

.incoming-call-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.incoming-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.incoming-btn.reject {
    background: #f44336;
    color: white;
}

.incoming-btn.reject:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

.incoming-btn.accept {
    background: #4caf50;
    color: white;
}

.incoming-btn.accept:hover {
    background: #45a049;
    transform: scale(1.1);
}

/* 用户选择列表 */
.user-select-content {
    max-width: 500px;
}

.user-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 12px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.user-list::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.user-select-buttons {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.user-select-buttons .modal-btn {
    flex: 1;
}

.user-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #4a4a4a;
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
}

.user-item:hover {
    background: #667eea;
    color: white;
    transform: translateX(5px);
}

.user-item-avatar {
    font-size: 32px;
    margin-right: 12px;
}

.user-item-info {
    flex: 1;
}

.user-item-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.user-item-status {
    font-size: 12px;
    color: #4caf50;
}

.user-item:hover .user-item-status {
    color: rgba(255, 255, 255, 0.9);
}

/* 屏幕共享界面 */
.screen-share-ui {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #2c2c2c;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 全屏模式 */
.screen-share-ui.fullscreen {
    position: fixed !important;
    width: 100vw !important;
    height: 100vh !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 9999 !important;
}

.screen-share-ui.fullscreen .screen-share-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.screen-share-ui.fullscreen .screen-share-info {
    display: none;
}

.screen-share-ui.fullscreen .screen-share-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* 控制栏隐藏状态 */
.screen-share-ui.fullscreen.controls-hidden .screen-share-header {
    transform: translateY(-100%);
    opacity: 0;
}

.screen-share-ui.fullscreen.controls-hidden .screen-share-controls {
    transform: translateY(100%);
    opacity: 0;
}

.screen-share-ui.fullscreen .screen-share-container {
    width: 100vw;
    height: 100vh;
}

.screen-share-ui.fullscreen #screenShareVideo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.screen-share-overlay {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.screen-share-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #2c2c2c;
    color: white;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.screen-share-back-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen-share-back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.screen-share-title {
    font-size: 18px;
    font-weight: 600;
}

.screen-share-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
}

#screenShareVideo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.screen-share-info {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.screen-share-user {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.screen-share-status {
    font-size: 14px;
    color: #aaa;
}

.screen-share-controls {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #2c2c2c;
    justify-content: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
}

.fullscreen-btn {
    background: rgba(33, 150, 243, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(33, 150, 243, 0.4);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.fullscreen-btn:hover {
    background: rgba(33, 150, 243, 0.35);
    border-color: rgba(33, 150, 243, 0.6);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.4);
}

/* 系统音频按钮样式 - 绿色毛玻璃（开启）/ 红色（关闭） */
.system-audio-btn {
    background: rgba(76, 175, 80, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(76, 175, 80, 0.4);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.system-audio-btn:hover {
    background: rgba(76, 175, 80, 0.35);
    border-color: rgba(76, 175, 80, 0.6);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.system-audio-btn.muted {
    background: rgba(244, 67, 54, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(244, 67, 54, 0.4);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.system-audio-btn.muted:hover {
    background: rgba(244, 67, 54, 0.35);
    border-color: rgba(244, 67, 54, 0.6);
    box-shadow: 0 6px 16px rgba(244, 67, 54, 0.4);
}

/* 屏幕共享状态栏 - 可拖动悬浮窗样式 */
.screen-share-status-bar {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 188, 212, 0.2);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    color: white;
    padding: 8px 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 188, 212, 0.4);
    cursor: move;
    transition: box-shadow 0.3s;
    border-radius: 20px;
    max-width: 90%;
    border: 1px solid rgba(0, 188, 212, 0.4);
    touch-action: none;
    user-select: none;
}

.screen-share-status-bar:hover {
    box-shadow: 0 6px 16px rgba(0, 188, 212, 0.5);
}

.screen-share-status-bar.dragging {
    transition: none;
    box-shadow: 0 8px 20px rgba(0, 188, 212, 0.6);
}

.screen-share-status-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.screen-share-status-icon {
    font-size: 16px;
}

.screen-share-status-text {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .screen-share-header {
        padding: 10px 15px;
    }
    
    .screen-share-title {
        font-size: 16px;
    }
    
    .screen-share-controls {
        padding: 15px;
    }
}

/* 扬声器按钮样式 */
.speaker-btn {
    background: rgba(76, 175, 80, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(76, 175, 80, 0.4);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.speaker-btn:hover {
    background: rgba(76, 175, 80, 0.35);
    border-color: rgba(76, 175, 80, 0.6);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.speaker-btn.muted {
    background: rgba(158, 158, 158, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.speaker-btn.muted:hover {
    background: rgba(158, 158, 158, 0.35);
    border-color: rgba(255, 255, 255, 0.3);
}

/* 通话计时器样式 */
.call-timer {
    font-size: 18px;
    color: #aaa;
    margin-top: 5px;
    font-family: monospace;
    font-weight: 500;
    display: none; /* 默认隐藏，连接成功后显示 */
}

.call-timer.visible {
    display: block;
}

/* 控制按钮容器 */
.control-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* 控制按钮标签 */
.control-label {
    font-size: 12px;
    color: #aaa;
    white-space: nowrap;
}

/* 麦克风按钮样式 - 绿色毛玻璃（开启）/ 红色（关闭） */
.mute-btn {
    background: rgba(76, 175, 80, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(76, 175, 80, 0.4);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.mute-btn:hover {
    background: rgba(76, 175, 80, 0.35);
    border-color: rgba(76, 175, 80, 0.6);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.mute-btn.muted {
    background: rgba(244, 67, 54, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(244, 67, 54, 0.4);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.mute-btn.muted:hover {
    background: rgba(244, 67, 54, 0.35);
    border-color: rgba(244, 67, 54, 0.6);
    box-shadow: 0 6px 16px rgba(244, 67, 54, 0.4);
}

/* 摄像头按钮样式 - 绿色毛玻璃（开启）/ 红色（关闭） */
.camera-btn {
    background: rgba(76, 175, 80, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(76, 175, 80, 0.4);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.camera-btn:hover {
    background: rgba(76, 175, 80, 0.35);
    border-color: rgba(76, 175, 80, 0.6);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.camera-btn.muted {
    background: rgba(244, 67, 54, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(244, 67, 54, 0.4);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.camera-btn.muted:hover {
    background: rgba(244, 67, 54, 0.35);
    border-color: rgba(244, 67, 54, 0.6);
    box-shadow: 0 6px 16px rgba(244, 67, 54, 0.4);
}

/* 切换摄像头按钮 - 毛玻璃样式 */
.switch-camera-btn {
    background: rgba(33, 150, 243, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(33, 150, 243, 0.4);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.switch-camera-btn:hover {
    background: rgba(33, 150, 243, 0.35);
    border-color: rgba(33, 150, 243, 0.6);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.4);
}

/* 用户昵称蓝色样式（用于通话和屏幕共享状态栏） */
.user-name {
    color: #f3970d;
    font-weight: 600;
}

/* 设置按钮 */
.settings-btn {
    background: none;
    border: none;
    color: #f0f0f0;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.settings-btn:active {
    background: rgba(255, 255, 255, 0.2);
}

/* 设置按钮里的三条横线图标 */
.settings-menu-icon {
    display: inline-flex;
    flex-direction: column;
    gap: 3px;
}

.settings-menu-icon span {
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: #fff;
}

/* 设置对话框 */
.settings-content {
    max-width: 500px;
    width: 90%;
}

.settings-list {
    margin: 20px 0;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item-info {
    flex: 1;
}

.settings-item-title {
    font-size: 16px;
    color: #f0f0f0;
    margin-bottom: 4px;
}

.settings-item-desc {
    font-size: 13px;
    color: #aaa;
}

/* 开关按钮 */
.settings-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.settings-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.settings-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.3s;
    border-radius: 28px;
}

.settings-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.settings-switch input:checked + .settings-slider {
    background-color: #667eea;
}

.settings-switch input:checked + .settings-slider:before {
    transform: translateX(22px);
}
