* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0f0f0f;
    --bg-secondary: #272727;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --accent: #BF40BF;
    --border: #3f3f3f;
    --like-color: #4CAF50;
    --dislike-color: #f44336;
    --header-height: 60px;
    --success-color: #4CAF50;
    --error-color: #f44336;
    --warning-color: #ff9800;
}

/* Light mode colors */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --text-primary: #000000;
    --text-secondary: #666666;
    --accent: #BF40BF;
    --border: #e0e0e0;
    --like-color: #4CAF50;
    --dislike-color: #f44336;
    --success-color: #4CAF50;
    --error-color: #f44336;
    --warning-color: #e67700;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Header */
header {
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border);
    z-index: 100;
    transition: background-color 0.3s ease;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.search-bar {
    justify-self: center;
    width: 100%;
    max-width: 600px;
    display: flex;
}

.search-bar input {
    flex: 1;
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.upload-btn {
    padding: 0.5rem 1rem;
    background: #1da1f2;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-weight: 500;
}

.theme-toggle {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.theme-toggle:hover {
    background: var(--border);
}

.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    cursor: pointer;
    color: var(--text-primary);
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.menu-toggle:hover {
    background: var(--bg-secondary);
}

/* Sidebar */
.container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 72px;
    /* Space for fixed sidebar */
}

/* Desktop collapsed sidebar (icons only) - always fixed position */
.sidebar {
    width: 72px;
    padding: 0.5rem;
    border-right: 1px solid var(--border);
    transition: width 0.2s ease, background-color 0.3s ease;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: fixed;
    top: 60px;
    left: 0;
    height: calc(100vh - 60px);
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    z-index: 99;
}

.sidebar::-webkit-scrollbar {
    display: none;
}

/* Expanded sidebar (overlay) */
.sidebar.expanded {
    top: 0;
    width: 240px;
    z-index: 101;
    padding: 1rem;
    padding-top: 0;
    padding-bottom: 1rem;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.3);
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sidebar.expanded::-webkit-scrollbar {
    display: block;
    width: 6px;
}

.sidebar.expanded::-webkit-scrollbar-track {
    background: transparent;
}

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

.sidebar.expanded::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Sidebar header with hamburger and logo (only visible when expanded) */
.sidebar-header-expanded {
    display: none;
    align-items: center;
    gap: 1rem;
    /* Match header exactly */
    padding: 0.5rem 1rem;
    margin: 0 -1rem 0.5rem -1rem;
    box-sizing: border-box;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1;
}

.sidebar.expanded .sidebar-header-expanded {
    display: flex;
}

.sidebar-header-expanded .menu-toggle {
    flex-shrink: 0;
}

.sidebar-header-expanded .logo {
    font-size: 1.5rem;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.sidebar-overlay.active {
    display: block;
}

/* Sidebar icon styling */
.sidebar-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    min-width: 20px;
}

/* Sidebar label - hidden when collapsed */
.sidebar-label {
    white-space: nowrap;
    overflow: hidden;
    opacity: 0;
    width: 0;
    transition: opacity 0.2s ease, width 0.2s ease;
}

/* Show labels in expanded state */
.sidebar.expanded .sidebar-label {
    opacity: 1;
    width: auto;
    margin-left: 12px;
}

/* Sidebar divider */
.sidebar-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0.5rem 0;
}

.sidebar.expanded .sidebar-divider {
    margin: 1rem 0;
}

/* Section title */
.sidebar-section-title {
    padding: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    overflow: hidden;
}

.sidebar.expanded .sidebar-section-title {
    padding: 0 1rem;
    margin-bottom: 0.5rem;
    text-align: left;
}

.sidebar-section-title .sidebar-label {
    opacity: 0;
    width: 0;
}

.sidebar.expanded .sidebar-section-title .sidebar-label {
    opacity: 1;
    width: auto;
    margin-left: 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 0.25rem;
    transition: background 0.2s;
}

.sidebar.expanded .sidebar-item {
    justify-content: flex-start;
    padding: 0.75rem 1rem;
}

.sidebar-item:hover {
    background: var(--bg-secondary);
}

.sidebar-item.active {
    background: var(--bg-secondary);
    font-weight: 500;
}

/* Sidebar footer */
.sidebar-footer {
    margin-top: auto;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    overflow: hidden;
}

.sidebar.expanded .sidebar-footer {
    padding: 1rem;
    padding-bottom: 3rem;
    overflow: visible;
    flex-shrink: 0;
    margin-top: auto;
}

.sidebar-footer-links {
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.sidebar.expanded .sidebar-footer-links {
    display: flex;
}

.sidebar-footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.2s;
}

.sidebar-footer-link:hover {
    color: var(--text-primary);
}

.sidebar-footer-credits {
    line-height: 1.8;
}

/* Hide credits text when collapsed, show only in expanded */
.sidebar:not(.expanded) .sidebar-footer-credits {
    display: none;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 1.5rem;
    transition: background-color 0.3s ease;
    overflow-x: hidden;
    max-width: 100%;
}

/* Trending Section with Carousel */
.trending-section {
    position: relative;
}

.trending-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}

.trending-header h2 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trending-tabs {
    display: flex;
    gap: 0.5rem;
}

.trending-tab {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.trending-tab:hover {
    background: var(--border);
}

.trending-tab.active {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Carousel Container */
.trending-carousel-container {
    position: relative;
    overflow: visible;
}

.trending-carousel-wrapper {
    overflow: hidden;
}

.trending-grid {
    display: flex;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.trending-grid .video-card {
    flex-shrink: 0;
}

/* Carousel Navigation Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--accent);
    transform: translateY(-50%) scale(1.1);
}

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

.carousel-btn:disabled:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%);
}

.carousel-btn.prev {
    left: 8px;
}

.carousel-btn.next {
    right: 8px;
}

.carousel-btn svg {
    width: 24px;
    height: 24px;
}

/* Carousel Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.carousel-dot.active {
    background: var(--accent);
    width: 24px;
    border-radius: 4px;
}

/* Home Feed Sections */
.home-section {
    margin-bottom: 2rem;
}

.home-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.home-section-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.home-section-header h2 svg {
    width: 24px;
    height: 24px;
}

.view-more-container {
    text-align: center;
    margin-top: 1rem;
}

.trending-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--accent);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.section-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    padding: 0.5rem;
}

.video-card {
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    max-width: 100%;
    width: 100%;
    height: auto;
    padding: 0.5rem;
    border-radius: 12px;
    margin: -0.5rem;
    margin-bottom: 0;
}

.video-card:hover {
    background: var(--bg-secondary);
}

.video-thumbnail {
    position: relative;
    padding-bottom: 56.25%;
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
}

.video-thumbnail img,
.video-thumbnail video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumbnail.nsfw img,
.video-thumbnail.nsfw video,
.video-thumbnail.ratioed img,
.video-thumbnail.ratioed video {
    filter: blur(20px);
}

.nsfw-overlay,
.ratioed-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-weight: 500;
}

.nsfw-badge {
    background: rgba(255, 0, 0, 0.8);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.ratioed-badge {
    background: rgba(255, 152, 0, 0.8);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

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

.video-reactions {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: flex;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.reaction-count {
    background: rgba(0, 0, 0, 0.8);
    padding: 2px 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: white;
    transition: all 0.3s ease;
}

.reaction-count.likes svg {
    color: var(--like-color);
}

.reaction-count.dislikes svg {
    color: var(--dislike-color);
}

.video-info {
    padding: 0.75rem 0;
    max-width: 100%;
}

.video-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.video-meta {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* History remove button */
.history-card {
    position: relative;
}

.history-remove-btn {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    color: white;
}

.history-remove-btn:hover {
    background: rgba(220, 53, 69, 0.9);
}

.history-remove-btn svg {
    width: 16px;
    height: 16px;
}

.channel-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    max-width: 100%;
}

.channel-info:hover .channel-name {
    color: var(--accent);
}

.channel-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    overflow: hidden;
    flex-shrink: 0;
    transition: background-color 0.3s ease;
}

.channel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.channel-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-width: calc(100% - 36px - 0.5rem);
}

.channel-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
    max-width: 100%;
}

