/* =============================================
   VidTube - YouTube Clone Stylesheet
   ============================================= */

/* === CSS VARIABLES === */
:root, [data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f2f2f2;
    --bg-tertiary: #e5e5e5;
    --bg-hover: rgba(0,0,0,0.05);
    --bg-active: rgba(0,0,0,0.1);
    --bg-card: #ffffff;
    --bg-elevated: #ffffff;
    --bg-overlay: rgba(0,0,0,0.6);
    --bg-chip: #f2f2f2;
    --bg-chip-active: #0f0f0f;
    --text-primary: #0f0f0f;
    --text-secondary: #606060;
    --text-tertiary: #909090;
    --text-chip-active: #ffffff;
    --text-link: #065fd4;
    --border-color: rgba(0,0,0,0.1);
    --border-light: rgba(0,0,0,0.05);
    --accent: #ff0000;
    --accent-hover: #cc0000;
    --accent-light: rgba(255,0,0,0.1);
    --success: #2ba640;
    --warning: #ff9800;
    --danger: #ff4444;
    --info: #065fd4;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 50%;
    --navbar-height: 56px;
    --sidebar-width: 240px;
    --sidebar-mini: 72px;
    --transition: 0.2s ease;
    --font: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme="dark"] {
    --bg-primary: #0f0f0f;
    --bg-secondary: #272727;
    --bg-tertiary: #3f3f3f;
    --bg-hover: rgba(255,255,255,0.1);
    --bg-active: rgba(255,255,255,0.15);
    --bg-card: #1a1a1a;
    --bg-elevated: #212121;
    --bg-chip: #272727;
    --bg-chip-active: #f1f1f1;
    --text-primary: #f1f1f1;
    --text-secondary: #aaaaaa;
    --text-tertiary: #717171;
    --text-chip-active: #0f0f0f;
    --text-link: #3ea6ff;
    --border-color: rgba(255,255,255,0.1);
    --border-light: rgba(255,255,255,0.05);
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-tertiary); border-radius: 4px; }

/* === NAVBAR === */
.navbar {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--navbar-height);
    background: var(--bg-primary);
    display: flex; align-items: center;
    padding: 0 16px; gap: 16px;
    z-index: 1000;
    border-bottom: 1px solid var(--border-light);
}
.navbar-left { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.navbar-center { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; max-width: 640px; margin: 0 auto; }
.navbar-right { display: flex; align-items: center; gap: 8px; min-width: 200px; justify-content: flex-end; }
.logo { display: flex; align-items: center; gap: 4px; }
.logo-svg { height: 20px; width: auto; }
.search-form { flex: 1; }
.search-wrapper {
    display: flex; border: 1px solid var(--border-color); border-radius: 40px; overflow: hidden;
    transition: border-color var(--transition); background: var(--bg-primary);
}
.search-wrapper:focus-within { border-color: var(--info); }
.search-input {
    flex: 1; padding: 8px 16px; border: none; outline: none;
    background: transparent; font-size: 15px; min-width: 0;
}
.search-btn {
    padding: 0 24px; background: var(--bg-secondary); border-left: 1px solid var(--border-color);
    color: var(--text-secondary); font-size: 15px; transition: background var(--transition);
}
.search-btn:hover { background: var(--bg-tertiary); }
.btn-icon {
    width: 40px; height: 40px; border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    transition: background var(--transition); font-size: 18px; position: relative; flex-shrink: 0;
}
.btn-icon:hover { background: var(--bg-hover); }
.voice-search-btn { background: var(--bg-secondary); }
.notif-badge {
    position: absolute; top: 2px; right: 2px;
    background: var(--accent); color: white; font-size: 10px; font-weight: 600;
    min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px;
    display: flex; align-items: center; justify-content: center;
}

/* User Menu */
.user-menu-wrapper { position: relative; }
.user-avatar-btn { padding: 0; border-radius: var(--radius-full); }
.avatar-xs { width: 24px; height: 24px; border-radius: var(--radius-full); object-fit: cover; }
.avatar-sm { width: 32px; height: 32px; border-radius: var(--radius-full); object-fit: cover; }
.avatar-md { width: 40px; height: 40px; border-radius: var(--radius-full); object-fit: cover; }
.avatar-lg { width: 80px; height: 80px; border-radius: var(--radius-full); object-fit: cover; }
.avatar-xl { width: 120px; height: 120px; border-radius: var(--radius-full); object-fit: cover; }
.user-dropdown {
    position: absolute; top: 100%; right: 0; width: 280px; margin-top: 8px;
    background: var(--bg-elevated); border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg); display: none; z-index: 1001;
    border: 1px solid var(--border-color); overflow: hidden;
}
.user-dropdown.show { display: block; }
.dropdown-header { display: flex; align-items: center; gap: 12px; padding: 16px; }
.dropdown-name { font-weight: 600; font-size: 16px; }
.dropdown-username { color: var(--text-secondary); font-size: 13px; }
.dropdown-divider { height: 1px; background: var(--border-color); margin: 4px 0; }
.dropdown-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 16px; width: 100%;
    font-size: 14px; transition: background var(--transition); text-align: left;
}
.dropdown-item:hover { background: var(--bg-hover); }
.dropdown-item i { width: 24px; text-align: center; color: var(--text-secondary); }

