/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #000;
    color: #fff;
    height: 100vh;
    overflow: hidden;
}

.live-container {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* 视频容器 */
.video-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

#liveVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 顶部信息栏 */
.top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 44px 12px 12px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
    z-index: 100;
}

.streamer-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-container {
    position: relative;
}

.streamer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
}

.live-tag {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: #FF2C55;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: bold;
}

.streamer-details {
    flex: 1;
}

.streamer-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.viewer-count {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
}

.follow-btn {
    background: #FF2C55;
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 右侧操作栏 */
.side-actions {
    position: absolute;
    right: 12px;
    bottom: 120px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 100;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.action-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0,0,0,0.4);
    border: none;
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.action-item span {
    font-size: 12px;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.like-btn {
    position: relative;
    overflow: hidden;
}

.like-btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #FF2C55 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.like-btn:active::after {
    opacity: 1;
}

/* 底部区域 */
.bottom-area {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    z-index: 100;
    display: flex;
    justify-content: center;
    padding-bottom: 20px;
}

/* 底部链接按钮样式 */
.bottom-area a{
    background: #FF2C55;
    color: #fff;
    text-decoration: none;
    padding: 12px 120px;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(255, 44, 85, 0.3);
    transition: all 0.3s ease;
}

.action-link:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(255, 44, 85, 0.2);
}

.bottom-area a {
    font-size: 14px;
}

/* 响应式调整 */
@media (min-width: 768px) {
    .live-container {
        max-width: 450px;
        margin: 0 auto;
        height: 100vh;
    }
    
    body {
        background: #000;
    }
}

/* 动画效果 */
@keyframes likeEffect {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.like-btn.active {
    color: #FF2C55;
    animation: likeEffect 0.3s ease;
}

/* 播放按钮覆盖层 */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

/* 音量指示器 */
.volume-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 150;
}

.volume-indicator i {
    font-size: 16px;
}

/* 添加弹幕列表样式 */
.danmaku-list {
    position: absolute;
    left: 12px;
    bottom: 80px;
    width: 60%;
    max-height: 180px;
    overflow: hidden;
    z-index: 90;
}

.danmaku-item {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 100px;
    padding: 6px 12px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    opacity: 0;
    transform: translateY(20px);
    animation: danmakuFadeIn 0.3s ease forwards;
}

.danmaku-item .avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.danmaku-item .nickname {
    color: #FFD700;
    margin-right: 4px;
}

@keyframes danmakuFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes danmakuFadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* 添加提示消息样式 */
.toast-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

.toast-message.show {
    opacity: 1;
}

/* 添加到现有的CSS中 */
.action-btn#prevVideo,
.action-btn#nextVideo {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.action-btn#prevVideo:active,
.action-btn#nextVideo:active {
    opacity: 1;
}

.action-btn#prevVideo.disabled,
.action-btn#nextVideo.disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* 向下滑动的动画 */
.video-container.sliding-next {
    transform: translateY(-100%);
}

.video-container.sliding-next-enter {
    transform: translateY(100%);
}

/* 向上滑动的动画 */
.video-container.sliding-prev {
    transform: translateY(100%);
}

.video-container.sliding-prev-enter {
    transform: translateY(-100%);
}
