/* ============================================================
   יוסי עריכות — Dark Red Theme
   ============================================================ */

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

:root {
    --bg-primary:   #0e0101;
    --bg-sidebar:   #180303;
    --bg-card:      #220404;
    --bg-card2:     #2a0505;
    --bg-input:     #220404;
    --bg-surface:   #1a0303;

    --accent:       #ff4444;
    --accent-dim:   #cc2222;
    --accent-light: #ff7777;
    --accent-glow:  rgba(255, 68, 68, 0.18);

    --text-primary:   #ffffff;
    --text-secondary: #f0d0d0;
    --text-muted:     #c09090;
    --text-accent:    #ff4444;

    --border:        rgba(255, 68, 68, 0.15);
    --border-hover:  rgba(255, 68, 68, 0.3);
    --border-accent: rgba(255, 68, 68, 0.5);

    --danger:  #ff5555;
    --warning: #ffbb33;
    --success: #44dd88;

    --sidebar-width: 300px;
    --header-height: 64px;
    --radius:    12px;
    --radius-sm: 8px;
    --radius-lg: 18px;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.5);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.6);
    --shadow-lg: 0 8px 36px rgba(0,0,0,0.7);

    --transition:      all 0.2s ease;
    --transition-fast: all 0.12s ease;
}

/* Light mode */
body.light-mode {
    --bg-primary:   #f5f0f0;
    --bg-sidebar:   #fff0f0;
    --bg-card:      #ffffff;
    --bg-card2:     #fdf0f0;
    --bg-input:     #fff0f0;
    --bg-surface:   #fafafa;

    --accent:       #cc2222;
    --accent-dim:   #aa1111;
    --accent-light: #ee4444;
    --accent-glow:  rgba(204, 34, 34, 0.12);

    --text-primary:   #1a0000;
    --text-secondary: #4a1010;
    --text-muted:     #6a2020;
    --text-accent:    #cc2222;

    --border:        rgba(204, 34, 34, 0.2);
    --border-hover:  rgba(204, 34, 34, 0.4);
    --border-accent: rgba(204, 34, 34, 0.6);

    --shadow-sm: 0 1px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

/* Light mode overrides for hardcoded dark elements */
body.light-mode .header {
    background: rgba(255, 245, 245, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
body.light-mode .sidebar {
    background: var(--bg-sidebar);
}
body.light-mode .sidebar-search input,
body.light-mode .sidebar-sort select {
    background: #ffffff;
    border-color: rgba(204, 34, 34, 0.25);
}
body.light-mode .content-header,
body.light-mode .tabs {
    background: var(--bg-sidebar);
}
body.light-mode .modal {
    background: #fff5f5;
}
body.light-mode .modal-loading {
    background: rgba(255, 245, 245, 0.95);
}
body.light-mode .video-item:hover {
    background: rgba(204, 34, 34, 0.06);
}
body.light-mode .video-item.active {
    background: rgba(204, 34, 34, 0.1);
}
body.light-mode .btn-ghost {
    background: rgba(204, 34, 34, 0.04);
    border-color: rgba(204, 34, 34, 0.2);
    color: var(--text-primary);
}
body.light-mode .fab-button {
    box-shadow: 0 4px 16px rgba(204, 34, 34, 0.25);
}
body.light-mode .content-card,
body.light-mode .platform-card {
    background: #ffffff;
    border-color: rgba(204, 34, 34, 0.15);
}
body.light-mode .chat-bubble.user {
    background: rgba(204, 34, 34, 0.08);
}
body.light-mode .chat-bubble.assistant {
    background: #ffffff;
}

/* ============================================================
   Lucide Icon Sizes
   ============================================================ */
.icon-xs { width: 14px; height: 14px; vertical-align: -2px; }
.icon-sm { width: 18px; height: 18px; vertical-align: -3px; }
.icon-md { width: 22px; height: 22px; vertical-align: -4px; }

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

body {
    font-family: 'Heebo', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    direction: rtl;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.65;
}

/* ============================================================
   Header
   ============================================================ */
.header {
    position: fixed;
    top: 10px; left: 14px; right: 14px;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: var(--header-height);
    background: rgba(18, 2, 2, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}

.header-brand { display: flex; align-items: center; gap: 12px; }

.header-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.header-actions { display: flex; align-items: center; gap: 10px; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.87rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    border-color: var(--accent-dim);
}
.btn-primary:hover { background: var(--accent-light); }
.btn-primary:active { background: var(--accent-dim); }

.btn-accent {
    background: var(--accent-glow);
    color: var(--accent-light);
    border-color: var(--border-accent);
}
.btn-accent:hover { background: rgba(255, 68, 68, 0.28); }

.btn-ghost {
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    border-color: rgba(255,100,100,0.25);
}
.btn-ghost:hover { background: rgba(255,68,68,0.1); color: var(--text-primary); border-color: var(--border-hover); }

.btn-danger {
    background: rgba(255, 68, 68, 0.1);
    color: var(--danger);
    border-color: rgba(255, 68, 68, 0.3);
}
.btn-danger:hover { background: rgba(255, 68, 68, 0.22); }

.btn-sm  { padding: 4px 10px; font-size: 0.8rem; }
.btn-lg  { padding: 12px 28px; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.icon-btn {
    background: transparent; border: none;
    font-size: 1.1rem; color: var(--text-secondary);
    cursor: pointer; padding: 8px; border-radius: 50%;
    transition: var(--transition-fast);
}
.icon-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }

/* ============================================================
   Layout
   ============================================================ */
.layout {
    display: flex;
    height: calc(100vh - var(--header-height) - 24px);
    margin-top: calc(var(--header-height) + 24px);
}

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px 8px;
}
.sidebar-header h2 { font-size: 1rem; font-weight: 600; color: var(--text-primary); }

.badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 24px; height: 24px; padding: 0 8px; border-radius: 12px;
    background: var(--accent-glow); color: var(--accent); font-size: 0.75rem; font-weight: 600;
}

.sidebar-search { padding: 4px 18px 10px; }
.sidebar-global-action { padding: 0 18px 8px; }

.sidebar-search input,
.sidebar-sort select {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,100,100,0.3);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit; font-size: 0.85rem;
    transition: var(--transition);
}
.sidebar-search input:focus,
.sidebar-sort select:focus { outline: none; border-color: var(--accent); }
.sidebar-search input::placeholder { color: var(--text-muted); }

.sidebar-sort { padding: 0 18px 8px; }
.sidebar-sort select { appearance: none; cursor: pointer; }

.video-list {
    flex: 1; overflow-y: auto; padding: 4px 10px 10px;
}
.video-list::-webkit-scrollbar { width: 4px; }
.video-list::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 4px; }

