/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #0f0f0f;
    --bg2: #1a1a1a;
    --bg3: #242424;
    --border: #2e2e2e;
    --text: #e8e8e8;
    --text2: #999;
    --primary: #ff2d55;
    --primary-dark: #cc1f42;
    --accent: #ff6b35;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 4px 20px rgba(0,0,0,0.4);
    --font: 'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
input, textarea, select { font-family: var(--font); }

/* ===== NAVBAR ===== */
.navbar {
    position: sticky; top: 0; z-index: 100;
    background: rgba(15,15,15,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.nav-container {
    max-width: 1400px; margin: 0 auto;
    padding: 0 20px; height: 60px;
    display: flex; align-items: center; gap: 16px;
}
.nav-logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.2rem; white-space: nowrap; }
.logo-icon { color: var(--primary); font-size: 1.4rem; }
.logo-text { background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-search { flex: 1; max-width: 500px; display: flex; gap: 0; }
.nav-search input {
    flex: 1; background: var(--bg3); border: 1px solid var(--border);
    border-right: none; border-radius: var(--radius) 0 0 var(--radius);
    padding: 8px 14px; color: var(--text); font-size: 0.9rem;
    outline: none; transition: border-color 0.2s;
}
.nav-search input:focus { border-color: var(--primary); }
.nav-search button {
    background: var(--primary); border: none; padding: 8px 14px;
    border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer;
    color: white; font-size: 1rem;
}
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.4rem; cursor: pointer; }
.nav-mobile { display: none; flex-direction: column; padding: 10px 20px; border-top: 1px solid var(--border); }
.nav-mobile a { padding: 10px 0; border-bottom: 1px solid var(--border); color: var(--text); }
.nav-mobile-divider { height: 1px; background: var(--border); margin: 4px 0; opacity: 0.5; }
.user-menu { display: flex; align-items: center; gap: 8px; }
.user-name { font-size: 0.85rem; color: var(--text2); }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: var(--radius);
    font-size: 0.875rem; font-weight: 500; cursor: pointer;
    border: none; transition: all 0.2s; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-admin { background: var(--bg3); color: var(--text); border: 1px solid var(--border); }
.btn-admin:hover { background: var(--primary); color: white; border-color: var(--primary); }
.btn-sm { padding: 4px 10px; font-size: 0.8rem; }
.btn-lg { padding: 12px 24px; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-success { background: var(--success); color: white; }
.btn-warning { background: var(--warning); color: black; }
.btn-danger { background: var(--danger); color: white; }
.btn-ai { background: linear-gradient(135deg, #7c3aed, #2563eb); color: white; padding: 4px 10px; font-size: 0.8rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== MAIN ===== */
.main-content { max-width: 1400px; margin: 0 auto; padding: 24px 20px; min-height: calc(100vh - 120px); }

/* ===== HERO ===== */
.hero { text-align: center; padding: 60px 20px 40px; }
.hero h1 { font-size: 2.2rem; font-weight: 700; margin-bottom: 12px; }
.hero p { color: var(--text2); font-size: 1.1rem; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.highlight { color: var(--primary); }

/* ===== CATEGORIES ===== */
.categories-menu { margin-bottom: 24px; }
.categories-menu-header { display: flex; justify-content: flex-start; align-items: center; margin-bottom: 12px; }
.categories-select-wrap { display: flex; flex-direction: column; gap: 8px; min-width: 260px; }
.categories-select-label { font-size: 0.78rem; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: 0.06em; }
.categories-select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    padding: 10px 42px 10px 14px;
    border-radius: 14px;
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--text2) 50%),
        linear-gradient(135deg, var(--text2) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 3px),
        calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}
.categories-select:focus,
.categories-select:hover { border-color: var(--primary); }
.category-chip {
    padding: 6px 16px; border-radius: 20px;
    background: var(--bg3); border: 1px solid var(--border);
    font-size: 0.85rem; color: var(--text2); transition: all 0.2s;
}
.category-chip:hover, .category-chip.active {
    background: var(--primary); color: white; border-color: var(--primary);
}

/* ===== SECTION HEADER ===== */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-header h2 { font-size: 1.3rem; font-weight: 600; }
.video-count { color: var(--text2); font-size: 0.85rem; }

/* ===== VIDEOS GRID ===== */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}
.video-card { border-radius: var(--radius-lg); overflow: hidden; background: var(--bg2); transition: transform 0.2s, box-shadow 0.2s; }
.video-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.video-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--bg3); }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.video-card:hover .video-thumb img { transform: scale(1.05); }
.thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--text2); }
.thumb-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.3); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s; }
.video-card:hover .thumb-overlay { opacity: 1; }
.play-btn { width: 50px; height: 50px; background: rgba(255,255,255,0.9); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: var(--bg); padding-left: 4px; }
.duration { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,0.8); padding: 2px 6px; border-radius: 4px; font-size: 0.75rem; color: white; }
.thumb-lock { position: absolute; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; font-size: 0.9rem; color: var(--text); backdrop-filter: blur(2px); }
.video-info { padding: 12px; }
.video-title { font-size: 0.9rem; font-weight: 500; line-height: 1.4; margin-bottom: 6px; color: var(--text); }
.video-meta { display: flex; gap: 8px; font-size: 0.78rem; color: var(--text2); flex-wrap: wrap; }
.video-category { background: var(--bg3); padding: 2px 8px; border-radius: 10px; color: var(--primary); }

