@charset "UTF-8";
/* ===== مظهركي: أسود وذهبي + عنابي كلون ثالث ===== */
:root {
  color-scheme: dark;
  --paper: #0d0c0a;      /* أسود دافئ */
  --card: #171510;       /* سطح البطاقات واللوحة */
  --surface: #1c1912;    /* خلفية الصور قبل التحميل */
  --ink: #f4eddc;        /* نص عاجي */
  --muted: #a39a85;
  --line: #2d2920;
  --accent: #c9a24b;     /* الذهبي */
  --accent-2: #e2c36f;   /* ذهبي فاتح للعناوين */
  --accent-ink: #0d0c0a; /* نص فوق الذهبي */
  --wine: #7b1e2e;       /* العنابي: اللون الثالث */
  --wa: #c9a24b;         /* لون أزرار الطلب (الشرارة تأخذ لون الزر) */
  --danger: #c0392b;
  --dark: #080706;
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-title: "Reem Kufi", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- صفحة المعرض ---------- */
.top { padding: 22px 20px 6px; max-width: 1500px; margin: 0 auto; text-align: center; }
.top h1 { margin: 0; line-height: 0; }
.top .logo { display: block; margin: 0 auto; width: min(300px, 66vw); height: auto; }
.top p { margin: 8px auto 0; color: var(--muted); max-width: 46ch; }

.chips {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 20px;
  max-width: 1500px;
  margin: 0 auto;
  background: linear-gradient(var(--paper) 78%, rgba(13, 12, 10, 0));
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 6px 16px;
  color: var(--ink);
}
.chip:hover { border-color: var(--accent); }
.chip small { color: var(--muted); margin-inline-start: 6px; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.chip[aria-pressed="true"] small { color: rgba(13, 12, 10, 0.7); }
.nav2 { max-width: 1500px; margin: 0 auto; }
.chips.sub { position: static; padding-top: 0; background: none; }
.chip.sm { padding: 4px 14px; font-size: 15px; }

.empty { max-width: 1500px; margin: 40px auto; padding: 0 20px; color: var(--muted); font-size: 18px; }

/* المجموعات والبطاقات */
.fold { max-width: 1500px; margin: 0 auto; padding: 26px 14px 6px; }
.fold h2 {
  margin: 0 0 14px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.3;
  color: var(--ink);
}
.fold h2 small {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  margin-inline-start: 12px;
  padding: 2px 12px;
  border-radius: 99px;
  background: var(--wine);
  color: var(--ink);
  vertical-align: middle;
}
.g5 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 8px; }
@media (min-width: 700px) { .g5 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .g5 { grid-template-columns: repeat(5, 1fr); } }

.mc-ph {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  padding: 0;
  background: var(--surface);
  border-radius: 2px;
  overflow: hidden;
}
.mc-ph:hover { border-color: var(--accent); }
.mc-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mc-n {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(8, 7, 6, 0.8);
  color: var(--accent-2);
  font-size: 13px;
  padding: 2px 10px;
  border-radius: 99px;
  border: 1px solid rgba(201, 162, 75, 0.5);
}
.mc-b { padding: 10px 2px 0; }
.mc-b h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mc-b h3 small { color: var(--accent); font-weight: 500; margin-inline-start: 6px; }
.mc-b p {
  margin: 4px 0 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sz { margin: 0 0 8px; font-size: 13px; color: var(--accent); line-height: 1.5; }
.mc-f { display: flex; }
.mc-wa, .lb-wa, .wa-float {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #00b2ff, #006aff);   /* لون ماسنجر المعروف */
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border: 0;
}
.mc-wa { width: 100%; border-radius: 6px; padding: 8px 12px; font-size: 14px; }
.mc-wa:hover, .lb-wa:hover, .wa-float:hover { filter: brightness(1.12); }
.mc-wa svg, .lb-wa svg, .wa-float svg { fill: currentColor; flex: none; }
.mc-wa svg { width: 22px; height: 22px; }
.wa-float svg .bolt, .mc-wa svg .bolt, .lb-wa svg .bolt { fill: #0a7cff; }   /* الصاعقة الزرقاء داخل دائرة بيضاء = شعار ماسنجر */

.wa-float {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 8;
  border-radius: 999px;
  padding: 12px 20px 12px 16px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.55);
}
.wa-float svg { width: 26px; height: 26px; }

/* الرئيسية: مشاهدة المزيد */
.more { text-align: center; margin: 16px 0 4px; }
.more-btn {
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent-2);
  border-radius: 999px;
  padding: 9px 30px;
  font-weight: 600;
}
.more-btn:hover { background: var(--accent); color: var(--accent-ink); }

/* الفوتر */
.foot { max-width: 1500px; margin: 46px auto 0; padding: 26px 20px 100px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 14px; }
.foot p { margin: 0; }
.foot .fb { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-2); text-decoration: none; font-weight: 600; margin-bottom: 10px; }
.foot .fb svg { width: 20px; height: 20px; fill: currentColor; }
.foot .fb:hover { text-decoration: underline; }

