/* mobile.css - 移动端专用样式 */

/* ===== 移动端右侧悬浮联系人按钮 ===== */
.mobile-contact-fab {
    display: none;
    position: fixed;
    right: 12px;
    bottom: 90px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #e94560;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.15);
    font-size: 22px;
    cursor: pointer;
    z-index: 55;
    box-shadow: 0 4px 15px rgba(233,69,96,0.4);
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.mobile-contact-fab:active {
    transform: scale(0.92);
}

.mobile-contact-fab .badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #f39c12;
    color: #fff;
    font-size: 11px;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    font-weight: bold;
    border: 2px solid #1a1a2e;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ===== 侧滑遮罩 ===== */
.mobile-drawer-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 105;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-drawer-overlay.active {
    display: block;
    opacity: 1;
}

/* ===== 侧滑联系人面板 ===== */
.mobile-contact-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    max-width: 85vw;
    height: 100%;
    background: #0f3460;
    z-index: 110;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0,0,0,0.4);
}

.mobile-contact-drawer.active {
    transform: translateX(0);
}

.mobile-drawer-header {
    padding: 16px;
    background: #16213e;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.mobile-drawer-header h3 {
    color: #e94560;
    margin: 0;
    font-size: 16px;
}

.mobile-drawer-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.mobile-drawer-close:hover {
    background: rgba(233,69,96,0.2);
}

.mobile-drawer-search {
    padding: 12px 16px;
    border-bottom: 1px solid #333;
    flex-shrink: 0;
}

.mobile-drawer-search input {
    width: 100%;
    padding: 10px 12px;
    background: #16213e;
    border: 1px solid #333;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.mobile-drawer-search input:focus {
    border-color: #e94560;
}

.mobile-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    min-height: 0;
}

.mobile-drawer-results {
    padding: 10px 16px;
    border-bottom: 1px solid #333;
    /* display 由 JS 通过 style 控制，不再用 .show 类 */
}

.mobile-drawer-results .section-title {
    color: #e94560;
    font-size: 12px;
    margin-bottom: 8px;
    font-weight: bold;
}

/* ===== 移动端适配 ===== */
@media (max-width: 900px) {
    .sidebar { display: none; }
    .right-panel { width: 220px; }
}

@media (max-width: 768px) {
    .right-panel { display: none; }
    .mode-bar { display: none; }
    .mobile-menu-bar { display: flex; }
    .float-actions { display: flex; }
    .mobile-contact-fab { display: flex; }

    .room-tabs { padding: 0 10px; }
    .room-tab { padding: 7px 12px; font-size: 12px; }

    .top-bar h1 { font-size: 15px; }
    .top-bar .info { font-size: 11px; }
    .top-bar .info span { margin-left: 8px; }
    .top-bar button { padding: 4px 10px; font-size: 12px; }

    .result-banner { padding: 6px 10px; gap: 8px; }
    .ball { width: 24px; height: 24px; font-size: 10px; }

    .timer-bar { padding: 5px 10px; }
    .timer-bar .time { font-size: 14px; }

    .messages { padding: 8px; padding-right: 46px; }
    .msg { max-width: 92%; padding: 6px 10px; }

    .input-area { padding: 8px 10px; }
    .input-area textarea { min-height: 36px; padding: 8px 10px; }
    .input-area button { height: 36px; padding: 8px 14px; font-size: 13px; }

    .float-btn { width: 32px; height: 32px; font-size: 10px; }

    /* 私聊弹窗全屏 */
    .private-chat-box {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        border: none;
    }
}

@media (max-width: 480px) {
    .top-bar .info span { display: block; margin-left: 0; margin-top: 2px; }
    .result-banner { flex-direction: column; align-items: flex-start; }
    .timer-bar { flex-direction: column; align-items: flex-start; gap: 2px; }
    .mobile-menu-btn { padding: 4px 8px; font-size: 11px; }
}