/* 子比社群大厅 —— 全部颜色引用主题 CSS 变量，自动适配暗色模式 */

.qunhall-wrap {
    width: 100%;
}

/* 标题区 */
.qunhall-head {
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--main-border-color);
}

.qunhall-head-title {
    margin: 0;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: .5px;
    color: var(--key-color);
}

.qunhall-head-count {
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    color: var(--muted-2-color);
    background: var(--muted-bg-color);
}

/* 会员提示条 */
.qunhall-vipbar {
    position: relative;
    gap: 16px;
    margin-bottom: 14px;
    padding: 14px 16px;
    border: 1px solid var(--main-border-color);
    border-radius: 12px;
    background: var(--muted-bg-color);
    overflow: hidden;
}

.qunhall-vipbar::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #ffc46b, #ff8a00);
}

.qunhall-vipbar-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.qunhall-vipbar-badge {
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 20px;
    color: #fff;
    background: linear-gradient(135deg, #ffb64d, #ff8a00);
    flex-shrink: 0;
}

.qunhall-vipbar-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--key-color);
}

.qunhall-vipbar-tip {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--muted-2-color);
}

/* 金色转化按钮 */
.qunhall-vip-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 999px;
    font-size: 13px;
    color: #fff !important;
    background: linear-gradient(135deg, #ffb64d, #ff8a00);
    box-shadow: 0 4px 12px rgba(255, 138, 0, .28);
    transition: transform .2s, opacity .2s;
}

.qunhall-vip-btn:hover {
    opacity: .92;
    transform: translateY(-1px);
}

/* 搜索与排序 */
.qunhall-filter {
    gap: 8px;
    margin-bottom: 14px;
}

.qunhall-input,
.qunhall-select {
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--main-border-color);
    border-radius: 8px;
    font-size: 13px;
    color: var(--main-color);
    background: var(--muted-bg-color);
    outline: none;
    transition: border-color .2s, background .2s;
}

.qunhall-input {
    width: 300px;
    max-width: 100%;
}

.qunhall-input:focus,
.qunhall-select:focus {
    border-color: var(--focus-color);
    background: var(--main-bg-color);
}

.qunhall-filter .but {
    height: 38px;
    line-height: 36px;
    padding: 0 18px;
    border-radius: 8px;
    font-size: 13px;
}

/* 底部提示 */
.qunhall-cta-text {
    margin: 18px 0 0;
    font-size: 12px;
    line-height: 1.6;
}

/* 空状态 */
.qunhall-empty {
    padding: 44px 12px;
    border-radius: 12px;
    font-size: 13px;
    color: var(--muted-2-color);
    background: var(--muted-bg-color);
}

/* 群列表 */
.qunhall-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.qunhall-item {
    align-items: center;
    padding: 16px;
    border: 1px solid var(--main-border-color);
    border-radius: 12px;
    background: var(--main-bg-color);
    transition: box-shadow .25s, transform .25s;
}

.qunhall-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--main-shadow);
}

/* 缩略图：无封面时按位置循环 6 套渐变，避免一片同色 */
.qunhall-thumb {
    width: 76px;
    height: 76px;
    margin-right: 12px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--muted-bg-color);
}

.qunhall-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qunhall-thumb-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 27px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #5b8dee, #8e6bff);
}

.qunhall-item:nth-child(6n+2) .qunhall-thumb-ph {
    background: linear-gradient(135deg, #ff8a65, #ff5e7e);
}

.qunhall-item:nth-child(6n+3) .qunhall-thumb-ph {
    background: linear-gradient(135deg, #26c6da, #4facfe);
}

.qunhall-item:nth-child(6n+4) .qunhall-thumb-ph {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.qunhall-item:nth-child(6n+5) .qunhall-thumb-ph {
    background: linear-gradient(135deg, #fa709a, #fee140);
}

.qunhall-item:nth-child(6n) .qunhall-thumb-ph {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

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

.qunhall-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--key-color);
}

.qunhall-meta {
    margin-top: 7px;
    gap: 8px;
    font-size: 12px;
    color: var(--muted-2-color);
    flex-wrap: wrap;
}

.qunhall-tag {
    padding: 0 6px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 18px;
    color: var(--focus-color);
    background: var(--muted-bg-color);
}

.qunhall-sub {
    font-size: 12px;
    color: var(--muted-3-color);
}

.qunhall-desc {
    margin: 7px 0 0;
    font-size: 12px;
    line-height: 1.65;
    color: var(--muted-2-color);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.qunhall-op {
    margin-top: 10px;
}

.qunhall-op .but {
    padding: 5px 16px;
    border-radius: 999px;
    font-size: 12px;
}

.qunhall-op .but.qunhall-loading {
    opacity: .6;
    pointer-events: none;
}

/* 未解锁时的诱导按钮 */
.qunhall-tease-btn {
    color: var(--muted-2-color) !important;
    background: var(--muted-bg-color) !important;
    border: 1px solid var(--main-border-color);
}

.qunhall-tease-btn:hover {
    color: var(--focus-color) !important;
    border-color: var(--focus-color);
}

/* 分页 */
.qunhall-pager {
    flex-wrap: wrap;
    gap: 6px;
}

.qunhall-pager .page-numbers {
    display: inline-block;
    min-width: 32px;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
    color: var(--muted-2-color);
    background: var(--muted-bg-color);
    transition: background .2s, color .2s;
}

.qunhall-pager .page-numbers:hover {
    color: var(--focus-color);
}

.qunhall-pager .page-numbers.current {
    color: #fff;
    background: var(--theme-color);
}

/* 二维码弹窗 */
.qunhall-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
}

.qunhall-modal.show {
    display: flex;
}

.qunhall-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
}

.qunhall-modal-card {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 1;
    width: 92vw;
    max-width: 360px;
    max-height: 86vh;
    overflow-y: auto;
    padding: 18px;
    border-radius: 14px;
    transform: translate(-50%, -50%);
    box-shadow: 0 16px 48px rgba(0, 0, 0, .28);
}

.qunhall-modal-head {
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--main-border-color);
}

.qunhall-modal-title {
    max-width: 80%;
    font-size: 15px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--key-color);
}

.qunhall-modal-close {
    font-size: 20px;
    line-height: 1;
    color: var(--muted-2-color);
    transition: color .2s;
}

.qunhall-modal-close:hover {
    color: var(--focus-color);
}

.qunhall-qr-box {
    width: 220px;
    min-height: 220px;
    margin: 8px auto;
    padding: 8px;
    border-radius: 10px;
    background: #fff;
}

.qunhall-modal-desc {
    margin: 6px 0 14px;
    font-size: 12px;
    line-height: 1.65;
    color: var(--muted-2-color);
}

@media (max-width: 767px) {
    .qunhall-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .qunhall-item {
        padding: 12px;
    }

    .qunhall-thumb {
        width: 64px;
        height: 64px;
        margin-right: 10px;
    }

    .qunhall-thumb-ph {
        font-size: 23px;
    }

    .qunhall-title {
        font-size: 15px;
    }

    .qunhall-vipbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .qunhall-vipbar-op {
        width: 100%;
    }

    .qunhall-vipbar-op .but {
        flex: 1;
        text-align: center;
    }

    .qunhall-filter {
        flex-wrap: wrap;
    }

    .qunhall-input {
        width: 100%;
        flex: none;
    }

    .qunhall-filter .but {
        margin-left: auto;
    }
}