/* ===== PAGINATION ===== */
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 40px; }
.page-btn { padding: 8px 20px; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); transition: all 0.2s; }
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-info { color: var(--text2); font-size: 0.9rem; }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-icon { font-size: 3rem; display: block; margin-bottom: 16px; }
.empty-state p { color: var(--text2); margin-bottom: 20px; }

/* ===== VIDEO PAGE ===== */
.page-video { }
.video-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; }
.video-main { position: relative; }
.video-player-wrapper { position: relative; background: black; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16/9; }
.video-player-wrapper video { width: 100%; height: 100%; }
.video-feed-arrow {
    position: absolute;
    right: -56px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(15,15,15,0.92);
    border: 1px solid var(--border);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.video-feed-arrow:hover { transform: scale(1.06); border-color: var(--primary); background: rgba(255,45,85,0.14); }
.video-feed-prev { top: 18px; }
.video-feed-next { bottom: 18px; }
.video-feed-arrow span { font-size: 1.2rem; line-height: 1; }
.video-details { padding: 20px 0; }
.video-title-full { font-size: 1.4rem; font-weight: 600; margin-bottom: 12px; }
.video-stats-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.video-stats { display: flex; gap: 16px; color: var(--text2); font-size: 0.9rem; flex-wrap: wrap; align-items: center; }
.video-cat-badge { background: var(--bg3); padding: 3px 10px; border-radius: 10px; color: var(--primary); font-size: 0.8rem; }
.btn-fav { background: var(--bg3); border: 1px solid var(--border); color: var(--text); padding: 8px 16px; border-radius: var(--radius); cursor: pointer; font-size: 0.9rem; transition: all 0.2s; }
.btn-fav:hover, .btn-fav.active { background: var(--primary); border-color: var(--primary); color: white; }
.video-description { color: var(--text2); font-size: 0.95rem; line-height: 1.7; margin-bottom: 16px; }
.video-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { background: var(--bg3); padding: 4px 10px; border-radius: 14px; font-size: 0.8rem; color: var(--text2); }
.tag:hover { color: var(--primary); }

/* Comments */
.comments-section { margin-top: 32px; border-top: 1px solid var(--border); padding-top: 24px; }
.comments-section h3 { margin-bottom: 16px; }
.comment-form { margin-bottom: 24px; }
.comment-form textarea { width: 100%; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; color: var(--text); resize: vertical; margin-bottom: 8px; outline: none; }
.comment-form textarea:focus { border-color: var(--primary); }
.comment { display: flex; gap: 12px; margin-bottom: 16px; }
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; flex-shrink: 0; }
.comment-body { flex: 1; }
.comment-user { font-weight: 600; font-size: 0.9rem; margin-right: 8px; }
.comment-text { font-size: 0.9rem; color: var(--text2); margin: 4px 0; }
.comment-date { font-size: 0.75rem; color: var(--text2); }
.no-comments { color: var(--text2); font-size: 0.9rem; }

