/* 直播页面样式 */
.live-page {
    padding-top: 80px;
    min-height: 110vh;
    background: #1a1a1a;
}

.live-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 1rem;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1rem;
    height: calc(100vh - 80px);
}

/* 左侧直播区域 */
.live-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 视频播放器 */
.video-player {
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.video-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.video-placeholder {
    text-align: center;
    color: #666;
    padding: 2rem;
}

.video-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #28a745;
}

.video-placeholder p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.live-info {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.live-badge {
    background: #dc3545;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

.viewer-count {
    color: #ccc;
    font-size: 0.9rem;
}

.video-controls {
    background: rgba(0, 0, 0, 0.8);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.control-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: #444;
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.progress {
    height: 100%;
    background: #28a745;
    border-radius: 2px;
    width: 30%;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
}

.volume-slider {
    width: 80px;
    height: 4px;
    background: #444;
    border-radius: 2px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #28a745;
    cursor: pointer;
}

/* 主播信息 */
.anchor-profile {
    background: #2a2a2a;
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.anchor-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #28a745;
    object-fit: cover;
}

.anchor-details {
    flex: 1;
}

.anchor-details h3 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.anchor-tag {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.anchor-stats {
    display: flex;
    gap: 1rem;
    color: #ccc;
    font-size: 0.9rem;
}

.anchor-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.follow-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.follow-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

/* 直播描述 */
.live-description {
    background: #2a2a2a;
    border-radius: 10px;
    padding: 1.5rem;
}

.live-description h2 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.live-description p {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.live-tags {
    display: flex;
    gap: 0.5rem;
}

.tag {
    background: #444;
    color: #ccc;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.9rem;
}

/* 右侧互动区域 */
.live-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 聊天区域 */
.chat-section {
    background: #2a2a2a;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
}

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

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

.online-count {
    font-size: 0.9rem;
    opacity: 0.9;
}

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

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #28a745;
    border-radius: 3px;
}

.message {
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 5px;
}

.system-message {
    background: rgba(40, 167, 69, 0.1);
    border-left: 3px solid #28a745;
}

.system-message .message-content {
    color: #28a745;
    font-style: italic;
}

.user-message {
    background: #333;
}

.anchor-message {
    background: rgba(40, 167, 69, 0.2);
    border-left: 3px solid #28a745;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
}

.message-sender {
    color: #28a745;
    font-weight: bold;
    font-size: 0.9rem;
}

.message-time {
    color: #666;
    font-size: 0.8rem;
}

.message-content {
    color: #ccc;
    font-size: 0.9rem;
    line-height: 1.4;
}

.chat-input {
    padding: 1rem;
    background: #333;
    display: flex;
    gap: 0.5rem;
}

.chat-input input {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 20px;
    padding: 10px 15px;
    color: white;
    font-size: 0.9rem;
}

.chat-input input:focus {
    outline: none;
    border-color: #28a745;
}

.send-btn {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.send-btn:hover {
    background: #20c997;
}

/* 礼物区域 */
.gifts-section {
    background: #2a2a2a;
    border-radius: 10px;
    overflow: hidden;
}

.gifts-header {
    background: #28a745;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.balance {
    font-size: 0.9rem;
    opacity: 0.9;
}

.gifts-container {
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

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

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

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

.gift-name {
    color: white;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.gift-price {
    color: #28a745;
    font-size: 0.8rem;
    font-weight: bold;
}

.send-gift-btn {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 15px;
    padding: 5px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 0.5rem;
    width: 100%;
}

.send-gift-btn:hover {
    background: #20c997;
}

.recharge-prompt {
    padding: 1rem;
    text-align: center;
    background: #333;
}

.recharge-link {
    color: #28a745;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.recharge-link:hover {
    color: #20c997;
}

/* 礼物动画 */
.gift-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.gift-animation-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    animation: giftPop 3s ease-in-out;
}

.gift-icon-large {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

.gift-text {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

@keyframes giftPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    40% {
        transform: translate(-50%, -50%) scale(1);
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .live-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .live-sidebar {
        order: -1;
        height: 400px;
    }
    
    .chat-messages {
        max-height: 200px;
    }
}

@media (max-width: 768px) {
    .live-container {
        padding: 0 0.5rem;
    }
    
    .gifts-container {
        grid-template-columns: 1fr;
    }
    
    .anchor-profile {
        flex-direction: column;
        text-align: center;
    }
    
    .anchor-stats {
        justify-content: center;
    }
}