* { box-sizing: border-box; }

:root {
  --header-h: 160px;
  --bg-main: #05070b;
  --panel: rgba(2, 6, 23, 0.88);
  --line: rgba(255, 255, 255, 0.08);
  --cyan: rgba(0, 255, 255, 0.95);
  --green: rgba(0, 255, 127, 0.95);
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Cairo", sans-serif;
  background: var(--bg-main);
  color: #fff;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}

/* الخلفية */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    linear-gradient(rgba(2, 7, 15, 0.72), rgba(2, 7, 15, 0.84)),
    url("https://bazooka.losha.site/admin/img1/file_69953add7a8c55.34260248.jpeg") center center / cover no-repeat;
  transform: scale(1.06);
  filter: blur(7px);
  opacity: 0.48;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.12;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(0,255,255,.85) 0 2px, transparent 3px),
    radial-gradient(circle at 60% 30%, rgba(0,255,127,.75) 0 2px, transparent 3px),
    radial-gradient(circle at 85% 18%, rgba(0,255,255,.65) 0 1.5px, transparent 3px),
    radial-gradient(circle at 25% 70%, rgba(0,255,255,.55) 0 2px, transparent 3px),
    radial-gradient(circle at 75% 78%, rgba(0,255,127,.55) 0 2px, transparent 3px);
  background-size: 520px 520px;
}

@media (min-width: 769px) {
  body::before {
    animation: bgFloatDesktop 18s ease-in-out infinite alternate;
  }

  body::after {
    animation: starsDrift 16s linear infinite;
  }

  @keyframes bgFloatDesktop {
    from { transform: scale(1.06) translateY(0); }
    to   { transform: scale(1.09) translateY(-10px); }
  }

  @keyframes starsDrift {
    from { transform: translateY(0); }
    to   { transform: translateY(18px); }
  }
}

@media (max-width: 768px) {
  body::before {
    filter: blur(5px);
    opacity: 0.42;
    animation: bgFloatMobile 9s ease-in-out infinite alternate;
  }

  body::after {
    opacity: 0.08;
    animation: starsDriftMobile 10s linear infinite;
  }

  @keyframes bgFloatMobile {
    from { transform: scale(1.04) translateY(0); }
    to   { transform: scale(1.05) translateY(-4px); }
  }

  @keyframes starsDriftMobile {
    from { transform: translateY(0); }
    to   { transform: translateY(6px); }
  }
}

/* ================= الهيدر ================= */
.top-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1500;
  background: rgba(5, 7, 11, 0.84);
  backdrop-filter: blur(10px);
  padding: 8px 12px 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.7);
  border-bottom: 1px solid var(--line);
}

.top-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.top-header h1 {
  margin: 0;
  text-align: center;
  font-size: 22px;
  line-height: 1.35;
  flex: 1;
  text-shadow: 0 0 10px rgba(0,255,255,0.12);
}

.menu-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(0,255,255,0.7);
  background: transparent;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

/* ================= الأيام ================= */
.day-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 0 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
  justify-content: flex-start;
}
.day-bar::-webkit-scrollbar { display: none; }

.day-btn {
  border: 1px solid rgba(0,255,127,0.6);
  background: transparent;
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
  scroll-snap-align: start;
  min-width: 44px;
  text-align: center;
  position: relative;
}

.day-btn:hover {
  background: rgba(0,255,127,0.15);
  box-shadow: 0 0 10px rgba(0,255,127,0.6);
}

.day-btn.active {
  background: rgba(0,255,127,0.25);
  box-shadow: 0 0 14px rgba(0,255,127,0.9);
}

.day-btn::after {
  content: "☾";
  position: absolute;
  top: -8px;
  left: 10px;
  font-size: 12px;
  opacity: 0;
  transform: translateY(2px);
  transition: .15s ease;
  color: rgba(0,255,255,0.95);
  text-shadow: 0 0 10px rgba(0,255,255,0.7);
  pointer-events: none;
}
.day-btn.active::after {
  opacity: 1;
  transform: translateY(0);
}

/* ================= التصنيفات ================= */
.category-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
}

.cat-btn {
  border: 1px solid rgba(0,255,255,0.6);
  background: transparent;
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
}

.cat-btn:hover {
  background: rgba(0,255,255,0.12);
  box-shadow: 0 0 12px rgba(0,255,255,0.5);
}

.cat-btn.active {
  background: rgba(0,255,255,0.22);
  box-shadow: 0 0 12px rgba(0,255,255,0.75);
}

