/* =====================================================
   NetTube - עיצוב ייחודי, RTL, רספונסיבי
   ===================================================== */

/* --- משתני צבעים --- */
:root {
    --primary:         #1e40af;
    --primary-dark:    #1e3a8a;
    --primary-light:   #2563eb;
    --bg:              #f1f5f9;
    --bg-card:         #ffffff;
    --bg-input:        #f8fafc;
    --bg-header:       #1e293b;
    --bg-hover:        #f1f5f9;
    --bg-chip:         #1e293b;
    --text:            #1e293b;
    --text-muted:      #64748b;
    --text-secondary:  #94a3b8;
    --border:          #e2e8f0;
    --border-light:    #e2e8f0;
    --star-color:      #f59e0b;
    --success:         #10b981;
    --warning:         #f59e0b;
    --danger:          #ef4444;
    --radius:          16px;
    --radius-sm:       10px;
    --shadow:          0 4px 16px rgba(0,0,0,0.08);
    --shadow-hover:    0 8px 28px rgba(30,64,175,0.15);
    --transition:      0.18s ease;
    --header-h:        60px;
    --sidebar-w:       240px;
}

/* --- איפוס --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; overflow-x: hidden; }
body {
    overflow-x: hidden;
    font-family: 'Roboto', 'Rubik', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    direction: rtl;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--text); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: 1rem; }

/* =====================================================
   HEADER
   ===================================================== */
header {
    background: var(--bg-header);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-h);
    border-bottom: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.header-inner {
    height: 100%;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.logo {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
    white-space: nowrap;
    padding: 0 0.75rem;
    flex-shrink: 0;
}
.logo-img {
    height: 38px;
    width: auto;
    display: block;
    object-fit: contain;
    /* filter: brightness(0) invert(1); */
}
.header-search {
    flex: 1;
    display: flex;
    align-items: center;
    max-width: 560px;
    margin: 0 auto;
}
.header-search input {
    flex: 1;
    height: 40px;
    padding: 0 1.25rem;
    background: rgba(255,255,255,0.1);
    border: 1.5px solid rgba(255,255,255,0.2);
    border-inline-end: none;
    border-radius: 24px 0 0 24px;
    color: #ffffff;
    outline: none;
    font-size: 0.95rem;
    transition: border-color var(--transition), background var(--transition);
}
.header-search input::placeholder { color: rgba(255,255,255,0.5); }
.header-search input:focus {
    border-color: var(--primary-light);
    background: rgba(255,255,255,0.15);
}
.header-search button {
    height: 40px;
    padding: 0 1.25rem;
    background: var(--primary);
    border: 1.5px solid var(--primary);
    border-radius: 0 24px 24px 0;
    color: #ffffff;
    cursor: pointer;
    transition: background var(--transition);
    font-size: 1rem;
}
.header-search button:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
nav.main-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-inline-start: 0.5rem;
    flex-shrink: 0;
}
nav.main-nav a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.7);
    transition: all var(--transition);
    white-space: nowrap;
}
nav.main-nav a:hover, nav.main-nav a.active {
    background: rgba(255,255,255,0.15);
    color: #ffffff;
}
.btn-add-video {
    background: var(--primary) !important;
    color: #ffffff !important;
    border: none !important;
}
.btn-add-video:hover { background: var(--primary-dark) !important; }

/* Hamburger */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background var(--transition);
}
.hamburger:hover { background: rgba(255,255,255,0.15); }
.hamburger span { display: block; width: 20px; height: 2px; background: rgba(255,255,255,0.85); border-radius: 1px; transition: all 0.3s; }

/* =====================================================
   Layout
   ===================================================== */
main { flex: 1; }

.yt-layout { display: flex; min-height: calc(100vh - var(--header-h)); }

