/* ===========================
   VideoBrain - Global Styles
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Syne:wght@400;500;600;700;800&display=swap');

:root {
    /* Dark theme (default) */
    --bg-primary: #0f1117;
    --bg-secondary: #161b27;
    --bg-tertiary: #1e2535;
    --bg-card: #1a2030;
    --bg-hover: #222840;
    --border: #2a3348;
    --border-light: #3a4560;

    --text-primary: #e8eaf2;
    --text-secondary: #8b96b0;
    --text-muted: #5a6480;

    --accent: #4f7ef8;
    --accent-hover: #6b93ff;
    --accent-glow: rgba(79, 126, 248, 0.25);
    --accent2: #f5a623;
    --accent2-hover: #ffc045;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;

    --sidebar-width: 240px;
    --header-height: 60px;

    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 16px;

    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-accent: 0 4px 20px var(--accent-glow);

    --transition: 0.2s ease;
}

[data-theme="light"] {
    --bg-primary: #f0f2f8;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8ecf5;
    --bg-card: #ffffff;
    --bg-hover: #eef1f9;
    --border: #dde2ef;
    --border-light: #c8cfe0;

    --text-primary: #1a2035;
    --text-secondary: #4a5568;
    --text-muted: #8896b0;

    --accent: #3b6ef0;
    --accent-hover: #2b5de0;
    --accent-glow: rgba(59, 110, 240, 0.2);
    --accent2: #e8931a;

    --shadow: 0 4px 24px rgba(0,0,0,0.1);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
}

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

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
}

/* ======= SCROLLBAR ======= */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ======= LAYOUT ======= */
#app { display: flex; min-height: 100vh; }

/* ======= LANDING PAGE ======= */
#landing-page {
    min-height: 100vh;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
}

.landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 60px;
    border-bottom: 1px solid var(--border);
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Syne', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.landing-logo .brain-icon { font-size: 1.8rem; }
.landing-logo span { color: var(--accent); }

.landing-nav-links { display: flex; gap: 12px; }

.landing-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 40px;
    position: relative;
    overflow: hidden;
}

.landing-hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.landing-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 28px;
    font-weight: 500;
}

.landing-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    max-width: 800px;
}

.landing-title .highlight {
    background: linear-gradient(135deg, var(--accent), #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin-bottom: 40px;
    line-height: 1.7;
}

.landing-cta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 60px;
}

.landing-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    max-width: 900px;
    width: 100%;
    padding: 0 20px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: left;
    transition: border-color var(--transition), transform var(--transition);
}

.feature-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.feature-card .icon { font-size: 2rem; margin-bottom: 14px; }
.feature-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.feature-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }

/* ======= AUTH PAGES ======= */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg-primary);
}

.auth-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow);
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
    font-family: 'Syne', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-primary);
}

.auth-logo span { color: var(--accent); }

.auth-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.auth-subtitle { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 28px; }

/* ======= FORMS ======= */
.form-group { margin-bottom: 18px; }

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.92rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder { color: var(--text-muted); }

.form-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.form-checkbox-row input { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }

/* ======= BUTTONS ======= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-accent);
    transform: translateY(-1px);
}

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

.btn-secondary:hover { background: var(--bg-hover); border-color: var(--border-light); }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }

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

.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }
.btn-full { width: 100%; }

.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* ======= SIDEBAR ======= */
#sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s ease;
    overflow: hidden;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 18px;
    font-family: 'Syne', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-primary);
}

.sidebar-logo span { color: var(--accent); }

.sidebar-body { flex: 1; overflow-y: auto; padding: 12px 0; }

.sidebar-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 10px 18px 4px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: 0;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    position: relative;
}

.sidebar-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-item.active {
    background: var(--bg-hover);
    color: var(--accent);
}

.sidebar-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    border-radius: 0 2px 2px 0;
}

.sidebar-item .badge {
    margin-left: auto;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 0.72rem;
    padding: 1px 7px;
    border-radius: 100px;
    min-width: 20px;
    text-align: center;
}

.sidebar-folder-icon { font-size: 1rem; }

.sidebar-footer {
    padding: 14px;
    border-top: 1px solid var(--border);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition);
}

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

.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    overflow: hidden;
    flex-shrink: 0;
}

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

.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-username { font-size: 0.88rem; font-weight: 600; truncate; }
.sidebar-role { font-size: 0.72rem; color: var(--text-muted); }

/* ======= HEADER ======= */
#header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 20px;
    z-index: 99;
    backdrop-filter: blur(10px);
}

.header-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ======= SEARCH ======= */
.search-wrapper {
    position: relative;
    flex: 1;
    max-width: 500px;
}

.search-input {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 36px 8px 14px;
    border-radius: 100px;
    font-family: inherit;
    font-size: 0.88rem;
    outline: none;
    transition: all var(--transition);
}

.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 200;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

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

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background var(--transition);
    text-decoration: none;
    color: var(--text-primary);
}

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

