/**
 * Nostr Tube UX Enhancements Styles
 * Include this in youtube.html after main styles
 * 
 * @version 1.0.0
 * @date 2025-01-09
 */

/* Version information for client detection */
/* UPLANET_YOUTUBE_CSS_VERSION: 1.0.0 */
/* UPLANET_YOUTUBE_CSS_DATE: 2025-01-09 */

/* ========================================
   THEATER MODE
   ======================================== */

.theater-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.theater-modal-content {
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    background: #0f0f0f;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #3f3f3f;
}

/* Prevent body scroll when theater modal is open (from youtube.html parent) */
body.theater-modal-open {
    overflow: hidden !important;
}

html.theater-modal-open {
    overflow: hidden !important;
}

.theater-header {
    padding: 16px 24px;
    background: #212121;
    border-bottom: 1px solid #3f3f3f;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.theater-close-btn {
    background: transparent;
    border: 1px solid #3f3f3f;
    color: #f1f1f1;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
}

.theater-close-btn:hover {
    background: #3f3f3f;
}

.theater-title {
    flex: 1;
    margin: 0 24px;
    font-size: 1.1em;
    font-weight: 500;
    color: #f1f1f1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.theater-connection-badge {
    font-size: 0.75em;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #9ca3af;
    transition: all 0.2s ease;
    cursor: help;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.theater-connection-badge.connected {
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.1);
}

.theater-connection-badge.not-connected {
    color: #9ca3af;
    border-color: rgba(156, 163, 175, 0.3);
    background: rgba(156, 163, 175, 0.1);
}

.theater-action-btn {
    background: transparent;
    border: 1px solid #3f3f3f;
    color: #f1f1f1;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.theater-action-btn:hover {
    background: #3f3f3f;
    border-color: #606060;
}

.theater-body {
    flex: 1;
    display: flex;
    gap: 16px;
    padding: 24px;
    overflow: hidden;
}

.theater-video-container {
    flex: 2;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.theater-video-player {
    width: 100%;
    height: 100%;
    max-height: calc(90vh - 200px);
    background: #000;
    border-radius: 8px;
}

.theater-video-info {
    margin-top: 16px;
    color: #f1f1f1;
}

.theater-video-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
}

.stat-item {
    font-size: 0.9em;
    color: #aaaaaa;
}

.theater-video-meta {
    font-size: 0.9em;
    color: #aaaaaa;
    margin-bottom: 8px;
}

.theater-description {
    margin-top: 12px;
    padding: 12px;
    background: #181818;
    border-radius: 8px;
    color: #cccccc;
    line-height: 1.6;
    font-size: 0.9em;
}

.theater-description p {
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.theater-description p:last-child {
    margin-bottom: 0;
}

.theater-description a {
    color: #3ea6ff;
    text-decoration: underline;
    transition: color 0.2s;
}

.theater-description a:hover {
    color: #60a5fa;
    text-decoration: underline;
}

.theater-comments-panel {
    flex: 1;
    min-width: 350px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    background: #181818;
    border-radius: 8px;
    border: 1px solid #3f3f3f;
    overflow: hidden;
}

.theater-comments-header {
    padding: 16px;
    border-bottom: 1px solid #3f3f3f;
    background: #212121;
}

.theater-comments-header h3 {
    margin: 0 0 4px 0;
    font-size: 1em;
    color: #f1f1f1;
}

.theater-comment-stats {
    font-size: 0.85em;
    color: #aaaaaa;
}

.theater-comment-form {
    padding: 16px;
    border-bottom: 1px solid #3f3f3f;
    background: #181818;
}

.theater-comment-form textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    background: #121212;
    border: 1px solid #3f3f3f;
    border-radius: 8px;
    color: #f1f1f1;
    font-family: inherit;
    font-size: 0.9em;
    resize: vertical;
}

.theater-comment-form textarea:focus {
    outline: none;
    border-color: #065fd4;
}

.theater-comment-form-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.theater-comment-submit-btn,
.theater-comment-timestamp-btn {
    flex: 1;
    padding: 8px 16px;
    background: #065fd4;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.theater-comment-submit-btn:hover {
    background: #0a7ae7;
}

.theater-comment-timestamp-btn {
    background: transparent;
    border: 1px solid #3f3f3f;
    color: #f1f1f1;
}

.theater-comment-timestamp-btn:hover {
    background: #3f3f3f;
}