.yt-sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    padding: 16px 0;
    position: sticky;
    top: var(--header-h);
    align-self: flex-start;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--bg-card);
    border-inline-end: 1px solid var(--border-light);
    box-shadow: 2px 0 8px rgba(0,0,0,0.04);
}
.yt-sidebar::-webkit-scrollbar { width: 4px; }
.yt-sidebar::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 2px; }

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 10px 20px;
    font-size: 0.875rem;
    color: var(--text-muted);
    border-radius: 12px;
    margin: 2px 8px;
    transition: all var(--transition);
    cursor: pointer;
}
.sidebar-item:hover { background: rgba(30,64,175,0.07); color: var(--primary); }
.sidebar-item.active { background: rgba(30,64,175,0.12); color: var(--primary); font-weight: 600; }
.sidebar-item i { font-size: 1.1rem; width: 22px; text-align: center; color: inherit; }
.sidebar-divider { height: 1px; background: var(--border-light); margin: 10px 0; }
.sidebar-section-title { padding: 8px 20px; font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

.yt-content { flex: 1; min-width: 0; padding: 24px; }
.container { max-width: 1280px; margin: 0 auto; padding: 2rem 1.5rem; }

/* =====================================================
   Chips
   ===================================================== */
.chips-bar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 16px; margin-bottom: 24px; scrollbar-width: none; }
.chips-bar::-webkit-scrollbar { display: none; }
.chip {
    padding: 7px 18px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--transition);
    font-weight: 500;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.chip:hover { border-color: var(--primary); color: var(--primary); background: rgba(30,64,175,0.06); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #ffffff; box-shadow: 0 2px 8px rgba(30,64,175,0.3); }

/* =====================================================
   Section title
   ===================================================== */
.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
}
.section-title a { font-size: 0.85rem; font-weight: 400; color: var(--text-muted); margin-inline-start: auto; }
.section-title a:hover { color: var(--text); }

/* =====================================================
   Video Grid
   ===================================================== */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px 16px;
}
/* בוחר עמודות */
.cols-cycle-btn { background: var(--bg-card); border: 1px solid var(--border); cursor: pointer; width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--text); transition: all var(--transition); flex-shrink: 0; }
.cols-cycle-btn:hover { background: var(--bg-hover); border-color: var(--text-muted); }
@media (min-width: 769px) {
    .videos-grid[data-cols="3"] { grid-template-columns: repeat(3, 1fr); }
    .videos-grid[data-cols="4"] { grid-template-columns: repeat(4, 1fr); }
    .videos-grid[data-cols="5"] { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 768px) { .cols-cycle-btn { display: none; } }

/* Video Card */
.video-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    box-shadow: var(--shadow);
}
.video-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
/* .video-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--primary-light); } */


