/* 视频弹窗组件样式 - 左右布局 */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.video-modal-content {
    position: relative;
    width: 95%;
    max-width: 1400px;
    height: 90%;
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
}

/* 左侧视频播放区域 */
.video-left-section {
    flex: 2;
    display: flex;
    flex-direction: column;
    background-color: #000;
    position: relative;
    overflow: hidden;
}

.video-player-container {
    flex: 1;
    position: relative;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
    min-height: 200px;
}

.modal-video {
    background-color: #000;
    display: block;
    /* 初始设置，JavaScript会根据视频宽高比动态调整 */
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 右侧信息区域 */
.video-right-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    max-width: 400px;
    min-width: 350px;
}

/* 用户信息头部 */
.video-user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #fff;
    border-bottom: 1px solid #eee;
}

.video-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.video-user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.video-user-details {
    display: flex;
    align-items: center;
    gap: 12px;
}

.video-username {
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.video-follow-btn {
    background-color: #ff4757;
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-follow-btn::before {
    content: "♥";
    margin-right: 4px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.video-follow-btn.followed::before {
    content: "✓";
    color: #fff;
}

.video-follow-btn:hover {
    background-color: #ff3742;
}

.video-follow-btn.followed {
    background-color: #95a5a6;
    color: #fff;
}

.video-follow-btn.followed:hover {
    background-color: #7f8c8d;
}

.video-modal-close {
    background: none;
    border: none;
    color: #666;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s;
}

.video-modal-close:hover {
    color: #333;
}

/* 视频信息 */
.video-content {
    padding: 20px;
    background-color: #fff;
    color: #333;
}

.video-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    color: #333;
}

.video-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.5;
}

.video-hashtags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.hashtag {
    color: #1da1f2;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.3s;
}

.hashtag:hover {
    color: #0d8bd9;
}

/* 统计数据 */
.video-stats {
    display: flex;
    gap: 24px;
    padding: 0 20px 20px;
    background-color: #fff;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 8px;
    padding: 8px 12px;
    border: none;
    background: none;
}

.stat-item:hover {
    background-color: #f5f5f5;
    transform: scale(1.05);
}

.stat-item:active {
    transform: scale(0.95);
}

.stat-icon {
    font-size: 18px;
    color: #999;
}

.stat-count {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* 点赞按钮样式 */
.stat-item#likeButton .stat-icon {
    font-size: 20px;
    color: #999;
    transition: all 0.3s;
}

.stat-item#likeButton.liked .stat-icon {
    color: #ff4757; /* Red for liked */
}

/* 移除伪元素，使用JavaScript直接更新图标内容 */

/* 收藏按钮样式 */
.stat-item#collectButton .stat-icon {
    font-size: 20px;
    color: #999;
    transition: all 0.3s;
}

.stat-item#collectButton.collected .stat-icon {
    color: #ffa502; /* Orange for collected */
}

/* 移除伪元素，使用JavaScript直接更新图标内容 */

/* 评论区域 */
.video-comments-section {
    background-color: #fff;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.comments-header {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    background-color: #fff;
}

.comments-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px;
    background-color: #fff;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

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

.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.comment-username {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.comment-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.comment-time {
    font-size: 12px;
    color: #999;
}

.comment-text {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    margin-bottom: 8px;
    word-wrap: break-word;
}

.comment-action {
    background: none;
    border: none;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s;
}

.comment-action:hover {
    background-color: #f5f5f5;
    color: #333;
}

.reply-btn {
    color: #007bff;
}

.reply-btn:hover {
    background-color: #e6f3ff;
    color: #0056b3;
}

.delete-btn {
    color: #ff4757;
}

.delete-btn:hover {
    background-color: #ffe6e6;
    color: #d63031;
}

/* 评论输入 */
.video-comment-input {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background-color: #fff;
    border-top: 1px solid #eee;
    gap: 12px;
    flex-shrink: 0;
}

.comment-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.comment-input:focus {
    border-color: #ff4757;
}

.send-comment-btn {
    background-color: #ff4757;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.send-comment-btn:hover {
    background-color: #ff3742;
}

.send-comment-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .video-modal-content {
        width: 98%;
        height: 95%;
    }
    
    .video-right-section {
        min-width: 300px;
    }
    
    .modal-video {
        /* JavaScript会根据视频宽高比动态调整 */
        object-fit: cover;
    }
}

@media (max-width: 768px) {
    .video-modal-content {
        flex-direction: column;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    
    .video-left-section {
        flex: 1;
        min-height: 300px;
        max-height: 50vh;
    }
    
    .video-right-section {
        flex: 1;
        max-width: none;
        min-width: auto;
    }
    
    .modal-video {
        /* JavaScript会根据视频宽高比动态调整 */
        object-fit: cover;
    }
}

/* 确保视频在任何情况下都不会超出容器 */
.modal-video {
    /* JavaScript会根据视频宽高比动态调整 */
    object-fit: cover !important;
}

/* 图片轮播样式 */
.image-carousel {
    width: 100%;
    height: 100%;
    position: relative;
    background-color: #000;
    overflow: hidden;
}

.carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.carousel-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.indicator.active {
    background-color: #fff;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 10;
}

.carousel-prev,
.carousel-next {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.carousel-prev:hover,
.carousel-next:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.no-images {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    font-size: 16px;
}

.no-video {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    font-size: 16px;
    background-color: #f5f5f5;
    border-radius: 8px;
}

/* 案例详情样式 */
.case-details {
    margin: 15px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.case-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.case-detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px;
    background-color: #fff;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.case-detail-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.case-detail-label {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.case-detail-value {
    font-size: 14px;
    color: #212529;
    font-weight: 600;
    word-break: break-word;
}

/* 移动端案例详情样式 */
@media (max-width: 768px) {
    .case-details {
        margin: 10px 0;
        padding: 12px;
    }
    
    .case-details-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .case-detail-item {
        padding: 6px;
    }
    
    .case-detail-label {
        font-size: 11px;
    }
    
    .case-detail-value {
        font-size: 13px;
    }
}

/* 移动端轮播样式调整 */
@media (max-width: 768px) {
    .carousel-nav {
        padding: 0 10px;
    }
    
    .carousel-prev,
    .carousel-next {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    
    .carousel-indicators {
        bottom: 10px;
    }
    
    .indicator {
        width: 6px;
        height: 6px;
    }
}