.video-item {
    padding: 10px 12px; border-radius: var(--radius-sm);
    cursor: pointer; transition: var(--transition);
    border: 1px solid transparent; margin-bottom: 4px;
}
.video-item:hover {
    background: rgba(255,68,68,0.08);
    border-color: var(--border);
}
.video-item.active {
    background: rgba(255,68,68,0.14);
    border-color: var(--border-accent);
}

.video-item-title {
    font-size: 0.87rem; font-weight: 500; color: var(--text-primary);
    margin-bottom: 4px;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.video-item-meta { font-size: 0.73rem; color: var(--text-muted); display: flex; gap: 10px; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-secondary); }
.empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-state p { margin-bottom: 4px; }
.text-muted { color: var(--text-muted); font-size: 0.83rem; }

/* ============================================================
   Main Content
   ============================================================ */
.main-content { flex: 1; overflow-y: auto; padding: 0; }
.main-content::-webkit-scrollbar { width: 6px; }
.main-content::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 4px; }

/* Welcome Screen */
.welcome-screen {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; height: 100%; text-align: center; padding: 40px;
    animation: fadeIn 0.4s ease;
}
.welcome-icon { font-size: 64px; margin-bottom: 20px; }
.welcome-screen h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.welcome-screen p { color: var(--text-secondary); margin-bottom: 24px; }

