/* 移动端图文直播页面样式 */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: #fff;
    color: #333;
    line-height: 1.6;
    max-width: 414px;
    margin: 0 auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Banner样式 */
.live-banner {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.live-banner img {
    width: 100%;
    height: auto;
    display: block;
}

.live-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);
    color: white;
    padding: 20px 15px 15px;
}

.live-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.live-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.live-participants {
    font-size: 12px;
    opacity: 0.8;
    text-align: right;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* 直播状态 */
.live-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #fff;
    margin-bottom: 5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4444;
}

.status-dot.ended {
    background: #999;
}

/* 直播描述 */
.live-description {
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.live-description p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* Tab切换 */
.live-tabs {
    display: flex;
    background: white;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tab-item {
    flex: 1;
    padding: 15px;
    text-align: center;
    background: none;
    border: none;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.tab-item.active {
    color: #13b7f6;
    border-bottom-color: #13b7f6;
    font-weight: bold;
}

.tab-item:hover {
    background: rgba(19, 183, 246, 0.05);
}

/* 直播内容区域 */
.live-content {
    min-height: 60vh;
    background: #f6f6f6;
}

.tab-panel {
    display: none;
    padding: 0;
}

.tab-panel.active {
    display: block;
}

/* 直播时间线 */
.live-timeline {
    padding: 15px;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
    padding-left: 25px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }
.timeline-item:nth-child(6) { animation-delay: 0.6s; }
.timeline-item:nth-child(7) { animation-delay: 0.7s; }
.timeline-item:nth-child(8) { animation-delay: 0.8s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -3px;
    top: 8px;
    width: 6px;
    height: 6px;
    background: #13b7f6;
    border-radius: 50%;
    border: 2px solid #13b7f6;
    z-index: 2;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 0;
    top: 20px;
    bottom: -20px;
    width: 1px;
    background: #ddd;
    z-index: 1;
}

.timeline-item:last-child::after {
    display: none;
}

.timeline-content {
    background: white;
    border-radius: 8px;
    padding: 12px 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.timeline-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 15px;
    border: 8px solid transparent;
    border-right-color: white;
}

.timeline-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
    border: 2px solid #f0f0f0;
}

.user-info {
    flex: 1;
}

.user-title {
    font-size: 13px;
    color: #13b7f6;
    font-weight: bold;
}

.timeline-time {
    font-size: 12px;
    color: #999;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
}

.timeline-text {
    font-size: 15px;
    line-height: 1.5;
    color: #333;
    word-break: break-word;
}

.timeline-text strong {
    color: #13b7f6;
    font-weight: 600;
}

/* 聊天室样式 */
.chat-container {
    height: 60vh;
    display: flex;
    flex-direction: column;
}

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

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

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.chat-input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid #e9ecef;
    position: relative;
}

.chat-disabled-notice {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 15px;
    border: 1px dashed #ddd;
}

.chat-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    background: #f8f9fa;
    color: #999;
    -webkit-tap-highlight-color: transparent;
}

.chat-input:disabled {
    cursor: not-allowed;
}

.chat-send-btn {
    padding: 12px 20px;
    background: #ccc;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    cursor: not-allowed;
    -webkit-tap-highlight-color: transparent;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
}

/* 图片样式 */
.timeline-image-container {
    margin: 10px 0;
    text-align: center;
}

.timeline-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.timeline-image:hover {
    transform: scale(1.02);
}

.timeline-image:active {
    transform: scale(0.98);
}

/* 图片模态框样式 */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.image-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.modal-close:hover {
    background: white;
    transform: scale(1.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 底部安全区域 */
.safe-area-bottom {
    height: env(safe-area-inset-bottom);
    background: white;
}

/* 响应式设计 */
@media (max-width: 375px) {
    .live-title {
        font-size: 16px;
    }
    
    .tab-item {
        padding: 12px;
        font-size: 15px;
    }
    
    .timeline-text {
        font-size: 14px;
    }
    
    .live-timeline {
        padding: 10px;
    }
    
    .timeline-content {
        padding: 10px 12px;
    }
}

@media (max-width: 320px) {
    .live-title {
        font-size: 15px;
    }
    
    .timeline-item {
        padding-left: 20px;
    }
    
    .timeline-content {
        padding: 8px 10px;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .live-description {
        background: #2a2a2a;
        border-bottom-color: #404040;
    }
    
    .live-description p {
        color: #b0b0b0;
    }
    
    .live-tabs {
        background: #2a2a2a;
        border-bottom-color: #404040;
    }
    
    .tab-item {
        color: #b0b0b0;
    }
    
    .tab-item.active {
        color: #13b7f6;
    }
    
    .live-content {
        background: #1a1a1a;
    }
    
    .timeline-content {
        background: #2a2a2a;
        box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    }
    
    .timeline-content::before {
        border-right-color: #2a2a2a;
    }
    
    .timeline-time {
        background: #404040;
        color: #b0b0b0;
    }
    
    .chat-disabled-notice {
        background: #2a2a2a;
        color: #b0b0b0;
        border-color: #404040;
    }
    
    .chat-input-area {
        background: #2a2a2a;
        border-top-color: #404040;
    }
    
    .chat-input {
        background: #404040;
        border-color: #555;
        color: #b0b0b0;
    }
}
