/* CSS Variables for Theming */
:root {
    /* Light Mode Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f4;
    --bg-sidebar: #ffffff;
    --bg-modal: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    
    --text-primary: #0f0f0f;
    --text-secondary: #606060;
    --text-tertiary: #909090;
    --text-muted: #aaaaaa;
    
    --border-primary: #e5e5e5;
    --border-secondary: #dadce0;
    --border-focus: #1c62b9;
    
    --accent-primary: #ff0000;
    --accent-secondary: #1c62b9;
    --accent-hover: #cc0000;
    
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 10px 30px rgba(0, 0, 0, 0.3);
    
    --overlay: rgba(0, 0, 0, 0.5);
    
    /* Video Player Colors */
    --player-bg: rgba(0, 0, 0, 0.8);
    --player-controls-bg: rgba(0, 0, 0, 0.7);
    --player-progress-bg: rgba(255, 255, 255, 0.3);
    --player-progress-fill: #ff0000;
    
    /* Badge Colors */
    --badge-warning: rgba(255, 152, 0, 0.9);
    --badge-base64: rgba(40, 167, 69, 0.9);
    --badge-hls: rgba(0, 123, 255, 0.9);
    --badge-shorts: rgba(255, 107, 107, 0.9);
}

/* Dark Mode Colors */
[data-theme="dark"] {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2d2d2d;
    --bg-sidebar: #1a1a1a;
    --bg-modal: #1a1a1a;
    --bg-card: #1a1a1a;
    --bg-input: #2d2d2d;
    
    --text-primary: #ffffff;
    --text-secondary: #e5e5e5;
    --text-tertiary: #b0b0b0;
    --text-muted: #808080;
    
    --border-primary: #2d2d2d;
    --border-secondary: #404040;
    --border-focus: #4a9eff;
    
    --accent-primary: #ff4444;
    --accent-secondary: #4a9eff;
    --accent-hover: #ff6666;
    
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-heavy: 0 10px 30px rgba(0, 0, 0, 0.5);
    
    --overlay: rgba(0, 0, 0, 0.7);
    
    /* Video Player Colors */
    --player-bg: rgba(0, 0, 0, 0.9);
    --player-controls-bg: rgba(0, 0, 0, 0.8);
    --player-progress-bg: rgba(255, 255, 255, 0.2);
    --player-progress-fill: #ff4444;
    
    /* Badge Colors */
    --badge-warning: rgba(255, 152, 0, 0.9);
    --badge-base64: rgba(40, 167, 69, 0.9);
    --badge-hls: rgba(74, 158, 255, 0.9);
    --badge-shorts: rgba(255, 107, 107, 0.9);
}

/* Material Symbols Styling */
.material-symbols-rounded {
    font-variation-settings:
        'FILL' 0,
        'wght' 400,
        'GRAD' 0,
        'opsz' 24;
    font-size: 24px;
    line-height: 1;
    vertical-align: middle;
}

/* Spinning animation for Material Symbols */
.material-symbols-rounded.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Material Symbols in buttons and other contexts */
button .material-symbols-rounded,
.btn-primary .material-symbols-rounded,
.btn-secondary .material-symbols-rounded {
    font-size: 18px;
}

/* Material Symbols in navigation */
.nav-item .material-symbols-rounded {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Material Symbols in video cards */
.play-icon .material-symbols-rounded {
    font-size: 48px;
    color: white;
}

/* Material Symbols in headers */
.header .material-symbols-rounded {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

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

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

.container {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-primary);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 99;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
    flex: 1;
}

.menu-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.menu-toggle:hover {
    background-color: #f0f0f0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: bold;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.logo:hover {
    background-color: var(--bg-tertiary);
}

.logo>span {
    line-height: 1;
    /* height: 24px; */
    /* display: flex; */
    /* align-items: center; */
}

.logo>span.material-symbols-rounded {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    font-size: 24px !important;
    color: var(--accent-primary);
    height: 24px;
    width: 24px;
}

/* Search */
.search-container {
    flex: 1;
    max-width: 512px;
    margin-left: 20px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 0;
}

#searchInput {
    flex: 1;
    padding: 8px 16px;
    box-shadow: 0px 0px 0px 1px var(--border-primary);
    border: none;
    border-radius: 32px 0px 0px 32px;
    background-color: var(--bg-input);
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--border-focus);
    background-color: var(--bg-input);
}