/* === SIDEBAR === */
.sidebar {
    position: fixed; top: var(--navbar-height); left: 0; bottom: 0;
    width: var(--sidebar-width); background: var(--bg-primary);
    overflow-y: auto; overflow-x: hidden;
    z-index: 999; transition: transform 0.3s ease, width 0.3s ease;
    padding: 8px 0;
}
.sidebar-nav { display: flex; flex-direction: column; }
.sidebar-section { padding: 4px 12px; }
.sidebar-heading {
    font-size: 14px; font-weight: 600; padding: 8px 12px 4px;
    display: flex; align-items: center; gap: 8px;
}
.sidebar-heading i { font-size: 10px; }
.sidebar-item {
    display: flex; align-items: center; gap: 20px; padding: 8px 12px;
    border-radius: 10px; font-size: 14px; transition: background var(--transition);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-item:hover { background: var(--bg-hover); }
.sidebar-item.active { background: var(--bg-active); font-weight: 600; }
.sidebar-item i { width: 24px; text-align: center; font-size: 18px; flex-shrink: 0; }
.sidebar-avatar { flex-shrink: 0; }
.sidebar-divider { height: 1px; background: var(--border-color); margin: 8px 16px; }
.sidebar-footer { padding: 8px 24px; }
.sidebar-links { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.sidebar-links a { font-size: 12px; color: var(--text-tertiary); font-weight: 500; }
.sidebar-links a:hover { color: var(--text-primary); }
.sidebar-copyright { font-size: 11px; color: var(--text-tertiary); margin-top: 12px; }
.sidebar-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 998; display: none; backdrop-filter: blur(2px);
}

/* === MAIN CONTENT === */
.main-content {
    margin-left: var(--sidebar-width); margin-top: var(--navbar-height);
    padding: 24px; min-height: calc(100vh - var(--navbar-height));
    transition: margin-left 0.3s ease;
}

/* === BUTTONS === */
.btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px;
    border-radius: 20px; font-size: 14px; font-weight: 500;
    transition: all var(--transition); border: none; cursor: pointer;
    white-space: nowrap; text-decoration: none;
}
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 16px; }
.btn-lg { padding: 10px 24px; font-size: 16px; border-radius: 24px; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--bg-secondary); color: var(--text-primary); }
.btn-secondary:hover { background: var(--bg-tertiary); }
.btn-dark { background: var(--text-primary); color: var(--bg-primary); }
.btn-dark:hover { opacity: 0.8; }
.btn-outline-primary { border: 1px solid var(--info); color: var(--info); background: transparent; }
.btn-outline-primary:hover { background: rgba(6,95,212,0.1); }
.btn-danger { background: var(--danger); color: white; }
.btn-text { color: var(--text-link); background: none; }
.btn-text:hover { background: var(--bg-hover); }
.btn-subscribe { background: var(--text-primary); color: var(--bg-primary); border-radius: 20px; font-weight: 600; }
.btn-subscribe.subscribed { background: var(--bg-secondary); color: var(--text-primary); }
.w-full { width: 100%; justify-content: center; }

