/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", "Microsoft YaHei", sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a103f, #10244b, #201040);
    background-size: 400% 400%;
    animation: bgFlow 12s ease infinite;
    color: #fff;
    overflow: hidden;
}

/* 背景流动动画 */
@keyframes bgFlow {
    0%{background-position:0% 50%}
    50%{background-position:100% 50%}
    100%{background-position:0% 50%}
}

/* 液态玻璃全局卡片通用样式 */
.glass {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.2);
}

/* 主容器 - 左右分栏 核心布局 */
.main-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    padding: 10px;
    gap: 10px;
}

/* 左侧侧边栏（QQ/微信 联系人区） */
.left-sidebar {
    width: 280px;
    height: 100%;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 侧边栏头部：个人信息 */
.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #0ea5e9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
}
.user-name {
    font-size: 16px;
    font-weight: 500;
}
.user-desc {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
}

/* 侧边栏标签切换：好友 / 群聊 */
.tab-nav {
    display: flex;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}
.tab-item {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}
.tab-item.active {
    border-bottom: 2px solid #0ea5e9;
    color: #0ea5e9;
}

/* 列表容器（好友/群聊 滚动列表） */
.list-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}
/* 自定义滚动条 */
.list-wrap::-webkit-scrollbar {
    width: 6px;
}
.list-wrap::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}
.list-wrap::-webkit-scrollbar-track {
    background: transparent;
}

/* 好友/群聊 列表项 */
.list-item {
    display: flex;
    align-items: center;
    padding: 10px 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
    margin-bottom: 4px;
}
.list-item:hover {
    background: rgba(255,255,255,0.15);
}
.item-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #0ea5e9);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    flex-shrink: 0;
}
.item-text {
    flex: 1;
    overflow: hidden;
}
.item-name {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.item-tag {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
}
.official-tag {
    background: linear-gradient(90deg,#f59e0b,#ef4444);
}
.admin-tag {
    background: linear-gradient(90deg,#10b981,#06b6d4);
}
.mute-tag {
    background: #666;
}

/* 快捷操作栏（添加好友、建群） */
.quick-action {
    padding: 10px;
    border-top: 1px solid rgba(255,255,255,0.15);
}

/* 右侧主内容区 */
.right-main {
    flex: 1;
    height: 100%;
    border-radius: 16px;
    padding: 20px;
    overflow-y: auto;
}
.right-main::-webkit-scrollbar {
    width: 6px;
}
.right-main::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

/* 胶囊按钮 通用样式 */
.capsule-btn {
    width: 100%;
    padding: 10px;
    margin: 6px 0;
    border-radius: 999px;
    border: none;
    outline: none;
    background: linear-gradient(90deg, #6366f1, #0ea5e9);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.capsule-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99,102,241,0.4);
}
.btn-warn {
    background: linear-gradient(90deg,#f59e0b,#ef4444);
}
.btn-danger {
    background: linear-gradient(90deg,#dc2626,#f87171);
}
.btn-sm {
    padding: 4px 10px;
    border-radius: 999px;
    border: none;
    background: #6366f1;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    margin: 2px;
    text-decoration: none;
    display: inline-block;
}

/* 输入框样式 */
.input-box {
    width: 100%;
    padding: 10px 14px;
    margin: 6px 0;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 14px;
    outline: none;
}
.input-box::placeholder {
    color: rgba(255,255,255,0.6);
}

/* 公告、提示框 */
.notice-box {
    background: rgba(239,68,68,0.2);
    border: 1px solid rgba(239,68,68,0.4);
    padding: 12px;
    border-radius: 12px;
    margin: 15px 0;
}
.tip-text {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin: 8px 0;
}

/* 聊天容器（私聊/群聊复用） */
.chat-box {
    height: 380px;
    overflow-y: auto;
    padding: 15px;
    border-radius: 15px;
    background: rgba(0,0,0,0.2);
    margin: 15px 0;
}
.msg-item {
    margin: 10px 0;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.1);
}
.at-all {
    color: #f59e0b;
    font-weight: bold;
}

/* 语音播放器 */
audio {
    height: 28px;
    margin: 0 8px;
}

/* 通话弹窗 */
.call-modal {
    position: fixed;
    top:0;left:0;
    width:100%;height:100%;
    background:rgba(0,0,0,0.85);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:9999;
}
.call-card {
    padding: 40px;
    border-radius: 20px;
    text-align: center;
}

hr {
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.15);
    margin: 16px 0;
}
a {
    color: #0ea5e9;
    text-decoration: none;
}

/* 隐藏多余滚动 */
html,body {
    overflow: hidden;
}