:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --bg: #f1f5f9;
  --bg-card: #ffffff;
  --bg-dark: #0f172a;
  --bg-header: #1e293b;
  --text: #1e293b;
  --text-light: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: .2s ease;
  --max-width: 1200px;
  --header-h: 64px;
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Hebrew", sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -120px;
  background: var(--primary);
  color: #fff !important;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 10000;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-md);
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 1rem;
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 { line-height: 1.3; font-weight: 700; }

/* ====== HEADER ====== */
.site-header {
  background: var(--bg-header);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  height: var(--header-h);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: #fff;
  letter-spacing: -.02em;
}

/* Future: <img class="site-logo__img" src="/images/logo-xoox.png" alt="XooX" width="120" height="36"> */
.site-logo__img {
  height: 36px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  border-radius: 6px;
}

.site-logo__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .1rem;
  line-height: 1.15;
}

.site-logo__brand {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.03em;
}

.site-logo__brand .site-logo__accent {
  color: var(--accent);
}

.site-logo__sub {
  font-size: .68rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: .04em;
}

/* Desktop Nav */
.main-nav { display: flex; align-items: center; gap: .25rem; }
.main-nav a {
  color: #cbd5e1;
  font-size: .875rem;
  font-weight: 500;
  padding: .5rem .875rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}
.main-nav a:hover,
.main-nav a.active {
  color: #fff;
  background: rgba(255,255,255,.1);
}

/* Mobile: אקראי + תפריט המבורגר */
.header-mobile-tools {
  display: none;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.header-random-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff !important;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  white-space: nowrap;
  line-height: 1.2;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.header-random-btn:hover {
  background: rgba(99, 102, 241, 0.55);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff !important;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: .5rem;
  border-radius: var(--radius-sm);
}
.menu-toggle:hover { background: rgba(255,255,255,.1); }
.menu-toggle svg { width: 26px; height: 26px; }

/* Mobile nav */
.mobile-nav {
  display: none;
  background: var(--bg-header);
  border-top: 1px solid rgba(255,255,255,.08);
  padding: .75rem 1.25rem 1rem;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block;
  color: #cbd5e1;
  font-size: .95rem;
  padding: .65rem 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.mobile-nav a:hover { color: #fff; }

@media (max-width: 768px) {
  .main-nav { display: none; }
  .header-mobile-tools { display: flex; }
  .menu-toggle { display: flex; }
}

/* ====== MAIN LAYOUT ====== */
.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

/* Breadcrumbs (פירורי לחם — SEO + נגישות) */
.breadcrumbs {
  margin-bottom: 1rem;
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .5rem;
  list-style: none;
  font-size: .82rem;
  color: var(--text-muted);
}

.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.breadcrumbs__item + .breadcrumbs__item::before {
  content: "/";
  margin-inline-end: .5rem;
  color: var(--text-muted);
  font-weight: 400;
}

.breadcrumbs a {
  color: var(--text-light);
  font-weight: 500;
}

.breadcrumbs a:hover {
  color: var(--primary);
}

.breadcrumbs__current {
  color: var(--text);
  font-weight: 600;
  max-width: min(100%, 42rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .breadcrumbs__current {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}

/* 404 */
.page-404 .site-main {
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-page {
  text-align: center;
  padding: 2rem 1rem;
  max-width: 28rem;
}

.error-page__title {
  font-size: 1.5rem;
  margin-bottom: .75rem;
  color: var(--text);
}

.error-page__text {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.error-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
}

.error-page__btn {
  display: inline-block;
  padding: .65rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .9rem;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--bg-card);
  transition: background var(--transition), color var(--transition);
}

.error-page__btn:hover {
  background: var(--bg);
  color: var(--primary);
}

.error-page__btn--primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.error-page__btn--primary:hover {
  background: var(--primary-dark);
  color: #fff;
}

.page-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: start;
}

/* עמוד היסטוריה בלבד: תוכן ההיסטוריה למעלה, סרגל (🔥/📈 וכו׳) מתחת — לא ליד */
body.page-history .page-layout {
  grid-template-columns: 1fr;
}

@media (max-width: 960px) {
  .page-layout { grid-template-columns: 1fr; }
}

/* ====== VIDEO GRID ====== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .video-grid { grid-template-columns: 1fr; }
}

/* ====== VIDEO CARD ====== */
.video-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.video-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.video-card__thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #e2e8f0;
}

.video-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.video-card:hover .video-card__thumb img {
  transform: scale(1.05);
}

.video-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.25);
  opacity: 0;
  transition: opacity var(--transition);
}

.video-card:hover .video-card__play { opacity: 1; }

.video-card__play svg {
  width: 48px;
  height: 48px;
  fill: #fff;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.3));
}

.video-card__body {
  padding: .875rem 1rem;
}

.video-card__title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: .35rem;
  min-height: 2.5em;
}