.search-btn {
    width: 64px;
    min-width: 64px;
    height: 32px;
    background-color: #f8f9fa;
    box-shadow: 0px 0px 0px 1px var(--border-primary);
    border: none;
    border-radius: 0px 32px 32px 0px;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.search-btn:hover {
    background-color: #e9ecef;
}

/* Header right */
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;

    justify-content: flex-end;
}

.upload-btn, .connect-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.upload-btn {
    background-color: #ff0000;
    color: white;
}

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

.connect-btn {
    background-color: #1c62b9;
    color: white;
}

.connect-btn:hover {
    background-color: #155a9e;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background-color: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.user-avatar:hover {
    background-color: #e0e0e0;
}

/* Theme Toggle Button */
.theme-toggle {
    width: 40px;
    height: 40px;
    background-color: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 16px;
    transition: background-color 0.2s ease;
}

.theme-toggle:hover {
    background-color: var(--bg-tertiary);
}

.theme-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--accent-primary);
}

/* Main container */
.main-container {
    margin-top: 56px;
    min-height: calc(100vh - 56px);
    transition: margin-left 0.3s ease;
}

.main-container.sidebar-open {
    margin-left: 240px;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 56px; /* Below the header */
    left: 0;
    width: 240px;
    height: calc(100vh - 56px);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-primary);
    padding: 0;
    overflow-y: auto;
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    z-index: 100;
}

.main-container:not(.sidebar-open) .sidebar {
    transform: translateX(-100%);
}

.sidebar-nav {
    padding: 12px 0;
    display: flex;
    gap: 4px;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 12px 24px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
    border-radius: 10px;
    margin: 0 12px;
    cursor: default;
}

.nav-item:hover {
    background-color: #f0f0f0;
}

.nav-item.active {
    background-color: #e5f3ff;
    color: #1c62b9;
    font-weight: 500;
}

.nav-item i {
    width: 20px;
    text-align: center;
}

/* Main Content Area */
.main-content {
    padding: 24px;
    min-width: 0;
}

.content-header {
    /* margin-bottom: 24px; */
    padding: 20px;
}

.content-header h1 {
    font-size: 20px;
    font-weight: 500;
}

.filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid #ccc;
    background-color: #fff;
    border-radius: 18px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.filter-btn:hover {
    background-color: #f0f0f0;
}

.filter-btn.active {
    background-color: #333;
    color: white;
    border-color: #333;
}

/* Videos grid */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
    /* margin-bottom: 24px; */
    padding: 20px;
}

.video-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease;
    /* box-shadow: var(--shadow-light); */
}

.video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0px 1px var(--border-primary), var(--shadow-medium);
}

.video-thumbnail {
    width: 100%;
    height: 180px;
    border-radius: 12px;
    background-color: #f0f0f0;
    position: relative;
    overflow: hidden;
}

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

.video-thumbnail .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.2s;
}

.video-card:hover .play-icon {
    opacity: 1;
}

.video-info {
    padding: 12px;
    background-color: var(--bg-card);
}

.video-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

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

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

.shorts-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: #ff0000;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.warning-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--badge-warning);
    color: white;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    cursor: help;
    z-index: 2;
}

.base64-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--badge-base64);
    color: white;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    cursor: help;
    z-index: 2;
}

.hls-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--badge-hls);
    color: white;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    cursor: help;
    z-index: 2;
}

/* If both warning and base64 badges exist, adjust positioning */
.video-thumbnail .warning-badge + .base64-badge,
.video-thumbnail .base64-badge + .warning-badge {
    left: 40px;
}

/* If both warning and HLS badges exist, adjust positioning */
.video-thumbnail .warning-badge + .hls-badge,
.video-thumbnail .hls-badge + .warning-badge {
    left: 40px;
}

/* If both base64 and HLS badges exist, adjust positioning */
.video-thumbnail .base64-badge + .hls-badge,
.video-thumbnail .hls-badge + .base64-badge {
    left: 40px;
}

.hashtags {
    color: #1c62b9;
    font-weight: 500;
}

/* Loading */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: #666;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #ff0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--overlay);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: var(--bg-modal);
    border-radius: 12px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-heavy);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e5e5;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 500;
}