.theater-comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.theater-comments-list::-webkit-scrollbar {
    width: 8px;
}

.theater-comments-list::-webkit-scrollbar-track {
    background: #121212;
}

.theater-comments-list::-webkit-scrollbar-thumb {
    background: #3f3f3f;
    border-radius: 4px;
}

.theater-comment-item {
    padding: 12px;
    margin-bottom: 12px;
    background: #121212;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
}

.theater-comment-author {
    font-weight: 600;
    color: #3ea6ff;
    font-size: 0.9em;
    margin-bottom: 4px;
}

.theater-comment-content {
    color: #f1f1f1;
    font-size: 0.9em;
    line-height: 1.5;
    margin-bottom: 8px;
}

.theater-comment-time {
    font-size: 0.8em;
    color: #717171;
    margin-bottom: 4px;
}

.theater-comment-timestamp-link {
    display: inline-block;
    margin-top: 4px;
    padding: 4px 8px;
    background: rgba(62, 166, 255, 0.1);
    border: 1px solid #3ea6ff;
    border-radius: 4px;
    color: #3ea6ff;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theater-comment-timestamp-link:hover {
    background: rgba(62, 166, 255, 0.2);
}

.loading-comments,
.no-comments,
.error-comments {
    text-align: center;
    padding: 40px 20px;
    color: #aaaaaa;
    font-size: 0.9em;
}

/* ========================================
   VIDEO STATS OVERLAY
   ======================================== */

.video-stats-container {
    display: flex;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    backdrop-filter: blur(4px);
}

.video-stat-item {
    font-size: 0.85em;
    color: #f1f1f1;
    display: flex;
    align-items: center;
    gap: 4px;
}

.video-engagement-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.75);
    padding: 6px 10px;
    border-radius: 16px;
    font-size: 11px;
    color: #ffffff;
    backdrop-filter: blur(4px);
    z-index: 10;
    align-items: center;
    pointer-events: none;
}

.video-engagement-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========================================
   ENHANCED VIDEO ACTIONS
   ======================================== */

.video-action-menu {
    position: relative;
}

.video-action-menu-dropdown {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 8px;
    background: #212121;
    border: 1px solid #3f3f3f;
    border-radius: 8px;
    padding: 8px;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.video-action-menu-item {
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 6px;
    color: #f1f1f1;
    font-size: 0.9em;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-action-menu-item:hover {
    background: #3f3f3f;
}

/* ========================================
   RELATED VIDEOS SECTION
   ======================================== */

.related-videos-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #3f3f3f;
}

.related-videos-header {
    font-size: 1.2em;
    font-weight: 500;
    color: #f1f1f1;
    margin-bottom: 16px;
}

.related-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

/* Related videos in theater mode */
.related-videos-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.theater-related-video-card {
    flex: 1;
    min-width: 200px;
    max-width: 280px;
    background: #212121;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #3f3f3f;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.theater-related-video-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border-color: #606060;
}

.theater-related-video-card-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #181818;
    overflow: hidden;
}

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

.theater-related-video-card-thumbnail .placeholder-thumbnail {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #181818;
}

.theater-related-video-card-thumbnail .duration-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
}

.theater-related-video-card-info {
    padding: 12px;
}

.theater-related-video-card-title {
    color: #3b82f6;
    font-size: 0.9em;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.theater-related-video-card:hover .theater-related-video-card-title {
    color: #60a5fa;
}

.theater-related-video-card-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8em;
    color: #aaaaaa;
}

.theater-related-video-card-meta .author-name,
.theater-related-video-card-meta .duration-text {
    display: flex;
    align-items: center;
    gap: 4px;
}

.theater-related-video-card-meta i {
    font-size: 0.9em;
}

/* Responsive for related videos - Using Bootstrap breakpoint */
@media (max-width: 767.98px) {
    .related-videos-row {
        flex-direction: column;
    }
    
    .theater-related-video-card {
        max-width: 100%;
    }
}

/* ========================================
   COMMENT TIMELINE
   ======================================== */

.comment-timeline-overlay {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    height: 4px;
    z-index: 100;
}

.comment-timeline-marker {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #3ea6ff;
    border-radius: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.comment-timeline-marker:hover {
    transform: translateX(-50%) scale(1.5);
}

.comment-timeline-tooltip {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: #212121;
    border: 1px solid #3f3f3f;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.8em;
    color: #f1f1f1;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.comment-timeline-marker:hover .comment-timeline-tooltip {
    opacity: 1;
}

/* ========================================
   PICTURE-IN-PICTURE STYLES
   ======================================== */

.pip-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    gap: 8px;
    z-index: 10001;
    backdrop-filter: blur(8px);
}