/* عارض الصور */
.lb {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: var(--dark);
  display: grid;
  grid-template-rows: auto 1fr auto;
  color: var(--ink);
}
.lb-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; }
.lb-count { color: var(--muted); font-size: 14px; }
.lb-x, .lb-nav {
  background: rgba(244, 237, 220, 0.1);
  border: 0;
  color: var(--ink);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
}
.lb-x:hover, .lb-nav:hover { background: rgba(201, 162, 75, 0.35); }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 64px; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { right: 10px; }
.lb-next { left: 10px; }
.lb-foot { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px; }
.lb-wa { border-radius: 999px; padding: 12px 26px; }
.lb-wa svg { width: 22px; height: 22px; }
.lb-info { text-align: center; padding: 0 16px; max-width: 640px; margin: 0 auto; }
.lb-info h3 { margin: 0; font-size: 20px; font-weight: 600; color: var(--accent-2); }
.lb-info p { margin: 4px 0 4px; color: #cfc6b0; font-size: 15px; }
.lb-info .sz { margin: 6px 0 4px; color: var(--accent); }
.lb-thumbs { display: flex; gap: 6px; justify-content: center; padding: 8px 0 4px; }
.lb-thumbs button { border: 2px solid transparent; padding: 0; width: 52px; height: 52px; background: none; border-radius: 3px; overflow: hidden; opacity: 0.55; }
.lb-thumbs button[aria-current="true"] { border-color: var(--accent); opacity: 1; }
.lb-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  z-index: 30;
  max-width: min(92vw, 420px);
  background: var(--accent);
  color: var(--accent-ink);
  padding: 12px 18px;
  border-radius: 10px;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
}

@media (max-width: 640px) {
  .lb-stage { padding: 0; }
  .lb-nav { display: none; }
  .wa-float span { display: none; }
  .wa-float { padding: 14px; }
}

/* ---------- لوحة الرفع ---------- */
.adm { max-width: 980px; margin: 0 auto; padding: 24px 18px 80px; }
.adm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.adm-head h1 { margin: 0; font-family: var(--font-title); font-weight: 600; font-size: 30px; color: var(--accent-2); }
.adm-head nav { display: flex; gap: 16px; }
.adm-head a, .linkbtn { color: var(--accent-2); background: none; border: 0; padding: 0; text-decoration: underline; }
.rule { color: var(--muted); font-size: 14px; margin: 0 0 14px; }

.drop {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 6px;
  min-height: 250px;
  padding: 28px 18px;
  border: 2px dashed #6b5a2e;
  border-radius: 8px;
  background: var(--card);
  transition: background 0.15s, border-color 0.15s;
}
.drop.over { background: #241e10; border-color: var(--accent); }
.drop strong { font-size: 24px; font-weight: 600; color: var(--ink); }
.drop span { color: var(--muted); }
.drop-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }

.btn {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 6px;
  padding: 10px 20px;
  font-weight: 600;
}
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.alt { background: transparent; color: var(--accent-2); border-color: #6b5a2e; }
.btn.alt:hover { background: rgba(201, 162, 75, 0.12); border-color: var(--accent); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.opts, .row { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: end; }
.opts { margin: 16px 0; align-items: center; }
.opts label, .row label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.opts input[type="text"], .login input, .row select, .movebar select {
  border: 1px solid var(--line);
  background: #100f0b;
  color: var(--ink);
  border-radius: 6px;
  padding: 9px 12px;
  min-width: 170px;
}

.stage { margin: 16px 0; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 14px; }
.stage h2 { margin: 0; font-size: 18px; font-weight: 600; color: var(--accent-2); }
.sum { font-size: 17px; }
.sum b { font-weight: 600; color: var(--accent-2); }

.prog { margin: 22px 0; padding: 18px; background: var(--card); border-radius: 8px; border: 1px solid var(--line); }
.bar { height: 10px; background: #2a261c; border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }
.prog-line { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: 15px; }
.prog-line b { font-weight: 600; color: var(--accent-2); }
.note { color: var(--muted); font-size: 14px; }
.descline { margin-top: 10px; font-size: 14px; color: var(--muted); }
.strip { display: flex; gap: 4px; margin-top: 14px; overflow: hidden; height: 64px; }
.strip img { height: 64px; width: 64px; object-fit: cover; border-radius: 3px; flex: none; }
.errs { margin: 12px 0 0; padding: 0; list-style: none; color: #ff8f84; font-size: 14px; max-height: 140px; overflow: auto; }

.lib-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 34px 0 12px; }
.lib-head h2 { margin: 0; font-size: 20px; font-weight: 600; color: var(--ink); }
.lib-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.movebar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.lib.m { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.lib.m figure { margin: 0; }
.lib label { position: relative; display: block; aspect-ratio: 3 / 4; background: var(--surface); border-radius: 3px; overflow: hidden; cursor: pointer; }
.lib img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib input { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; accent-color: var(--accent); }
.lib label:has(input:checked) { outline: 3px solid var(--accent); outline-offset: -3px; }
.lib.m figcaption { font-size: 13px; padding: 4px 2px; line-height: 1.3; color: var(--muted); }
.lib.m figcaption b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 600; }

.login { max-width: 380px; margin: 14vh auto; padding: 0 18px; display: grid; gap: 12px; }
.login h1 { margin: 0 0 6px; font-family: var(--font-title); font-weight: 600; color: var(--accent-2); }
.warn { background: #2a2410; border: 1px solid var(--accent); border-radius: 6px; padding: 12px 14px; }
.err { color: #ff8f84; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
