/* Video Player and Watch Page Styles */

.watch-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
    padding: 24px;
    max-width: 1750px;
}

.video-section {
    min-width: 0;
}

/* Video Player */
.video-player-container {
    position: relative;
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.video-player {
    width: 100%;
    max-height: 720px;
    aspect-ratio: 16/9;
    display: block;
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-player-container:hover .video-controls {
    opacity: 1;
}

.progress-container {
    margin-bottom: 12px;
}

.progress-bar {
    position: relative;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
}

.progress-filled {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s ease;
}

.progress-thumb {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background-color: var(--primary-color);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.progress-bar:hover .progress-thumb {
    opacity: 1;
}

.time-display {
    color: white;
    font-size: 12px;
    margin-top: 4px;
}

.control-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.left-controls, .right-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.control-buttons button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.control-buttons button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.play-pause-btn i {
    font-size: 20px;
}

.volume-btn i {
    font-size: 16px;
}

.volume-slider {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.speed-btn, .quality-btn {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
}

.fullscreen-btn i {
    font-size: 16px;
}

/* Video Info Section */
.video-info-section {
    margin-bottom: 20px;
}

.video-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.view-count {
    color: var(--text-secondary);
    font-size: 14px;
}

.video-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: var(--dark-elevated);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background-color: var(--hover-bg);
}

.action-btn.active{background:#fff!important;border-color:#fff!important;color:#111!important}
.action-btn.active i{color:#111!important}
.like-btn.active,.dislike-btn.active{background:#fff!important;border-color:#fff!important;color:#111!important}

.like-btn.active {
    background-color: rgba(0, 255, 0, 0.2);
    border-color: #4caf50;
    color: #4caf50;
}

.dislike-btn.active {
    background-color: rgba(255, 0, 0, 0.2);
    border-color: #f44336;
    color: #f44336;
}

/* Channel Info */
.channel-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

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

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

.channel-text h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 2px;
}

.channel-text a {
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.channel-text a:hover {
    color: #3ea6ff;
}

.subscriber-count {
    color: var(--text-secondary);
    font-size: 12px;
}

.subscribe-btn {
    padding: 10px 16px;
    background-color: var(--primary-color);
    border: none;
    border-radius: 18px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.subscribe-btn:hover {
    background-color: #cc0000;
}

.subscribe-btn.subscribed {
    background-color: var(--dark-elevated);
    color: var(--text-primary);
}

.subscribe-btn.subscribed:hover {
    background-color: var(--hover-bg);
}

/* Video Description */
.video-description {
    background-color: var(--dark-elevated);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.description-text {
    color: var(--text-primary);
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.show-more-btn {
    background: none;
    border: none;
    color: #3ea6ff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin-top: 8px;
}

.show-more-btn:hover {
    text-decoration: underline;
}

/* Comments Section */
.comments-section {
    margin-top: 24px;
}

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

.comments-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.sort-comments {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
}

.sort-comments:hover {
    color: var(--text-primary);
}

/* Add Comment */
.add-comment {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

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

.comment-form {
    flex: 1;
}

.comment-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 14px;
    padding: 8px 0;
    resize: vertical;
    min-height: 24px;
    max-height: 200px;
}

.comment-input:focus {
    outline: none;
    border-bottom-color: #3ea6ff;
}

.comment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.comment-form:focus-within .comment-actions {
    opacity: 1;
}

.cancel-btn, .comment-btn {
    padding: 8px 16px;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
}

.cancel-btn:hover {
    background-color: var(--hover-bg);
    color: var(--text-primary);
}

.comment-btn {
    background-color: #3ea6ff;
    border: none;
    color: white;
}

.comment-btn:hover {
    background-color: #1976d2;
}

.comment-btn:disabled {
    background-color: var(--dark-elevated);
    color: var(--text-secondary);
    cursor: not-allowed;
}

/* Comments List */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment {
    display: flex;
    gap: 12px;
}

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

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

.comment-author {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.comment-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.comment-text {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    margin-bottom: 8px;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-like-btn, .comment-dislike-btn, .reply-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 18px;
    transition: all 0.2s ease;
}

.comment-like-btn:hover, .comment-dislike-btn:hover, .reply-btn:hover {
    background-color: var(--hover-bg);
    color: var(--text-primary);
}

.comment-like-btn span {
    margin-left: 4px;
}

/* Replies */
.replies {
    margin-top: 12px;
    margin-left: 52px;
}

.show-replies-btn {
    background: none;
    border: none;
    color: #3ea6ff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.show-replies-btn:hover {
    text-decoration: underline;
}

.replies-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reply {
    display: flex;
    gap: 12px;
}

.reply .comment-avatar {
    width: 24px;
    height: 24px;
}

/* Related Videos Sidebar */
.related-videos {
    padding-left: 24px;
}

.related-videos h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.related-video {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.related-video:hover {
    background-color: var(--hover-bg);
}

.related-thumbnail {
    position: relative;
    flex-shrink: 0;
    width: 168px;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
}

.related-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-thumbnail .duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 4px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 500;
}

.related-info {
    flex: 1;
    min-width: 0;
    padding-left: 4px;
}

.related-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.related-title a:hover {
    color: #3ea6ff;
}

.related-channel {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.related-stats {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .watch-content {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px;
    }
    
    .related-videos {
        padding-left: 0;
    }
    
    .related-video {
        flex-direction: column;
    }
    
    .related-thumbnail {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .video-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .video-actions {
        flex-wrap: wrap;
    }
    
    .channel-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .action-btn {
        font-size: 12px;
        padding: 6px 12px;
    }
}
.video-loading{display:none;position:absolute;inset:0;align-items:center;justify-content:center;color:#fff;background:rgba(0,0,0,.25);pointer-events:none}
.video-player-container.video-error .video-loading{display:flex}
.video-buffer{position:absolute}
.progress-buffer{position:absolute;left:0;top:0;height:100%;width:0;background:rgba(255,255,255,.45);border-radius:2px}
.video-date{color:var(--text-secondary);font-size:13px;margin:-10px 0 18px}
.share-modal,.auth-modal{position:fixed;inset:0;background:rgba(0,0,0,.65);display:flex;align-items:center;justify-content:center;z-index:3000;padding:16px}
.share-modal[hidden],.auth-modal[hidden]{display:none}
.share-card,.auth-modal .auth-card{position:relative;background:var(--dark-elevated);border:1px solid var(--border-color);border-radius:14px;padding:24px;width:min(520px,100%);box-shadow:0 16px 50px rgba(0,0,0,.5)}
.share-card h3,.auth-modal h3{margin-bottom:16px}
.share-close{position:absolute;right:12px;top:10px;background:none;border:0;color:#fff;font-size:28px;cursor:pointer}
.share-row{display:flex;gap:8px}.share-row input{flex:1;min-width:0;background:var(--dark-bg);color:#fff;border:1px solid var(--border-color);border-radius:8px;padding:11px}.share-row button{border:0;border-radius:8px;padding:0 14px;cursor:pointer}
.auth-modal .auth-card{text-align:center}.auth-modal .auth-card>i{font-size:42px;margin-bottom:10px}.auth-modal .submit-btn{display:inline-block;text-decoration:none}
@media(max-width:1024px){.watch-content{margin-left:72px;grid-template-columns:1fr;padding:16px}.related-videos{padding-left:0}.related-video{display:grid;grid-template-columns:220px 1fr}.related-thumbnail{width:auto}}
@media(max-width:640px){.watch-content{margin-left:0;padding:0 0 20px}.video-player-container{border-radius:0}.video-info-section,.channel-info,.video-description,.comments-section,.video-date{margin-left:12px;margin-right:12px}.video-title{font-size:18px}.video-meta{align-items:flex-start;gap:12px}.video-actions{width:100%;overflow:auto;padding-bottom:4px}.action-btn{white-space:nowrap;padding:7px 11px}.channel-info{padding:14px 0}.related-videos{padding:12px}.related-video{grid-template-columns:140px 1fr}.control-buttons{padding:0 4px}.right-controls .speed-btn{display:none}.video-controls{padding:12px}}

@media (max-width:640px){.video-controls{opacity:1!important;visibility:visible}.video-player{background:#000}}
.action-btn.active{background:transparent!important;color:var(--text-primary)!important}.action-btn.active i{color:#111!important}.action-btn.like-btn.active,.action-btn.dislike-btn.active{box-shadow:none}.action-btn.like-btn.active span{color:var(--text-primary)}
.comment-actions .active{color:var(--text-primary)!important}.comment-actions button{background:none;border:0}.inline-reply{margin-top:12px}.comment{position:relative}

/* Monochrome YouTube-like reactions and comment composer */
.action-btn{background:#212121;border-color:#3f3f3f}.action-btn.active{background:#fff!important;color:#111!important}.action-btn.active i{color:#111!important}.action-btn.like-btn.active span{color:#111!important}
.comment-form.add-comment{display:flex;align-items:flex-start;gap:12px;margin:20px 0 28px}.comment-form.add-comment:before{content:"";width:40px;height:40px;border-radius:50%;background:url("/assets/default-avatar.svg") center/cover no-repeat;flex:0 0 40px}.comment-form.add-comment .comment-input{background:transparent;border-bottom:1px solid #aaa;min-height:38px;padding:8px 0}.comment-form.add-comment .comment-actions{opacity:0}.comment-form.add-comment:focus-within .comment-actions{opacity:1}.comment-actions button{color:var(--text-primary)!important}.comment-like-btn.active,.comment-dislike-btn.active{color:#111!important;background:#fff!important;border-radius:16px}.comment-like-btn.active i,.comment-dislike-btn.active i{color:#111!important}