.pip-control-btn {
    background: transparent;
    border: 1px solid #3f3f3f;
    color: #f1f1f1;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.pip-control-btn:hover {
    background: #3f3f3f;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet - Bootstrap md breakpoint */
@media (max-width: 991.98px) {
    .theater-body {
        flex-direction: column;
    }

    .theater-comments-panel {
        max-width: 100%;
        max-height: 40vh;
        max-height: 40dvh; /* Dynamic viewport for mobile */
    }

    .theater-video-player {
        max-height: 50vh;
        max-height: 50dvh; /* Dynamic viewport for mobile */
    }
}

/* Mobile - Bootstrap sm breakpoint */
@media (max-width: 767.98px) {
    .theater-modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .theater-header {
        padding: 12px 16px;
    }

    .theater-title {
        font-size: 0.95em;
        margin: 0 12px;
    }

    .theater-actions {
        gap: 4px;
    }

    .theater-action-btn {
        padding: 6px 12px;
        font-size: 0.85em;
    }

    .theater-body {
        padding: 16px;
    }

    .theater-comments-panel {
        max-height: 30vh;
    }
}

/* ========================================
   LOADING STATES
   ======================================== */

.loading-skeleton {
    background: linear-gradient(
        90deg,
        #181818 0%,
        #212121 50%,
        #181818 100%
    );
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-up {
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.bounce-in {
    animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ========================================
   IFRAME MODAL STYLES (common component)
   ======================================== */

.iframe-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
}

.iframe-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.iframe-modal-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 85vh;
    background: #181818;
    border: 1px solid #3f3f3f;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    z-index: 10001;
}

.iframe-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #3f3f3f;
    background: #212121;
    border-radius: 12px 12px 0 0;
}

.iframe-modal-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.2em;
    font-weight: 500;
}

.iframe-modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 2em;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    line-height: 1;
}

.iframe-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ef4444;
}

.iframe-modal-content {
    flex: 1;
    overflow: hidden;
    border-radius: 0 0 12px 12px;
}

.iframe-modal-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #0f0f0f;
}

@media (max-width: 767.98px) {
    .iframe-modal-container {
        width: 100%;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport for mobile */
        border-radius: 0;
    }
    
    .iframe-modal-header {
        border-radius: 0;
        padding: 0.75rem 1rem;
    }
    
    .iframe-modal-header h3 {
        font-size: 1rem;
    }
    
    .iframe-modal-close {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1.8rem;
        min-height: 44px; /* Better touch target */
    }
    
    .iframe-modal-content {
        border-radius: 0;
    }
}

/* ========================================
   SHARE MODAL STYLES
   ======================================== */

.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.share-modal-content {
    background: #181818;
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #3f3f3f;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #3f3f3f;
}

.share-modal-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.3em;
    font-weight: 500;
}

.share-modal-close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.share-preview {
    margin-bottom: 20px;
    padding: 16px;
    background: #212121;
    border-radius: 8px;
    border: 1px solid #3f3f3f;
}

.share-preview-thumbnail {
    margin-bottom: 12px;
}