/* ================= القائمة الجانبية ================= */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: none;
  align-items: flex-start;
  justify-content: flex-end;
  z-index: 1600;
}

.mobile-menu.show {
  display: flex;
}

.mobile-menu-panel {
  width: 260px;
  max-width: 80%;
  height: 100%;
  background: #020617;
  box-shadow: 0 0 25px rgba(0,0,0,0.9);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.mobile-menu-title {
  font-size: 15px;
  font-weight: 600;
}

.mobile-menu-close {
  border: none;
  background: #ef4444;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}

.mobile-category-list {
  flex: 1;
  overflow-y: auto;
  padding-top: 4px;
}

.mobile-cat-btn {
  width: 100%;
  text-align: right;
  padding: 8px 10px;
  margin-bottom: 4px;
  border-radius: 8px;
  border: 1px solid rgba(0,255,255,0.35);
  background: transparent;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all .15s ease;
}

.mobile-cat-btn.active {
  background: rgba(0,255,255,0.2);
  box-shadow: 0 0 12px rgba(0,255,255,0.7);
}

/* ================= المحتوى ================= */
.wrapper {
  width: 100%;
  min-height: 100vh;
  padding: calc(var(--header-h) + 14px) 12px 30px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  width: 100%;
}

@media (max-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

.card {
  background: rgba(13, 17, 26, 0.82);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 0 16px rgba(0,255,255,0.22);
  transition: transform .18s ease, box-shadow .18s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 22px rgba(0,255,255,0.42);
}

.media-wrapper {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
}

.card-media {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  background: #000;
}

.card-category {
  margin-top: 6px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}

.no-data {
  text-align: center;
  opacity: 0.95;
  margin-top: 25px;
  line-height: 1.9;
}

.video-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(0,0,0,0.65);
  border: 2px solid rgba(0,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #fff;
  box-shadow: 0 0 20px rgba(0,255,255,0.9);
  pointer-events: none;
}

/* ================= الحالة الافتراضية ================= */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100vh - var(--header-h) - 80px);
  padding: 20px 12px 40px;
}

.empty-state-title {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 8px;
  text-shadow: 0 0 16px rgba(0,255,255,0.16);
}

.empty-state-subtitle {
  margin: 0 0 18px;
  font-size: 16px;
  opacity: .92;
}

.empty-state-logo {
  width: min(260px, 72vw);
  max-width: 100%;
  height: auto;
  display: block;
  filter:
    drop-shadow(0 0 10px rgba(0,255,255,.22))
    drop-shadow(0 0 24px rgba(0,255,255,.16));
  animation: heroLogoDesktop 3.2s ease-in-out infinite;
  transform-origin: center center;
}

@keyframes heroLogoDesktop {
  0%   { transform: translateY(0) scale(1) rotate(0deg); }
  50%  { transform: translateY(-8px) scale(1.02) rotate(.6deg); }
  100% { transform: translateY(0) scale(1) rotate(0deg); }
}

@media (max-width: 768px) {
  .empty-state {
    min-height: calc(100vh - var(--header-h) - 50px);
    padding: 14px 10px 28px;
  }

  .empty-state-title {
    font-size: 20px;
  }

  .empty-state-subtitle {
    font-size: 14px;
    margin-bottom: 14px;
  }

  .empty-state-logo {
    width: min(210px, 68vw);
    animation: heroLogoMobile 2.8s ease-in-out infinite;
  }

  @keyframes heroLogoMobile {
    0%   { transform: translateY(0) scale(1); }
    50%  { transform: translateY(-4px) scale(1.015); }
    100% { transform: translateY(0) scale(1); }
  }
}

/* ================= وضع الاختيار ================= */
.select-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(0,255,255,0.8);
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px rgba(0,255,255,0.35);
  user-select: none;
}

.select-badge span {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.5);
  background: transparent;
  display: block;
  transition: .12s ease;
}

.card.selectable .select-badge {
  display: flex;
}

.card.selected .select-badge span {
  background: rgba(0,255,127,0.55);
  border-color: rgba(0,255,127,0.9);
  box-shadow: 0 0 12px rgba(0,255,127,0.55);
}

.card.selected {
  outline: 2px solid rgba(0,255,127,0.75);
  outline-offset: 2px;
}

/* ================= LIGHTBOX ================= */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 2000;
}

.lightbox.show {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 14px;
  box-shadow: 0 0 25px rgba(0,255,255,0.55);
  background: #000;
}

.lightbox-caption {
  font-size: 15px;
  text-align: center;
  line-height: 1.7;
  opacity: .95;
}