/* Sidebar */
.video-sidebar h3 { margin-bottom: 16px; font-size: 1rem; }
.related-card { display: flex; gap: 10px; margin-bottom: 12px; border-radius: var(--radius); overflow: hidden; transition: background 0.2s; padding: 4px; }
.related-card:hover { background: var(--bg2); }
.related-thumb { position: relative; width: 120px; height: 68px; border-radius: 6px; overflow: hidden; background: var(--bg3); flex-shrink: 0; }
.related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-info { flex: 1; }
.related-title { font-size: 0.82rem; font-weight: 500; line-height: 1.3; color: var(--text); }
.related-views { font-size: 0.75rem; color: var(--text2); }

/* ===== AUTH PAGES ===== */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 70vh; padding: 20px; }
.auth-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; width: 100%; max-width: 420px; }
.auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; justify-content: center; }
.auth-logo h1 { font-size: 1.4rem; font-weight: 700; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.auth-card h2 { font-size: 1.2rem; margin-bottom: 24px; text-align: center; color: var(--text2); }
.auth-footer { text-align: center; margin-top: 20px; font-size: 0.9rem; color: var(--text2); }
.auth-footer a { color: var(--primary); }
.auth-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.lock-icon { font-size: 3rem; text-align: center; margin-bottom: 16px; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 18px; }
.form-group label { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; font-weight: 500; margin-bottom: 6px; color: var(--text2); }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; background: var(--bg3); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 10px 14px; color: var(--text);
    font-size: 0.9rem; outline: none; transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--primary); }
.input-lg { padding: 14px 16px; font-size: 1rem; }
.form-hint { font-size: 0.78rem; color: var(--text2); margin-top: 4px; display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 12px; padding-top: 8px; }
.required { color: var(--primary); }