/* === FORMS === */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; color: var(--text-secondary); }
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 10px 14px; border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); font-size: 15px; background: var(--bg-primary);
    transition: border-color var(--transition); outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--info); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }
.form-row { display: flex; gap: 16px; }
.form-row > * { flex: 1; }

/* === ALERTS === */
.alert {
    padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px;
    display: flex; align-items: center; justify-content: space-between; font-size: 14px;
    animation: slideDown 0.3s ease;
}
.alert-success { background: rgba(43,166,64,0.15); color: var(--success); border: 1px solid rgba(43,166,64,0.3); }
.alert-error { background: rgba(255,68,68,0.15); color: var(--danger); border: 1px solid rgba(255,68,68,0.3); }
.alert-warning { background: rgba(255,152,0,0.15); color: var(--warning); border: 1px solid rgba(255,152,0,0.3); }
.alert-info { background: rgba(6,95,212,0.15); color: var(--info); border: 1px solid rgba(6,95,212,0.3); }
.alert-close { background: none; border: none; font-size: 20px; cursor: pointer; color: inherit; }

/* === VIDEO GRID === */
.video-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px 16px;
}
.video-card { position: relative; cursor: pointer; }
.video-card a { display: block; }
.video-thumbnail {
    position: relative; width: 100%; padding-top: 56.25%;
    border-radius: var(--radius-md); overflow: hidden; background: var(--bg-secondary);
}
.video-thumbnail img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.3s ease;
}
.video-card:hover .video-thumbnail img { transform: scale(1.03); }
.video-duration {
    position: absolute; bottom: 8px; right: 8px;
    background: rgba(0,0,0,0.8); color: white; font-size: 12px; font-weight: 500;
    padding: 2px 6px; border-radius: 4px;
}
.video-progress {
    position: absolute; bottom: 0; left: 0; height: 3px;
    background: var(--accent); border-radius: 0 0 0 var(--radius-md);
}
.video-info { display: flex; gap: 12px; padding: 12px 0 4px; }
.video-info .avatar-sm { flex-shrink: 0; margin-top: 2px; }
.video-meta { flex: 1; min-width: 0; }
.video-title {
    font-size: 14px; font-weight: 500; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; margin-bottom: 4px;
}
.video-channel { font-size: 13px; color: var(--text-secondary); display: flex; align-items: center; gap: 4px; }
.video-channel:hover { color: var(--text-primary); }
.verified-badge { font-size: 12px; color: var(--text-secondary); }
.video-stats { font-size: 13px; color: var(--text-secondary); }
.video-card-menu {
    position: absolute; top: 4px; right: 4px; opacity: 0;
    transition: opacity var(--transition);
}
.video-card:hover .video-card-menu { opacity: 1; }
.video-badge {
    position: absolute; top: 8px; left: 8px;
    background: var(--accent); color: white; font-size: 11px; font-weight: 600;
    padding: 2px 8px; border-radius: 4px; text-transform: uppercase;
}
.video-badge.live { background: var(--accent); }
.video-badge.new { background: var(--info); }
.video-badge.short { background: #000; }

/* === CHIPS/TAGS FILTER === */
.chips-bar {
    display: flex; gap: 8px; padding: 12px 0; overflow-x: auto;
    -ms-overflow-style: none; scrollbar-width: none; margin-bottom: 8px;
}
.chips-bar::-webkit-scrollbar { display: none; }
.chip {
    padding: 6px 14px; border-radius: 8px; font-size: 14px; font-weight: 500;
    background: var(--bg-chip); white-space: nowrap; transition: all var(--transition);
    border: none; cursor: pointer;
}
.chip:hover { background: var(--bg-tertiary); }
.chip.active { background: var(--bg-chip-active); color: var(--text-chip-active); }

/* === WATCH PAGE === */
.watch-layout { display: flex; gap: 24px; max-width: 1800px; margin: 0 auto; }
.watch-primary { flex: 1; min-width: 0; }
.watch-secondary { width: 400px; flex-shrink: 0; }
.video-player-wrapper {
    position: relative; width: 100%; padding-top: 56.25%;
    background: #000; border-radius: var(--radius-md); overflow: hidden;
}
.video-player {
    position: absolute; inset: 0; width: 100%; height: 100%;
}
.watch-title { font-size: 20px; font-weight: 600; margin: 16px 0 8px; line-height: 1.3; }
.watch-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.watch-channel-info { display: flex; align-items: center; gap: 12px; }
.watch-channel-meta { display: flex; flex-direction: column; }
.watch-channel-name { font-weight: 600; font-size: 16px; display: flex; align-items: center; gap: 4px; }
.watch-channel-subs { font-size: 13px; color: var(--text-secondary); }
.watch-buttons { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.like-btn-group {
    display: flex; align-items: center; background: var(--bg-secondary);
    border-radius: 20px; overflow: hidden;
}
.like-btn-group button {
    padding: 8px 16px; font-size: 14px; font-weight: 500;
    display: flex; align-items: center; gap: 6px;
    transition: background var(--transition);
}
.like-btn-group button:hover { background: var(--bg-tertiary); }
.like-btn-group .divider { width: 1px; height: 24px; background: var(--border-color); }
.like-btn-group button.active { font-weight: 700; }

.watch-description {
    background: var(--bg-secondary); border-radius: var(--radius-md);
    padding: 12px; margin-bottom: 24px; font-size: 14px; cursor: pointer;
}
.watch-description .desc-header { display: flex; gap: 8px; font-weight: 500; margin-bottom: 4px; }
.watch-description .desc-text { white-space: pre-wrap; word-break: break-word; }
.watch-description.collapsed .desc-text {
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.watch-description .show-more { color: var(--text-secondary); font-weight: 600; margin-top: 8px; }

/* Comments */
.comments-section { margin-top: 24px; }
.comments-header { display: flex; align-items: center; gap: 24px; margin-bottom: 24px; }
.comments-count { font-size: 20px; font-weight: 600; }
.comments-sort { display: flex; gap: 8px; }
.comment-form { display: flex; gap: 12px; margin-bottom: 24px; }
.comment-input-wrapper { flex: 1; }
.comment-input {
    width: 100%; border: none; border-bottom: 1px solid var(--border-color);
    padding: 8px 0; font-size: 14px; background: transparent; outline: none;
    transition: border-color var(--transition);
}
.comment-input:focus { border-color: var(--text-primary); }
.comment-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; display: none; }
.comment-input:focus ~ .comment-actions { display: flex; }
.comment-item { display: flex; gap: 12px; margin-bottom: 16px; }
.comment-body { flex: 1; }
.comment-author { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.comment-author-name { font-size: 13px; font-weight: 600; }
.comment-author-name.owner { background: var(--bg-secondary); padding: 2px 8px; border-radius: 12px; }
.comment-time { font-size: 12px; color: var(--text-tertiary); }
.comment-text { font-size: 14px; line-height: 1.5; margin-bottom: 4px; white-space: pre-wrap; }
.comment-footer { display: flex; align-items: center; gap: 8px; }
.comment-footer button { font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; gap: 4px; }
.comment-replies { margin-left: 48px; margin-top: 8px; }
.pinned-badge { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.pinned-badge i { margin-right: 4px; }
.hearted-badge { color: var(--accent); font-size: 12px; display: flex; align-items: center; gap: 4px; }

/* Sidebar videos */
.sidebar-video { display: flex; gap: 8px; margin-bottom: 8px; cursor: pointer; }
.sidebar-video .video-thumbnail { width: 168px; min-width: 168px; padding-top: 94px; border-radius: var(--radius-sm); }
.sidebar-video .video-meta { padding-top: 0; }
.sidebar-video .video-title { font-size: 13px; -webkit-line-clamp: 2; }
.sidebar-video .video-channel { font-size: 12px; }
.sidebar-video .video-stats { font-size: 12px; }

/* === CHANNEL PAGE === */
.channel-banner {
    width: 100%; height: 200px; border-radius: var(--radius-md); overflow: hidden;
    background: var(--bg-secondary); margin-bottom: 16px;
}
.channel-banner img { width: 100%; height: 100%; object-fit: cover; }
.channel-header { display: flex; gap: 24px; align-items: flex-start; padding: 16px 0; }
.channel-info { flex: 1; }
.channel-name { font-size: 24px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.channel-handle { font-size: 14px; color: var(--text-secondary); margin-top: 2px; }
.channel-stats-inline { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }
.channel-desc-short { font-size: 14px; color: var(--text-secondary); margin-top: 8px; }
.channel-tabs {
    display: flex; gap: 0; border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px; overflow-x: auto;
}
.channel-tab {
    padding: 12px 24px; font-size: 15px; font-weight: 500; border: none; background: none;
    color: var(--text-secondary); border-bottom: 3px solid transparent;
    transition: all var(--transition); white-space: nowrap;
}
.channel-tab:hover { color: var(--text-primary); }
.channel-tab.active { color: var(--text-primary); border-bottom-color: var(--text-primary); }

/* === UPLOAD PAGE === */
.upload-area {
    border: 2px dashed var(--border-color); border-radius: var(--radius-lg);
    padding: 60px; text-align: center; transition: all var(--transition);
    cursor: pointer; margin-bottom: 24px;
}
.upload-area:hover, .upload-area.drag-over {
    border-color: var(--info); background: rgba(6,95,212,0.05);
}
.upload-icon { font-size: 48px; color: var(--text-tertiary); margin-bottom: 16px; }
.upload-text { font-size: 16px; margin-bottom: 8px; }
.upload-hint { font-size: 13px; color: var(--text-tertiary); }
.upload-form { max-width: 800px; }
.upload-progress {
    height: 4px; background: var(--bg-secondary); border-radius: 2px;
    overflow: hidden; margin: 16px 0; display: none;
}
.upload-progress-bar { height: 100%; background: var(--accent); width: 0; transition: width 0.3s; border-radius: 2px; }
.thumbnail-preview {
    width: 320px; height: 180px; border-radius: var(--radius-sm);
    background: var(--bg-secondary); overflow: hidden; margin-top: 8px;
}
.thumbnail-preview img { width: 100%; height: 100%; object-fit: cover; }

/* === SHORTS === */
.shorts-feed {
    display: flex; flex-direction: column; align-items: center; gap: 16px;
    max-width: 400px; margin: 0 auto;
}
.short-card {
    width: 100%; aspect-ratio: 9/16; border-radius: var(--radius-lg);
    overflow: hidden; position: relative; background: #000;
}
.short-card video { width: 100%; height: 100%; object-fit: cover; }
.short-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 60px 16px 16px; background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
}
.short-actions {
    position: absolute; right: 12px; bottom: 80px;
    display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.short-action { display: flex; flex-direction: column; align-items: center; gap: 4px; color: white; }
.short-action i { font-size: 24px; }
.short-action span { font-size: 12px; }

/* === STUDIO === */
.studio-layout { display: flex; gap: 24px; }
.studio-sidebar { width: 200px; flex-shrink: 0; }
.studio-content { flex: 1; min-width: 0; }
.studio-nav { display: flex; flex-direction: column; gap: 4px; }
.studio-nav-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px;
    border-radius: var(--radius-sm); font-size: 14px; transition: background var(--transition);
}
.studio-nav-item:hover { background: var(--bg-hover); }
.studio-nav-item.active { background: var(--bg-active); font-weight: 600; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); padding: 20px;
}
.stat-card-label { font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; }
.stat-card-value { font-size: 28px; font-weight: 700; }
.stat-card-change { font-size: 13px; margin-top: 4px; }
.stat-card-change.up { color: var(--success); }
.stat-card-change.down { color: var(--danger); }

/* Data Table */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { font-size: 12px; font-weight: 600; color: var(--text-secondary); text-align: left; padding: 12px; border-bottom: 1px solid var(--border-color); text-transform: uppercase; letter-spacing: 0.5px; }
.data-table td { padding: 12px; border-bottom: 1px solid var(--border-light); font-size: 14px; }
.data-table tr:hover { background: var(--bg-hover); }
.table-video-info { display: flex; align-items: center; gap: 12px; }
.table-thumb { width: 120px; height: 68px; border-radius: 4px; object-fit: cover; }
.table-video-title { font-weight: 500; }
.table-video-desc { font-size: 12px; color: var(--text-secondary); }

/* === MODALS === */
.modal {
    position: fixed; inset: 0; background: var(--bg-overlay);
    display: none; align-items: center; justify-content: center;
    z-index: 2000; padding: 16px;
}
.modal.show { display: flex; }
.modal-content {
    background: var(--bg-elevated); border-radius: var(--radius-lg);
    width: 100%; max-height: 90vh; overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
.modal-sm { max-width: 400px; }
.modal-md { max-width: 600px; }
.modal-lg { max-width: 900px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border-color); }
.modal-header h3 { font-size: 18px; font-weight: 600; }
.modal-body { padding: 16px 20px; }
.modal-footer { padding: 12px 20px; border-top: 1px solid var(--border-color); }

/* Share */
.share-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.share-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px; border-radius: var(--radius-sm); background: var(--bg-secondary); transition: background var(--transition); }
.share-btn:hover { background: var(--bg-tertiary); }
.share-btn i { font-size: 24px; }
.share-btn span { font-size: 12px; }
.share-url-box { display: flex; gap: 8px; }

/* Report */
.report-options { display: flex; flex-direction: column; gap: 8px; }
.radio-option { display: flex; align-items: center; gap: 8px; padding: 8px; cursor: pointer; border-radius: var(--radius-sm); }
.radio-option:hover { background: var(--bg-hover); }

/* === NOTIFICATIONS PAGE === */
.notif-list { max-width: 800px; }
.notif-item {
    display: flex; align-items: flex-start; gap: 16px; padding: 16px;
    border-radius: var(--radius-sm); transition: background var(--transition); cursor: pointer;
}
.notif-item:hover { background: var(--bg-hover); }
.notif-item.unread { background: var(--bg-secondary); }
.notif-content { flex: 1; }
.notif-text { font-size: 14px; }
.notif-time { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
.notif-thumb { width: 86px; height: 48px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--info); flex-shrink: 0; margin-top: 8px; }

/* === PLAYLIST PAGE === */
.playlist-layout { display: flex; gap: 24px; }
.playlist-sidebar-panel {
    width: 360px; flex-shrink: 0; background: linear-gradient(135deg, var(--info), #9333ea);
    border-radius: var(--radius-lg); padding: 24px; color: white; position: sticky; top: 80px; height: fit-content;
}
.playlist-panel-thumb { width: 100%; aspect-ratio: 16/9; border-radius: var(--radius-md); object-fit: cover; margin-bottom: 16px; }
.playlist-panel-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.playlist-panel-info { font-size: 14px; opacity: 0.9; margin-bottom: 4px; }
.playlist-videos { flex: 1; }
.playlist-video-item {
    display: flex; align-items: center; gap: 12px; padding: 8px;
    border-radius: var(--radius-sm); transition: background var(--transition);
}
.playlist-video-item:hover { background: var(--bg-hover); }
.playlist-video-num { width: 24px; text-align: center; font-size: 14px; color: var(--text-secondary); }
.playlist-video-thumb { width: 160px; min-width: 160px; aspect-ratio: 16/9; border-radius: 4px; object-fit: cover; }

/* === AUTH PAGES === */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - var(--navbar-height) - 48px); }
.auth-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 40px; width: 100%; max-width: 440px; }
.auth-title { font-size: 24px; font-weight: 700; text-align: center; margin-bottom: 8px; }
.auth-subtitle { font-size: 14px; color: var(--text-secondary); text-align: center; margin-bottom: 24px; }
.auth-divider { display: flex; align-items: center; gap: 16px; margin: 24px 0; color: var(--text-tertiary); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-color); }
.auth-footer { text-align: center; margin-top: 16px; font-size: 14px; color: var(--text-secondary); }
.auth-footer a { color: var(--text-link); font-weight: 500; }

