/* Watch Page Styles */
.watch-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px;
}

.video-player-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.video-player-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-info {
    margin-bottom: 20px;
}

.video-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #030303;
}

.video-channel-info {
    margin-bottom: 10px;
    font-size: 14px;
}

.video-channel-info .channel-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #065fd4;
    text-decoration: none;
    font-weight: 500;
    padding: 4px 0;
    transition: color 0.2s;
}

.video-channel-info .channel-link:hover {
    color: #cc0000;
    text-decoration: underline;
}

.video-channel-info .channel-link i {
    font-size: 20px;
    color: #606060;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
    gap: 10px;
}

.video-stats {
    color: #606060;
    font-size: 14px;
}

.video-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border: 1px solid #ccc;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.action-btn:hover {
    background: #f0f0f0;
}

.action-btn.active {
    background: #065fd4;
    color: white;
    border-color: #065fd4;
}

.action-btn.active.dislike {
    background: #cc0000;
    border-color: #cc0000;
}

.action-btn.favorite-btn.active {
    background: #e91e63;
    border-color: #e91e63;
    color: white;
}

.video-description {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.video-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tag-badge {
    background: #e0e0e0;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    color: #333;
}

.comments-section {
    margin-top: 30px;
}

.comments-header {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #030303;
}

.comment-form {
    margin-bottom: 30px;
}

.comment-form textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
}

.comment-form .guest-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #065fd4;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 4px;
    color: #030303;
}

.comment-text {
    margin-bottom: 8px;
    line-height: 1.5;
    color: #030303;
    word-wrap: break-word;
}

.comment-actions {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #606060;
}

.comment-like-btn {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.comment-like-btn:hover {
    color: #065fd4;
}

.comment-like-btn.liked {
    color: #065fd4;
    font-weight: 600;
}

.related-videos {
    margin-top: 20px;
}

.related-videos h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #030303;
}

.related-video-item {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.related-video-item:hover {
    opacity: 0.8;
}

.related-video-item:hover .related-video-title {
    color: #065fd4;
}

.related-video-thumb {
    width: 168px;
    height: 94px;
    object-fit: cover;
    border-radius: 8px;
    background: #e0e0e0;
    flex-shrink: 0;
}

.related-video-info {
    flex: 1;
    min-width: 0;
}

.related-video-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    line-height: 1.4;
    color: #030303;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-video-stats {
    font-size: 12px;
    color: #606060;
}

@media (min-width: 1024px) {
    .watch-layout {
        display: grid;
        grid-template-columns: 1fr 400px;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .video-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .comment-form .guest-fields {
        grid-template-columns: 1fr;
    }

    .related-video-thumb {
        width: 120px;
        height: 68px;
    }
}

/* Skeleton Loading Animation */
.recommendation-skeleton {
    animation: skeleton-pulse 1.5s infinite ease-in-out;
}

@keyframes skeleton-pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Fix: Hide border for the last reply to avoid double borders */
[id^="replies-list-"] .comment-item:last-child {
    border-bottom: none;
    padding-bottom: 10px;
    margin-bottom: 0;
}

/* Sidebar Sections (Categories & Tags) */
.sidebar-section {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e0e0e0;
}

.sidebar-title {
    font-size: 15px;
    font-weight: 600;
    color: #030303;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.sidebar-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-category-list li {
    margin-bottom: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    color: #444;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    transition: background 0.15s;
}

.sidebar-link:hover {
    background: #f2f2f2;
    color: #065fd4;
}

.sidebar-link i {
    width: 18px;
    text-align: center;
    color: #888;
    font-size: 14px;
}

.sidebar-cat-icon {
    width: 18px;
    height: 18px;
    object-fit: cover;
    border-radius: 3px;
}

.sidebar-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sidebar-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #f2f2f2;
    color: #065fd4;
    border-radius: 12px;
    font-size: 12px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.sidebar-tag:hover {
    background: #065fd4;
    color: #fff;
}

/* AI Summary Section */
.ai-summary-section {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.ai-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.ai-summary-header:hover {
    background: #f0f0f0;
}

.ai-summary-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-summary-header-left i.fa-robot {
    color: #065fd4;
    font-size: 18px;
}

.ai-summary-title {
    font-weight: 600;
    font-size: 15px;
    color: #030303;
}

.ai-summary-toggle {
    color: #606060;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.ai-summary-toggle.rotated {
    transform: rotate(180deg);
}

.ai-summary-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 16px;
}

.ai-summary-content.expanded {
    max-height: 1000px;
    padding: 0 16px 16px 16px;
}

.ai-summary-content ul {
    margin: 0;
    padding-left: 20px;
}

.ai-summary-content li {
    margin-bottom: 6px;
    line-height: 1.5;
    color: #0f0f0f;
    font-size: 14px;
}

.ai-summary-content p {
    margin-bottom: 6px;
    line-height: 1.5;
    color: #0f0f0f;
    font-size: 14px;
}

@media (max-width: 768px) {
    .ai-summary-header {
        padding: 10px 12px;
    }

    .ai-summary-content.expanded {
        padding: 0 12px 12px 12px;
    }
}

/* Breadcrumb Styles */
.breadcrumb-bar {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 20px 0;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    color: #606060;
}

.breadcrumb-link {
    color: #065fd4;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background 0.2s;
}

.breadcrumb-link:hover {
    background: rgba(6, 95, 212, 0.08);
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #909090;
    font-size: 16px;
    line-height: 1;
}

.breadcrumb-current {
    color: #606060;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
}