/* Content Header */
.content-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-sidebar);
}
.content-title { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.content-meta { display: flex; align-items: center; gap: 10px; }
.meta-badge {
    padding: 4px 12px; background: var(--bg-card2); border-radius: var(--radius-sm);
    font-size: 0.8rem; color: var(--text-secondary); border: 1px solid var(--border);
}

/* ============================================================
   Tabs
   ============================================================ */
.tabs {
    display: flex; gap: 2px; padding: 12px 24px 0;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border);
    overflow-x: auto; position: sticky; top: 0; z-index: 10;
}
.tab {
    padding: 10px 16px; border: none; background: transparent;
    color: var(--text-secondary); font-family: inherit; font-size: 0.87rem; font-weight: 500;
    cursor: pointer; transition: var(--transition);
    border-bottom: 2px solid transparent;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0; white-space: nowrap;
}
.tab:hover { color: var(--text-primary); background: rgba(255,68,68,0.07); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); background: rgba(255,68,68,0.09); font-weight: 600; }

/* ============================================================
   Tab Panels
   ============================================================ */
.tab-panels { padding: 24px; }
.tab-panel { display: none; animation: fadeIn 0.25s ease; }
.tab-panel.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}

.panel-header { margin-bottom: 18px; }
.panel-header h3 { font-size: 1rem; font-weight: 600; color: var(--text-primary); }

/* ============================================================
   Transcript
   ============================================================ */
.transcript-container {
    max-height: calc(100vh - 280px); overflow-y: auto; padding-left: 8px;
}
.transcript-container::-webkit-scrollbar { width: 4px; }
.transcript-container::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 4px; }

.transcript-entry {
    display: flex; gap: 12px; padding: 7px 10px; border-radius: var(--radius-sm);
    transition: var(--transition-fast); align-items: flex-start;
}
.transcript-entry:hover { background: rgba(255,68,68,0.06); }

.transcript-time {
    font-size: 0.75rem; color: var(--accent); font-weight: 600;
    min-width: 55px; padding-top: 2px;
    font-family: 'Courier New', monospace; direction: ltr; text-align: left; cursor: pointer;
}
.transcript-time:hover { text-decoration: underline; }
.transcript-text { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }

/* ============================================================
   Chat
   ============================================================ */
.chat-container { display: flex; flex-direction: column; height: calc(100vh - 280px); }
.chat-messages { flex: 1; overflow-y: auto; padding: 10px 0; }
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 4px; }

.chat-welcome { text-align: center; padding: 60px 20px; }
.chat-welcome-icon { font-size: 48px; margin-bottom: 16px; }
.chat-welcome p { margin-bottom: 6px; color: var(--text-secondary); }

.chat-bubble {
    max-width: 85%; padding: 12px 16px; border-radius: var(--radius);
    margin-bottom: 10px; font-size: 0.9rem; line-height: 1.7; animation: fadeIn 0.25s ease;
}
.chat-bubble.user {
    background: rgba(255,68,68,0.12); border: 1px solid var(--border-accent); margin-left: auto;
    color: var(--text-primary);
}
.chat-bubble.assistant {
    background: var(--bg-card2); border: 1px solid var(--border); margin-right: auto;
    color: var(--text-primary);
}
.chat-bubble.assistant .timestamp-link { color: var(--accent); cursor: pointer; text-decoration: underline; }

.chat-input-area {
    display: flex; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border);
}
.chat-input-area input {
    flex: 1; padding: 10px 16px;
    background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text-primary); font-family: inherit; font-size: 0.9rem; transition: var(--transition);
}
.chat-input-area input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-glow); }
.chat-input-area input::placeholder { color: var(--text-muted); }

/* ============================================================
   Content Cards Grid
   ============================================================ */
.content-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 20px;
}

.content-card, .platform-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 22px; transition: var(--transition);
}
.content-card:hover, .platform-card:hover {
    background: var(--bg-card2); border-color: var(--border-hover);
}