.video-card__meta {
  font-size: .78rem;
  color: var(--text-muted);
}

/* ====== VIDEO DETAIL PAGE ====== */
.video-detail-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 960px) {
  .video-detail-layout { grid-template-columns: 1fr; }
}

.video-player-wrap {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* מניעת קפיצת פריסה (CLS) לפני טעינת הווידאו */
.video-player-wrap--aspect {
  aspect-ratio: 16 / 9;
  max-height: min(75vh, 92vw);
  margin: 0 auto;
}

.video-player-wrap video,
.video-player-wrap .vv-video {
  width: 100%;
  height: 100%;
  display: block;
  max-height: 75vh;
  object-fit: contain;
}

.video-player-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  line-height: 1.4;
  padding: 0 0.15rem;
}

.video-page-cta {
  margin: 1.25rem 0 0.5rem;
  display: flex;
  justify-content: center;
}

.video-page-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff !important;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  transition: filter 0.2s ease, transform 0.15s ease;
}

.video-page-cta__btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.video-shelf {
  margin-top: 1.75rem;
  padding: 1.25rem 1rem 1.35rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.video-shelf__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-light);
}

.video-shelf__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .video-shelf__grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

.video-shelf__card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

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

.video-shelf__thumb {
  aspect-ratio: 16 / 9;
  background: #0f172a;
  overflow: hidden;
}

.video-shelf__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-shelf__cap {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  padding: 0 0.5rem 0.65rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-info {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1rem;
  box-shadow: var(--shadow);
}

.video-info h1 {
  font-size: 1.25rem;
  margin-bottom: .75rem;
  line-height: 1.5;
  white-space: pre-line;
}

.video-info__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .85rem;
  color: var(--text-light);
  padding-top: .75rem;
  border-top: 1px solid var(--border);
  margin-top: .75rem;
}

.video-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .75rem;
}

.video-tags a {
  display: inline-block;
  background: var(--bg);
  color: var(--primary);
  font-size: .8rem;
  font-weight: 500;
  padding: .3rem .7rem;
  border-radius: 20px;
  transition: all var(--transition);
  border: 1px solid var(--border);
}

