@font-face {
  font-family: "Cairo";
  src: url("fonts/Cairo.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0c0e13;
  --surface: #141821;
  --surface-hover: #1a202c;
  --border: #232a38;
  --border-strong: #323c50;
  --text: #f1f5f9;
  --text-secondary: #9aa6bc;
  --text-muted: #6c7890;
  --accent: #f59e0b;
  --accent-hover: #fbbf24;
  --accent-soft: rgba(245, 158, 11, 0.14);
  --radius: 14px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Cairo", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(12, 14, 19, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 10px 0;
}

.brand-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.brand-tagline {
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gh-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.gh-link:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
}

.gh-link svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

/* Hero */
.hero {
  padding: 56px 0 44px;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.08), transparent 62%);
}

.hero-inner {
  max-width: 720px;
}

.hero-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-hover);
  background: var(--accent-soft);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.hero-title {
  font-size: clamp(1.75rem, 4.5vw, 2.65rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 14px;
}

.hero-desc {
  font-size: 1.02rem;
  color: var(--text-secondary);
  margin-bottom: 26px;
  max-width: 620px;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  background: var(--accent);
  color: #111318;
  font-size: 0.95rem;
  font-weight: 800;
  transition: background 0.15s ease, transform 0.15s ease;
}

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

/* Gallery Section */
.gallery-section {
  padding: 42px 0 64px;
  flex: 1;
}

.gallery-bar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}

.gallery-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.gallery-heading h2 {
  font-size: 1.35rem;
  font-weight: 800;
}

.video-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-btn:hover {
  color: var(--text);
  border-color: #4b5874;
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #111318;
}

/* Mobile-first Responsive Grid: 1 col mobile -> 2 col tablet -> 3 col desktop */
.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

@media (min-width: 640px) {
  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gallery-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

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

/* Video Card */
.video-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

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

.thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #090b10;
  overflow: hidden;
}

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

.duration-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(9, 11, 16, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 11, 16, 0.2);
  transition: background 0.18s ease;
}

.video-card:hover .play-overlay {
  background: rgba(9, 11, 16, 0.38);
}

.play-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.92);
  color: #111318;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  transition: transform 0.18s ease;
}

.video-card:hover .play-circle {
  transform: scale(1.07);
}

.card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cat-badge {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.card-title {
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.4;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

.card-play-btn {
  margin-top: 6px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.video-card:hover .card-play-btn {
  background: var(--accent);
  border-color: var(--accent);
  color: #111318;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-secondary);
}

/* Modal Video Player */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 12, 0.84);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 50;
}

.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  width: 100%;
  max-width: 860px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.65);
}

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

.modal-title {
  font-size: 1.05rem;
  font-weight: 800;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  border-color: var(--accent);
}

.player-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #06070a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-stage iframe,
.player-stage video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.player-empty {
  padding: 28px 24px;
  text-align: center;
  max-width: 520px;
}

.player-empty h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.player-empty p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.player-empty code {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--accent-hover);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  direction: ltr;
}

.modal-footer {
  padding: 14px 18px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.modal-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  max-width: 680px;
}

@media (min-width: 720px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