.search-result-thumb {
    width: 48px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

.search-result-title { font-size: 0.85rem; font-weight: 500; }
.search-result-meta { font-size: 0.75rem; color: var(--text-muted); }

/* ======= MAIN CONTENT ======= */
#main {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    flex: 1;
    min-height: calc(100vh - var(--header-height));
    padding: 24px;
}

/* ======= VIDEO GRID ======= */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.video-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}

.video-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.video-thumb-wrapper {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumb { transform: scale(1.03); }

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

.video-type-badge {
    position: absolute;
    bottom: 6px;
    left: 6px;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.video-type-badge.short { background: #ff4444; color: white; }
.video-type-badge.video { background: var(--accent); color: white; }

.video-public-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 0.65rem;
    padding: 2px 7px;
    border-radius: 100px;
    font-weight: 600;
}

.video-public-badge.public { background: rgba(34, 197, 94, 0.2); color: var(--success); border: 1px solid rgba(34,197,94,0.3); }
.video-public-badge.private { background: rgba(100, 100, 120, 0.3); color: var(--text-muted); border: 1px solid var(--border); }

.video-info { padding: 12px; }

.video-title {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

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

.video-action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    font-family: inherit;
}

.video-action-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.video-action-btn.liked { color: #ef4444; }
.video-action-btn.liked:hover { color: #dc2626; }

/* ======= ADD VIDEO FORM ======= */
.add-video-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.add-video-bar .form-input { flex: 1; min-width: 200px; }

/* ======= VIDEO PREVIEW ======= */
.video-preview-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    margin-top: 12px;
    display: flex;
    gap: 14px;
    align-items: center;
}

.video-preview-thumb {
    width: 100px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
}

.video-preview-info { flex: 1; }
.video-preview-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; }
.video-preview-meta { font-size: 0.78rem; color: var(--text-muted); }
.video-preview-type { 
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    margin-top: 6px;
}

/* ======= MODAL ======= */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

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

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

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

.modal-title { font-family: 'Syne', sans-serif; font-size: 1.1rem; font-weight: 700; }

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-size: 1.2rem;
    transition: all var(--transition);
}

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

.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ======= VIDEO PLAYER MODAL ======= */
.player-modal { max-width: 900px; }

.player-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius);
    background: #000;
    margin-bottom: 16px;
}

.player-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

/* ======= NOTIFICATIONS ======= */
.notif-btn {
    position: relative;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    font-size: 1.2rem;
    transition: all var(--transition);
}

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

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--danger);
    color: white;
    font-size: 0.62rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    display: none;
}

.notif-badge.visible { display: flex; }

/* ======= TOAST ======= */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 18px;
    font-size: 0.88rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.3s ease;
    max-width: 300px;
}

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

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--accent); }

/* ======= PAGINATION ======= */
.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    margin-top: 28px;
}

.page-btn {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
    transition: all var(--transition);
}

.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: white; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ======= EMPTY STATE ======= */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-state .icon { font-size: 3.5rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.empty-state p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 20px; }

/* ======= ADMIN PANEL ======= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.stat-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; margin-bottom: 6px; }
.stat-value { font-family: 'Syne', sans-serif; font-size: 2rem; font-weight: 700; }

.table-wrapper { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

th {
    padding: 10px 12px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-hover); }

/* ======= PROFILE PAGE ======= */
.profile-header {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
}

.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar:hover::after {
    content: '📷';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border-radius: 50%;
}

/* ======= THEME TOGGLE ======= */
.theme-toggle {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    transition: all var(--transition);
    color: var(--text-secondary);
    flex-shrink: 0;
}

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

/* ======= MENU TOGGLE (mobile) ======= */
.menu-toggle {
    display: none;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* ======= RESPONSIVE ======= */
@media (max-width: 900px) {
    :root { --sidebar-width: 0px; }

    #sidebar {
        transform: translateX(-240px);
        width: 240px;
        z-index: 300;
        box-shadow: var(--shadow);
    }

    #sidebar.open { transform: translateX(0); }

    #header { left: 0; }

    #main { margin-left: 0; padding: 16px; }

    .menu-toggle { display: flex; }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 299;
    }

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

    .landing-nav { padding: 16px 24px; }
    .landing-hero { padding: 50px 20px; }
    .landing-cta { flex-direction: column; align-items: center; }
}

@media (max-width: 600px) {
    .video-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
    .add-video-bar { flex-direction: column; }
    .auth-box { padding: 28px 20px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ======= UTILITIES ======= */
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.section-title { font-family: 'Syne', sans-serif; font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; }
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.hidden { display: none !important; }
.tag { display: inline-flex; align-items: center; gap: 4px; background: var(--bg-tertiary); border: 1px solid var(--border); padding: 3px 10px; border-radius: 100px; font-size: 0.75rem; color: var(--text-secondary); }