.share-preview-thumbnail img {
    width: 100%;
    border-radius: 8px;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.share-preview-info h4 {
    margin: 0 0 8px 0;
    color: #ffffff;
    font-size: 1.1em;
    font-weight: 500;
}

.share-preview-info p {
    margin: 0;
    color: #aaaaaa;
    font-size: 0.9em;
}

.share-form textarea {
    width: 100%;
    padding: 12px;
    background: #212121;
    border: 1px solid #3f3f3f;
    border-radius: 8px;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.95em;
    resize: vertical;
    margin-bottom: 16px;
    box-sizing: border-box;
}

.share-form textarea:focus {
    outline: none;
    border-color: #3ea6ff;
}

.share-tags {
    margin-bottom: 20px;
}

.share-tags label {
    display: block;
    margin-bottom: 8px;
    color: #aaaaaa;
    font-size: 0.9em;
    font-weight: 500;
}

.share-tags input {
    width: 100%;
    padding: 12px;
    background: #212121;
    border: 1px solid #3f3f3f;
    border-radius: 8px;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.95em;
    box-sizing: border-box;
}

.share-tags input:focus {
    outline: none;
    border-color: #3ea6ff;
}

.share-actions {
    display: flex;
    gap: 12px;
}

.share-btn-primary {
    flex: 1;
    padding: 12px 20px;
    background: #3ea6ff;
    border: none;
    border-radius: 20px;
    color: #ffffff;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.share-btn-primary:hover {
    background: #2d8ce8;
}

.share-btn-secondary {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: 1px solid #3f3f3f;
    border-radius: 20px;
    color: #f1f1f1;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.share-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #606060;
}

@media (max-width: 767.98px) {
    .share-modal-content {
        width: 95%;
        padding: 1.25rem;
        max-height: 85vh;
        max-height: 85dvh; /* Dynamic viewport for mobile */
    }
    
    .share-actions {
        flex-direction: column;
    }
    
    .share-btn-primary,
    .share-btn-secondary {
        width: 100%;
        min-height: 44px; /* Better touch target */
    }
}

/* ========================================
   VIDEO SOURCE & METADATA BADGES
   ======================================== */

/* Video Source Badges */
.video-source-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
    display: flex;
    gap: 4px;
}

.source-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    transition: all 0.2s ease;
}

.source-badge:hover {
    transform: scale(1.05);
    background: rgba(0, 0, 0, 0.9);
}

.source-youtube {
    background: rgba(255, 0, 0, 0.8);
    color: #ffffff;
}

.source-tmdb {
    background: rgba(1, 210, 119, 0.8);
    color: #ffffff;
}

.source-video {
    background: rgba(62, 166, 255, 0.8);
    color: #ffffff;
}

/* Metadata Badges */
.video-metadata-badges {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.metadata-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.75em;
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    cursor: help;
    transition: all 0.2s ease;
}

.metadata-badge:hover {
    transform: scale(1.2);
    background: rgba(0, 0, 0, 0.9);
}

.metadata-gps {
    background: rgba(34, 197, 94, 0.8);
    color: #ffffff;
}

.metadata-comment {
    background: rgba(59, 130, 246, 0.8);
    color: #ffffff;
}

.metadata-youtube {
    background: rgba(255, 0, 0, 0.8);
    color: #ffffff;
}

.metadata-tmdb {
    background: rgba(1, 210, 119, 0.8);
    color: #ffffff;
}

/* Video Year Badge */
.video-year {
    font-size: 0.85em;
    color: #aaaaaa;
    font-weight: normal;
    margin-left: 4px;
}

/* Compliance Badge */
.video-compliance-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 9; /* Below metadata badges (z-index: 10) */
    display: flex;
    gap: 4px;
    flex-direction: column; /* Stack vertically if multiple badges */
    align-items: flex-end; /* Align to right */
}

.compliance-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(8px);
    color: #ffffff;
    transition: all 0.2s ease;
    opacity: 1; /* Ensure full opacity */
}

.compliance-badge:hover {
    transform: scale(1.05);
}

.compliance-compliant {
    background: rgba(34, 197, 94, 0.9); /* Green */
    color: #ffffff;
}

.compliance-partial {
    background: rgba(251, 191, 36, 0.9); /* Yellow/Orange */
    color: #ffffff;
}

.compliance-non-compliant {
    background: rgba(239, 68, 68, 0.9); /* Red */
    color: #ffffff;
    opacity: 0.85; /* Slightly transparent to indicate non-compliance, but still visible */
}

/* ========================================
   USER TAGS SYSTEM
   ======================================== */

.tag-badge {
    transition: all 0.2s ease;
    user-select: none;
}

.tag-badge:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.tag-cloud {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    min-height: 100px;
}

.tag-cloud-item {
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.tag-cloud-item:hover {
    color: #60a5fa !important;
    transform: scale(1.1);
    text-decoration: underline !important;
}

#theaterTagsContainer .input-group {
    max-width: 400px;
}

#theaterTagsContainer .tag-badge {
    margin: 0.25rem;
}

#theaterTagCloudContainer {
    max-height: 300px;
    overflow-y: auto;
}

#theaterTagCloudContainer::-webkit-scrollbar {
    width: 6px;
}

#theaterTagCloudContainer::-webkit-scrollbar-track {
    background: #181818;
}

#theaterTagCloudContainer::-webkit-scrollbar-thumb {
    background: #3f3f3f;
    border-radius: 3px;
}