.video-thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #0f172a;
    border-radius: 0;
    margin-bottom: 0;
}
.video-thumb > a { display: block; width: 100%; height: 100%; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.video-card:hover .video-thumb img { transform: scale(1.05); }
/* Play overlay */
.video-thumb .play-overlay {
    display: flex;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    background: rgba(30,64,175,0.0);
    transition: background 0.25s;
}
.video-card:hover .video-thumb .play-overlay { background: rgba(0,0,0,0.15); }
.play-overlay-icon {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary);
    font-size: 1.3rem;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.25s, transform 0.25s;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.video-card:hover .play-overlay-icon { opacity: 1; transform: scale(1); }

.video-duration {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    backdrop-filter: blur(4px);
}
.video-status-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
}
.badge-active   { background: rgba(16,185,129,0.9); color: #fff; }
.badge-inactive { background: rgba(100,116,139,0.9); color: #fff; }
.badge-pending  { background: rgba(245,158,11,0.9); color: #000; }

/* מידע - עיצוב ייחודי */
.video-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px 14px;
    flex: 1;
}
.video-channel-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.8rem;
    flex-shrink: 0;
}
.video-info-right { flex: 1; min-width: 0; }
.video-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text);
    margin-bottom: 0;
}
.video-title a { color: var(--text); }
.video-meta { display: flex; flex-direction: column; gap: 3px; color: var(--text-muted); font-size: 0.78rem; }
.video-channel-name { color: var(--text-muted); font-size: 0.78rem; font-weight: 500; }
.video-stats-line { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.video-category {
    display: inline-block;
    background: rgba(30,64,175,0.08);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
}
.video-actions { display: none; gap: 0.4rem; padding: 4px 0 0; }
.video-card:hover .video-actions { display: flex; }

/* =====================================================
   כפתורים
   ===================================================== */
.btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 9px 20px; border-radius: 10px; font-size: 0.875rem; cursor: pointer; border: none; transition: all var(--transition); font-weight: 600; }
.btn-primary   { background: var(--primary); color: #ffffff; box-shadow: 0 2px 8px rgba(30,64,175,0.3); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 4px 14px rgba(30,64,175,0.4); transform: translateY(-1px); }
.btn-secondary { background: var(--bg-card) !important; color: var(--text) !important; border: 1.5px solid var(--border) !important; }
.btn-secondary:hover { background: var(--bg-hover) !important; border-color: var(--primary-light) !important; color: var(--primary) !important; }
.btn-fav { background: var(--bg-card); color: var(--text-muted); border: 1.5px solid var(--border); padding: 6px 14px; border-radius: 10px; font-size: 0.8rem; transition: all var(--transition); }
.btn-fav.active, .btn-fav:hover { background: #fef3c7; border-color: #f59e0b; color: #d97706; }
/* כפתור מועדפים על התמונה */
.video-thumb .btn-fav { position: absolute; top: 8px; left: 8px; background: none; border: none; border-radius: 0; width: 36px; height: 36px; padding: 0; font-size: 1.35rem; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.25s, color 0.2s, text-shadow 0.2s, transform 0.2s; z-index: 3; color: rgba(255,255,255,0.9); text-shadow: 0 2px 6px rgba(0,0,0,0.55); backdrop-filter: none; box-shadow: none; }
.video-card:hover .video-thumb .btn-fav { opacity: 1; }
.video-thumb .btn-fav.active { color: #f59e0b; text-shadow: 0 0 10px rgba(245,158,11,0.8), 0 2px 8px rgba(0,0,0,0.4); opacity: 1; background: none; }
.video-thumb .btn-fav:hover { color: #fbbf24; text-shadow: 0 0 14px rgba(251,191,36,0.95), 0 0 6px rgba(245,158,11,0.7), 0 2px 8px rgba(0,0,0,0.4); transform: scale(1.25) rotate(-8deg); background: none; box-shadow: none; }
.video-thumb .btn-fav .fav-icon { display: inline-block; transition: transform 0.2s; }
.video-thumb .btn-fav:hover .fav-icon { transform: scale(1.15); }
.btn-sm { padding: 4px 12px; font-size: 0.8rem; }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--primary-dark); color: #fff; }
.btn-success { background: var(--success); color: #fff; }

/* =====================================================
   טופס צור קשר
   ===================================================== */
.contact-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 18px; padding: 2.5rem 2rem; box-shadow: 0 4px 24px rgba(0,0,0,0.07); }
.contact-header { text-align: center; margin-bottom: 2rem; }
.contact-header i { font-size: 2.5rem; color: var(--primary); opacity: 0.8; }
.contact-header h1 { font-size: 1.6rem; margin: 0.5rem 0 0.3rem; }
.contact-header p { color: var(--text-muted); margin: 0; }
.contact-form { display: flex; flex-direction: column; gap: 1.1rem; }
.contact-form .form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.contact-form label { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.contact-form .req { color: var(--danger); }
.contact-form input, .contact-form textarea { background: var(--bg); border: 1.5px solid var(--border); border-radius: 10px; padding: 10px 14px; font-size: 0.95rem; color: var(--text); font-family: inherit; transition: border-color var(--transition); resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,64,175,0.1); }
.contact-submit { width: 100%; padding: 12px; font-size: 1rem; border-radius: 10px; margin-top: 0.5rem; }

/* =====================================================
   ניהול פניות
   ===================================================== */
.contact-admin-list { display: flex; flex-direction: column; gap: 1rem; }
.contact-admin-item { background: var(--bg-card); border: 1.5px solid var(--border-light); border-radius: 14px; padding: 1.25rem 1.5rem; transition: box-shadow var(--transition); }
.contact-admin-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.contact-item-new { border-color: var(--primary); border-width: 2px; background: rgba(30,64,175,0.03); }
.contact-admin-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.contact-sender { display: flex; flex-direction: column; gap: 0.2rem; }
.contact-email { font-size: 0.82rem; color: var(--primary); text-decoration: none; }
.contact-email:hover { text-decoration: underline; }
.contact-admin-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; }
.contact-subject { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.6rem; display: flex; align-items: center; gap: 0.4rem; }
.contact-message-body { background: var(--bg); border: 1px solid var(--border-light); border-radius: 8px; padding: 0.75rem 1rem; font-size: 0.9rem; line-height: 1.6; color: var(--text); white-space: pre-wrap; margin-bottom: 1rem; max-height: 180px; overflow-y: auto; }
.contact-admin-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }

/* =====================================================
   מדיניות פרטיות ותנאי שימוש
   ===================================================== */
.privacy-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; border-bottom: 2px solid var(--border-light); padding-bottom: 0; }
.privacy-tab { display: flex; align-items: center; gap: 0.5rem; padding: 10px 20px; border-radius: 10px 10px 0 0; font-size: 0.9rem; font-weight: 600; color: var(--text-muted); border: 1.5px solid transparent; border-bottom: none; transition: all var(--transition); margin-bottom: -2px; }
.privacy-tab:hover { color: var(--primary); background: rgba(30,64,175,0.05); }
.privacy-tab.active { color: var(--primary); background: var(--bg-card); border-color: var(--border-light); border-bottom-color: var(--bg-card); }
.privacy-card { background: var(--bg-card); border: 1.5px solid var(--border-light); border-radius: 0 16px 16px 16px; padding: 2rem 2.5rem; box-shadow: 0 4px 24px rgba(0,0,0,0.07); }
.privacy-section { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border-light); }
.privacy-section:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.privacy-section h2 { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }
.privacy-section h2 i { color: var(--primary); font-size: 0.95rem; width: 18px; }
.privacy-section p { color: var(--text-muted); line-height: 1.8; margin-bottom: 0.5rem; }
.privacy-section ul { color: var(--text-muted); line-height: 1.8; padding-inline-start: 1.5rem; }
.privacy-section ul li { margin-bottom: 0.25rem; }
.privacy-section a { color: var(--primary); text-decoration: underline; }
@media (max-width: 600px) { .privacy-card { padding: 1.25rem 1rem; } .privacy-tab { padding: 8px 12px; font-size: 0.82rem; } }