.lb-close {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #ff1744;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(255,23,68,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(0,255,255,0.9);
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px rgba(0,255,255,0.6);
  z-index: 3000;
}

.lb-prev { left: 25px; }
.lb-next { right: 25px; }
.lb-arrows-row { width: 100%; }

/* ================= زر الرجوع لأعلى ================= */
#backToTop {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(0,255,255,0.9);
  background: rgba(0,0,0,0.8);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(0,255,255,0.8);
  z-index: 2500;
}

#backToTop.show {
  display: flex;
}

/* ================= زر الاختيار + الشريط ================= */
#selectFab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(0,255,127,0.9);
  background: rgba(0,0,0,0.85);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px rgba(0,255,127,0.55);
  z-index: 2600;
  user-select: none;
}

#selectFab.active {
  box-shadow: 0 0 22px rgba(0,255,127,0.95);
  background: rgba(0,255,127,0.12);
}

#selectionBar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 18px;
  width: min(980px, calc(100% - 24px));
  border-radius: 16px;
  border: 1px solid rgba(0,255,255,0.35);
  background: rgba(2,6,23,0.92);
  box-shadow: 0 0 24px rgba(0,0,0,0.65);
  padding: 10px;
  z-index: 2550;
  display: none;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

#selectionBar.show {
  display: flex;
}

.sel-left {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.sel-count {
  font-size: 13px;
  opacity: .9;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  white-space: nowrap;
}

.sel-btn {
  border: 1px solid rgba(0,255,255,0.6);
  background: transparent;
  color: #fff;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  transition: .15s ease;
  white-space: nowrap;
}

.sel-btn:hover {
  background: rgba(0,255,255,0.12);
  box-shadow: 0 0 12px rgba(0,255,255,0.45);
}

.sel-btn.danger {
  border-color: rgba(255,23,68,0.65);
}

.sel-btn.danger:hover {
  background: rgba(255,23,68,0.12);
  box-shadow: 0 0 12px rgba(255,23,68,0.35);
}

.sel-status {
  font-size: 12px;
  opacity: .85;
  text-align: left;
  max-width: 45%;
  line-height: 1.4;
}

/* ================= Responsive ================= */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .top-header h1 {
    font-size: 18px;
  }

  .category-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    padding-top: 4px;
  }

  .cat-btn {
    font-size: 12px;
    padding: 6px 10px;
  }

  .lb-arrow {
    position: static;
    width: 42px;
    height: 42px;
    margin-top: 6px;
    font-size: 22px;
  }

  .lb-arrows-row {
    display: flex;
    justify-content: center;
    gap: 16px;
  }

  .sel-status {
    display: none;
  }

  #selectionBar {
    bottom: 78px;
  }
}
.archive-footer{
  margin-top: 40px;
  padding: 28px 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(2, 6, 23, 0.58);
  backdrop-filter: blur(8px);
  text-align: center;
}

.archive-footer-top{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.archive-footer-logo{
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 10px rgba(0,255,255,0.18));
}

.archive-footer-org{
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
}

.archive-footer-text{
  margin: 0 auto 12px;
  max-width: 760px;
  font-size: 15px;
  line-height: 1.9;
  color: rgba(255,255,255,0.88);
}

.archive-footer-copy{
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255,255,255,0.78);
}

.archive-footer-copy a{
  color: rgba(0,255,255,0.95);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: .5px;
}

.archive-footer-copy a:hover{
  text-decoration: underline;
}

@media (max-width: 768px){
  .archive-footer{
    margin-top: 28px;
    padding: 22px 12px 20px;
  }

  .archive-footer-logo{
    width: 48px;
    height: 48px;
  }

  .archive-footer-org{
    font-size: 17px;
  }

  .archive-footer-text{
    font-size: 14px;
    line-height: 1.8;
  }

  .archive-footer-copy{
    font-size: 13px;
  }
}
/* ===== Custom Scrollbar (Modern Neon Style) ===== */

/* Chrome, Edge, Safari */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(5, 7, 11, 0.6);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(0,255,255,0.9),
    rgba(0,255,127,0.9)
  );
  border-radius: 999px;
  border: 2px solid rgba(5,7,11,0.8);
  box-shadow:
    0 0 10px rgba(0,255,255,0.4),
    inset 0 0 6px rgba(255,255,255,0.15);
  transition: all 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    rgba(0,255,255,1),
    rgba(0,255,127,1)
  );
  box-shadow:
    0 0 16px rgba(0,255,255,0.7),
    inset 0 0 8px rgba(255,255,255,0.2);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(0,255,255,0.8) rgba(5,7,11,0.6);
}