/* 直播间页面样式 */

/* 主要布局 */
.live-room-container {
    display: flex;
    max-width: 1400px;
    margin: 20px auto;
    gap: 24px;
    padding: 0 20px;
}

.live-player-section {
    flex: 1;
    min-width: 0;
}

.live-sidebar {
    width: 350px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 播放器容器 */
.player-container {
    width: 100%;
    background-color: #000;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
}

.video-player {
    position: relative;
    width: 100%;
    height: 556px;
}

/* 直播信息栏 */
.stream-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--background);
    padding: 16px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
}

.stream-info {
    flex: 1;
    min-width: 0;
}

.streamer-info {
    display: flex;
    align-items: center;
}

.streamer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    border: 2px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.streamer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.streamer-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
}

.streamer-id {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.stream-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.stat-item i {
    color: var(--primary-color);
}

/* 直播操作区 */
.stream-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--background);
    padding: 16px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    background: var(--background);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-gift {
    background: var(--accent-color);
    color: white;
    border: none;
}

.btn-gift:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.stream-tags {
    display: flex;
    gap: 8px;
}

.tag {
    padding: 4px 12px;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* 聊天区域 */
.chat-container {
    background: var(--background);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    height: 755px;
}

.chat-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.chat-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.system-message {
    text-align: center;
    padding: 8px 16px;
    background: rgba(108, 92, 231, 0.1);
    border-radius: 20px;
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.chat-message {
    display: flex;
    margin-bottom: 12px;
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-user {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 4px;
}

.message-text {
    background: var(--background);
    padding: 8px 12px;
    border-radius: 12px;
    border-top-left-radius: 0;
    font-size: 0.95rem;
    color: var(--text-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.chat-input-container {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.chat-input-container textarea {
    width: 100%;
    height: 60px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    resize: none;
    margin-bottom: 12px;
    font-size: 0.95rem;
    transition: border-color var(--transition-speed);
}

.chat-input-container textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.send-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.send-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* 礼物弹窗 */
.gift-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed);
}

.gift-modal.active {
    opacity: 1;
    visibility: visible;
}

.gift-modal-content {
    background: var(--background);
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: var(--card-shadow);
    transform: translateY(20px);
    transition: transform var(--transition-speed);
}

.gift-modal.active .gift-modal-content {
    transform: translateY(0);
}

.gift-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.gift-modal-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition-speed);
}

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

.gift-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.gift-item {
    background: var(--background);
    border-radius: var(--border-radius);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-speed);
    border: 2px solid transparent;
}

.gift-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--hover-shadow);
}

.gift-item.selected {
    border-color: var(--primary-color);
    background: rgba(108, 92, 231, 0.1);
}

.gift-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
}

.gift-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gift-name {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.gift-price {
    font-size: 0.9rem;
    color: var(--accent-color);
}

.gift-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.amount-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.amount-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--background);
    color: var(--text-color);
    cursor: pointer;
    transition: all var(--transition-speed);
}

.amount-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.amount-control input {
    width: 50px;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-align: center;
    font-size: 0.95rem;
}

.total-price {
    font-weight: 600;
    color: var(--text-color);
}

.total-price span {
    color: var(--accent-color);
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .live-room-container {
        flex-direction: column;
    }
    
    .live-sidebar {
        width: 100%;
    }
    
    .chat-container {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .stream-info-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .stream-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .stream-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .action-buttons {
        width: 100%;
        justify-content: space-between;
    }
    
    .gift-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .video-player {
        height: 300px;
    }
    
    .gift-list {
        grid-template-columns: 1fr;
    }
    
    .gift-controls {
        flex-direction: column;
        gap: 16px;
    }
} 