.channel-nip05 {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.channel-nip05 .nip05-verified {
    color: #1da1f2;
    flex-shrink: 0;
}

.channel-nip05 .nip05-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Video Player Page */
.video-player-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.video-player {
    position: relative;
    padding-bottom: 56.25%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    width: 100%;
}

.video-player video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-loading-state {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #000;
    color: var(--text-secondary);
    gap: 1rem;
}

.video-loading-state p {
    margin: 0;
    font-size: 0.9rem;
}

.video-loading-state .error-message {
    color: var(--text-primary);
    text-align: center;
    padding: 1rem;
}

/* Auto-play next video overlay */
.next-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 2rem;
    box-sizing: border-box;
}

.next-video-overlay .overlay-header {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.next-video-overlay .countdown-ring {
    width: 40px;
    height: 40px;
    position: relative;
}

.next-video-overlay .countdown-ring svg {
    transform: rotate(-90deg);
    width: 40px;
    height: 40px;
}

.next-video-overlay .countdown-ring circle {
    fill: none;
    stroke-width: 3;
}

.next-video-overlay .countdown-ring .bg {
    stroke: var(--border);
}

.next-video-overlay .countdown-ring .progress {
    stroke: var(--accent);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s linear;
}

.next-video-overlay .countdown-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1rem;
    font-weight: 600;
    color: white;
}

.next-video-overlay .next-video-card {
    display: flex;
    gap: 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1rem;
    max-width: 400px;
    width: 100%;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.next-video-overlay .next-video-card:hover {
    background: var(--bg-primary);
    transform: scale(1.02);
}

.next-video-overlay .next-video-thumbnail {
    width: 160px;
    height: 90px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-primary);
}

.next-video-overlay .next-video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.next-video-overlay .next-video-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
    min-width: 0;
}

.next-video-overlay .next-video-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.next-video-overlay .next-video-channel {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.next-video-overlay .overlay-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.next-video-overlay .overlay-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.next-video-overlay .overlay-btn.cancel {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.next-video-overlay .overlay-btn.cancel:hover {
    background: var(--bg-primary);
}

.next-video-overlay .overlay-btn.play-now {
    background: var(--accent);
    color: white;
}

.next-video-overlay .overlay-btn.play-now:hover {
    filter: brightness(1.1);
}

@media (max-width: 480px) {
    .next-video-overlay .next-video-card {
        flex-direction: column;
        max-width: 280px;
    }

    .next-video-overlay .next-video-thumbnail {
        width: 100%;
        height: 0;
        padding-bottom: 56.25%;
        position: relative;
    }

    .next-video-overlay .next-video-thumbnail img {
        position: absolute;
        top: 0;
        left: 0;
    }
}

.video-details {
    padding: 1rem;
    max-width: 100%;
}

.video-channel-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    transition: background-color 0.3s ease;
    max-width: 100%;
}

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

.video-channel-info .channel-avatar {
    width: 48px;
    height: 48px;
}

.video-channel-info .channel-details {
    max-width: calc(100% - 48px - 0.5rem);
}

.channel-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.channel-stat {
    white-space: nowrap;
}

.channel-stat.loading {
    opacity: 0.6;
}

.channel-stat .stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

.channel-stat-separator {
    color: var(--text-secondary);
    opacity: 0.5;
}

.channel-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.channel-follow-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    background: var(--accent);
    border: none;
    border-radius: 20px;
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 90px;
    height: 36px;
}

.channel-follow-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.channel-follow-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.channel-follow-btn.following {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.channel-follow-btn.following:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgb(239, 68, 68);
    color: rgb(239, 68, 68);
}

.channel-follow-btn.loading {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.video-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

/* Owner actions row (Edit/Delete buttons) - forces new row, 50% width each */
.video-owner-actions-row {
    display: flex;
    gap: 1rem;
    flex: 0 0 100%;
    margin-top: 0.5rem;
}

.video-owner-actions-row .action-btn {
    flex: 1 1 0;
    min-width: 0;
}

.video-owner-actions-row .action-btn.edit {
    background: var(--accent);
    color: white;
}

.video-owner-actions-row .action-btn.edit:hover {
    background: var(--accent);
    color: white;
    filter: brightness(1.1);
}

.video-owner-actions-row .action-btn.delete {
    background: var(--error-color);
    color: white;
}

.video-owner-actions-row .action-btn.delete:hover {
    background: var(--error-color);
    color: white;
    filter: brightness(1.1);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: none;
    border-radius: 20px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    min-width: calc(25% - 0.375rem);
}

.action-btn:hover {
    transform: translateY(-2px);
}

/* View More button - inline centered style */
.action-btn.view-more-btn {
    display: inline-flex;
    flex: none;
    min-width: auto;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    justify-content: center;
}

.action-btn.like.active {
    background: var(--like-color);
    color: white;
}

.action-btn.dislike.active {
    background: var(--dislike-color);
    color: white;
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.action-btn .count {
    font-weight: 500;
}

.action-btn.delete {
    background: var(--dislike-color);
    color: white;
}

.action-btn.delete:hover {
    background: #d32f2f;
}

/* Edit and Delete buttons side by side */
.action-btn.edit,
.action-btn.delete {
    min-width: auto;
}

/* Zap button styling */
.action-btn.zap.active {
    background: #f7931a;
    color: white;
}

.action-btn.zap.active:hover:not(.self-content) {
    background: #e8841a;
}

.action-btn.zap.self-content {
    cursor: not-allowed !important;
    opacity: 0.5;
}

.action-btn.zap.self-content:hover {
    background: var(--bg-secondary) !important;
    color: var(--text-secondary) !important;
}

/* Boost button styling */
.action-btn.boost {
    color: var(--text-primary);
}

.action-btn.boost:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
}

.action-btn.boost.active {
    background: linear-gradient(135deg, #f7931a 0%, #ff9500 100%);
    color: white;
    box-shadow: 0 0 20px rgba(247, 147, 26, 0.5);
}

/* Boosted video card styling */
.video-card.boosted {
    position: relative;
    background: rgba(247, 147, 26, 0.15);
}

.video-card.boosted:hover {
    background: rgba(247, 147, 26, 0.25);
}

.video-card.boosted.boost-level-1 {
    background: rgba(247, 147, 26, 0.1);
}

.video-card.boosted.boost-level-1:hover {
    background: rgba(247, 147, 26, 0.18);
}

.video-card.boosted.boost-level-2 {
    background: rgba(247, 147, 26, 0.15);
}

.video-card.boosted.boost-level-2:hover {
    background: rgba(247, 147, 26, 0.23);
}

.video-card.boosted.boost-level-3 {
    background: rgba(247, 147, 26, 0.2);
}

.video-card.boosted.boost-level-3:hover {
    background: rgba(247, 147, 26, 0.28);
}

.video-card.boosted.boost-level-4 {
    background: rgba(247, 147, 26, 0.25);
    box-shadow: 0 0 20px rgba(247, 147, 26, 0.3);
}

.video-card.boosted.boost-level-4:hover {
    background: rgba(247, 147, 26, 0.35);
}

/* Boost indicator badge */
.boost-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #f7931a 0%, #ff9500 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.boost-indicator svg {
    width: 12px;
    height: 12px;
}

/* Trending badge with boost */
.trending-badge.with-boost {
    background: linear-gradient(135deg, var(--accent), #f7931a);
}

/* Profile zap button positioning */
.profile-zap {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

/* Custom zap button in profile */
.profile-zap-btn {
    padding: 0.5rem 1rem;
    background: #f7931a;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-zap-btn:hover:not(.self-content) {
    background: #e8841a;
}

/* Self-content style - prevent zapping own content */
.self-content {
    cursor: not-allowed !important;
    opacity: 0.5;
}

.self-content:hover {
    background: inherit !important;
}

.profile-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-bottom: 2rem;
    transition: background-color 0.3s ease;
    max-width: 100%;
}

/* Style the nostr-zap component */
nostr-zap {
    --nostr-zap-primary-color: var(--accent);
}

/* Ratioed Modal */
.ratioed-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

.ratioed-modal.active {
    display: flex;
}

.ratioed-modal-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    text-align: center;
    transition: background-color 0.3s ease;
}

.ratioed-modal h2 {
    margin-bottom: 1rem;
    color: #ff9800;
}

.ratioed-modal p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.ratioed-modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.ratioed-modal-buttons button {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: opacity 0.2s;
}

.ratioed-modal-buttons button:hover {
    opacity: 0.8;
}

.ratioed-modal-buttons .proceed {
    background: #ff9800;
    color: white;
}

.ratioed-modal-buttons .cancel {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.ratioed-remember {
    margin-top: 1rem;
    font-size: 0.875rem;
}

/* Report Modal (NIP-56) */
.report-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

.report-modal.active {
    display: flex;
}

.report-modal-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transition: background-color 0.3s ease;
}

.report-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.report-modal h2 {
    margin: 0;
    color: var(--text-primary);
}

.report-modal .close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    line-height: 1;
}