.close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background-color: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.close-btn:hover {
    background-color: #f0f0f0;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

/* Video Page Styles */
.video-page {
    width: 100%;
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease;
    overflow-x: hidden;
}

.video-page-content {
    display: flex;
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    min-height: 0;
}

.video-main-section {
    flex: 1;
    min-width: 0;
    max-width: 1000px;
}

.video-player-container {
    width: 100%;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
    position: relative;
}

.custom-video-player {
    position: relative;
    width: 100%;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
}

.custom-video-player video {
    width: 100%;
    height: auto;
    display: block;
    background-color: var(--bg-secondary);
    cursor: pointer;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
}

.video-content {
    background-color: var(--bg-primary);
    border-radius: 12px;
    margin-bottom: 24px;
}

.video-header h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.video-stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-primary);
}

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

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

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-radius: 18px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

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

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

.channel-avatar {
    width: 48px;
    height: 48px;
    background-color: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.channel-details h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

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

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

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

.video-description {
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    padding: 12px;
}

.description-text {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 8px;
}

.show-more-btn {
    background: none;
    border: none;
    color: var(--accent-secondary);
    cursor: pointer;
    font-weight: 500;
}

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

.video-sidebar {
    width: 400px;
    flex-shrink: 0;
    min-width: 0;
}

.video-sidebar h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.related-videos {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

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

.related-video-thumbnail {
    position: relative;
    width: 168px;
    height: 94px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

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

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

.related-video-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.related-video-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-video-author {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0 0 2px 0;
}

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

/* Comments Section */
.comments-section {
    margin-top: 24px;
    border-top: 1px solid var(--border-primary);
    padding-top: 24px;
}

.comments-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.comment-input-container {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.comment-input-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.comment-input-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#commentInput {
    width: 100%;
    min-height: 60px;
    padding: 12px;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s ease;
}

#commentInput:focus {
    border-color: var(--accent-primary);
}

.comment-submit-btn {
    align-self: flex-end;
    padding: 8px 16px;
    background-color: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s ease;
}

.comment-submit-btn:hover:not(:disabled) {
    background-color: var(--accent-hover);
}

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

.comments-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    flex-shrink: 0;
    overflow: hidden;
}

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

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

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

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

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

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

.comment-action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: background-color 0.2s ease;
}

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

/* Channel Page */
.channel-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.channel-header {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    margin-bottom: 24px;
    overflow: hidden;
}

.channel-banner {
    height: 120px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 0 24px 16px 24px;
}

.channel-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 32px;
    border: 4px solid var(--bg-primary);
    overflow: hidden;
}

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

.channel-info-header {
    padding: 16px 24px 24px 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.channel-details-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.channel-details-header p {
    color: var(--text-secondary);
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.channel-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.channel-content {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
}

.channel-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-primary);
    background-color: var(--bg-secondary);
}

.channel-tab {
    flex: 1;
    padding: 16px 24px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
}

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

.channel-tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.channel-tab-content {
    padding: 24px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

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

.channel-shorts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
}

.channel-about {
    max-width: 600px;
}

.about-section {
    margin-bottom: 24px;
}

.about-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.about-section p {
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.channel-info-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-primary);
}

.info-label {
    font-weight: 500;
    color: var(--text-primary);
}

.info-value {
    color: var(--text-secondary);
    font-family: monospace;
    font-size: 12px;
    word-break: break-all;
}

/* Make usernames clickable */
.clickable-username {
    color: var(--accent-primary);
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease;
}

