/* ============================================
   评论面板样式
   ============================================ */

/* 评论面板 */
.comment-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 350px;
    height: 100%;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 50;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255,255,255,0.1);
}

.comment-panel.show {
    transform: translateX(0);
}

/* 评论头部 */
.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.comment-header h3 {
    color: #fff;
    font-size: 16px;
    margin: 0;
}

.comment-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.comment-close:hover {
    color: #fff;
}

/* 评论输入区域 */
.comment-input-area {
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.comment-input-area textarea {
    width: 100%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: #fff;
    padding: 12px;
    font-size: 14px;
    resize: none;
    outline: none;
    font-family: inherit;
    transition: border-color 0.3s;
}

.comment-input-area textarea:focus {
    border-color: rgba(0,176,155,0.5);
}

.comment-input-area textarea::placeholder {
    color: rgba(255,255,255,0.4);
}

.comment-submit {
    margin-top: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #00b09b, #96c93d);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    float: right;
    transition: all 0.3s ease;
}

.comment-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,176,155,0.3);
}

.comment-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* 评论列表 */
.comment-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.comment-list::-webkit-scrollbar {
    width: 4px;
}

.comment-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
}

.comment-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
}

.comment-loading {
    text-align: center;
    color: rgba(255,255,255,0.5);
    padding: 20px;
}

.comment-empty {
    text-align: center;
    color: rgba(255,255,255,0.4);
    padding: 40px 20px;
}

/* 评论项 */
.comment-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

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

.comment-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00b09b, #96c93d);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.comment-user-info {
    flex: 1;
}

.comment-username {
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    font-weight: 500;
}

.comment-time {
    color: rgba(255,255,255,0.4);
    font-size: 11px;
}

.comment-content {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    line-height: 1.5;
    margin-left: 40px;
}

/* 回复引用样式 */
.comment-reply-quote {
    margin-left: 40px;
    margin-bottom: 8px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.05);
    border-left: 3px solid rgba(0,176,155,0.5);
    border-radius: 0 6px 6px 0;
    font-size: 12px;
}

.reply-to {
    color: #00b09b;
    font-weight: 500;
    margin-right: 8px;
}

.reply-content {
    color: rgba(255,255,255,0.5);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    max-width: 200px;
    vertical-align: bottom;
}

/* 评论操作按钮 */
.comment-actions {
    display: flex;
    gap: 16px;
    margin-left: 40px;
    margin-top: 8px;
}

.comment-action {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
    padding: 0;
}

.comment-action:hover {
    color: rgba(255,255,255,0.8);
}

.comment-action svg {
    fill: currentColor;
}

/* 评论点赞按钮样式 */
.comment-action.like-comment-btn {
    transition: color 0.2s, transform 0.2s;
}

.comment-action.like-comment-btn:hover {
    transform: scale(1.1);
    color: #ff6b6b;
}

.comment-action.like-comment-btn.liked {
    color: #ff6b6b !important;
}

.comment-action.like-comment-btn.liked svg {
    fill: #ff6b6b;
}

.like-count {
    min-width: 12px;
    text-align: center;
}

/* 评论分页 */
.comment-pagination {
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.comment-page-btn {
    padding: 6px 12px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 4px;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.comment-page-btn:hover {
    background: rgba(255,255,255,0.2);
}

.comment-page-btn.active {
    background: linear-gradient(135deg, #00b09b, #96c93d);
    color: white;
}

.comment-page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* 登录提示 */
.comment-login-hint {
    text-align: center;
    padding: 20px;
    color: rgba(255,255,255,0.5);
}

.comment-login-hint p {
    margin-bottom: 8px;
}

.comment-login-hint a {
    color: #00b09b;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s;
}

.comment-login-hint a:hover {
    text-decoration: underline;
    color: #96c93d;
}

/* 点赞按钮激活状态 */
.like-btn.liked svg,
.ctrl-btn.liked svg {
    fill: #ff6b6b;
}

.like-btn.liked,
.ctrl-btn.liked {
    color: #ff6b6b !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .comment-panel {
        width: 100%;
    }

    .comment-input-area {
        padding: 12px;
    }

    .comment-list {
        padding: 12px;
    }

    .comment-avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .comment-content {
        margin-left: 36px;
        font-size: 13px;
    }

    .comment-actions {
        margin-left: 36px;
    }
}

@media (max-width: 480px) {
    .comment-header {
        padding: 12px;
    }

    .comment-header h3 {
        font-size: 14px;
    }

    .comment-submit {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* B站风格评论区样式补充 */
.comment-section {
    background: rgba(30, 30, 30, 0.95);
    margin-top: 0;
}

.comment-section-header {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.comment-section-title {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.comment-section-count {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.comment-input-wrapper {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.comment-input-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.comment-input-box .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00b09b, #96c93d);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.comment-input-box input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 20px;
    padding: 10px 16px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

.comment-input-box input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.comment-input-box input:focus {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px rgba(0, 161, 214, 0.3);
}

/* B站风格评论列表 */
.bilibili-comment-list {
    padding: 0 16px;
}

.bilibili-comment-item {
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 12px;
}

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

.comment-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00b09b, #96c93d);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

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

.comment-user-name {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    margin-bottom: 6px;
}

.comment-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.comment-meta-action {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: color 0.2s;
}

.comment-meta-action:hover {
    color: rgba(255, 255, 255, 0.8);
}

.comment-meta-action svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* B站风格点赞动画 */
.action-item.active svg {
    animation: likeAnimation 0.3s ease;
}

@keyframes likeAnimation {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* B站风格视频标题展开效果 */
.video-title-main {
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-title-main:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* 移动端B站风格优化 */
@media (max-width: 768px) {
    .comment-section {
        margin-top: 0;
        border-radius: 0;
    }
    
    .bilibili-comment-item {
        padding: 12px 0;
    }
    
    .comment-user-avatar {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .comment-text {
        font-size: 13px;
    }
    
    .comment-meta {
        font-size: 11px;
    }
    
    .comment-input-box input {
        font-size: 13px;
        padding: 8px 14px;
    }
}

/* 查看更多评论按钮 */
.comment-more {
    text-align: center;
    padding: 16px;
    color: #00a1d6;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.comment-more:hover {
    color: #0091c1;
    text-decoration: underline;
}

/* 评论区展开状态 */
.bilibili-comment-list {
    max-height: 600px;
    overflow-y: auto;
}

.bilibili-comment-list::-webkit-scrollbar {
    width: 6px;
}

.bilibili-comment-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.bilibili-comment-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.bilibili-comment-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* PC端评论区样式 */
@media (min-width: 769px) {
    .bilibili-comment-list {
        max-height: 800px;
    }
}

/* 音量控制展开样式 */
.volume-control {
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

.volume-control.expanded .volume-slider-wrap {
    width: 80px;
}

.volume-slider-wrap {
    width: 0;
    overflow: hidden;
    transition: width 0.25s ease;
    display: flex;
    align-items: center;
}

/* 移动端音量控制 */
@media (max-width: 768px) {
    .volume-control {
        display: flex;
    }
    
    .volume-control .volume-slider-wrap {
        width: 60px;
    }
}