/* === SETTINGS PAGE === */
.settings-layout { display: flex; gap: 24px; max-width: 1000px; margin: 0 auto; }
.settings-nav { width: 200px; flex-shrink: 0; }
.settings-content { flex: 1; }
.settings-section { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 24px; margin-bottom: 16px; }
.settings-section h3 { font-size: 18px; font-weight: 600; margin-bottom: 16px; }

/* === COMMUNITY === */
.community-post {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); padding: 16px; margin-bottom: 16px; max-width: 640px;
}
.community-post-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.community-post-image { width: 100%; border-radius: var(--radius-sm); margin: 12px 0; }
.poll-option-bar {
    padding: 10px 16px; border: 1px solid var(--border-color); border-radius: var(--radius-sm);
    margin-bottom: 8px; position: relative; overflow: hidden; cursor: pointer;
    transition: background var(--transition);
}
.poll-option-bar:hover { background: var(--bg-hover); }
.poll-option-fill {
    position: absolute; inset: 0; background: rgba(6,95,212,0.1); transform-origin: left;
}
.poll-option-text { position: relative; z-index: 1; display: flex; justify-content: space-between; }

/* === ADMIN === */
.admin-layout { display: flex; gap: 24px; }
.admin-sidebar { width: 220px; flex-shrink: 0; }
.admin-content { flex: 1; min-width: 0; }