.clickable-username:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.clickable-avatar {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.clickable-avatar:hover {
    opacity: 0.8;
}

/* Channel Loading/Error Overlays */
.channel-loading-overlay,
.channel-error-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.channel-page {
    position: relative;
}


.shorts-thumbnail {
    aspect-ratio: 9/16 !important;
    width: 120px;
    max-width: 200px;
    margin: 0 auto;
}

.shorts-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.short-card {
    max-width: 200px;
    margin: 0 auto;
}

.short-card .video-info {
    padding: 8px 0;
}

.short-card .video-title {
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 4px;
}

.short-card .video-author {
    font-size: 12px;
    margin-bottom: 2px;
}

.short-card .video-stats {
    font-size: 11px;
}

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

.related-video-thumbnail {
    position: relative;
    width: 168px;
    height: 94px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

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

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

.related-video-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.related-video-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-video-author {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0 0 2px 0;
}

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

/* Video Page Responsive Design */
@media (max-width: 1200px) {
    .video-page-content {
        max-width: 100%;
        padding: 16px;
        gap: 16px;
    }
    
    .video-sidebar {
        width: 350px;
    }
}

@media (max-width: 900px) {
    .video-page-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .video-main-section {
        max-width: none;
    }
    
    .video-sidebar {
        width: 100%;
        order: -1;
    }
    
    .video-sidebar h3 {
        margin-bottom: 12px;
    }
    
    .related-videos {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 600px) {
    .video-page-content {
        padding: 12px;
        gap: 16px;
    }
    
    .video-content {
        padding: 16px;
    }
    
    .video-stats-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .video-actions {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .action-btn {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .related-videos {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Form styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #1c62b9;
    box-shadow: 0 0 0 2px rgba(28, 98, 185, 0.2);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #ff0000;
    color: white;
}

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

.btn-secondary {
    background-color: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

/* Video modal */
.video-modal .modal-content {
    width: 95vw;
    max-width: 1200px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.video-player-container {
    width: 100%;
    background: #000;
    position: relative;
    aspect-ratio: 16/9;
}

.custom-video-player {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
}

#videoPlayer {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

/* Custom Video Controls */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 20px 16px 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-video-player:hover .video-controls,
.video-controls.settings-open,
.video-controls.interacting {
    opacity: 1;
}

.progress-bar {
    position: relative;
    height: 6px;
    margin-bottom: 12px;
    cursor: pointer;
}

.progress-track {
    position: relative;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #ff0000, #ff4444);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.3);
}

.progress-handle {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 18px;
    height: 18px;
    background: #ff0000;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    border: 2px solid #fff;
    transition: opacity 0.2s ease, width 0.2s ease, height 0.2s ease, box-shadow 0.2s ease;
}

.progress-track:hover .progress-handle,
.progress-track:active .progress-handle {
    opacity: 1;
    width: 22px;
    height: 22px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.controls-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.control-btn {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.control-btn>.material-symbols-rounded {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    font-size: 24px;
}

/* Volume Control */
.volume-control {
    position: relative;
    display: flex;
    align-items: center;
}

.volume-slider-container {
    position: relative;
    margin-left: 8px;
}

.volume-slider {
    width: 0;
    transition: width 0.3s ease;
}

.volume-control:hover .volume-slider,
.volume-slider-container.volume-slider-open .volume-slider {
    width: 80px;
}

.volume-track {
    position: relative;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    transition: height 0.2s ease;
}

.volume-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #fff, #f0f0f0);
    border-radius: 3px;
    width: 100%;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
}

.volume-handle {
    position: absolute;
    top: 50%;
    right: 0;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transform: translate(50%, -50%);
    cursor: pointer;
    opacity: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    border: 2px solid #ddd;
    transition: opacity 0.2s ease, width 0.2s ease, height 0.2s ease, box-shadow 0.2s ease;
}

.volume-track:hover .volume-handle,
.volume-slider-container.volume-slider-open .volume-handle {
    opacity: 1;
    width: 18px;
    height: 18px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

/* Settings Menu */
.settings-menu {
    position: absolute;
    bottom: 60px;
    right: 20px;
    background: rgba(28, 28, 28, 0.95);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 200px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.settings-item {
    padding: 12px 16px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.settings-item .current-speed,
.settings-item .current-quality {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

.settings-item i {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

/* Settings Submenu */
.settings-submenu {
    position: absolute;
    bottom: 60px;
    right: 20px;
    background: rgba(28, 28, 28, 0.95);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 200px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.submenu-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 8px;
}

.submenu-header .back-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    margin-right: 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.submenu-header .back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.submenu-header span {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

.speed-options, .quality-options {
    display: flex;
    flex-direction: column;
}

.speed-option, .quality-option {
    padding: 8px 16px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.speed-option:hover, .quality-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.speed-option.active, .quality-option.active {
    background: rgba(255, 255, 255, 0.2);
    color: #3ea6ff;
}

.quality-info {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-left: 8px;
}

.time-display {
    color: white;
    font-size: 14px;
    font-family: monospace;
}

/* Quality Menu */
.quality-menu {
    position: absolute;
    bottom: 60px;
    right: 16px;
    background: rgba(28, 28, 28, 0.9);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 200px;
    backdrop-filter: blur(10px);
}

.quality-option {
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.quality-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.quality-label {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.quality-info {
    color: #aaa;
    font-size: 12px;
}

/* Loading Spinner */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 32px;
}

.video-header h1 {
    margin: 0 0 12px 0;
    font-size: 1.4rem;
    font-weight: 500;
    color: #0f0f0f;
    line-height: 1.4;
}

.video-stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

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

.video-stats .dot {
    color: #909090;
}

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

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    background: #f2f2f2;
    color: #606060;
    border-radius: 18px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.action-btn:hover {
    background: #e5e5e5;
}

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

.video-details {
    display: flex;
    flex-direction: column;
}

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

.channel-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f2f2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #606060;
    font-size: 1.2rem;
}

.channel-details {
    flex: 1;
}

.channel-details h3 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    color: #0f0f0f;
}

.subscriber-count {
    color: #606060;
    font-size: 0.9rem;
}

.subscribe-btn {
    padding: 10px 16px;
    background: #cc0000;
    color: white;
    border: none;
    border-radius: 18px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.subscribe-btn:hover {
    background: #990000;
}

.video-description {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 12px;
    position: relative;
}

.description-text {
    color: #0f0f0f;
    font-size: 0.9rem;
    line-height: 1.5;
    max-height: 60px;
    overflow: hidden;
    transition: max-height 0.3s;
}

.description-text.expanded {
    max-height: none;
}

.show-more-btn {
    background: none;
    border: none;
    color: #606060;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 4px 0;
    margin-top: 8px;
}

.show-more-btn:hover {
    color: #0f0f0f;
}

/* Debug Modal */
.debug-modal {
    max-width: 90vw;
    max-height: 90vh;
    width: 800px;
}

.debug-info {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.debug-section {
    margin-bottom: 24px;
}

.debug-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 8px;
}

.debug-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.debug-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.debug-item label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
}

.debug-item span {
    font-family: monospace;
    font-size: 14px;
    color: #333;
    word-break: break-all;
}

.debug-info pre {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    line-height: 1.4;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 200px;
    overflow-y: auto;
}

.json-container {
    position: relative;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #007bff;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s;
}

.copy-btn:hover {
    background: #0056b3;
}

.copy-btn.copied {
    background: #28a745;
}

/* Nostr connection modal */
.nostr-options {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.nostr-option {
    padding: 20px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.nostr-option h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.nostr-option p {
    color: #666;
    margin-bottom: 16px;
    font-size: 14px;
}

.nostr-option input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 14px;
}

/* Responsive design */
@media (max-width: 768px) {
    .main-container {
        margin-left: 0;
    }
    
    .main-container.sidebar-open {
        margin-left: 0; /* Don't push content on mobile */
    }
    
    .main-content {
        padding: 16px;
    }
    
    .search-container {
        margin-left: 16px;
    }
    
    .header-right {
        gap: 8px;
    }
    
    .upload-btn span,
    .connect-btn span {
        display: none;
    }
    
    .videos-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .modal-content {
        margin: 16px;
        max-width: calc(100vw - 32px);
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0 8px;
    }
    
    .search-container {
        margin-left: 8px;
    }
    
    .main-content {
        padding: 12px;
    }
    
    .filters {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Utility classes */
.hidden {
    display: none !important;
}

.connected {
    background-color: #4caf50 !important;
}

.connected:hover {
    background-color: #45a049 !important;
}

/* Nostr specific styles */
.nostr-event {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    background-color: #fff;
}

.nostr-event-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.nostr-pubkey {
    font-family: monospace;
    font-size: 12px;
    color: #666;
    background-color: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
}

.nostr-timestamp {
    font-size: 12px;
    color: #999;
}

.nostr-content {
    line-height: 1.6;
}

/* Video upload progress */
.upload-progress {
    margin-top: 16px;
}

.progress-bar {
    width: 100%;
    border-radius: 4px;
}

.progress-fill {
    height: 100%;
    background-color: #ff0000;
}

.progress-text {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* Nostr Embed Section */
.nostr-embed-section {
    margin-top: 32px;
    padding: 24px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nostr-embed-section h2 {
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 500;
}

.embed-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    align-items: center;
}

.embed-controls input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    font-family: monospace;
}

.embed-controls input:focus {
    outline: none;
    border-color: #1c62b9;
    box-shadow: 0 0 0 2px rgba(28, 98, 185, 0.2);
}

#nostrEmbeds {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nostr-embed {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 16px;
    background-color: #f9f9f9;
}

.nostr-embed-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.nostr-embed-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #666;
}

.nostr-embed-author {
    flex: 1;
}

.nostr-embed-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
}

.nostr-embed-pubkey {
    font-family: monospace;
    font-size: 12px;
    color: #666;
}

.nostr-embed-content {
    line-height: 1.6;
    margin-bottom: 12px;
    white-space: pre-wrap;
}

.nostr-embed-actions {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #666;
}

.nostr-embed-action {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: color 0.2s;
}

.nostr-embed-action:hover {
    color: #1c62b9;
}

.nostr-embed-error {
    color: #d32f2f;
    padding: 12px;
    background-color: #ffebee;
    border-radius: 8px;
    border: 1px solid #ffcdd2;
}



/* Shorts Styles */
.shorts-container {
    height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
    position: relative;
}

.shorts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    z-index: 10;
}

.shorts-header h1 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.shorts-controls {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 10;
}

.shorts-btn {
    width: 40px;
    height: 40px;
    border: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.shorts-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.shorts-player {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
}

.shorts-video-container {
    width: fit-content;
    height: fit-content;
    max-width: 560px;
    max-height: calc(100vh - 96px);
    min-width: 560px;
    min-height: 560px;
    position: relative;
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#shortsVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

#shortsVideo:hover {
    opacity: 0.95;
}

.shorts-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
}

.shorts-info {
    position: absolute;
    bottom: 60px;
    left: 20px;
    right: 80px;
    color: white;
    z-index: 5;
}

.shorts-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.shorts-info p {
    font-size: 14px;
    margin: 4px 0;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.shorts-actions {
    position: absolute;
    right: 20px;
    bottom: 120px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 5;
}

.shorts-action-btn {
    width: 48px;
    height: 48px;
    border: none;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s;
    font-size: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.shorts-action-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.shorts-action-btn i {
    font-size: 18px;
}

.shorts-action-btn.liked {
    color: #ff4757;
}

.shorts-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    z-index: 5;
}

.shorts-progress-bar {
    width: 0%;
    height: 3px;
    background-color: #ff0000;
    border-radius: 2px;
    transition: width 0.1s linear;
    position: relative;
}

/* Responsive Shorts */
@media (max-width: 768px) {
    .shorts-container {
        height: calc(100vh - 80px);
    }
    
    .shorts-video-container {
        max-width: 100%;
        border-radius: 0;
    }
    
    .shorts-header {
        padding: 12px 16px;
    }
    
    .shorts-overlay {
        padding: 16px;
    }
    
    .shorts-actions {
        right: 16px;
        bottom: 60px;
    }
    
    .shorts-controls {
        right: 10px;
        gap: 15px;
    }
    
    .shorts-control-btn {
        width: 48px;
        height: 48px;
    }
} 

/* Theme Toggle Button */
.theme-toggle {
    width: 40px;
    height: 40px;
    border: none;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

.theme-toggle i {
    font-size: 16px;
}

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 0;
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease;
} 

.shorts-control-btn {
    width: 56px;
    height: 56px;
    border: none;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 10;
}

.shorts-control-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

#prevShort {
    /* Positioned by parent container */
}

#nextShort {
    /* Positioned by parent container */
} 

/* Shorts Video Overlays */
.shorts-loading-overlay,
.shorts-play-overlay,
.shorts-pause-overlay,
.shorts-error-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 20;
    transition: opacity 0.2s ease;
}

.shorts-loading-overlay {
    background-color: rgba(0, 0, 0, 0.8);
}

.shorts-play-overlay,
.shorts-pause-overlay {
    background-color: rgba(0, 0, 0, 0.6);
    animation: shortsOverlayPulse 0.3s ease-out;
}

.shorts-error-overlay {
    background-color: rgba(220, 53, 69, 0.9);
    border-radius: 12px;
    width: auto;
    height: auto;
    padding: 12px 16px;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
}

.shorts-error-overlay span {
    font-size: 12px;
    opacity: 0.9;
}

@keyframes shortsOverlayPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
} 