/* 直播页面样式 */
.live-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.live-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* 视频播放区域 */
.video-section {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.video-player {
    position: relative;
}

.video-player video {
    width: 100%;
    height: 450px;
    background: #000;
    display: block;
}

.video-controls {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.video-info h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.video-info p {
    color: #666;
    margin-bottom: 1rem;
}

.live-stats {
    display: flex;
    gap: 2rem;
}

.live-stats span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
}

.live-stats .viewers {
    color: #ff6b6b;
}

.live-stats .likes {
    color: #667eea;
}

.control-buttons {
    display: none;
    gap: 1rem;
}

.control-btn {
    padding: 10px 20px;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.like-btn:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

/* 聊天区域 */
.chat-section {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    height: 400px;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 1rem 1.5rem;
    background: #667eea;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.online-count {
    background: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9rem;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    max-height: 300px;
}

.message {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 8px;
}

.message.system {
    background: #f8f9fa;
    justify-content: center;
    font-style: italic;
    color: #666;
}

.message.user {
    background: white;
}

.message.vip {
    background: linear-gradient(135deg, #ffeaa7, #fab1a0);
}

.message-avatar {
    position: relative;
    margin-right: 0.5rem;
}

.message-avatar img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.vip-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff6b6b;
    color: white;
    font-size: 0.7rem;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: bold;
}

.message-content {
    flex: 1;
}

.username {
    font-weight: bold;
    color: #667eea;
    margin-right: 0.5rem;
}

.message.vip .username {
    color: #d63031;
}

.message-time {
	display: none;
    font-size: 0.8rem;
    color: #999;
    margin-left: 0.5rem;
}

.chat-input {
    padding: 1rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 1rem;
}

.chat-input input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    outline: none;
}

.chat-input input:focus {
    border-color: #667eea;
}

.send-btn {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
}

.send-btn:hover {
    background: #5a6fd8;
}

/* 侧边栏 */
.live-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.gift-panel {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.gift-panel h3 {
    margin-bottom: 1rem;
    color: #333;
    text-align: center;
}

.gift-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.gift-item {
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gift-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.gift-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.gift-name {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.gift-price {
    color: #ff6b6b;
    font-weight: bold;
}

.balance-info {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.balance-info p {
    margin-bottom: 1rem;
    font-weight: bold;
}

/* 在线用户列表 */
.online-users {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.online-users h3 {
    margin-bottom: 1rem;
    color: #333;
}

.user-list {
    max-height: 200px;
    overflow-y: auto;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: background 0.3s ease;
}

.user-item:hover {
    background: #f8f9fa;
}

.user-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.user-item.vip {
    position: relative;
    background: linear-gradient(135deg, #ffeaa7, #fab1a0);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .live-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .live-sidebar {
        order: -1;
    }
    
    .gift-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .live-container {
        padding: 0.5rem;
    }
    
    .video-controls {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .control-buttons {
        justify-content: center;
    }
    
    .gift-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .video-player video {
        height: 300px;
    }
    
    .chat-section {
        height: 300px;
    }
}

/* 滚动条样式 */
.chat-messages::-webkit-scrollbar,
.user-list::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track,
.user-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb,
.user-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover,
.user-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}