.card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.card-icon {
    font-size: 26px; width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-glow); border-radius: var(--radius); border: 1px solid var(--border-accent);
}
.card-header h3 { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.card-desc { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 16px; line-height: 1.6; }

/* ============================================================
   Posts Grid
   ============================================================ */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }

.platform-icon {
    width: 40px; height: 40px; border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; font-weight: 700; color: #fff;
}
.platform-icon.linkedin  { background: #0077b5; }
.platform-icon.facebook  { background: #1877f2; }
.platform-icon.instagram { background: linear-gradient(135deg, #f09433, #dc2743, #bc1888); }
.platform-icon.twitter   { background: #222; }

/* ============================================================
   Generated Content
   ============================================================ */
.generated-content { margin-top: 16px; position: relative; }
.generated-content:empty { display: none; }

.generated-text {
    background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px; font-size: 0.88rem; line-height: 1.75; color: var(--text-secondary);
    white-space: pre-wrap; max-height: 500px; overflow-y: auto; animation: fadeIn 0.3s ease;
}
.generated-text::-webkit-scrollbar { width: 4px; }
.generated-text::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 4px; }

.copy-btn {
    position: absolute; top: 8px; left: 8px;
    padding: 4px 12px; background: var(--bg-card2); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-secondary);
    font-family: inherit; font-size: 0.75rem; cursor: pointer; transition: var(--transition-fast); z-index: 2;
}
.copy-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ============================================================
   Clips Section
   ============================================================ */
.clips-section { margin-bottom: 24px; }

.video-preview {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 20px;
}
.video-preview h3 { margin-bottom: 14px; font-size: 1rem; color: var(--text-primary); }
.video-embed { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; background: #000; }
.video-embed iframe { width: 100%; height: 100%; border: none; }

/* ============================================================
   Modal
   ============================================================ */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.75);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; animation: fadeIn 0.2s ease;
}
.modal {
    background: #1a0303;
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg); width: 90%; max-width: 520px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.8); overflow: hidden; position: relative;
    animation: slideUp 0.25s ease;
}
.modal-lg { max-width: 800px; height: 80vh; display: flex; flex-direction: column; }
.chat-modal-body { flex: 1; display: flex; flex-direction: column; padding: 0 24px 24px; height: calc(100% - 70px); }
.chat-modal-body .chat-container { height: 100%; }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px 12px; border-bottom: 1px solid var(--border);
}
.modal-header h2 { font-size: 1.1rem; font-weight: 600; color: var(--text-primary); }
.modal-close {
    background: none; border: none; font-size: 24px;
    color: var(--text-muted); cursor: pointer; padding: 4px; transition: var(--transition-fast);
}
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 16px 24px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 6px; font-weight: 500; }
.form-group input {
    width: 100%; padding: 10px 14px;
    background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text-primary); font-family: inherit; font-size: 0.9rem; transition: var(--transition);
}
.form-group input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-glow); }
.form-group input::placeholder { color: var(--text-muted); }
.input-ltr { direction: ltr; text-align: left; }

.modal-hint {
    display: flex; align-items: center; gap: 6px; padding: 10px 14px;
    background: rgba(255, 187, 51, 0.08); border: 1px solid rgba(255, 187, 51, 0.2);
    border-radius: var(--radius-sm); font-size: 0.8rem; color: var(--warning);
}
.modal-footer { display: flex; justify-content: flex-start; gap: 10px; padding: 14px 24px 20px; }

.modal-loading {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(20, 2, 2, 0.93);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 16px; z-index: 10;
}
.modal-loading p { color: var(--text-secondary); font-size: 0.88rem; }

/* ============================================================
   Spinner & Loading
   ============================================================ */