/* ===== ALERTS ===== */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 0.9rem; }
.alert-error { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.alert-success { background: rgba(34,197,94,0.15); border: 1px solid rgba(34,197,94,0.3); color: #86efac; }

/* ===== ADMIN ===== */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; gap: 0; min-height: calc(100vh - 60px); margin: -24px -20px; }
.admin-sidebar { background: var(--bg2); border-right: 1px solid var(--border); padding: 24px 0; }
.admin-sidebar-title { padding: 0 20px 16px; font-weight: 700; font-size: 0.9rem; color: var(--text2); text-transform: uppercase; letter-spacing: 0.05em; }
.admin-nav { display: flex; flex-direction: column; }
.admin-nav a { padding: 10px 20px; font-size: 0.9rem; color: var(--text2); transition: all 0.2s; border-left: 3px solid transparent; }
.admin-nav a:hover, .admin-nav a.active { background: var(--bg3); color: var(--text); border-left-color: var(--primary); }
.admin-main { padding: 32px; overflow: auto; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.admin-header h1 { font-size: 1.5rem; font-weight: 700; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.stat-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; display: flex; align-items: center; gap: 16px; }
.stat-icon { font-size: 2rem; }
.stat-value { font-size: 1.8rem; font-weight: 700; display: block; color: var(--primary); }
.stat-label { font-size: 0.8rem; color: var(--text2); }

/* Admin Table */
.admin-section { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.admin-section-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.admin-section-header h2 { font-size: 1rem; font-weight: 600; }
.admin-table-wrapper { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: auto; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { padding: 12px 16px; text-align: left; font-size: 0.8rem; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); background: var(--bg3); }
.admin-table td { padding: 12px 16px; font-size: 0.875rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg3); }
.table-video-title { display: flex; align-items: center; gap: 10px; }
.table-thumb { width: 64px; height: 36px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.table-thumb-placeholder { width: 64px; height: 36px; background: var(--bg3); border-radius: 4px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--text2); }
.table-actions { display: flex; gap: 6px; }
.empty-table { text-align: center; color: var(--text2); padding: 40px; }
.empty-table a { color: var(--primary); }

/* Status Badges */
.status-badge { padding: 3px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; text-transform: capitalize; }
.status-published { background: rgba(34,197,94,0.2); color: #4ade80; }
.status-draft { background: rgba(245,158,11,0.2); color: #fbbf24; }
.status-hidden { background: rgba(107,114,128,0.2); color: #9ca3af; }
.role-badge { padding: 3px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; text-transform: capitalize; }
.role-admin { background: rgba(255,45,85,0.2); color: #ff6b8a; }
.role-member { background: rgba(59,130,246,0.2); color: #60a5fa; }
.badge { background: var(--bg3); padding: 4px 12px; border-radius: 12px; font-size: 0.85rem; color: var(--text2); }
.text-muted { color: var(--text2); font-size: 0.8rem; }

/* Download page */
.download-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; max-width: 680px; margin-bottom: 32px; }
.progress-area { display: flex; align-items: center; gap: 20px; padding: 20px 0; }
.progress-spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress-text strong { display: block; margin-bottom: 4px; }
.progress-text p { color: var(--text2); font-size: 0.9rem; }
.success-area, .error-area { text-align: center; padding: 20px 0; }
.success-icon, .error-icon { font-size: 2.5rem; margin-bottom: 12px; }
.success-area h3 { color: var(--success); margin-bottom: 8px; }
.error-area h3 { color: var(--danger); margin-bottom: 8px; }
.success-area p, .error-area p { color: var(--text2); margin-bottom: 20px; }
.success-actions { display: flex; gap: 10px; justify-content: center; }

/* How it works */
.how-it-works { max-width: 680px; }
.how-it-works h3 { margin-bottom: 20px; color: var(--text2); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { text-align: center; padding: 20px 10px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.step-num { width: 36px; height: 36px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; margin: 0 auto 12px; font-size: 0.9rem; }
.step p { font-size: 0.82rem; color: var(--text2); }

/* Edit video */
.edit-video-layout { display: grid; grid-template-columns: 1fr 280px; gap: 24px; }
.edit-thumb { width: 100%; border-radius: var(--radius); margin-bottom: 16px; }
.edit-meta { font-size: 0.85rem; color: var(--text2); line-height: 2; margin-bottom: 16px; }
.edit-meta strong { color: var(--text); }
.original-desc { background: var(--bg3); padding: 12px; border-radius: var(--radius); font-size: 0.82rem; color: var(--text2); }
.original-desc strong { display: block; margin-bottom: 6px; color: var(--text); }

/* Toast */
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--bg3); border: 1px solid var(--border); padding: 12px 20px; border-radius: var(--radius); font-size: 0.9rem; z-index: 1000; box-shadow: var(--shadow); }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 20px; margin-top: 40px; }
.footer-container { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.footer-copy { color: var(--text2); font-size: 0.85rem; }

/* ===== TIKTOK EMBED PLAYER ===== */
.embed-wrapper { aspect-ratio: unset !important; background: transparent !important; border-radius: 0 !important; display: flex; justify-content: center; }
.tiktok-embed-container { display: flex; justify-content: center; width: 100%; }
.tiktok-embed-container blockquote { margin: 0 auto; }
.embed-unavailable { display: flex; align-items: center; justify-content: center; height: 400px; background: var(--bg3); border-radius: var(--radius-lg); color: var(--text2); font-size: 1rem; }

/* ===== MOBILE CARD OVERLAY (hidden on desktop) ===== */
.mobile-card-overlay { display: none; }
.video-card-link { display: block; text-decoration: none; color: inherit; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .video-layout { grid-template-columns: 1fr; }
    .video-feed-arrow {
        right: 12px;
        width: 38px;
        height: 38px;
        background: rgba(15,15,15,0.84);
    }
    .video-sidebar { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .video-sidebar h3 { grid-column: 1 / -1; }
    .related-card { flex-direction: column; }
    .related-thumb { width: 100%; height: 140px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .edit-video-layout { grid-template-columns: 1fr; }
}

/* ── Feed FAB ── */
.feed-fab {
    display: none;
}
@media (max-width: 768px) {
    .feed-fab {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 24px;
        right: 18px;
        z-index: 999;
        width: 54px;
        height: 54px;
        border-radius: 50%;
        background: #ff2d55;
        color: #fff;
        font-size: 20px;
        text-decoration: none;
        box-shadow: 0 4px 16px rgba(255,45,85,.5);
        transition: transform .15s, box-shadow .15s;
    }
    .feed-fab:active {
        transform: scale(.9);
        box-shadow: 0 2px 8px rgba(255,45,85,.4);
    }
}

@media (max-width: 768px) {
    /* ── Navbar ── */
    .nav-search { display: none; }
    .nav-actions { display: none; }
    .nav-toggle { display: block; }
    .nav-mobile.open { display: flex; }

    /* ── Admin ── */
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { display: none; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr; }

    /* ── Main layout ── */
    .main-content { padding: 0; }
    /* ── Categories: horizontal scroll ── */
    .categories-menu { margin-bottom: 0; }
    .categories-menu-header { padding: 10px 12px 0; margin-bottom: 8px; }
    .categories-select-wrap { width: 100%; min-width: 0; }
    .categories-select { font-size: 0.88rem; }

    /* ── SOCIAL FEED GRID ── */
    .videos-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2px;
        padding: 2px;
    }

    /* Each card becomes a portrait tile */
    .video-card {
        border-radius: 0;
        background: #000;
        transform: none !important;
        box-shadow: none !important;
    }
    .video-card-link { display: block; }

    /* Portrait thumbnail */
    .video-thumb {
        aspect-ratio: 9 / 16;
        border-radius: 0;
    }
    .video-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Hide desktop info below thumb */
    .desktop-info { display: none !important; }

    /* Show mobile title overlay */
    .mobile-card-overlay {
        display: block !important;
        position: absolute;
        bottom: 0; left: 0; right: 0;
        padding: 32px 8px 8px;
        background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.85) 100%);
    }
    .mobile-card-title {
        font-size: 0.72rem;
        font-weight: 600;
        color: #fff;
        line-height: 1.3;
        margin-bottom: 4px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .mobile-card-cat {
        display: inline-block;
        font-size: 0.62rem;
        color: #fff;
        background: var(--primary);
        padding: 1px 6px;
        border-radius: 6px;
        font-weight: 600;
    }

    /* Duration badge on mobile */
    .duration {
        bottom: auto;
        top: 6px;
        right: 6px;
    }

    /* Hover overlay — not needed on mobile */
    .thumb-overlay { display: none; }

    /* ── Video player page ── */
    .video-layout { grid-template-columns: 1fr; gap: 0; }
    .video-player-wrapper { border-radius: 0; aspect-ratio: 16/9; }
    .video-details { padding: 12px; }
    .video-title-full { font-size: 1.05rem; }
    .video-stats-bar { flex-direction: column; align-items: flex-start; gap: 8px; }
    .comments-section { padding: 12px; }
    .video-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 12px;
    }
    .video-sidebar h3 { grid-column: 1 / -1; }
    .related-card { flex-direction: column; }
    .related-thumb { width: 100%; height: 100px; }

    /* ── Footer ── */
    .footer { padding: 16px 12px; margin-top: 20px; }
    .footer-container { flex-direction: column; text-align: center; gap: 6px; }

    /* ── Section header ── */
    .section-header { padding: 0 12px; margin-bottom: 8px; }
    .hero { padding: 30px 16px 20px; }
    .hero h1 { font-size: 1.4rem; }
}