/* =====================================================
   דירוג כוכבים
   ===================================================== */
.stars { display: flex; gap: 2px; direction: ltr; }
.star { font-size: 1rem; color: #444; cursor: default; }
.star.filled { color: var(--star-color); }
.stars-interactive .star { cursor: pointer; transition: color var(--transition); }
.stars-interactive .star:hover, .stars-interactive .star.hover { color: var(--star-color); }

/* =====================================================
   טפסים
   ===================================================== */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; margin-bottom: 0.4rem; font-size: 0.875rem; color: var(--text-muted); }
.form-control {
    width: 100%;
    padding: 10px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    outline: none;
    transition: border-color var(--transition);
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,64,175,0.12); }
.form-control::placeholder { color: var(--text-secondary); }
textarea.form-control { min-height: 100px; resize: vertical; }
select.form-control option { background: var(--bg-card); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* =====================================================
   Card
   ===================================================== */
.card { background: var(--bg-card); border-radius: var(--radius); border: none; padding: 1.5rem; box-shadow: var(--shadow); }
.card-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 1.25rem; }

/* =====================================================
   Alerts
   ===================================================== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.alert-success { background: rgba(16,185,129,0.1);  border: 1.5px solid rgba(16,185,129,0.4);  color: #059669; }
.alert-error   { background: rgba(239,68,68,0.1);    border: 1.5px solid rgba(239,68,68,0.4);    color: #dc2626; }
.alert-warning { background: rgba(245,158,11,0.1);  border: 1.5px solid rgba(245,158,11,0.4);  color: #d97706; }
.alert-info    { background: rgba(30,64,175,0.08);  border: 1.5px solid rgba(30,64,175,0.3);   color: var(--primary); }

/* =====================================================
   Tabs
   ===================================================== */
