* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

.live-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* Click to Start Overlay */
.click-to-start {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.click-to-start.hidden {
    opacity: 0;
    pointer-events: none;
}

.start-content {
    text-align: center;
    color: white;
}

.play-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.start-text {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.start-subtext {
    font-size: 16px;
    opacity: 0.8;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Video Player */
#liveVideo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* Header Info */
.header-info {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 15px 10px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 100%);
}

.streamer-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.3);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.streamer-details {
    color: white;
}

.username {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 2px;
}

.viewers {
    font-size: 12px;
    opacity: 0.8;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.follow-btn {
    background: #FF4757;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.close-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Chat Section */
.chat-section {
    position: absolute;
    left: 15px;
    bottom: 80px;
    top: 140px;
    width: 260px;
    z-index: 10;
    pointer-events: none;
}

.chat-messages {
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    padding-right: 10px;
    -webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
    pointer-events: auto; /* 允许触摸滚动 */
}

.chat-messages::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.chat-message {
    background: rgba(0,0,0,0.4);
    color: white;
    padding: 6px 10px;
    margin-bottom: 6px;
    border-radius: 15px;
    font-size: 12px;
    max-width: 100%;
    word-wrap: break-word;
    animation: slideInLeft 0.3s ease-out;
    pointer-events: auto;
    line-height: 1.3;
    flex-shrink: 0;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
    user-select: none; /* 防止文本选择 */
}

.chat-message .username {
    font-weight: 600;
    color: #FFD700;
    margin-right: 5px;
    font-size: 11px;
}

.chat-message .message {
    color: white;
    font-size: 12px;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Bottom Actions */
.bottom-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 20px 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.action-buttons button {
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-buttons button:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.like-btn {
    background: rgba(255,71,87,0.8) !important;
}

.like-btn.liked {
    background: #FF4757 !important;
    animation: heartBeat 0.3s ease-in-out;
}

.like-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

.like-count {
    font-size: 10px;
    font-weight: 600;
}

.comment-icon, .share-icon {
    font-size: 20px;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Floating Elements */
.floating-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.floating-heart {
    position: absolute;
    font-size: 24px;
    animation: floatUp 3s ease-out forwards;
    pointer-events: none;
}

.floating-comment {
    position: absolute;
    background: rgba(255,255,255,0.9);
    color: #333;
    padding: 8px 12px;
    border-radius: 15px;
    font-size: 12px;
    max-width: 150px;
    animation: floatUp 4s ease-out forwards;
    pointer-events: none;
}

.floating-emoji {
    position: absolute;
    font-size: 32px;
    animation: floatUp 2.5s ease-out forwards;
    pointer-events: none;
}

.floating-emoji-large {
    position: absolute;
    font-size: 48px;
    animation: floatUpLarge 3.5s ease-out forwards;
    pointer-events: none;
}

.floating-emoji-small {
    position: absolute;
    font-size: 20px;
    animation: floatUpSmall 2s ease-out forwards;
    pointer-events: none;
}

.floating-star {
    position: absolute;
    font-size: 28px;
    animation: floatUpRotate 3s ease-out forwards;
    pointer-events: none;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translateY(90vh) scale(1);
    }
    100% {
        transform: translateY(-100px) scale(0.8);
        opacity: 0;
    }
}

@keyframes floatUpLarge {
    0% {
        transform: translateY(100vh) scale(0.3);
        opacity: 0;
    }
    15% {
        opacity: 1;
        transform: translateY(85vh) scale(1.2);
    }
    100% {
        transform: translateY(-150px) scale(0.6);
        opacity: 0;
    }
}

@keyframes floatUpSmall {
    0% {
        transform: translateY(100vh) scale(0.8);
        opacity: 0;
    }
    5% {
        opacity: 1;
        transform: translateY(95vh) scale(1);
    }
    100% {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
}

@keyframes floatUpRotate {
    0% {
        transform: translateY(100vh) scale(0.5) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translateY(90vh) scale(1) rotate(180deg);
    }
    100% {
        transform: translateY(-100px) scale(0.8) rotate(360deg);
        opacity: 0;
    }
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    .chat-section {
        width: 250px;
        left: 10px;
    }
    
    .header-info {
        padding: 15px 10px 5px;
    }
    
    .bottom-actions {
        padding: 15px 10px;
    }
    
    .action-buttons {
        gap: 20px;
    }
    
    .action-buttons button {
        width: 45px;
        height: 45px;
    }
}