.report-modal .close-modal:hover {
    color: var(--text-primary);
}

.report-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.report-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-primary);
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: border-color 0.2s, background-color 0.2s;
}

.report-option:hover {
    border-color: var(--border);
}

.report-option input[type="radio"] {
    margin-top: 0.25rem;
    accent-color: #ff4444;
}

.report-option input[type="radio"]:checked + .report-option-label strong {
    color: #ff4444;
}

.report-option-label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.report-option-label strong {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.report-option-label small {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.report-modal .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.report-modal textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    resize: vertical;
}

.report-modal textarea:focus {
    outline: none;
    border-color: #ff4444;
}

.report-modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.report-modal-buttons button {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: opacity 0.2s;
}

.report-modal-buttons button:hover {
    opacity: 0.8;
}

.report-modal-buttons button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.report-modal-buttons .submit {
    background: #ff4444;
    color: white;
}

.report-modal-buttons .cancel {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

/* Report flag link in video meta */
.report-flag {
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.report-flag:hover {
    color: #ff4444;
}

/* Upload Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transition: background-color 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.file-upload {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.3s ease;
}

.file-upload:hover {
    border-color: var(--accent);
}

.file-upload.active {
    border-color: var(--accent);
    background: rgba(191, 64, 191, 0.1);
}

.upload-progress {
    margin-top: 1rem;
    display: none;
}

.progress-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    transition: width 0.3s;
}

/* Upload Item Progress */
.upload-item-progress {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 0.75rem;
}

.upload-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.upload-item-name {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60%;
}

.upload-item-status {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: right;
}

.upload-item-status.success {
    color: #22c55e;
}

.upload-item-status.error {
    color: var(--error-color);
}

.upload-item-status.processing {
    color: var(--accent);
}

.upload-item-details {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.upload-item-progress .progress-bar {
    height: 6px;
    margin-top: 0.5rem;
}

.thumbnail-upload {
    padding: 1rem;
    min-height: auto;
}

.thumbnail-upload svg {
    margin-bottom: 0.25rem;
}

.thumbnail-upload p {
    font-size: 0.875rem;
}

/* Publish button states */
.upload-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.upload-btn.ready {
    background: #1da1f2;
    animation: pulse-ready 2s infinite;
}

@keyframes pulse-ready {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(var(--accent-rgb), 0);
    }
}

/* NSFW Modal */
.nsfw-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

.nsfw-modal.active {
    display: flex;
}

.nsfw-modal-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    text-align: center;
    transition: background-color 0.3s ease;
}

.nsfw-modal h2 {
    margin-bottom: 1rem;
    color: var(--accent);
}

.nsfw-modal p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.nsfw-modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.nsfw-modal-buttons button {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: opacity 0.2s;
}

.nsfw-modal-buttons button:hover {
    opacity: 0.8;
}

.nsfw-modal-buttons .confirm {
    background: var(--accent);
    color: white;
}

.nsfw-modal-buttons .cancel {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nsfw-remember {
    margin-top: 1rem;
    font-size: 0.875rem;
}

/* Confirmation Modal */
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2001;
    padding: 1rem;
}

.confirm-modal.active {
    display: flex;
}

.confirm-modal-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    max-width: 450px;
    width: 100%;
    text-align: center;
    transition: background-color 0.3s ease;
}

.confirm-modal h2 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.confirm-modal p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.confirm-modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.confirm-modal-buttons button {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: opacity 0.2s;
    min-width: 100px;
}

.confirm-modal-buttons button:hover {
    opacity: 0.8;
}

.confirm-modal-buttons .confirm {
    background: var(--accent);
    color: white;
}

.confirm-modal-buttons .confirm.danger {
    background: #dc3545;
}

.confirm-modal-buttons .cancel {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Share Modal */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    padding: 1rem;
}

.share-modal.active {
    display: flex;
}

.share-modal-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    transition: background-color 0.3s ease;
}