.tabs { display: flex; border-bottom: 1px solid var(--border-light); margin-bottom: 2rem; }
.tab-btn { padding: 12px 24px; background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.9rem; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all var(--transition); }
.tab-btn.active, .tab-btn:hover { color: var(--primary); border-bottom-color: var(--primary); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* =====================================================
   Filters / Sort
   ===================================================== */
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.filter-label { color: var(--text-muted); font-size: 0.875rem; }
.sort-btn { padding: 6px 14px; border-radius: 20px; background: var(--bg-card); border: 1.5px solid var(--border); color: var(--text-muted); cursor: pointer; font-size: 0.85rem; transition: all var(--transition); font-weight: 500; }
.sort-btn.active, .sort-btn:hover { background: var(--primary); border-color: var(--primary); color: #ffffff; }

/* =====================================================
   עמוד סרטון
   ===================================================== */
.video-player-wrap { position: relative; padding-top: 56.25%; background: #0f172a; border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; box-shadow: 0 8px 32px rgba(0,0,0,0.25); }
#yt-player-div { position: absolute; inset: 0; width: 100%; height: 100%; }
.video-player-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; display: block; }
.video-page-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 8px; line-height: 1.4; }
.video-page-meta { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; color: var(--text-muted); font-size: 0.875rem; align-items: center; }
.video-page-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin: 12px 0;
}
.video-page-actions .btn { background: var(--bg-hover); color: var(--text); border-radius: 10px; padding: 8px 16px; font-size: 0.875rem; border: 1.5px solid var(--border); }
.video-page-actions .btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(30,64,175,0.07); }
.video-page-actions .btn.active { background: var(--primary); color: #ffffff; border-color: var(--primary); }

.video-layout { display: grid; grid-template-columns: 1fr 402px; gap: 24px; align-items: start; max-width: 1280px; margin: 0 auto; padding: 24px; }
.related-videos h3 { font-size: 1rem; font-weight: 600; margin-bottom: 12px; }
.related-card { display: flex; gap: 10px; margin-bottom: 10px; padding: 8px; border-radius: var(--radius-sm); transition: background var(--transition), transform var(--transition); cursor: pointer; border: 1.5px solid transparent; }
.related-card:hover { background: rgba(30,64,175,0.05); border-color: var(--primary-light); transform: translateX(-2px); }
.related-card img { width: 160px; height: 90px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.related-card-info { flex: 1; padding: 2px 0; }
.related-card-title { font-size: 0.875rem; line-height: 1.3; font-weight: 500; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 4px; }
.related-card-meta { font-size: 0.75rem; color: var(--text-muted); }

/* =====================================================
   קטגוריות
   ===================================================== */
.categories-hero { background: linear-gradient(135deg, #334155 0%, #475569 100%); padding: 2.5rem 1.5rem 1.5rem; border-bottom: none; color: #fff; border-radius: 0 0 24px 24px; margin-bottom: 1rem; }
.categories-hero h1 { font-size: 1.5rem; font-weight: 700; color: #ffffff; }
.categories-hero h1 { font-size: 1.4rem; font-weight: 600; }
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin-bottom: 2rem; }
.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1.25rem 1rem;
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}
.category-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); border-color: var(--primary); }
.category-card.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(255,0,0,0.18); }
.category-card.active .category-name, .category-card.active .category-count { color: var(--text); }
.category-icon { font-size: 2rem; width: 52px; height: 52px; border-radius: 50%; background: rgba(255,0,0,0.08); display: flex; align-items: center; justify-content: center; color: var(--primary); margin-bottom: 0.25rem; }
.category-name { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.category-count { color: var(--text-muted); font-size: 0.75rem; margin-top: 0; }

/* Hero (חיפוש) */
.hero { background: linear-gradient(135deg, #1e293b 0%, #1e3a8a 100%); padding: 3.5rem 1.5rem 2.5rem; text-align: center; }
.hero h1 { font-size: clamp(1.5rem, 4vw, 2.4rem); margin-bottom: 0.5rem; color: #ffffff; }
.hero h1 span { color: #93c5fd; }
.hero p { color: rgba(255,255,255,0.7); margin-bottom: 1.75rem; font-size: 1rem; }
.hero-search { display: flex; max-width: 600px; margin: 0 auto; }
.hero-search input { flex: 1; height: 50px; padding: 0 1.25rem; background: rgba(255,255,255,0.1); border: 1.5px solid rgba(255,255,255,0.25); border-inline-end: none; border-radius: 14px 0 0 14px; color: #ffffff; outline: none; font-size: 1rem; }
.hero-search input::placeholder { color: rgba(255,255,255,0.5); }
.hero-search input:focus { border-color: #93c5fd; background: rgba(255,255,255,0.15); }
.hero-search button { height: 50px; padding: 0 1.5rem; background: var(--primary); border: 1.5px solid var(--primary); border-radius: 0 14px 14px 0; color: #ffffff; cursor: pointer; font-size: 1.1rem; transition: background var(--transition); }
.hero-search button:hover { background: var(--primary-dark); }

/* =====================================================
   פרופיל
   ===================================================== */
.profile-header { display: flex; align-items: center; gap: 2rem; padding: 2rem 0; border-bottom: 1px solid var(--border-light); margin-bottom: 2rem; }
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; background: var(--primary-dark); display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #fff; flex-shrink: 0; }
.profile-name { font-size: 1.5rem; font-weight: 700; }
.profile-email { color: var(--text-muted); font-size: 0.875rem; margin-top: 4px; }
.profile-stats { display: flex; gap: 2rem; margin-top: 0.75rem; }
.stat-item { text-align: center; }
.stat-value { font-size: 1.2rem; font-weight: 700; color: var(--text); }
.stat-label { font-size: 0.75rem; color: var(--text-muted); }

/* =====================================================
   Auth
   ===================================================== */
.auth-page { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.auth-card { background: var(--bg-card); border: none; border-radius: var(--radius); padding: 2.5rem; width: 100%; max-width: 420px; box-shadow: 0 12px 40px rgba(0,0,0,0.12); }
.auth-card h2 { text-align: center; margin-bottom: 2rem; font-size: 1.5rem; }
.auth-toggle { text-align: center; margin-top: 1.5rem; color: var(--text-muted); font-size: 0.875rem; }
.auth-toggle a { color: var(--primary); font-weight: 600; }
.auth-toggle a:hover { text-decoration: underline; }

/* =====================================================
   Admin
   ===================================================== */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - var(--header-h)); }
.admin-sidebar { background: var(--bg-card); border-inline-end: 1px solid var(--border-light); padding: 1.5rem 0; box-shadow: 2px 0 8px rgba(0,0,0,0.04); }
.admin-sidebar h3 { padding: 0 1.5rem 0.75rem; font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; }
.admin-sidebar a { display: flex; align-items: center; gap: 0.75rem; padding: 10px 20px; color: var(--text-muted); font-size: 0.875rem; transition: all var(--transition); border-radius: 10px; margin: 2px 8px; }
.admin-sidebar a:hover { background: rgba(30,64,175,0.07); color: var(--primary); }
.admin-sidebar a.active { background: rgba(30,64,175,0.12); color: var(--primary); font-weight: 600; border-inline-end: none; border-inline-start: 3px solid var(--primary); }
.admin-content { padding: 24px; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat-card { background: var(--bg-card); border: none; border-radius: var(--radius); padding: 1.25rem; text-align: center; box-shadow: var(--shadow); transition: transform var(--transition), box-shadow var(--transition); }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.stat-card .value { font-size: 1.75rem; font-weight: 700; color: var(--primary); }
.stat-card .label { color: var(--text-muted); font-size: 0.8rem; margin-top: 4px; }

/* =====================================================
   Tables
   ===================================================== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: none; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: right; border-bottom: 1px solid var(--border-light); font-size: 0.875rem; }
th { background: var(--bg-card); font-weight: 600; color: var(--text-muted); font-size: 0.8rem; }
tbody tr:hover td { background: var(--bg-hover); }
tbody tr:last-child td { border-bottom: none; }
.status-badge { padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.status-active   { background: rgba(43,166,64,0.2);  color: #5ac970; }
.status-inactive { background: rgba(255,0,0,0.15);   color: #ff7070; }
.status-pending  { background: rgba(255,152,0,0.2);  color: #ffb74d; }

/* =====================================================
   Pagination
   ===================================================== */
.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 2.5rem; flex-wrap: wrap; }
.page-btn { min-width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; padding: 0 8px; border-radius: var(--radius-sm); background: transparent; border: none; color: var(--text-muted); font-size: 0.875rem; transition: all var(--transition); cursor: pointer; }
.page-btn:hover { background: var(--bg-hover); color: var(--text); }
.page-btn.active { background: var(--primary); color: #ffffff; font-weight: 700; box-shadow: 0 2px 8px rgba(30,64,175,0.3); }
.page-btn.disabled { opacity: 0.3; cursor: default; pointer-events: none; }

/* =====================================================
   Modal
   ===================================================== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; pointer-events: none; transition: opacity var(--transition); }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius); padding: 2rem; width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; transform: scale(0.95); transition: transform var(--transition); }
.modal-overlay.open .modal-box { transform: scale(1); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.4rem; border-radius: 50%; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; }
.modal-close:hover { background: var(--bg-hover); color: var(--text); }

/* =====================================================
   Footer
   ===================================================== */
footer { background: #1e293b; border-top: none; padding: 2rem 1.5rem; text-align: center; color: rgba(255,255,255,0.5); font-size: 0.8rem; }
footer a { color: rgba(255,255,255,0.5); }
footer a:hover { color: rgba(255,255,255,0.85); }
.footer-inner { max-width: 1280px; margin: 0 auto; }
.footer-links { display: flex; justify-content: center; gap: 1.25rem; flex-wrap: wrap; margin-bottom: 0.75rem; }

/* =====================================================
   Empty state
   ===================================================== */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text-muted); }
.empty-state .icon { font-size: 3.5rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state h3 { font-size: 1.2rem; margin-bottom: 0.5rem; color: var(--text); }

/* Spinner */
.spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 2rem auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Tooltip */
[data-tooltip] { position: relative; }
[data-tooltip]::after { content: attr(data-tooltip); position: absolute; bottom: calc(100% + 6px); right: 50%; transform: translateX(50%); background: #303030; color: var(--text); padding: 4px 10px; border-radius: 4px; white-space: nowrap; font-size: 0.78rem; opacity: 0; pointer-events: none; transition: opacity var(--transition); z-index: 100; }
[data-tooltip]:hover::after { opacity: 1; }

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 1280px) {
    .video-layout { grid-template-columns: 1fr 360px; }
    .yt-sidebar { width: 200px; }
    :root { --sidebar-w: 200px; }
}
@media (max-width: 1024px) {
    /* ----- Layout ----- */
    .yt-sidebar { display: none; }
    :root { --sidebar-w: 0px; }
    .yt-layout { display: block; }
    .yt-content { padding: 16px; }
    /* ----- וידאו ----- */
    .video-layout { grid-template-columns: 1fr; padding: 16px; }
    .related-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
    .related-card { flex-direction: column; }
    .related-card img { width: 100%; height: 140px; }
    /* ----- Header - המבורגר + nav dropdown ----- */
    .hamburger { display: flex; }
    nav.main-nav {
        display: none;
        position: fixed;
        top: var(--header-h);
        right: 0; left: 0;
        background: #1e293b;
        flex-direction: column;
        padding: 0.5rem;
        border-bottom: none;
        box-shadow: 0 8px 24px rgba(0,0,0,0.3);
        z-index: 999;
        gap: 0;
    }
    nav.main-nav.open { display: flex; }
    nav.main-nav a { border-radius: var(--radius-sm); padding: 10px 16px; font-size: 0.9rem; color: rgba(255,255,255,0.75); }
    nav.main-nav a:hover { background: rgba(255,255,255,0.1); color: #ffffff; }
}
@media (max-width: 768px) {
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { display: none; }
    .form-row { grid-template-columns: 1fr; }
    .profile-header { flex-direction: column; text-align: center; }
    .profile-stats { justify-content: center; }
    .categories-grid { grid-template-columns: repeat(3, 1fr); }
    .videos-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
}
@media (max-width: 480px) {
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .card { padding: 1rem; }
    .auth-card { padding: 1.5rem; }
    .videos-grid { grid-template-columns: 1fr; }
    /* לוגו קומפקטי בפלאפון קטן */
    .logo { font-size: 1.1rem; padding: 0 0.25rem; }
    .logo .logo-yt { padding: 2px 5px; font-size: 1rem; }
}
