/* 聊天室样式 */
.chat-container {
    width: 100%;
    max-width: 1200px;
    height: calc(100vh - 180px) !important;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background: rgba(17, 17, 17, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    min-width: 0; /* 防止flex项目溢出 */
}

/* 用户信息卡片样式 */
.user-info-card {
    width: 320px;
    height: calc(100vh - 180px);
    background: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.user-info-header {
    padding: 20px 20px 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(0, 150, 136, 0.1) 0%, rgba(0, 0, 0, 0.1) 100%);
}

.user-info-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-info-header h3 i {
    color: #009688;
    font-size: 1.1rem;
}

.user-info-body {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

/* 用户头像区域 */
.user-avatar-section {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar-large {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(0, 150, 136, 0.3);
    box-shadow: 0 4px 12px rgba(0, 150, 136, 0.2);
}

.user-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name-section {
    flex: 1;
}

.user-nickname-large {
    margin: 0 0 5px 0;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.2;
}

.user-status {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4CAF50;
    box-shadow: 0 0 6px rgba(76, 175, 80, 0.6);
    animation: pulse 2s infinite;
}

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

.status-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

/* 用户详细信息 */
.user-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.detail-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 150, 136, 0.2);
}

.detail-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.detail-label i {
    width: 16px;
    color: #009688;
    font-size: 0.9rem;
}

.detail-value {
    color: #fff;
    font-weight: 500;
    font-size: 0.9rem;
    text-align: right;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.openid-value, .qq-value {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

.balance-value {
    display: flex;
    align-items: center;
    gap: 4px;
}

.balance-amount {
    color: #FFD700;
    font-weight: 600;
    font-size: 1rem;
}

.balance-unit {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

.member-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.member-badge.free {
    background: linear-gradient(135deg, #9E9E9E 0%, #757575 100%);
    color: #fff;
}

/* 用户操作按钮 */
.user-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #fff;
}

.profile-btn {
    background: linear-gradient(135deg, #009688 0%, #00796B 100%);
    box-shadow: 0 4px 12px rgba(0, 150, 136, 0.3);
}

.profile-btn:hover {
    background: linear-gradient(135deg, #00BCD4 0%, #009688 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 150, 136, 0.4);
}

.user-action-btn i {
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .chat-layout {
        flex-direction: column;
        height: auto;
        max-height: calc(100vh - 180px);
    }
    
    .user-info-card {
        width: 100%;
        height: auto;
        max-height: 300px;
        order: -1;
    }
    
    .user-info-body {
        flex-direction: row;
        align-items: center;
        gap: 20px;
        overflow-x: auto;
    }
    
    .user-avatar-section {
        flex-shrink: 0;
    }
    
    .user-details {
        flex: 1;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .detail-item {
        flex: 1;
        min-width: 150px;
        padding: 8px 12px;
    }
    
    .user-actions {
        flex-shrink: 0;
        flex-direction: row;
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
}

@media (max-width: 768px) {
    .chat-layout {
        padding: 0 10px;
    }
    
    .user-info-card {
        max-height: 250px;
    }
    
    .user-info-body {
        flex-direction: column;
        gap: 15px;
    }
    
    .user-details {
        flex-direction: column;
        gap: 8px;
    }
    
    .detail-item {
        min-width: auto;
    }
    
    .user-actions {
        flex-direction: column;
        width: 100%;
    }
}

.chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0; /* 防止收缩 */
    min-height: 60px; /* 固定最小高度 */
}

.chat-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
    font-weight: 600;
}

.chat-header-actions {
    display: flex;
    gap: 10px;
}

.chat-header-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-header-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) rgba(30,30,30,0.2);
    min-height: 0; /* 确保flex子元素可以收缩 */
    height: 0; /* 强制flex收缩 */
}

.chat-message {
    display: flex;
    gap: 12px;
    max-width: 80%;
}

.chat-message.outgoing {
    align-self: flex-end;
    flex-direction: row-reverse;
}

/* 导航栏用户头像样式 */
.user-avatar {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 5px;
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(90deg, #111 60%, #009688 100%);
    border: 1px solid #333;
    position: relative;
    z-index: 9999;
}

.user-avatar:hover {
    background: linear-gradient(90deg, #111 60%, #009688 100%);
    box-shadow: 0 4px 12px rgba(0, 150, 136, 0.3);
    transform: translateY(-2px);
}

.user-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.user-nickname {
    color: white;
    font-size: 14px;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: linear-gradient(90deg, #111 60%, #009688 100%);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 150, 136, 0.3);
    min-width: 140px;
    display: none;
    z-index: 9999;
    margin-top: 5px;
    padding: 6px 0;
    border: 1px solid #333;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.login-section {
    display: flex;
    align-items: center;
}

/* 消息头像样式 */
.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 15px;
    line-height: 1.5;
    position: relative;
    max-width: 100%;
    word-break: break-word;
}

.chat-message.outgoing .message-bubble {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-message:not(.outgoing) .message-bubble {
    background: rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 4px;
}

.message-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.message-sender {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

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

.message-image {
    max-width: 300px;
    max-height: 300px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.message-image:hover {
    transform: scale(1.02);
}

.message-video {
    max-width: 320px;
    border-radius: 12px;
}

.message-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.message-file:hover {
    background: rgba(255, 255, 255, 0.12);
}

.file-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
}

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

.file-name {
    font-weight: 600;
    color: #fff;
    font-size: 14px;
}

.file-size {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.chat-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0; /* 防止收缩 */
    min-height: 80px; /* 固定最小高度 */
}

.chat-tools {
    display: flex;
    gap: 15px;
}

.chat-tool {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    padding: 5px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-tool:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.chat-input-container {
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    padding: 12px 20px;
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: all 0.3s;
}

.chat-input:focus {
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 0 0 2px rgba(255,255,255,0.08);
}

.chat-send {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: none;
    border-radius: 24px;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-send:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 150, 136, 0.3);
}

/* 表情选择器 */
.emoji-picker {
    position: absolute;
    left: 0;
    bottom: 60px;
    z-index: 9999;
    pointer-events: auto;
    background: #1e1e1e;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    display: none;
    width: 320px;
    max-height: 300px;
    overflow-y: auto;
}

.emoji-picker.active {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
}

.emoji-item {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    border-radius: 8px;
    transition: all 0.2s;
    pointer-events: auto !important;
}

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

/* 文件上传进度 */
.upload-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 5px;
}

.upload-progress-bar {
    height: 100%;
    background: rgba(255,255,255,0.1);
    width: 0;
    transition: width 0.3s, background 0.3s;
}

.upload-progress-bar.active,
.upload-progress-bar:active,
.upload-progress-bar:focus,
.upload-progress-bar:hover {
    background: rgba(255,255,255,0.2);
}

/* 图片预览 */
.image-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.image-preview-modal.active {
    opacity: 1;
    visibility: visible;
}

.image-preview-container {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.image-preview-img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.image-preview-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.image-preview-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 登录提示 */
.login-required {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 30px;
}

.login-required-icon {
    font-size: 60px;
    color: rgba(255, 255, 255, 0.2);
    margin-bottom: 20px;
}

.login-required h3 {
    font-size: 24px;
    color: #fff;
    margin-bottom: 15px;
}

.login-required p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 25px;
    max-width: 500px;
}

.login-btn {
    background: #111;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.login-btn:hover {
    background: #23243a;
}

/* 响应式样式 */
@media (max-width: 768px) {
    .chat-container {
        height: calc(100vh - 120px);
        border-radius: 0;
        margin: 0;
    }

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

    .message-image {
        max-width: 250px;
    }

    .message-video {
        max-width: 250px;
    }
}

/* 微信扫码登录弹窗优化样式 */
.qr-loading {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(47, 100, 235, 0.1);
    border-top: 3px solid #009688;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 24px auto 12px auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.refresh-button {
    background: none;
    border: 1px solid #009688;
    color: #009688;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.refresh-button:hover {
    border-color: #00bcd4;
    color: #00bcd4;
    background: rgba(0, 188, 212, 0.08);
}
.refresh-button i {
    margin-right: 6px;
}

.login-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.login-modal-content {
    background: #111;
    border-radius: 16px;
    box-shadow: 0 4px 24px #0008;
    margin: 5% auto;
    padding: 0;
    width: 260px;
    max-width: 90%;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.login-modal-header {
    padding: 20px 24px 16px 24px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.login-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}
.login-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}
.login-close:hover {
    color: #fff;
}
.login-modal-body {
    padding: 24px;
    text-align: center;
}
.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.qr-code {
    width: 180px;
    height: 180px;
    background: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.qr-tips {
    color: #bdbde6;
    font-size: 14px;
    line-height: 1.5;
}
.qr-tips p {
    margin: 4px 0;
}
.qr-status {
    color: #ff9800;
    font-weight: 500;
}
.qr-status.success {
    color: #4caf50;
}
.qr-status.error {
    color: #f44336;
}

.menu-item {
    padding: 12px 18px;
    cursor: pointer;
    color: #bdbde6;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, #111 60%, #009688 100%);
    border: 1px solid #333;
    margin: 2px 4px;
    border-radius: 8px;
}
.menu-item:hover {
    background: linear-gradient(90deg, #111 60%, #009688 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 150, 136, 0.3);
    transform: translateY(-2px);
}
.profile-item i, .logout-item i {
    width: 18px;
    text-align: center;
}
.profile-item {
    border-radius: 8px 8px 0 0;
}
.logout-item {
    border-radius: 0 0 8px 8px;
}

.footer-warning {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 400;
    margin: 0;
}

.main-content {
    margin-top: 40px;
}

.message-bubble img {
    display: block;
    max-width: 200px;
    max-height: 200px;
    border-radius: 4px;
    background: none;
    padding: 0;
    margin: 0;
    box-shadow: none;
}

/* 图片消息去除气泡背景和padding */
.message-bubble:has(img:only-child) {
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

/* 聊天图片消息优化：无边框、无背景、无气泡、无margin */
.chat-message img {
    display: block;
    max-width: 200px;
    max-height: 200px;
    border-radius: 4px;
    background: none;
    padding: 0;
    margin: 0;
    box-shadow: none;
}

/* 聊天区滚动条美化 */
.chat-body::-webkit-scrollbar {
    width: 8px;
    background: rgba(30, 30, 30, 0.2);
    border-radius: 8px;
}
.chat-body::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    min-height: 40px;
}
.chat-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

.chat-message.system-message {
    position: absolute;
    right: 460px;
    bottom: 132px;
    width: auto;
    margin: 0;
    z-index: 9999;
    background: none;
    box-shadow: none;
    display: block;
}
.system-bubble {
    display: inline;
    background: none;
    color: var(--text-secondary);
    font-size: 15px;
    padding: 0;
    border-radius: 0;
    font-weight: 500;
    letter-spacing: 1px;
    box-shadow: none;
    text-align: center;
    max-width: 90vw;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.emoji-picker::-webkit-scrollbar {
    width: 8px;
    background: rgba(30, 30, 30, 0.2);
    border-radius: 8px;
}
.emoji-picker::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    min-height: 40px;
}
.emoji-picker::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

.banned-input {
    color: #aaa !important;
    cursor: not-allowed !important;
    font-style: italic;
}

/* 用户资料弹窗样式 */
.user-profile-modal {
    position: fixed;
    z-index: 9999;
    left: 0; top: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.user-profile-mask {
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.35);
    z-index: 0;
}
.user-profile-content {
    background: rgba(17, 17, 17, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    min-width: 340px;
    max-width: 90vw;
    padding: 0 0 18px 0;
    z-index: 1;
    position: relative;
    animation: popIn .2s;
    border: 1px solid rgba(255,255,255,0.08);
    color: #fff;
}
@keyframes popIn {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.user-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 22px 8px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 18px;
    font-weight: 600;
    background: transparent;
    color: #fff;
}
.user-profile-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #888;
    cursor: pointer;
    transition: color 0.2s;
}
.user-profile-close:hover {
    color: #e01e5b;
}
.user-profile-body {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 22px 28px 10px 28px;
    color: #fff;
}
.user-profile-avatar img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid #eee;
    object-fit: cover;
    background: #f7f7f7;
}
.user-profile-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 15px;
    color: #333;
}
.user-profile-info b {
    color: #00bfae;
    font-weight: 500;
}
.user-profile-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 28px;
    margin-top: 8px;
    background: transparent;
}
.profile-ban-btn {
    min-width: 80px;
    padding: 7px 0;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 500;
    background: #e01e5b;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}
.profile-ban-btn.unban {
    background: #2eb67d;
}
.profile-ban-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
@media (max-width: 500px) {
    .user-profile-content { min-width: 90vw; padding: 0 0 12px 0; }
    .user-profile-body { flex-direction: column; align-items: center; gap: 10px; padding: 16px 8px 8px 8px; }
    .user-profile-footer { padding: 0 8px; }
}

/* 用户信息卡片浮动样式 */
.main-content {
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 180px);
    margin-top: 40px;
}

.chat-room-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    max-width: 1600px;
    height: calc(100vh - 180px);
    margin: 0 auto;
    position: relative;
    gap: 20px;
}

.user-info-float-card {
    width: 340px;
    height: 100%;
    max-height: calc(100vh - 180px);
    background: rgba(24,28,36,0.98);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.35), 0 1.5px 8px 0 rgba(0,150,136,0.08);
    border: 1.5px solid rgba(255,255,255,0.13);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    opacity: 1;
    color: #fff;
    padding: 0;
    position: sticky;
    top: 0;
    transition: box-shadow 0.2s, border-color 0.2s;
    flex-shrink: 0; /* 防止在小屏幕上被压缩 */
    overflow-y: auto; /* 内容过多时可滚动 */
}

.user-info-float-card:hover {
    box-shadow: 0 12px 40px 0 rgba(0,0,0,0.45), 0 2px 12px 0 rgba(0,150,136,0.12);
    border-color: rgba(0,150,136,0.18);
}

.user-info-header {
    width: 100%;
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info-body {
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    overflow-y: auto;
}

.user-avatar-section {
    margin-bottom: 15px;
    width: 100%;
}

.user-details {
    width: 100%;
}

/* 响应式设计增强 */
@media (max-width: 1300px) {
    .chat-room-wrapper {
        flex-direction: column;
        height: auto;
    }
    
    .user-info-float-card {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 250px;
        margin-top: 20px;
        overflow-x: auto;
    }
    
    .user-info-body {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .user-avatar-section {
        width: auto;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .user-details {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        width: auto;
        flex: 1;
    }
    
    .detail-item {
        flex: 1;
        min-width: 150px;
    }
    
    .user-actions {
        flex-direction: row;
        width: 100%;
        justify-content: center;
        gap: 15px;
        margin-top: 15px;
    }
    
    .user-action-btn {
        flex: 0 0 auto;
        min-width: 120px;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 0 10px;
    }
    
    .user-info-float-card {
        max-height: 200px;
    }
    
    .user-info-body {
        padding: 15px;
        gap: 10px;
    }
    
    .user-avatar-section {
        width: 100%;
        justify-content: center;
    }
    
    .user-details {
        width: 100%;
    }
    
    .detail-item {
        width: 100%;
        min-width: 0;
    }
}

/* 自定义滚动条样式 */
.user-info-float-card::-webkit-scrollbar,
.user-info-body::-webkit-scrollbar {
    width: 6px;
}

.user-info-float-card::-webkit-scrollbar-track,
.user-info-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.user-info-float-card::-webkit-scrollbar-thumb,
.user-info-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    transition: background 0.2s;
}

.user-info-float-card::-webkit-scrollbar-thumb:hover,
.user-info-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 平滑过渡效果 */
.chat-room-wrapper {
    transition: flex-direction 0.3s ease;
}

.user-info-float-card {
    transition: all 0.3s ease;
}

.user-info-body {
    transition: padding 0.3s ease, flex-direction 0.3s ease;
}

.user-avatar-section,
.user-details {
    transition: width 0.3s ease, margin 0.3s ease;
}

/* 优化阴影效果 */
.chat-container,
.user-info-float-card {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

.chat-container:hover,
.user-info-float-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 
                0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.red-packet-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}
.red-packet-modal[style*='display: flex'] { display: flex !important; }
.red-packet-modal-content {
    background: rgba(17, 17, 17, 0.92);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    border: 1.5px solid rgba(255,255,255,0.10);
    width: 340px;
    max-width: 95vw;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(12px);
}
.red-packet-modal-header {
    padding: 18px 24px 10px 24px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    background: linear-gradient(90deg, #23272f 60%, #009688 100%);
}
.red-packet-close {
    font-size: 1.5rem;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
}
.red-packet-close:hover { color: #f44336; }
.red-packet-modal-body {
    padding: 22px 24px 10px 24px;
    color: #fff;
}
.balance-info {
    margin-bottom: 18px;
    font-size: 1rem;
    color: #FFD700;
    background: rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 8px 12px;
    text-align: center;
}
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #bbb;
    font-size: 0.98rem;
}
.form-group input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #444;
    background: #181c24;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: border 0.2s;
}
.form-group input:focus {
    border-color: #009688;
}
.red-packet-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 18px 24px 18px 24px;
    border-top: 1px solid rgba(255,255,255,0.10);
    background: rgba(17, 17, 17, 0.92);
}
.red-packet-cancel, .red-packet-send {
    padding: 8px 22px;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.red-packet-cancel {
    background: #444;
    color: #fff;
}
.red-packet-cancel:hover {
    background: #666;
}
.red-packet-send {
    background: linear-gradient(90deg, #FF9800 0%, #F57C00 100%);
    color: #fff;
}
.red-packet-send:hover {
    background: linear-gradient(90deg, #FFD700 0%, #FF9800 100%);
    color: #23272f;
}

/* 红包消息卡片样式 */
.message-red-packet {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #ff4757 0%, #ff3742 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
    transition: all 0.3s ease;
    max-width: 300px;
}

.message-red-packet:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4);
}

.red-packet-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.red-packet-icon i {
    color: #fff;
    font-size: 1.2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

.red-packet-info {
    flex: 1;
    min-width: 0;
}

.red-packet-text {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.red-packet-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.red-packet-action {
    flex-shrink: 0;
}

.red-packet-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #ff4757;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.red-packet-btn:hover {
    background: #fff;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.red-packet-btn:disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 已抢到的红包按钮样式 */
.red-packet-btn.claimed {
    background: #fff;
    color: #ff4757;
}

.red-packet-btn.claimed:hover {
    background: #fff;
    color: #ff4757;
    transform: none;
}

/* 链接卡片样式 */
.message-link-card {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    padding: 10px 14px;
    margin: 6px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s;
    border: 1px solid #222;
    max-width: 350px;
    min-width: 220px;
}
.message-link-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    background: rgba(45,140,240,0.08);
}
.link-card-ico {
    margin-right: 12px;
    flex-shrink: 0;
}
.link-card-ico img {
    border-radius: 4px;
    background: #fff;
    width: 24px;
    height: 24px;
}
.link-card-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.link-card-title {
    font-weight: bold;
    color: #fff;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 15px;
}
.link-card-url {
    color: #2d8cf0;
    font-size: 12px;
    word-break: break-all;
}