.share-url {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.share-url input {
    flex: 1;
    padding: 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: monospace;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.copy-btn {
    padding: 0.75rem 1rem;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-weight: 500;
}

.copy-btn:hover {
    opacity: 0.8;
}

/* Share Modal Tabs */
.share-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
}

.share-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.share-tab:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.share-tab.active {
    background: var(--accent);
    color: white;
}

.share-tab svg {
    flex-shrink: 0;
}

.share-tab-content {
    display: none;
}

.share-tab-content.active {
    display: block;
}

/* Embed options */
.embed-size-options {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.embed-size-options label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.embed-size-options select {
    flex: 1;
    padding: 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
}

.share-url textarea {
    flex: 1;
    padding: 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: monospace;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

/* Profile follow button */
.profile-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.profile-follow-btn {
    padding: 0.5rem 1rem;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.profile-follow-btn:hover {
    opacity: 0.9;
}

.profile-follow-btn.following {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.profile-follow-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Profile View */
.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--bg-primary);
    overflow: hidden;
    flex-shrink: 0;
    transition: background-color 0.3s ease;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.profile-nip05 {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.profile-nip05 .nip05-verified {
    color: #1da1f2;
    flex-shrink: 0;
}

.profile-nip05 .nip05-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-bio-container {
    position: relative;
    margin-top: 1rem;
}

.profile-bio {
    position: relative;
    overflow: hidden;
    line-height: 1.6;
    transition: max-height 0.3s ease;
}

.profile-bio.collapsed {
    max-height: 100px;
}

.profile-bio.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to bottom, transparent, var(--bg-primary));
    pointer-events: none;
}

.bio-toggle-btn {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.bio-toggle-btn:hover {
    background: var(--accent);
    color: var(--bg-primary);
}

.profile-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.profile-stat {
    white-space: nowrap;
}

.profile-stat.loading {
    opacity: 0.6;
}

.profile-stat .stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

.profile-stat-separator {
    color: var(--text-secondary);
    opacity: 0.5;
}

.profile-website {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.profile-website svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.profile-website a {
    color: var(--accent);
    text-decoration: none;
    word-break: break-all;
}

.profile-website a:hover {
    text-decoration: underline;
}

/* Notification toggle */
.notification-toggle {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.notification-toggle:hover {
    background: var(--border);
}

/* Notification badge */
.notification-toggle {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #f7931a;
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Notifications Modal */
.notifications-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    padding: 1rem;
}

.notifications-modal.active {
    display: flex;
}

.notifications-modal-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    transition: background-color 0.3s ease;
}

.notifications-list {
    max-height: 60vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notification-item {
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
    gap: 1rem;
}

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

.notification-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.notification-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-secondary);
    overflow: hidden;
    flex-shrink: 0;
}

.notification-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.notification-link {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.notification-link:hover {
    color: var(--accent);
    background: var(--bg-secondary);
}

.notification-item:hover {
    background: var(--bg-secondary);
}

.notification-item a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.notification-item a:hover {
    color: var(--text-primary);
}

/* Comments System - Reddit-style */
.comments-section {
    margin-top: 2rem;
    padding: 0;
    background: transparent;
    border-radius: 0;
    transition: background-color 0.3s ease;
    max-width: 100%;
    width: 100%;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.comments-section h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.comments-sort-dropdown select {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.comments-sort-dropdown select:hover {
    border-color: var(--accent);
}

.comments-sort-dropdown select:focus {
    outline: none;
    border-color: var(--accent);
}

/* Comment Input */
.comment-input-container {
    margin-bottom: 1.5rem;
}

.comment-input-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.2s ease;
}

.comment-input-box:focus-within {
    border-color: var(--accent);
    background: var(--bg-primary);
}

.replying-to {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.cancel-reply {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0 0.25rem;
    transition: color 0.2s;
}

.cancel-reply:hover {
    color: var(--accent);
}

.comment-textarea {
    width: 100%;
    padding: 0.625rem 0.75rem;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9375rem;
    resize: vertical;
    min-height: 60px;
    transition: background-color 0.2s ease;
    line-height: 1.5;
}

.comment-textarea:focus {
    outline: none;
    background: var(--bg-primary);
}

.comment-textarea:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.comment-input-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.comment-submit-btn {
    padding: 0.5rem 1rem;
    background: var(--accent);
    border: none;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8125rem;
    transition: background-color 0.15s ease, opacity 0.15s ease;
}

.comment-submit-btn:hover:not(:disabled) {
    opacity: 0.85;
}

.comment-submit-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.comment-login-prompt {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Comments Container */
#comments-container {
    margin-top: 1rem;
}

.comment {
    position: relative;
    margin-bottom: 0;
    padding-left: 1.25rem;
    transition: background-color 0.15s ease;
}

/* Thread lines - YouTube curved style */
.comment-thread-line {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: transparent;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

/* Curved connector from parent thread to comment */
.comment-thread-line::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 12px;
    height: 20px;
    border-left: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
    border-bottom-left-radius: 10px;
    background: transparent;
}

/* Vertical continuation line for comments with children */
.comment-thread-line::after {
    content: '';
    position: absolute;
    left: 0;
    top: 20px;
    bottom: 0;
    width: 2px;
    background: var(--border);
    display: none;
}

/* Show vertical line when comment has replies */
.comment:has(.comment-children:not(:empty))>.comment-thread-line::after {
    display: block;
}

.comment-thread-line:hover::before {
    border-color: #1da1f2;
}

.comment-thread-line:hover::after {
    background: #1da1f2;
}

.comment[data-depth="1"]>.comment-thread-line,
.comment[data-depth="2"]>.comment-thread-line,
.comment[data-depth="3"]>.comment-thread-line {
    opacity: 1;
}

.comment:hover>.comment-thread-line::before {
    border-color: #1da1f2;
}

.comment:hover>.comment-thread-line::after {
    background: #1da1f2;
}

.comment[data-depth="0"] {
    margin-left: 0;
    padding-left: 0;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.comment[data-depth="0"]:first-child {
    border-top: none;
    padding-top: 0;
}

.comment[data-depth="1"] {
    margin-left: 0.75rem;
}

.comment[data-depth="2"] {
    margin-left: 0.75rem;
}

.comment[data-depth="3"] {
    margin-left: 0.75rem;
}

.comment[data-depth="0"]>.comment-thread-line {
    display: none;
}

.comment-content {
    position: relative;
    background: transparent;
    border-radius: 0;
    padding: 0.5rem 0;
    transition: background-color 0.15s ease;
    margin-left: 0;
}

.comment:hover>.comment-content {
    background: transparent;
}

[data-theme="light"] .comment:hover>.comment-content {
    background: transparent;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
    flex-wrap: wrap;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    text-decoration: none;
    color: inherit;
}

.comment-author:hover .comment-author-name {
    text-decoration: underline;
}

.comment-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-secondary);
    overflow: hidden;
    flex-shrink: 0;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-author-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.375rem;
}

.comment-author-name {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-primary);
    transition: color 0.15s;
}

.comment-author-nip05 {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.comment-author-nip05::before {
    content: "·";
    margin-right: 0.375rem;
    color: var(--text-secondary);
}

.comment-author-nip05 .nip05-verified {
    color: #1da1f2;
    margin-left: 0.25rem;
    vertical-align: middle;
}

.comment-timestamp {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.comment-timestamp::before {
    content: "·";
    margin-right: 0.375rem;
}

.comment-depth-indicator {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 0.25rem;
}

.comment-body {
    margin-bottom: 0.375rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    word-break: break-word;
    hyphens: auto;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

/* Comment media styles */
.comment-media {
    margin-top: 0.5rem;
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.comment-media img {
    max-width: 100%;
    height: auto;
    cursor: pointer;
    display: block;
}

.comment-media video {
    max-width: 100%;
    height: auto;
    display: block;
}

.comment-media.youtube-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    margin-top: 0.5rem;
}

.comment-media.youtube-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.comment-link {
    color: var(--accent);
    text-decoration: underline;
    word-break: break-word;
}

.comment-link:hover {
    opacity: 0.8;
}

.text-link {
    color: var(--accent);
    text-decoration: underline;
    word-break: break-word;
}

.text-link:hover {
    opacity: 0.8;
}

.comment-media,
.comment-media img,
.comment-media video,
.comment-media iframe {
    max-width: 100% !important;
}

.comment-actions {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.comment-action-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: none;
    border-radius: 16px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.comment-action-btn:hover:not(:disabled) {
    background: var(--bg-secondary);
}

/* Like button hover - green */
.comment-like-btn:hover:not(:disabled) {
    color: rgb(34, 197, 94);
    background: rgba(34, 197, 94, 0.1);
}

/* Dislike button hover - red */
.comment-dislike-btn:hover:not(:disabled) {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Reply button hover - accent color */
.comment-reply-btn:hover:not(:disabled) {
    color: var(--accent);
    background: rgba(139, 92, 246, 0.1);
}

/* Zap button hover - Bitcoin orange */
.comment-zap-btn:hover:not(:disabled):not(.self-content) {
    color: #f7931a;
    background: rgba(247, 147, 26, 0.1);
}

.comment-zap-btn.self-content {
    cursor: not-allowed !important;
    opacity: 0.5;
}

.comment-zap-btn.self-content:hover {
    color: var(--text-secondary) !important;
    background: transparent !important;
}

.comment-action-btn.active {
    color: var(--accent);
    background: transparent;
}

.comment-action-btn.active:hover {
    background: var(--bg-secondary);
}

/* Like button active state - green to match hover */
.comment-like-btn.active {
    color: rgb(34, 197, 94);
    background: transparent;
}

.comment-like-btn.active:hover {
    background: rgba(34, 197, 94, 0.1);
}

/* Dislike button active state - red to match hover */
.comment-dislike-btn.active {
    color: #ef4444;
    background: transparent;
}

.comment-dislike-btn.active:hover {
    background: rgba(239, 68, 68, 0.1);
}

.comment-action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.comment-action-btn svg {
    width: 14px;
    height: 14px;
}

.like-count,
.zap-count {
    font-weight: 600;
}

.comment-children {
    margin-top: 0;
    position: relative;
}

.comment-children.collapsed {
    display: none !important;
}

.comment-expand-btn-wrapper {
    position: relative;
    padding-left: 1.25rem;
    margin: 0.25rem 0;
}

/* Curved thread line for expand button */
.comment-expand-btn-wrapper::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 12px;
    height: 18px;
    border-left: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
    border-bottom-left-radius: 10px;
    background: transparent;
}

.comment-expand-btn-wrapper:hover::before {
    border-color: var(--accent);
}

/* Show vertical line on comment when followed by expand button */
.comment:has(+ .comment-expand-btn-wrapper) > .comment-thread-line::after {
    display: block;
}

.comment-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 1rem;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.4rem 0.75rem;
    transition: all 0.2s;
}

.comment-expand-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent);
}

.comment-expand-btn svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

.comment-reply-box {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding-left: 1.25rem;
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--border);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tag {
    padding: 0.25rem 0.75rem;
    background: var(--bg-primary);
    border-radius: 16px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.tag:hover {
    background: var(--accent);
    color: white;
}

.error-message {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.success-message {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #00ff00;
    color: #00ff00;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

@media (hover: none) and (pointer: coarse) {

    .action-btn,
    .comment-action-btn,
    .tag,
    .sidebar-item {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

@supports (-webkit-touch-callout: none) {
    .video-player video {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
}

/* Compression UI Styles */
.compression-settings {
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.compression-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.compression-toggle input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.compression-quality {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.compression-quality select {
    flex: 1;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
}

.compression-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

#compressionProgress {
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

#compressionStatus {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.compression-stats {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.compression-stats strong {
    color: var(--accent);
}

/* Update file upload area */
.file-upload.active {
    background: var(--bg-primary);
    border-color: var(--accent);
}

.file-upload p {
    margin: 0.25rem 0;
}

.file-upload-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.video-description-container {
    position: relative;
}

.video-description {
    position: relative;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.video-description.collapsed {
    max-height: 100px;
}

.video-description.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to bottom, transparent, var(--bg-primary));
    pointer-events: none;
}

.description-toggle-btn {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.description-toggle-btn:hover {
    background: var(--accent);
    color: var(--bg-primary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    :root {
        --header-height: auto;
    }

    .sidebar-header-expanded {
        gap: 0.5rem;
    }

    .comments-section {
        padding: 0;
    }

    .comment[data-depth="1"],
    .comment[data-depth="2"],
    .comment[data-depth="3"] {
        margin-left: 0.5rem;
    }

    .comment {
        padding-left: 1rem;
    }

    .comment[data-depth="0"] {
        padding-left: 0;
    }

    /* Adjust curved thread line for tablet */
    .comment-thread-line::before {
        width: 10px;
        height: 18px;
        border-bottom-left-radius: 8px;
    }

    .comment-thread-line::after {
        top: 18px;
    }

    .comment-content {
        padding: 0.375rem 0;
    }

    .comment-header {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    /* Mobile: remove sidebar padding from container */
    .container {
        padding-left: 0;
    }

    /* Mobile: hide collapsed sidebar completely, show only when expanded */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 240px;
        z-index: 101;
        transform: translateX(-100%);
        box-shadow: 4px 0 10px rgba(0, 0, 0, 0.3);
        height: 100vh;
        height: 100dvh;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        padding: 1rem;
        padding-top: 0;
    }

    .sidebar.expanded {
        transform: translateX(0);
    }

    /* Show header in sidebar on mobile when expanded */
    .sidebar.expanded .sidebar-header-expanded {
        display: flex;
    }

    /* On mobile, always show labels (since sidebar is either hidden or expanded) */
    .sidebar .sidebar-label {
        opacity: 1;
        width: auto;
        margin-left: 12px;
    }

    .sidebar .sidebar-item {
        justify-content: flex-start;
        padding: 0.75rem 1rem;
    }

    .sidebar .sidebar-section-title {
        padding: 0 1rem;
        margin-bottom: 0.5rem;
        text-align: left;
    }

    .sidebar .sidebar-section-title .sidebar-label {
        opacity: 1;
        width: auto;
    }

    .sidebar .sidebar-footer {
        padding: 1rem;
    }

    .sidebar .sidebar-footer-links {
        display: flex;
    }

    .sidebar .sidebar-footer-credits {
        display: block;
    }

    .sidebar .sidebar-divider {
        margin: 1rem 0;
    }

    .sidebar> :last-child {
        padding-bottom: 2rem;
        padding-bottom: calc(2rem + env(safe-area-inset-bottom));
    }

    .sidebar::-webkit-scrollbar {
        width: 4px;
    }

    .sidebar::-webkit-scrollbar-track {
        background: transparent;
    }

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

    .sidebar {
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 0.75rem;
    }

    .trending-grid .video-card {
        flex-shrink: 0;
    }

    .carousel-btn {
        width: 35px;
        height: 35px;
    }

    .carousel-btn.prev {
        left: 10px;
    }

    .carousel-btn.next {
        right: 10px;
    }

    .header-content {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .menu-toggle {
        order: 1;
    }

    .logo {
        order: 2;
    }

    .search-bar {
        order: 4;
        justify-self: auto;
        flex: 0 0 100%;
        width: 100%;
        max-width: none;
    }

    .upload-btn {
        padding: 0.5rem;
    }

    .upload-btn .btn-text {
        display: none;
    }

    .header-actions {
        order: 3;
        margin-left: auto;
    }

    .trending-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .trending-tabs {
        width: 100%;
        justify-content: center;
    }

    .video-actions {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .video-actions .action-btn:nth-child(1),
    .video-actions .action-btn:nth-child(2),
    .video-actions .action-btn:nth-child(3) {
        grid-row: 1;
    }

    .video-actions .action-btn:nth-child(4),
    .video-actions .action-btn:nth-child(5),
    .video-actions .action-btn:nth-child(6) {
        grid-row: 2;
    }

    .video-actions .action-btn.delete {
        grid-row: 3;
        grid-column: 1 / -1;
        margin-left: 0;
        margin-top: 0;
    }

    .video-actions .action-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.875rem;
        min-width: auto;
    }

    .video-actions .action-btn svg {
        width: 18px;
        height: 18px;
    }

    .video-player-container {
        padding: 0;
    }

    .video-details {
        padding: 1rem;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .profile-actions {
        position: static;
        margin-top: 1rem;
        justify-content: center;
    }

    .profile-avatar {
        margin: 0 auto;
    }

    .comment-media {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        border-radius: 4px;
    }

    .comment-media img,
    .comment-media video {
        border-radius: 4px;
    }

    .modal-content,
    .nsfw-modal-content,
    .ratioed-modal-content,
    .share-modal-content,
    .notifications-modal-content,
    .confirm-modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }

    .video-channel-info {
        flex-direction: column;
        text-align: center;
    }

    .user-btn {
        order: 4;
    }

    .user-menu {
        order: 3;
    }

    .login-modal {
        margin: 1rem;
    }

    .login-option {
        padding: 0.75rem;
    }

    .login-option svg {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .comment-body {
        font-size: 0.875rem;
    }

    .comment[data-depth="1"],
    .comment[data-depth="2"],
    .comment[data-depth="3"] {
        margin-left: 0.375rem;
    }

    .comment {
        padding-left: 0.75rem;
    }

    .comment[data-depth="0"] {
        padding-left: 0;
    }

    /* Adjust curved thread line for mobile */
    .comment-thread-line::before {
        width: 8px;
        height: 16px;
        border-bottom-left-radius: 6px;
    }

    .comment-thread-line::after {
        top: 16px;
    }

    .comment-actions {
        gap: 0.125rem;
    }

    .comment-action-btn {
        font-size: 0.6875rem;
        padding: 0.25rem 0.375rem;
    }

    .comment-avatar {
        width: 20px;
        height: 20px;
    }

    .comment-author-name {
        font-size: 0.75rem;
    }

    .comment-media {
        margin-left: -1rem;
        margin-right: -1rem;
        border-radius: 0;
    }

    .comment-media img,
    .comment-media video {
        border-radius: 0;
    }

    .video-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .video-card {
        width: 100%;
    }

    .trending-grid {
        gap: 0.5rem;
    }

    .trending-grid .video-card {
        flex-shrink: 0;
    }

    .video-actions {
        gap: 0.25rem;
    }

    .video-actions .action-btn {
        min-width: calc(33.333% - 0.333rem);
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    .action-btn svg {
        width: 18px;
        height: 18px;
    }

    .video-actions .action-btn.delete {
        margin-top: 0.5rem;
        flex-basis: 100%;
        min-width: 100%;
    }

    .file-upload {
        padding: 1rem;
    }

    .modal-content {
        padding: 1rem;
    }

    .tags {
        gap: 0.25rem;
    }

    .tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }
}

body {
    overflow-x: hidden;
}

.main-content {
    overflow-x: hidden;
}

.comment-body {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.2s;
}

.user-btn:hover {
    background: var(--bg-secondary);
}

.user-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem;
    min-width: 150px;
    display: none;
    z-index: 1000;
}

.user-dropdown.active {
    display: block;
}

.user-dropdown button {
    width: 100%;
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
    text-align: left;
}

.user-dropdown button:hover {
    background: var(--bg-primary);
}

/* Login Modal */
.login-modal {
    max-width: 500px;
}

.login-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.login-option:hover {
    background: var(--bg-secondary);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.login-option svg {
    width: 48px;
    height: 48px;
    color: var(--accent);
    flex-shrink: 0;
}

.login-option span {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-primary);
    display: block;
}

.login-option p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.login-option.signup {
    background: #1da1f2;
    color: white;
}

.login-option.signup:hover {
    opacity: 0.9;
}

.login-option.signup svg,
.login-option.signup span,
.login-option.signup p {
    color: white;
}

.login-divider {
    text-align: center;
    margin: 1rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    position: relative;
}

.login-divider::before,
.login-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 60px);
    height: 1px;
    background: var(--border);
}

.login-divider::before {
    left: 0;
}

.login-divider::after {
    right: 0;
}

/* Form controls */
.form-control {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color 0.2s, background-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
}

/* Connect Modal */
.connect-steps {
    margin-top: 1rem;
}

.connect-step {
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.connect-step h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.bunker-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.bunker-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
}

.bunker-btn:hover {
    background: var(--accent);
    color: white;
}

.bunker-btn.active {
    background: var(--accent);
    color: white;
}

/* Private Key Modal */
.key-warning {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid #ff9800;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.key-warning h3 {
    color: #ff9800;
    margin: 0 0 0.5rem 0;
}

.key-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Profile generation */
.profile-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
    margin: 1rem 0;
}

.profile-preview-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    font-weight: bold;
}

.profile-preview-info h3 {
    margin: 0;
}

.profile-preview-info p {
    margin: 0.25rem 0 0 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* NIP-46 Connection Status */
.connection-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    border-radius: 20px;
    font-size: 0.875rem;
    margin-top: 1rem;
}

.connection-status.connecting {
    color: #ff9800;
}

.connection-status.connected {
    color: #4caf50;
}

.connection-status.error {
    color: #f44336;
}

.user-btn svg {
    color: var(--text-primary);
}

.bunker-option {
    color: var(--text-primary);
}

.bunker-option h4 {
    color: var(--text-primary);
}

.bunker-option p {
    color: var(--text-secondary);
}

.tab-btn {
    padding: 0.5rem 1.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    cursor: pointer;
    margin: 0 0.25rem;
    border-radius: 20px;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: var(--bg-secondary);
}

.tab-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.connect-tab {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.nostrconnect-qr-section {
    text-align: center;
}

.copy-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--accent);
    color: white;
}

.divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.divider span {
    background: var(--bg-secondary);
    padding: 0 1rem;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.server-status {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.server-status .server {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
}

.server-status .server svg {
    width: 16px;
    height: 16px;
    color: var(--success-color);
}

.server-status .server.failure svg {
    color: var(--error-color);
}

/* Server status in upload item progress */
.upload-item-progress .server-status {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
}

.upload-item-progress .server-status .server {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Upload Preview */
.upload-preview {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.upload-preview video {
    width: 100%;
    max-height: 200px;
    border-radius: 8px;
    background: #000;
}

.upload-preview img {
    width: 100%;
    max-height: 150px;
    object-fit: contain;
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.preview-delete-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: 1px solid var(--error-color);
    color: var(--error-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.preview-delete-btn:hover {
    background: var(--error-color);
    color: white;
}

.preview-delete-btn svg {
    width: 16px;
    height: 16px;
}

/* ===== PERFORMANCE & UX OPTIMIZATIONS ===== */

/* Relay Connection Status Indicator */
.relay-status-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    z-index: 1000;
    transition: all 0.3s ease;
    cursor: pointer;
}

.relay-status-indicator:hover {
    background: var(--bg-primary);
}

.relay-status-indicator .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.relay-status-indicator .status-dot.connected {
    background: var(--success-color);
    box-shadow: 0 0 6px var(--success-color);
}

.relay-status-indicator .status-dot.connecting {
    background: var(--warning-color);
    animation: pulse 1.5s infinite;
}

.relay-status-indicator .status-dot.disconnected {
    background: var(--error-color);
}

.relay-status-indicator .relay-count {
    font-weight: 500;
}

.relay-status-indicator .latency {
    color: var(--text-secondary);
    font-size: 0.7rem;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Relay Status Dropdown */
.relay-status-dropdown {
    position: fixed;
    bottom: 60px;
    right: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    min-width: 280px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1001;
    display: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.relay-status-dropdown.active {
    display: block;
    animation: slideUp 0.2s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.relay-status-dropdown h4 {
    margin-bottom: 10px;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.relay-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 4px;
    background: var(--bg-primary);
}

.relay-item .relay-url {
    font-size: 0.75rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}

.relay-item .relay-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.relay-item .relay-latency {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.relay-item .relay-latency.fast {
    color: var(--success-color);
}

.relay-item .relay-latency.medium {
    color: var(--warning-color);
}

.relay-item .relay-latency.slow {
    color: var(--error-color);
}

/* Skeleton Loaders */
.skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--border) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

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

    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    width: 100%;
}

.skeleton-thumbnail {
    padding-bottom: 56.25%;
    border-radius: 12px;
    margin-bottom: 12px;
}

.skeleton-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-text {
    height: 14px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-text.title {
    height: 18px;
    width: 80%;
}

.skeleton-text.subtitle {
    width: 60%;
}

.skeleton-text.small {
    height: 12px;
    width: 40%;
}

.skeleton-info {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.skeleton-details {
    flex: 1;
}

/* User Card Skeleton Loaders */
.skeleton-user-card {
    pointer-events: none;
}

.skeleton-user-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 0.75rem;
}

.skeleton-user-avatar-medium {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-user-info {
    flex: 1;
    min-width: 0;
}

.skeleton-user-name {
    height: 16px;
    width: 70%;
    margin: 0 auto 0.5rem auto;
}

.skeleton-user-name-wide {
    height: 16px;
    width: 60%;
    margin-bottom: 0.5rem;
}

.skeleton-user-nip05 {
    height: 12px;
    width: 50%;
    margin: 0 auto;
}

.skeleton-user-about {
    height: 12px;
    width: 90%;
    margin-top: 0.5rem;
}

/* Lazy Load Images */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-image.loaded {
    opacity: 1;
}

/* Improved Loading States */
.loading-more {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
}

.loading-more .spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    vertical-align: middle;
}

/* Search Improvements */
.search-bar input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(191, 64, 191, 0.2);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.search-suggestions.active {
    display: block;
}

.search-suggestion-item {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.search-suggestion-item:hover {
    background: var(--bg-primary);
}

.search-suggestion-item svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

.search-bar-container {
    position: relative;
    flex: 1;
    max-width: 600px;
    display: flex;
    gap: 0.5rem;
}

/* Touch-friendly Carousel */
.trending-carousel-container {
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
}

.trending-grid {
    will-change: transform;
}

/* Improved Scroll Performance */
.video-grid {
    contain: layout style;
}

.video-card {
    contain: layout style paint;
}

/* Pull to Refresh Indicator */
.pull-to-refresh {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    background: var(--bg-secondary);
    padding: 12px 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.3s ease;
    z-index: 99;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pull-to-refresh.visible {
    transform: translateX(-50%) translateY(20px);
}

.pull-to-refresh .spinner {
    width: 20px;
    height: 20px;
}

/* Accessibility - Focus States */
.sidebar-item:focus,
.video-card:focus,
button:focus,
a:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Exclude logo from focus outline */
a.logo:focus {
    outline: none;
}

.video-card:focus {
    outline-offset: 4px;
}

/* Improved Error States */
.error-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.error-message h3 {
    color: var(--error-color);
    margin-bottom: 10px;
}

.error-message button {
    margin-top: 16px;
    padding: 10px 20px;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-weight: 500;
}

.error-message button:hover {
    opacity: 0.9;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1002;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.3s ease;
    pointer-events: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.toast.success {
    border-color: var(--success-color);
}

.toast.error {
    border-color: var(--error-color);
}

.toast.warning {
    border-color: var(--warning-color);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .skeleton {
        animation: none;
        background: var(--bg-secondary);
    }
}

/* Optimized Mobile Styles */
@media (max-width: 768px) {
    .relay-status-indicator {
        bottom: 10px;
        right: 10px;
        padding: 6px 10px;
        font-size: 0.7rem;
    }

    .relay-status-dropdown {
        bottom: 50px;
        right: 10px;
        left: 10px;
        min-width: auto;
    }

    .toast-container {
        bottom: 70px;
        left: 10px;
        right: 10px;
        transform: none;
    }

    .toast {
        width: 100%;
    }
}

/* Video Card Hover Optimization */
@media (hover: hover) {
    .video-card:hover {
        transform: translateY(-4px);
    }

    .video-card:hover .video-thumbnail {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    }
}

/* Intersection Observer Placeholder */
.video-card[data-lazy="true"] .video-thumbnail img,
.video-card[data-lazy="true"] .video-thumbnail video {
    opacity: 0;
}

.video-card[data-loaded="true"] .video-thumbnail img,
.video-card[data-loaded="true"] .video-thumbnail video {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* User Search Results Grid */
.user-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.user-search-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.user-search-card:hover {
    background: var(--bg-primary);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.user-search-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-primary);
    overflow: hidden;
    flex-shrink: 0;
}

.user-search-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-search-info {
    flex: 1;
    min-width: 0;
}

.user-search-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-search-nip05 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-search-about {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Following Page - Users Section */
.following-users-section {
    margin-bottom: 2rem;
}

.following-users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.following-user-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    text-align: center;
}

.following-user-card:hover {
    background: var(--bg-primary);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.following-user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-primary);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.following-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.following-user-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.following-user-nip05 {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

@media (max-width: 768px) {
    .user-results-grid {
        grid-template-columns: 1fr;
    }

    .following-users-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .following-user-avatar {
        width: 60px;
        height: 60px;
    }

    .user-search-avatar {
        width: 50px;
        height: 50px;
    }
}

/* ===== Signup Modal Expanded Styles ===== */

.signup-modal-content {
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.nostr-explainer {
    padding: 0.5rem 0;
}

.explainer-section {
    margin-bottom: 1.25rem;
}

.explainer-section h3 {
    color: var(--accent);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.explainer-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.explainer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.explainer-section li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.explainer-section li::before {
    content: "•";
    color: var(--accent);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.explainer-section li strong {
    color: var(--text-primary);
}

/* Avatar Upload Section */
.avatar-upload-section {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.avatar-preview-container {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.avatar-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 2rem;
    font-weight: bold;
}

.avatar-upload-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.avatar-upload-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.2s, border-color 0.2s;
}

.avatar-upload-btn:hover {
    background: var(--border);
    border-color: var(--accent);
}

.avatar-remove-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--error-color);
    border-radius: 6px;
    color: var(--error-color);
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.avatar-remove-btn:hover {
    background: rgba(244, 67, 54, 0.1);
}

.avatar-hint {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-top: 0.5rem;
    width: 100%;
}

.avatar-upload-progress {
    width: 100%;
    margin-top: 0.5rem;
}

.avatar-upload-progress .progress-bar {
    height: 4px;
    margin-bottom: 0.25rem;
}

.avatar-upload-progress span {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Form Hints */
.form-hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Profile Preview in Signup */
.profile-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-top: 1rem;
}

.profile-preview-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-preview-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-preview-avatar span {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-secondary);
}

.profile-preview-info {
    flex: 1;
    min-width: 0;
}

.profile-preview-info h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-preview-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Signup Success Section */
.signup-success-section {
    text-align: center;
}

.success-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.success-header h3 {
    color: var(--success-color);
    font-size: 1.25rem;
}

.key-section {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.key-section h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.key-warning-text {
    color: var(--warning-color);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.nsec-display {
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    word-break: break-all;
}

.nsec-display code {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.875rem;
    color: var(--accent);
}

.key-section .copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
}

/* Key Instructions */
.key-instructions {
    text-align: left;
    margin-top: 1.5rem;
}

.key-instructions h4 {
    margin-bottom: 1rem;
    text-align: center;
}

.instruction-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.instruction-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.instruction-number {
    width: 28px;
    height: 28px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.instruction-item p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.instruction-item p strong {
    color: var(--text-primary);
}

/* ===== Edit Profile Modal Styles ===== */

.edit-profile-modal-content {
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Profile Edit Button */
.profile-edit-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.profile-edit-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent);
}

.profile-edit-btn svg {
    width: 16px;
    height: 16px;
}

/* User Dropdown Styles Enhancement */
.user-dropdown button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9rem;
    text-align: left;
    transition: background 0.2s;
}

.user-dropdown button:hover {
    background: var(--bg-secondary);
}

.user-dropdown button:first-child {
    border-radius: 8px 8px 0 0;
}

.user-dropdown button:last-child {
    border-radius: 0 0 8px 8px;
}

.user-dropdown button:only-child {
    border-radius: 8px;
}

.user-dropdown button+button {
    border-top: 1px solid var(--border);
}

/* Mobile Adjustments */
@media (max-width: 768px) {

    .signup-modal-content,
    .edit-profile-modal-content {
        max-width: 100%;
        margin: 1rem;
    }

    .avatar-upload-section {
        flex-direction: column;
        align-items: center;
    }

    .avatar-upload-actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .instruction-item {
        gap: 0.75rem;
    }

    .instruction-number {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }
}

/* ===== RECOMMENDATION SYSTEM STYLES ===== */

/* Recommended Section (Home Page) */
.recommended-section {
    position: relative;
    margin-top: 1.5rem;
}

.recommended-section .trending-header h2 {
    color: white;
}

.recommended-section .trending-header h2 svg {
    color: var(--accent);
}

/* Video Content Wrapper (Two-Column Layout) */
/* ===== Static Pages Styles ===== */
.static-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.static-page h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.static-page .last-updated {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 2rem;
    font-style: italic;
}

.static-section {
    margin-bottom: 2rem;
}

.static-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.static-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.static-section ul {
    list-style: disc;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.static-section ul li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.static-section a {
    color: var(--accent);
    text-decoration: none;
}

.static-section a:hover {
    text-decoration: underline;
}

.accent-link {
    color: var(--accent);
    text-decoration: none;
}

.accent-link:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .static-page {
        padding: 1.5rem 1rem;
    }

    .static-page h1 {
        font-size: 1.5rem;
    }

    .static-section h2 {
        font-size: 1.125rem;
    }
}

/* ===== Video Content Wrapper ===== */
.video-content-wrapper {
    display: flex;
    gap: 1.5rem;
    margin-top: 0;
    align-items: flex-start;
}

.video-content-wrapper .video-details {
    flex: 1;
    min-width: 0;
}

/* Recommendations Sidebar */
.recommendations-sidebar {
    width: 350px;
    flex-shrink: 0;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1rem;
    overflow-y: auto;
}

/* Show desktop sidebar only on larger screens */
.recommendations-sidebar.desktop-only {
    display: block;
    height: calc(100vh - var(--header-height) - 2rem);
}

/* When sidebar becomes fixed via JS */
.recommendations-sidebar.desktop-only.is-sticky {
    position: fixed;
    top: calc(var(--header-height) + 1rem);
    width: 350px;
}

.recommendations-sidebar.mobile-only {
    display: none;
}

.recommendations-sidebar::-webkit-scrollbar {
    width: 6px;
}

.recommendations-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.recommendations-sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.recommendations-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.sidebar-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    margin: 0;
    color: var(--text-primary);
}

.sidebar-header h3 svg {
    color: #1da1f2;
}

.sidebar-recommendations-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Sidebar Video Card */
.sidebar-video-card {
    display: flex;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.sidebar-video-card:hover {
    background: var(--bg-primary);
}

.sidebar-video-thumbnail {
    width: 140px;
    height: 79px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    background: var(--bg-primary);
}

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

.sidebar-video-thumbnail .video-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 500;
}

.sidebar-video-thumbnail.nsfw img,
.sidebar-video-thumbnail.nsfw video,
.sidebar-video-thumbnail.ratioed img,
.sidebar-video-thumbnail.ratioed video {
    filter: blur(10px);
}

.sidebar-video-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.25rem;
}

.sidebar-video-title {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--text-primary);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-video-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.sidebar-channel-name {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-video-time {
    font-size: 0.7rem;
}

/* Responsive: Sidebar below video on smaller screens */
@media (max-width: 1024px) {
    .video-content-wrapper {
        flex-direction: column;
    }

    /* Hide desktop sidebar, show mobile sidebar */
    .recommendations-sidebar.desktop-only {
        display: none;
    }

    .recommendations-sidebar.mobile-only {
        display: block;
        width: 100%;
        position: static;
        height: auto;
        max-height: none;
        margin-top: 1.5rem;
        overflow: visible;
    }

    /* Horizontal scrolling carousel for mobile */
    .recommendations-sidebar.mobile-only .sidebar-recommendations-grid {
        display: flex;
        flex-direction: row;
        gap: 1rem;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5rem;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .recommendations-sidebar.mobile-only .sidebar-recommendations-grid::-webkit-scrollbar {
        display: none;
    }

    .recommendations-sidebar.mobile-only .sidebar-video-card {
        flex-direction: column;
        gap: 0.5rem;
        flex-shrink: 0;
        width: 200px;
        scroll-snap-align: start;
    }

    .recommendations-sidebar.mobile-only .sidebar-video-thumbnail {
        width: 100%;
        height: 0;
        padding-bottom: 56.25%;
    }

    .recommendations-sidebar.mobile-only .sidebar-video-thumbnail img,
    .recommendations-sidebar.mobile-only .sidebar-video-thumbnail video {
        position: absolute;
        top: 0;
        left: 0;
    }

    .recommendations-sidebar.mobile-only .sidebar-video-info {
        padding: 0 0.25rem;
    }

    .recommendations-sidebar.mobile-only .sidebar-video-title {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
    }
}

@media (max-width: 480px) {
    .recommendations-sidebar.mobile-only .sidebar-video-card {
        width: 160px;
    }

    .recommendations-sidebar.mobile-only {
        padding: 0.75rem;
    }

    .recommendations-sidebar.mobile-only .sidebar-header h3 {
        font-size: 0.9rem;
    }
}

/* ===== MUTE FUNCTIONALITY STYLES ===== */

/* Profile Mute Button - styled like follow button */
.profile-mute-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.profile-mute-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.5);
    color: rgb(239, 68, 68);
}

.profile-mute-btn.muted {
    background: rgb(239, 68, 68);
    border: none;
    color: white;
}

.profile-mute-btn.muted:hover {
    opacity: 0.9;
}

.profile-mute-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Profile Report Button - styled like follow button */
.profile-report-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.profile-report-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.5);
    color: rgb(239, 68, 68);
}

.profile-report-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Channel Mute Button (Video Page) */
.channel-mute-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 80px;
    height: 36px;
}

.channel-mute-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.5);
    color: rgb(239, 68, 68);
}

.channel-mute-btn.muted {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.5);
    color: rgb(239, 68, 68);
}

.channel-mute-btn.muted:hover {
    background: var(--bg-tertiary);
    border-color: var(--border);
    color: var(--text-secondary);
}

.channel-mute-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.channel-mute-btn.loading {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

/* Comment Mute Button */
.comment-mute-btn {
    color: var(--text-tertiary);
    opacity: 0.6;
    transition: all 0.15s ease;
}

.comment-mute-btn:hover:not(:disabled) {
    opacity: 1;
    color: rgb(239, 68, 68);
    background: rgba(239, 68, 68, 0.1);
}

.comment-mute-btn.muted {
    opacity: 1;
    color: rgb(239, 68, 68);
}

.comment-mute-btn.muted:hover:not(:disabled) {
    color: var(--text-secondary);
    background: var(--bg-secondary);
}

/* Comment Report Button */
.comment-report-btn {
    color: var(--text-tertiary);
    opacity: 0.6;
    transition: all 0.15s ease;
}

.comment-report-btn:hover:not(:disabled) {
    opacity: 1;
    color: rgb(239, 68, 68);
    background: rgba(239, 68, 68, 0.1);
}

/* Muted Content Placeholders */
.muted-content-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px dashed var(--border);
    border-radius: 12px;
    min-height: 200px;
}

.muted-placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
}

.muted-placeholder-content.muted-comment {
    flex-direction: row;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.muted-icon {
    color: var(--text-tertiary);
    opacity: 0.5;
}

.muted-icon-small {
    color: var(--text-tertiary);
    opacity: 0.5;
    display: flex;
    align-items: center;
}

.muted-placeholder-content p {
    margin: 0;
    font-size: 0.875rem;
}

.unhide-muted-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.unhide-muted-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.unhide-muted-btn-small {
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.unhide-muted-btn-small:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Muted Comment Placeholder */
.muted-comment-placeholder {
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-left: calc(var(--depth, 0) * 1.5rem);
}

.muted-comment-placeholder[data-depth="1"] {
    margin-left: 1.5rem;
}

.muted-comment-placeholder[data-depth="2"] {
    margin-left: 3rem;
}

.muted-comment-placeholder[data-depth="3"] {
    margin-left: 4.5rem;
}

/* Muted Users Section in Profile Edit Modal */
.muted-users-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.muted-users-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-primary);
}

.muted-users-list::-webkit-scrollbar {
    width: 6px;
}

.muted-users-list::-webkit-scrollbar-track {
    background: transparent;
}

.muted-users-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.no-muted-users {
    padding: 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

.muted-user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    transition: all 0.2s;
}

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

.muted-user-item:hover {
    background: var(--bg-secondary);
}

.muted-user-item.removing {
    opacity: 0.5;
    pointer-events: none;
}

.muted-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
}

.muted-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.muted-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.muted-user-avatar span {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.muted-user-name {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unmute-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.unmute-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.5);
    color: rgb(239, 68, 68);
}

/* Mobile responsive adjustments for mute buttons */
@media (max-width: 768px) {
    .profile-mute-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    .channel-mute-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
        min-width: 70px;
    }

    .muted-content-placeholder {
        min-height: 150px;
    }

    .muted-placeholder-content {
        padding: 1rem;
    }

    .muted-users-list {
        max-height: 150px;
    }
}

/* ===== CONTENT FILTER PACKS ===== */

/* Filter Packs List in Settings */
.filter-packs-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.filter-packs-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.filter-pack-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.2s;
}

.filter-pack-item:hover {
    border-color: var(--accent);
}

.filter-pack-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-pack-header .checkbox-group {
    margin-bottom: 0;
}

.filter-pack-header label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.filter-pack-icon {
    font-size: 1.1rem;
}

.filter-pack-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0.25rem 0 0 1.5rem;
    line-height: 1.4;
}

.filter-pack-count {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    margin: 0.25rem 0 0 1.5rem;
}

/* Filtered Content Placeholder (Video Cards) */
.filtered-content-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px dashed var(--border);
    border-radius: 12px;
    min-height: 200px;
}

.filtered-placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
}

.filtered-placeholder-content.filtered-comment {
    flex-direction: row;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.filtered-icon {
    font-size: 2rem;
    opacity: 0.7;
}

.filtered-icon-small {
    font-size: 1rem;
    opacity: 0.7;
    display: flex;
    align-items: center;
}

.filtered-placeholder-content p {
    margin: 0;
    font-size: 0.875rem;
}

.filtered-reason {
    font-size: 0.75rem !important;
    color: var(--text-tertiary);
    font-style: italic;
}

.unhide-filtered-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
}

.unhide-filtered-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.unhide-filtered-btn-small {
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.unhide-filtered-btn-small:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Filtered Comment Placeholder */
.filtered-comment-placeholder {
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-left: calc(var(--depth, 0) * 1.5rem);
}

.filtered-comment-placeholder[data-depth="1"] {
    margin-left: 1.5rem;
}

.filtered-comment-placeholder[data-depth="2"] {
    margin-left: 3rem;
}

.filtered-comment-placeholder[data-depth="3"] {
    margin-left: 4.5rem;
}

/* Mobile responsive adjustments for filter packs */
@media (max-width: 768px) {
    .filtered-content-placeholder {
        min-height: 150px;
    }

    .filtered-placeholder-content {
        padding: 1rem;
    }

    .filter-pack-item {
        padding: 0.5rem;
    }

    .filter-pack-description,
    .filter-pack-count {
        margin-left: 1.25rem;
    }
}

/* ===== DRAFT CARDS ===== */
.draft-card {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: 12px;
}

.draft-thumbnail {
    position: relative;
    cursor: pointer;
}

.draft-thumbnail:hover {
    opacity: 0.8;
}

.draft-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.draft-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--accent);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.draft-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
}

.draft-edit-btn,
.draft-delete-btn {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: background-color 0.2s;
}

.draft-edit-btn:hover {
    background: var(--accent);
}

.draft-delete-btn:hover {
    background: var(--error-color);
}

/* Video owner actions (edit/delete on My Videos page) */
.video-owner-actions {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    gap: 4px;
    z-index: 10;
}

.owner-edit-btn,
.owner-delete-btn {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: background-color 0.2s;
}

.owner-edit-btn:hover {
    background: var(--accent);
}

.owner-delete-btn:hover {
    background: var(--error-color);
}

.drafts-section {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
}

/* ===== EDIT VIDEO MODAL ===== */
.edit-video-preview {
    margin-bottom: 1rem;
}

.edit-thumbnail-section {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.edit-thumbnail-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s;
}

.btn-secondary:hover {
    background: var(--border);
}

/* Edit button styling */
.action-btn.edit {
    color: var(--accent);
}

.action-btn.edit:hover {
    background: rgba(191, 64, 191, 0.1);
}

/* Video type badge for shorts */
.video-type-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.video-type-badge.short {
    background: var(--accent);
}

/* ===== SHORTS SECTION ===== */
.shorts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    padding: 0.5rem;
}

.short-card {
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    max-width: 100%;
    width: 100%;
    height: auto;
    padding: 0.5rem;
    border-radius: 12px;
    margin: -0.5rem;
    margin-bottom: 0;
}

.short-card:hover {
    background: var(--bg-secondary);
    transform: scale(1.02);
}

.short-thumbnail {
    position: relative;
    padding-bottom: 177.78%; /* 9:16 aspect ratio for vertical videos */
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
}

.short-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.short-card .video-info {
    margin-top: 0.75rem;
}

.short-card .video-title {
    font-size: 0.9rem;
    line-height: 1.3;
    -webkit-line-clamp: 2;
}

.short-card .channel-avatar {
    width: 28px;
    height: 28px;
    min-width: 28px;
}

.short-card .channel-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.short-card .video-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.short-card .video-duration {
    bottom: 8px;
    right: 8px;
}

/* Responsive adjustments for shorts grid */
@media (max-width: 768px) {
    .shorts-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
    }

    .short-card .video-title {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .shorts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
}