/* ==================== 直播列表页 ==================== */

/* 分类标签栏 */
.live-categories {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.live-categories::-webkit-scrollbar { display: none; }

.live-cat {
    flex-shrink: 0;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.08);
    cursor: pointer;
    transition: all 0.2s;
}
.live-cat.active {
    color: #fff;
    background: linear-gradient(135deg, #ff4757, #ff6b81);
}

/* 直播间网格 */
.live-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 8px 12px;
    padding-bottom: 80px;
}

.live-card {
    border-radius: 10px;
    overflow: hidden;
    background: #1a1a2e;
    cursor: pointer;
}
.live-card.skeleton {
    aspect-ratio: 3/4;
    background: linear-gradient(110deg, #1a1a2e 30%, #252540 50%, #1a1a2e 70%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.live-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    background: #252540 center/cover no-repeat;
    display: flex;
    align-items: flex-end;
}
.live-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    color: #fff;
    background: rgba(255,0,0,0.7);
}
.live-viewers {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    color: #fff;
    background: rgba(0,0,0,0.5);
}

.live-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
}
.live-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #333;
    overflow: hidden;
    flex-shrink: 0;
}
.live-avatar img { width: 100%; height: 100%; object-fit: cover; }
.live-meta { flex: 1; min-width: 0; }
.live-title {
    font-size: 13px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.live-anchor {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    margin-top: 2px;
}

/* ==================== 收费房列表 ==================== */

.private-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 8px 12px;
    padding-bottom: 80px;
}

.private-card {
    border-radius: 10px;
    overflow: hidden;
    background: #1a1a2e;
    cursor: pointer;
}

.private-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    background: #252540 center/cover no-repeat;
}
/* 渐变封面占位（无真实图时） */
.private-cover.cover-1 { background: linear-gradient(135deg, #ff6b81 0%, #c44569 100%); }
.private-cover.cover-2 { background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%); }
.private-cover.cover-3 { background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%); }
.private-cover.cover-4 { background: linear-gradient(135deg, #00cec9 0%, #0984e3 100%); }
.private-cover.cover-5 { background: linear-gradient(135deg, #ffa502 0%, #ff6348 100%); }
.private-cover.cover-6 { background: linear-gradient(135deg, #e17055 0%, #d63031 100%); }

.private-cover-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    opacity: 0.3;
}

.private-badge {
    position: absolute;
    top: 8px;
    left: 8px;
}
.private-viewers {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    color: #fff;
    background: rgba(0,0,0,0.5);
}
.private-price-tag {
    position: absolute;
    bottom: 8px;
    right: 8px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}
.private-price-tag em {
    color: #ffd75a;
    font-style: normal;
}
.private-seats-tag {
    position: absolute;
    bottom: 8px;
    left: 8px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    color: rgba(255,255,255,0.8);
    background: rgba(0,0,0,0.5);
}

.private-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
}
.private-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #333;
    overflow: hidden;
    flex-shrink: 0;
}
.private-avatar img { width: 100%; height: 100%; object-fit: cover; }
.private-meta { flex: 1; min-width: 0; }
.private-title {
    font-size: 13px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.private-anchor {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    margin-top: 2px;
}

/* 收费类型标签 */
.charge-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    vertical-align: middle;
    margin-right: 4px;
}
.ticket-tag {
    background: rgba(255,215,90,0.2);
    color: #ffd75a;
    border: 1px solid rgba(255,215,90,0.3);
}
.time-tag {
    background: rgba(255,71,87,0.2);
    color: #ff6b81;
    border: 1px solid rgba(255,71,87,0.3);
}

/* ==================== 直播间页面 ==================== */

.liveroom-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 播放区 */
.liveroom-player {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}
.liveroom-player video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.liveroom-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}
.liveroom-placeholder-text {
    color: rgba(255,255,255,0.3);
    font-size: 14px;
}

/* 顶部信息栏 */
.liveroom-top {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    padding-top: calc(12px + env(safe-area-inset-top));
}

.liveroom-host {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.4);
    border-radius: 24px;
    padding: 4px 12px 4px 4px;
}
.liveroom-host-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #333;
    overflow: hidden;
}
.liveroom-host-avatar img { width: 100%; height: 100%; object-fit: cover; }
.liveroom-host-info {}
.liveroom-host-name {
    font-size: 13px;
    color: #fff;
    font-weight: 500;
}
.liveroom-host-viewers {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
}

