/* Hide volume slider in mobile views */
@media (max-width: 480px) {
    .video-player-controls input[type="range"] {
        display: none !important;
    }
}

/* For more precise device analytics, also hide for common mobile heights */
@media (max-width: 430px), (max-width: 480px) and (max-height: 900px) {
    .video-player-controls input[type="range"] {
        display: none !important;
    }
}

.video-player-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.video-player-wrapper iframe,
.video-player-wrapper video,
.video-player-wrapper #vids {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-info {
    padding: 16px 0;
}

.video-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.5;
    color: #0f0f0f;
    letter-spacing: -0.02em;
}

.video-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #606060;
    flex-wrap: wrap;
}

.video-meta span {
    display: flex;
    align-items: center;
}

.channel-info {
    display: flex;
    align-items: center; 
    padding: 16px 0;
}

.channel-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f1f1f1;
}

.channel-details {
    flex: 1;
}

.channel-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f0f0f;
    margin-bottom: 2px;
}

.channel-subs {
    font-size: 0.8rem;
    color: #606060;
    font-weight: 500;
}

.subscribe-btn {
    background: #cc0000;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.subscribe-btn:hover {
    background: #b00000;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.subscribe-btn:active {
    transform: translateY(0);
}

.subscribe-btn.subscribed {
    background: #f1f1f1;
    color: #0f0f0f;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 16px 0;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 11px;
    background: #f1f1f1;
    border: none;
    border-radius: 24px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn i {
    font-size: 1rem;
}

.action-btn:hover {
    background: #e5e5e5;
    transform: translateY(-1px);
}

.action-btn:active {
    transform: translateY(0);
}

.action-btn.active {
    background: #065fd4;
    color: white;
}

.action-btn.active:hover {
    background: #054db8;
}

/* Like button animation */
@keyframes likeAnimation {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.action-btn.like-animation {
    animation: likeAnimation 0.6s ease-in-out;
}

.video-description {
    background: #f1f1f1;
    padding: 12px;
    border-radius: 12px;
    margin-top: 12px;
    cursor: pointer;
}

.description-preview {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.description-full {
    white-space: pre-wrap;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
}

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

.comment-content {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    font-size: 0.875rem;
    margin-right: 8px;
}

.comment-time {
    font-size: 0.75rem;
    color: #606060;
}

.comment-text {
    margin-top: 4px;
    font-size: 0.875rem;
    line-height: 1.4;
}

.sidebar-video {
    text-decoration: none;
    color: inherit;
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.sidebar-video:hover {
    background: #f1f1f1;
}

.sidebar-video-thumb {
    position: relative;
    width: 168px;
    min-width: 168px;
    height: 94px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.sidebar-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-video-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 4px;
    border-radius: 2px;
    font-size: 0.75rem;
    font-weight: 600;
}

.sidebar-video-info {
    flex: 1;
    min-width: 0;
}

.sidebar-video-title {
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-video-channel {
    font-size: 0.75rem;
    color: #606060;
    margin-bottom: 2px;
}

.sidebar-video-meta {
    font-size: 0.75rem;
    color: #606060;
}

@media (max-width: 767.98px) {
    .video-player-wrapper {
        border-radius: 0;
    }
    
    .video-info {
        padding: 12px 16px;
        background: #fff;
    }
    
    .video-title {
        font-size: 1.125rem;
        font-weight: 700;
        margin-bottom: 10px;
        line-height: 1.4;
    }
    
    .video-meta {
        font-size: 0.8125rem;
        gap: 6px;
    } 
    
    .channel-info {
        padding: 12px 16px;
        background: #fff;
        margin-top: 8px;
    }
    
    .channel-avatar {
        width: 40px;
        height: 40px;
    }
    
    .channel-name {
        font-size: 0.9rem;
    }
    
    .channel-subs {
        font-size: 0.75rem;
    }
    
    .subscribe-btn {
        padding: 8px 20px;
        font-size: 0.875rem;
    }
    
    .action-buttons {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 12px 16px;
        background: #fff;
        gap: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .action-buttons::-webkit-scrollbar {
        display: none;
    }
    
    .action-btn {
        white-space: nowrap;
        padding: 10px 18px;
        font-size: 0.875rem;
    }
    
    .sidebar-video-thumb {
        width: 140px;
        min-width: 140px;
        height: 78px;
    }
}

/* 360x800 - Most common mobile size (10.69%) */
@media (max-width: 360px) {
    .video-info {
        padding: 10px 12px;
    }
    
    .video-title {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .video-meta {
        font-size: 0.75rem;
    }
    
    .channel-info {
        padding: 10px 12px; 
    }
    
    .channel-avatar {
        width: 36px;
        height: 36px;
    }
    
    .channel-name {
        font-size: 0.85rem;
    }
    
    .subscribe-btn {
        padding: 6px 16px;
        font-size: 0.8125rem;
    }
    
    .action-buttons {
        padding: 10px 12px;
        gap: 8px;
    }
    
    .action-btn {
        padding: 8px 14px;
        font-size: 0.8125rem;
    }
    
    .action-btn i {
        font-size: 0.9rem;
    }
}

/* 360x806, 360x760 - Small mobile variants */
@media (min-width: 361px) and (max-width: 390px) {
    .video-info {
        padding: 12px 14px;
    }
    
    .video-title {
        font-size: 1.05rem;
    }
    
    .video-meta {
        font-size: 0.8rem;
    }
    
    .channel-info {
        padding: 12px 14px;
    }
    
    .channel-avatar {
        width: 38px;
        height: 38px;
    }
    
    .action-buttons {
        padding: 12px 14px;
    }
}

/* 412x915, 412x892 - Medium mobile (Galaxy S20, Pixel) */
@media (min-width: 391px) and (max-width: 430px) {
    .video-info {
        padding: 14px 16px;
    }
    
    .video-title {
        font-size: 1.15rem;
    }
    
    .video-meta {
        font-size: 0.8125rem;
    }
    
    .channel-info {
        padding: 14px 16px;
    }
    
    .channel-avatar {
        width: 42px;
        height: 42px;
    }
    
    .action-btn {
        padding: 10px 16px;
    }
}

/* 768x1024, 1366x768 - Tablets */
@media (min-width: 768px) and (max-width: 991.98px) {
    .video-player-wrapper {
        border-radius: 12px;
    }
    
    .video-info {
        padding: 16px 20px;
    }
    
    .video-title {
        font-size: 1.3rem;
    }
    
    .video-meta {
        font-size: 0.9rem;
    }
    
    .channel-info {
        padding: 16px 20px;
    }
    
    .channel-avatar {
        width: 52px;
        height: 52px;
    }
    
    .channel-name {
        font-size: 1rem;
    }
    
    .action-buttons {
        padding: 16px 20px;
    }
    
    .action-btn {
        padding: 11px 20px;
        font-size: 0.95rem;
    }
}

/* 1536x864 - Small laptop/Large tablet */
@media (min-width: 992px) and (max-width: 1536px) {
    .video-title {
        font-size: 1.35rem;
    }
    
    .video-meta {
        font-size: 0.9rem;
    }
}

/* Large desktop */
@media (min-width: 1537px) {
    .video-title {
        font-size: 1.5rem;
    }
    
    .video-meta {
        font-size: 0.95rem;
    }
    
    .channel-avatar {
        width: 52px;
        height: 52px;
    }
}

/* ========== COMMENT FORM STYLES ========== */

.watch-comment-form {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.comment-form-wrapper {
    position: relative;
}

.comment-input-container {
    position: relative;
    width: 100%;
}

.comment-textarea {
    border: 1.5px solid #ffd900 !important;
    border-radius: 4px !important;
    padding: 12px !important;
    font-family: inherit !important;
    font-size: 14px !important;
    resize: none !important;
    width: 100% !important;
    color: #333 !important;
    background-color: #fff !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
}

.comment-textarea:focus {
    outline: none !important;
    border-color: #ffb300 !important;
    box-shadow: 0 0 0 3px rgba(255, 217, 0, 0.1) !important;
}

.comment-textarea:disabled {
    background-color: #f5f5f5 !important;
    color: #999 !important;
    cursor: not-allowed !important;
}

.comment-submit-btn {
    padding: 0 !important;
    border: none !important;
    background: #ffd900 !important;
    color: #333 !important;
    cursor: pointer !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(255, 217, 0, 0.2) !important;
}

.comment-submit-btn:hover:not(:disabled) {
    background: #ffb300 !important;
    box-shadow: 0 4px 12px rgba(255, 217, 0, 0.35) !important;
    transform: scale(1.05) !important;
}

.comment-submit-btn:active:not(:disabled) {
    transform: scale(0.95) !important;
}

.comment-submit-btn:disabled {
    background: #ccc !important;
    color: #666 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

.alert-sm {
    margin: 0 !important;
}

.alert-danger {
    background-color: #f8d7da !important;
    border: 1px solid #f5c6cb !important;
    color: #721c24 !important;
}

/* Responsive adjustments for comment form */
@media (max-width: 430px) {
    .watch-comment-form {
        margin-bottom: 16px;
    }
    
    .comment-textarea {
        font-size: 13px !important;
        padding: 10px !important;
    }
    
    .comment-submit-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 16px !important;
        top: 6px !important;
        right: 6px !important;
    }
}

@media (min-width: 768px) {
    .watch-comment-form {
        margin-bottom: 28px;
    }
    
    .comment-textarea {
        font-size: 15px !important;
        padding: 14px !important;
    }
    
    .comment-submit-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 18px !important;
        top: 10px !important;
        right: 10px !important;
    }
}
.video-info-card {
            background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
            border: 1px solid #ececec;
            border-radius: 18px;
            padding: 18px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
        }

        .video-title-row {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 12px;
        }

        .video-title {
            margin-bottom: 0;
            flex: 1;
        }

        .video-related-trigger {
            flex-shrink: 0;
        }

        .video-meta-wrap {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            flex-wrap: wrap;
            padding-bottom: 14px; 
        }

        .video-topic-chip {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            background: #fff2d9;
            color: #7a4a00;
            border-radius: 999px;
            font-size: 0.85rem;
            font-weight: 700;
        }

        .video-topic-chip i {
            font-size: 0.85rem;
        }

        .video-meta {
            gap: 10px;
        }

        .video-meta span {
            gap: 6px;
            padding: 6px 10px;
            background: #f5f5f5;
            border-radius: 999px;
        }

        .video-meta i {
            font-size: 0.8rem;
            color: #7a7a7a;
        }

        .video-info-bottom {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            padding-top: 14px;
            flex-wrap: wrap;
        }

        .channel-info {
            gap: 12px;
            padding: 0;
            margin: 0;
            min-width: 0;
        }

        .channel-avatar {
            width: 35px;
            height: 35px;
            flex-shrink: 0;
        }

        .channel-details {
            min-width: 0;
        }

        .channel-name {
            font-size: 1rem;
        }

        .action-buttons {
            padding: 0;
            justify-content: flex-end;
        }

        @media (max-width: 991.98px) {
            .video-info-card {
                border-radius: 16px;
                padding: 14px;
            }

            .video-title-row {
                align-items: stretch;
            }

            .video-related-trigger {
                align-self: flex-start;
            }

            .video-title {
                font-size: 1.1rem;
                line-height: 1.4;
            }

            .video-info-bottom {
                flex-direction: column;
                align-items: stretch;
            }

            .action-buttons {
                justify-content: flex-start;
            }
        }

        @media (max-width: 575.98px) {
            .video-topic-chip,
            .video-meta span {
                font-size: 0.8rem;
            }

            .channel-avatar {
                width: 44px;
                height: 44px;
            }

            .action-btn {
                padding: 3px 11px;
                font-size: 0.85rem;
            }
        }