.spinner {
    width: 36px; height: 36px;
    border: 3px solid rgba(255,68,68,0.2);
    border-top-color: var(--accent);
    border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-inline {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px; color: var(--text-secondary); font-size: 0.85rem;
}
.loading-inline .spinner { width: 18px; height: 18px; border-width: 2px; }

.loading-placeholder {
    text-align: center; padding: 60px 20px; color: var(--text-muted);
}

/* ============================================================
   FAB
   ============================================================ */
.fab-container {
    position: fixed; bottom: 28px; left: 28px; z-index: 999;
    cursor: pointer; transition: var(--transition);
}
.fab-button {
    background: var(--accent-dim);
    color: #fff; font-weight: 700;
    padding: 14px 24px; border-radius: 50px;
    box-shadow: 0 6px 20px rgba(255,68,68,0.35);
    display: flex; align-items: center; gap: 10px;
    font-size: 1rem; transition: var(--transition);
}
.fab-container:hover .fab-button {
    background: var(--accent);
    box-shadow: 0 10px 28px rgba(255,68,68,0.5);
    transform: translateY(-3px);
}

/* ============================================================
   Toast
   ============================================================ */
.toast-container {
    position: fixed; bottom: 24px; left: 24px; z-index: 9999;
    display: flex; flex-direction: column; gap: 8px;
}
.toast {
    padding: 12px 20px; border-radius: var(--radius-sm);
    font-size: 0.85rem; font-weight: 500; box-shadow: var(--shadow-lg);
    animation: toastIn 0.25s ease; display: flex; align-items: center; gap: 8px; max-width: 400px;
    color: var(--text-primary);
}
.toast.success { background: rgba(68, 221, 136, 0.15); border: 1px solid rgba(68, 221, 136, 0.35); color: var(--success); }
.toast.error   { background: rgba(255, 68, 68, 0.15);  border: 1px solid rgba(255, 68, 68, 0.4);  color: var(--danger); }
.toast.info    { background: rgba(255, 200, 50, 0.12); border: 1px solid rgba(255, 200, 50, 0.3); color: var(--warning); }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.toast-exit { animation: toastOut 0.25s ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
    .layout { flex-direction: column; }
    .sidebar { width: 100%; min-width: 100%; max-height: 260px; border-left: none; border-bottom: 1px solid var(--border); }
    .content-grid, .posts-grid { grid-template-columns: 1fr; }
    .tab-panels { padding: 16px; }
    .tabs { padding: 8px 16px 0; }
    .header { top: 6px; left: 8px; right: 8px; padding: 0 12px; border-radius: var(--radius); }
    .header-actions { gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
    .header-actions .btn { padding: 4px 8px; font-size: 0.75rem; }
    .header-brand { min-width: 0; }
    .header-brand img { width: 32px !important; height: 32px !important; }
    .header-title { font-size: 0.95rem; }
    .header-subtitle { display: none; }
}

@media (max-width: 480px) {
    .header { top: 4px; left: 6px; right: 6px; padding: 0 10px; }
    .header-actions .btn span,
    .header-actions .btn:not(#addVideoBtn) { font-size: 0; gap: 0; padding: 6px; }
    .header-actions .btn:not(#addVideoBtn) .icon-sm,
    .header-actions .btn:not(#addVideoBtn) i { font-size: initial; }
}

/* ============================================================
   Utility
   ============================================================ */
.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

@keyframes float {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

/* ============================================================
   Focus Visible — Keyboard Accessibility
   ============================================================ */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}
:focus:not(:focus-visible) {
    outline: none;
}

/* ============================================================
   Prefers Reduced Motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}

/* ============================================================
   Cursor & Interaction Polish
   ============================================================ */
.video-item,
.content-card,
.platform-card,
.tab,
.btn,
.icon-btn,
.transcript-time,
.copy-btn,
.fab-container,
.modal-close {
    cursor: pointer;
}

/* Card lift effect on hover */
.content-card:hover, .platform-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 68, 68, 0.12);
}

/* Tab active glow */
.tab.active {
    box-shadow: inset 0 -2px 8px rgba(255, 68, 68, 0.15);
}

/* Sidebar item active bar */
.video-item.active {
    border-right: 3px solid var(--accent);
}

/* Better scrollbar track */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 68, 68, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 68, 68, 0.35);
}
