/* 直播间页面样式 */

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

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

.live-sidebar {
    width: 360px;
    display: flex;
    flex-direction: column;
}

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

.video-player {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9比例 */
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 直播主信息区 */
.stream-main-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 直播信息栏 */
.stream-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 16px 20px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.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: 15px;
    border: 2px solid var(--primary-color);
}

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

.streamer-details {
    margin-right: 15px;
}

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

.streamer-followers {
    font-size: 0.85rem;
    color: #666;
}

.stream-stats {
    display: flex;
    align-items: center;
    background-color: var(--light-color);
    padding: 8px 16px;
    border-radius: 4px;
}

.stat-item {
    display: flex;
    align-items: center;
    margin-left: 15px;
    color: var(--dark-color);
    cursor: pointer;
    transition: color var(--transition-speed);
}

.stat-item:first-child {
    margin-left: 0;
}

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

.stat-item i {
    margin-right: 6px;
    font-size: 1.1rem;
}

/* 直播操作区 */
.stream-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 16px 20px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

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

.action-btn {
    background: var(--light-color);
    border: none;
    border-radius: 4px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color var(--transition-speed);
    min-width: 100px;
}

.action-btn:hover {
    background-color: #d6dbdf;
}

.action-btn i {
    margin-right: 8px;
    font-size: 1rem;
}

.btn-gift {
    background-color: var(--primary-color);
    color: white;
}

.btn-gift:hover {
    background-color: #2980b9;
}

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

.tag {
    background: var(--light-color);
    color: var(--dark-color);
    padding: 6px 12px;
    border-radius: 2px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}

.tag i {
    margin-right: 5px;
}

/* 聊天区域 */
.chat-container {
    background: white;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 620px;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--light-color);
}

.chat-header h3 {
    font-size: 1.1rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
}

.chat-header h3 i {
    margin-right: 8px;
    color: var(--primary-color);
}

.chat-actions {
    display: flex;
}

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

.system-message {
    text-align: center;
    margin-bottom: 16px;
    padding: 8px 12px;
    background-color: var(--light-color);
    border-radius: 2px;
    font-size: 0.85rem;
    color: var(--dark-color);
}

.highlight {
    color: var(--primary-color);
    font-weight: bold;
}

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

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

.message-user {
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.message-text {
    background-color: var(--light-color);
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 0.95rem;
    word-wrap: break-word;
    line-height: 1.4;
}

.streamer-message .message-text {
    background-color: rgba(52, 152, 219, 0.1);
}

.streamer-tag {
    background-color: var(--primary-color);
    color: white;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 0.7rem;
    font-weight: normal;
    margin-left: 5px;
}

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

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

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

.input-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

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

.send-btn:hover {
    background-color: #2980b9;
}

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

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

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

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

.gift-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.gift-modal-header h3 {
    font-size: 1.3rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
}

.gift-modal-header h3 i {
    margin-right: 8px;
    color: var(--primary-color);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    transition: color var(--transition-speed);
    padding: 8px;
    border-radius: 4px;
}

.close-modal:hover {
    color: var(--primary-color);
    background-color: var(--light-color);
}

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

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

.gift-item:hover {
    transform: translateY(-3px);
}

.gift-item.selected {
    border-color: var(--primary-color);
    background-color: rgba(52, 152, 219, 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: bold;
    margin-bottom: 6px;
    color: var(--dark-color);
}

.gift-price {
    font-size: 0.9rem;
    color: #666;
}

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

.gift-amount {
    display: flex;
    align-items: center;
}

.amount-control {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.amount-btn {
    width: 30px;
    height: 30px;
    background-color: var(--light-color);
    border: none;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
}

.amount-control input {
    width: 50px;
    height: 30px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin: 0 5px;
    text-align: center;
}

.total-price {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .live-room-container {
        gap: 16px;
    }
    
    .live-sidebar {
        width: 320px;
    }
}

@media (max-width: 992px) {
    .container {
        padding: 0 16px;
    }
    
    .live-room-container {
        flex-direction: column;
    }
    
    .live-sidebar {
        width: 100%;
    }
    
    .chat-container {
        height: 450px;
    }
    
    .action-btn {
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .live-room-container {
        margin: 16px auto;
    }
    
    .stream-info-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stream-stats {
        margin-top: 16px;
        width: 100%;
        justify-content: center;
    }
    
    .stream-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stream-tags {
        margin-top: 16px;
        width: 100%;
    }
    
    .action-buttons {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
    
    .action-btn {
        width: 100%;
    }
    
    .gift-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .action-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .gift-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .total-price {
        margin: 16px 0;
    }
    
    .gift-list {
        grid-template-columns: 1fr;
    }
    
    .streamer-avatar {
        width: 40px;
        height: 40px;
    }
} 