.liveroom-follow-btn {
    padding: 4px 14px;
    border: none;
    border-radius: 14px;
    font-size: 12px;
    color: #fff;
    background: #ff4757;
    cursor: pointer;
    margin-left: 4px;
}
.liveroom-follow-btn.following {
    background: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.6);
}

.liveroom-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.4);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 聊天区 */
.liveroom-chat {
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 30%;
    max-height: 40vh;
    overflow-y: auto;
    padding: 8px 16px;
    z-index: 10;
    scrollbar-width: none;
}
.liveroom-chat::-webkit-scrollbar { display: none; }

.chat-msg {
    padding: 4px 0;
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.chat-name {
    color: #ffd75a;
    font-weight: 500;
    margin-right: 4px;
}
.chat-msg.chat-gift .chat-name {
    color: #ff6b81;
}
.chat-msg.chat-self .chat-name {
    color: #69db7c;
}

/* 礼物特效 */
.liveroom-gift-fx {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 24px;
    background: rgba(255,71,87,0.8);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    animation: giftPop 0.5s ease-out;
}
.gift-fx-icon {
    font-size: 28px;
}
@keyframes giftPop {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.2); }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* 礼物面板 */
.liveroom-gift-panel {
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
    z-index: 30;
    background: rgba(20,20,40,0.95);
    border-radius: 16px 16px 0 0;
    padding: 16px;
    max-height: 50vh;
    overflow-y: auto;
}
.gift-panel-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    color: #fff;
    font-weight: 600;
    margin-bottom: 12px;
}
.gift-panel-close {
    cursor: pointer;
    color: rgba(255,255,255,0.5);
    font-size: 18px;
}

.gift-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.gift-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 4px;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}
.gift-item.active {
    border-color: #ff4757;
    background: rgba(255,71,87,0.15);
}
.gift-icon { font-size: 28px; }
.gift-name { font-size: 11px; color: #fff; }
.gift-price { font-size: 10px; color: #ffd75a; }

.gift-panel-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.gift-coin-info {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}
.gift-coin-info em {
    color: #ffd75a;
    font-style: normal;
    font-weight: 600;
}
.gift-send-btn {
    padding: 8px 24px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    color: #fff;
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    cursor: pointer;
    font-weight: 600;
}

/* 底部输入栏 */
.liveroom-input {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    background: rgba(0,0,0,0.6);
}
.liveroom-input input {
    flex: 1;
    height: 36px;
    padding: 0 14px;
    border: none;
    border-radius: 18px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 14px;
    outline: none;
}
.liveroom-input input::placeholder {
    color: rgba(255,255,255,0.3);
}
.liveroom-emoji-btn,
.liveroom-send-btn {
    height: 36px;
    padding: 0 12px;
    border: none;
    border-radius: 18px;
    font-size: 14px;
    cursor: pointer;
}
.liveroom-emoji-btn {
    background: rgba(255,255,255,0.1);
    font-size: 18px;
}
.liveroom-send-btn {
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: #fff;
    font-weight: 500;
}

/* 收费房购买弹窗 */
.private-buy-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
}
.private-buy-modal {
    background: #1a1a2e;
    border-radius: 16px;
    padding: 30px 24px;
    width: 80%;
    max-width: 300px;
    text-align: center;
}
.private-buy-title {
    font-size: 18px;
    color: #fff;
    font-weight: 700;
    margin-bottom: 12px;
}
.private-buy-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 16px;
}
.private-buy-price {
    font-size: 28px;
    font-weight: 700;
    color: #ffd75a;
    margin-bottom: 20px;
}
.private-buy-btn {
    display: block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    cursor: pointer;
    margin-bottom: 10px;
}
.private-buy-cancel {
    display: block;
    width: 100%;
    padding: 10px;
    border: none;
    background: none;
    color: rgba(255,255,255,0.4);
    font-size: 14px;
    cursor: pointer;
}