.video-tags a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ====== VIDEO PAGE: share, community, report ====== */
.vv-engage {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.vv-engage__block {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.vv-engage__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
  color: var(--text);
}

.vv-engage__hint {
  font-size: 0.88rem;
  color: var(--text-light);
  margin-bottom: 0.85rem;
  line-height: 1.5;
}

.vv-share-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.vv-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.vv-share-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.vv-share-btn--fb:hover { background: #1877f2; border-color: #1877f2; }
.vv-share-btn--x:hover { background: #000; border-color: #000; }
.vv-share-btn--wa:hover { background: #25d366; border-color: #25d366; }
.vv-share-btn--tg:hover { background: #26a5e4; border-color: #26a5e4; }
.vv-share-btn--li:hover { background: #0a66c2; border-color: #0a66c2; }
.vv-share-btn--rd:hover { background: #ff4500; border-color: #ff4500; }

.vv-community-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.vv-community-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  color: #fff;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: filter var(--transition), transform 0.15s ease;
}

.vv-community-btn:hover {
  filter: brightness(1.08);
  color: #fff;
}

.vv-community-btn--wa {
  background: linear-gradient(135deg, #25d366, #128c7e);
}

.vv-community-btn--tg {
  background: linear-gradient(135deg, #26a5e4, #229ed9);
}

.vv-btn-report {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.vv-btn-report:hover {
  background: #fef3c7;
  border-color: var(--accent);
  color: var(--text);
}

.vv-report-dialog {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  max-width: 32rem;
  width: min(32rem, 94vw);
  box-shadow: var(--shadow-lg);
}

.vv-report-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.vv-report-dialog__inner {
  padding: 1.35rem 1.5rem 1.5rem;
  position: relative;
}

.vv-report-dialog__close {
  position: absolute;
  top: 0.5rem;
  left: 0.65rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-light);
  padding: 0.25rem 0.45rem;
}

.vv-report-dialog__close:hover {
  color: var(--text);
}

.vv-report-dialog h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-left: 2rem;
}

.vv-field {
  margin-bottom: 0.85rem;
}

.vv-field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.vv-req { color: #dc2626; }

.vv-field select,
.vv-field textarea,
.vv-field input[type="email"] {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.95rem;
}

.vv-field textarea {
  resize: vertical;
  min-height: 6rem;
}

.vv-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.vv-btn-submit {
  padding: 0.6rem 1.25rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-size: 0.95rem;
}

.vv-btn-submit:hover {
  background: var(--primary-dark);
}

.vv-report-msg {
  font-size: 0.88rem;
  margin-top: 0.75rem;
  min-height: 1.25em;
  color: var(--text-light);
}

@media (max-width: 640px) {
  .vv-share-grid {
    gap: 0.4rem;
  }
  .vv-share-btn {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 0;
  }
}

/* ====== SIDEBAR ====== */
.sidebar { display: flex; flex-direction: column; gap: 1.25rem; }

.sidebar-box {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.sidebar-box__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--primary);
  display: flex;
  align-items: center;
  gap: .4rem;
}

/* רק בעמוד היסטוריית צפייה (body.page-history): היום | השבוע בשורה אחת ב־RTL */
body.page-history .sidebar-box--history-hot {
  padding: 0.85rem 0.65rem;
}

body.page-history .sidebar-hot-split__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.5rem 0.65rem;
  align-items: start;
}

body.page-history .sidebar-hot-split--single .sidebar-hot-split__inner {
  grid-template-columns: minmax(0, 1fr);
}

body.page-history .sidebar-hot-split__col {
  min-width: 0;
}

body.page-history .sidebar-hot-split__title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  margin: 0 0 0.4rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--primary);
}

body.page-history .sidebar-list--history-hot li {
  padding: 0.3rem 0;
}

body.page-history .sidebar-list--history-hot a {
  font-size: 0.72rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.sidebar-list { list-style: none; }
.sidebar-list li { padding: .45rem 0; border-bottom: 1px solid var(--border-light); }
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list a {
  font-size: .85rem;
  color: var(--text);
  display: block;
  line-height: 1.5;
  transition: color var(--transition);
}
.sidebar-list a:hover { color: var(--primary); }

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.tag-cloud a {
  display: inline-block;
  background: var(--bg);
  color: var(--text-light);
  font-size: .78rem;
  padding: .25rem .6rem;
  border-radius: 16px;
  transition: all var(--transition);
  border: 1px solid var(--border);
}

.tag-cloud a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ====== SIDEBAR VIDEO LIST ====== */
.sidebar-video {
  display: flex;
  gap: .75rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--border-light);
}
.sidebar-video:last-child { border-bottom: none; }

.sidebar-video__thumb {
  width: 80px;
  min-width: 80px;
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #e2e8f0;
}
.sidebar-video__thumb img { width: 100%; height: 100%; object-fit: cover; }

.sidebar-video__info { flex: 1; min-width: 0; }
.sidebar-video__title {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

/* ====== PAGINATION ====== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
}

.pagination a, .pagination .current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 .5rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  transition: all var(--transition);
}

.pagination a {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.pagination a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.pagination .current {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.pagination-label {
  width: 100%;
  text-align: center;
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: .5rem;
}

/* ====== AD CONTAINERS (AdSense — label required for transparency) ====== */
.ad-container {
  text-align: center;
  padding: 1rem 0;
  clear: both;
}

.ad-slot {
  margin: 0 auto;
  max-width: 100%;
}

.ad-slot--in-content {
  max-width: 728px;
}

.ad-slot--sidebar {
  max-width: 300px;
}

.ad-slot__label {
  font-size: .65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin: 0 0 .5rem;
}

/* ====== SECTION TITLES ====== */
.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
}

/* ====== TAG PAGE HEADER ====== */
.tag-page-header {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: .75rem;
}

.tag-page-header h2 {
  font-size: 1.2rem;
  color: var(--text);
}

.tag-page-header .tag-badge {
  background: var(--primary);
  color: #fff;
  padding: .25rem .75rem;
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 600;
}

/* ====== FOOTER ====== */
.site-footer {
  background: var(--bg-dark);
  color: #94a3b8;
  margin-top: 3rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 1.5rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

@media (max-width: 768px) {
  .footer-top { grid-template-columns: 1fr; gap: 1.5rem; }
}

.footer-top h3 {
  color: #fff;
  font-size: .95rem;
  margin-bottom: .75rem;
}

.footer-top p { font-size: .85rem; line-height: 1.7; }

.footer-links { list-style: none; }
.footer-links li { padding: .25rem 0; }
.footer-links a {
  color: #94a3b8;
  font-size: .85rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  font-size: .8rem;
  flex-wrap: wrap;
  gap: .5rem;
}

.footer-bottom a { color: #94a3b8; }
.footer-bottom a:hover { color: #fff; }

/* ====== SUBMIT LINK PAGE ====== */
.submit-page {
  max-width: 38rem;
  margin: 0 auto;
}

.submit-page__head h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.submit-page__lead {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.submit-page__form {
  position: relative;
  background: var(--bg-card);
  padding: 1.35rem 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}

.submit-field {
  margin-bottom: 1rem;
}

.submit-field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.submit-field .req {
  color: #dc2626;
}

.submit-field input[type="url"],
.submit-field input[type="text"],
.submit-field textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.95rem;
}

.submit-field textarea {
  resize: vertical;
  min-height: 6rem;
}

.submit-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
}

.submit-check input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

/* לא להזיז מחוץ למסך (left:-9999px) — גורם לגלילה אופקית במובייל */
.vv-honeypot-submit {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.submit-actions {
  margin-top: 1.25rem;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.5rem;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s ease;
}

.submit-btn:hover {
  background: var(--primary-dark);
}

.submit-feedback {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  min-height: 1.25em;
  color: var(--text-light);
}

/* דף שליחת קישור — מובייל: בלי בריחת רוחב / גלילה לצד ימין */
body.page-submit .page-layout {
  grid-template-columns: 1fr;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

body.page-submit .submit-page {
  width: 100%;
  max-width: min(38rem, 100%);
  min-width: 0;
  margin-inline: auto;
  padding-inline: 0;
}

body.page-submit .submit-page__form {
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

body.page-submit .submit-field input[type="url"],
body.page-submit .submit-field input[type="text"],
body.page-submit .submit-field textarea {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 480px) {
  body.page-submit .site-main {
    padding-inline: 1rem;
    overflow-x: clip;
  }
}

.header-submit-mob {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff !important;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  white-space: nowrap;
  line-height: 1.2;
}

.header-submit-mob:hover {
  background: rgba(245, 158, 11, 0.55);
  color: #fff !important;
}

/* ====== UTILITIES ====== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }

/* ====== DISCOVERY & BROWSE ====== */
.discovery-nav {
  margin-bottom: 1.25rem;
}

.discovery-nav__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
}

.discovery-nav__link {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.discovery-nav__link:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.browse-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.browse-tabs__link {
  display: inline-flex;
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.browse-tabs__link:hover {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
}

.browse-tabs__link--active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.browse-page-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.browse-page-lead {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 0 1.25rem;
}

.browse-empty {
  color: var(--text-muted);
  padding: 1rem 0;
}

.browse-tag-cloud {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

.browse-tag-cloud__link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.browse-tag-cloud__link:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.browse-tag-cloud__count {
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.watch-history-loading {
  color: var(--text-muted);
}

.watch-history-empty {
  color: var(--text-muted);
}

/*
 * היסטוריית צפייה בלבד: 4 בעמודה רחבה, פחות במסכים צרים (לא משפיע על דף הבית).
 */
.watch-history-page .video-grid.watch-history-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (min-width: 560px) {
  .watch-history-page .video-grid.watch-history-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .watch-history-page .video-grid.watch-history-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem 1.1rem;
  }
}

.video-card--history {
  max-width: 100%;
}

.video-card--history .video-card__body {
  padding: 0.55rem 0.65rem;
}

.video-card__thumb--history {
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.video-card__thumb--history img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-card__thumb--history .video-card__play svg {
  width: 1.35rem;
  height: 1.35rem;
}

.video-card__title--history {
  font-size: 0.78rem !important;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-top: 0;
}

.video-card__desc--history {
  margin: 0.35rem 0 0;
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.watch-history-page {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* עמוד היסטוריה: עמודת התוכן ברוחב מלא מעל הסרגל */
body.page-history .page-layout > div:first-child {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

body.page-history .sidebar {
  width: 100%;
  max-width: 100%;
}

/* ====== PRINT ====== */
@media print {
  .site-header, .site-footer, .sidebar, .pagination, .ad-container { display: none; }
  .page-layout { grid-template-columns: 1fr; }
}