/* === TOAST === */
.toast-container { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 3000; display: flex; flex-direction: column; gap: 8px; }
.toast {
    background: var(--text-primary); color: var(--bg-primary);
    padding: 12px 24px; border-radius: var(--radius-sm); font-size: 14px;
    box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 12px;
    animation: slideUp 0.3s ease;
}
.toast-action { color: var(--text-link); font-weight: 600; cursor: pointer; }

/* === PAGINATION === */
.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 24px 0; }
.page-btn {
    min-width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-full); font-size: 14px; transition: background var(--transition);
}
.page-btn:hover { background: var(--bg-hover); }
.page-btn.active { background: var(--bg-active); font-weight: 600; }

/* === EMPTY STATE === */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-secondary); }
.empty-state i { font-size: 64px; color: var(--text-tertiary); margin-bottom: 16px; }
.empty-state h3 { font-size: 20px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.empty-state p { font-size: 14px; max-width: 400px; margin: 0 auto; }

/* === SKELETON LOADING === */
.skeleton { background: var(--bg-secondary); border-radius: 4px; animation: shimmer 1.5s infinite; }
.skeleton-thumb { width: 100%; padding-top: 56.25%; border-radius: var(--radius-md); }
.skeleton-text { height: 14px; margin-bottom: 6px; }
.skeleton-text.w-75 { width: 75%; }
.skeleton-text.w-50 { width: 50%; }
.skeleton-circle { border-radius: var(--radius-full); }
@keyframes shimmer {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* === ANIMATIONS === */
@keyframes slideDown { from { transform: translateY(-10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* === UTILITIES === */
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 16px; } .mt-4 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 16px; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 16px; }
.d-flex { display: flex; } .flex-col { flex-direction: column; } .flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.text-center { text-align: center; } .text-right { text-align: right; }
.text-sm { font-size: 13px; } .text-lg { font-size: 18px; }
.text-muted { color: var(--text-secondary); } .text-danger { color: var(--danger); }
.fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* === RESPONSIVE === */
@media (max-width: 1200px) {
    .watch-secondary { width: 340px; }
}
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.show { display: block; }
    .main-content { margin-left: 0; }
    .watch-layout { flex-direction: column; }
    .watch-secondary { width: 100%; }
    .playlist-layout { flex-direction: column; }
    .playlist-sidebar-panel { width: 100%; position: static; }
    .studio-layout { flex-direction: column; }
    .studio-sidebar { width: 100%; }
    .studio-nav { flex-direction: row; overflow-x: auto; }
    .settings-layout { flex-direction: column; }
    .settings-nav { width: 100%; }
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; }
}
@media (max-width: 768px) {
    .navbar-center { display: none; }
    .main-content { padding: 16px; }
    .video-grid { grid-template-columns: 1fr; }
    .channel-header { flex-direction: column; align-items: center; text-align: center; }
    .auth-card { padding: 24px; }
    .share-links { grid-template-columns: repeat(2, 1fr); }
    .sidebar-video .video-thumbnail { width: 120px; min-width: 120px; padding-top: 68px; }
}
@media (max-width: 480px) {
    .watch-actions { flex-direction: column; align-items: flex-start; }
    .watch-buttons { width: 100%; overflow-x: auto; }
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile search */
@media (max-width: 768px) {
    .navbar { padding: 0 8px; }
    .navbar-left { min-width: auto; }
    .navbar-right { min-width: auto; }
}
