/* =========================================================
   شريط الاحتفال اليومي — «منصة الفوز العظيم تحتفل بالمتميزات لهذا اليوم»
   ألوان المنصة: فيروزي #0A4F56 / #116D76 / #1A939E / #4FB8C0 + ذهبي #BAA213 / #D7C14D
========================================================= */
.cel {
  --cel-gold: #D7C14D;
  --cel-gold-2: #F3E39A;
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0;
  margin: 12px 18px 4px;
  min-height: 54px;
  border-radius: 18px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(120px 60px at 12% 0%, rgba(215, 193, 77, .22), transparent 70%),
    radial-gradient(160px 80px at 88% 100%, rgba(79, 184, 192, .25), transparent 70%),
    linear-gradient(100deg, #0A4F56 0%, #116D76 55%, #1A939E 100%);
  border: 1px solid rgba(215, 193, 77, .55);
  box-shadow: 0 10px 26px rgba(10, 79, 86, .18), inset 0 1px 0 rgba(255, 255, 255, .12);
  font-family: inherit;
  animation: cel-in .5s ease both;
}
.cel[hidden] { display: none; }
/* زخرفة إسلامية خفيفة */
.cel::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='%23fff' stroke-width='1'%3E%3Crect x='12' y='12' width='24' height='24'/%3E%3Crect x='12' y='12' width='24' height='24' transform='rotate(45 24 24)'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- العنوان ---------- */
.cel-head {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  height: 100%;
  padding: 8px 16px 8px 20px;
  background: linear-gradient(100deg, rgba(186, 162, 19, .95), rgba(215, 193, 77, .95));
  color: #23300F;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 14px 100%, 0 50%);   /* سهم يتجه نحو الأسماء (RTL) */
}
.cel-head__cup {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; color: #8F7B0D;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .35);
  animation: cel-glow 2.6s ease-in-out infinite;
}
.cel-head__txt { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; }
.cel-head__txt b { font-size: 14px; font-weight: 800; }
.cel-head__txt span { font-size: 12.5px; font-weight: 700; opacity: .9; }

/* ---------- الأسماء المتحركة ---------- */
.cel-track {
  position: relative; z-index: 1;
  overflow: hidden;
  height: 100%;
  display: flex; align-items: center;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
  outline: none;
}
.cel-reel {
  display: flex; width: max-content;
  animation: cel-scroll var(--cel-dur, 40s) linear infinite;
}
.cel-track:hover .cel-reel,
.cel-track:focus .cel-reel,
.cel-track:focus-within .cel-reel { animation-play-state: paused; }
.cel-set { display: flex; align-items: center; gap: 10px; padding-inline: 10px; flex: none; }

.cel-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  white-space: nowrap;
  font-size: 13.5px;
}
.cel-chip__ic {
  width: 24px; height: 24px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(215, 193, 77, .2); color: var(--cel-gold-2);
}
.cel-chip--teacher .cel-chip__ic { background: rgba(243, 227, 154, .95); color: #6F5D08; }
.cel-chip__who { font-size: 11.5px; font-weight: 700; opacity: .78; }
.cel-chip__name { font-weight: 800; color: var(--cel-gold-2); font-size: 14.5px; }
.cel-chip__txt { opacity: .95; }
.cel-chip__pts {
  font-size: 11.5px; font-weight: 800;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .16); color: #fff;
}
/* درجة الكأس */
.cel-chip--t1 .cel-chip__ic { background: #B07A4A; color: #fff; }
.cel-chip--t2 .cel-chip__ic { background: #8F9BA6; color: #fff; }
.cel-chip--t3 .cel-chip__ic { background: #BAA213; color: #fff; }
.cel-chip--t4 .cel-chip__ic { background: #4FB8C0; color: #fff; }

.cel-quote {
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap;
  font-weight: 800; font-size: 13.5px;
  color: var(--cel-gold);
  padding-inline: 6px;
}
.cel-quote svg { opacity: .8; }

/* ---------- أدوات ---------- */
.cel-tools { position: relative; z-index: 2; display: flex; align-items: center; gap: 6px; padding-inline: 10px 12px; }
.cel-more {
  font-size: 12.5px; font-weight: 800; white-space: nowrap;
  color: #0A4F56; background: var(--cel-gold-2);
  padding: 6px 12px; border-radius: 999px; text-decoration: none;
}
.cel-more:hover { background: #fff; }
.cel-more:focus-visible, .cel-track:focus-visible { outline: 3px solid var(--cel-gold); outline-offset: 2px; }

/* ---------- قصاصات الاحتفال (أول زيارة في اليوم) ---------- */
.cel-confetti { position: absolute; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
.cel-confetti i {
  position: absolute; top: -12px; width: 7px; height: 11px; border-radius: 2px; opacity: 0;
  background: var(--cel-gold);
}
.cel-confetti i:nth-child(3n)   { background: #fff; }
.cel-confetti i:nth-child(3n+1) { background: #4FB8C0; }
.cel-confetti i:nth-child(4n)   { width: 6px; height: 6px; border-radius: 50%; }
.cel--burst .cel-confetti i { animation: cel-fall 2.4s ease-out forwards; }
.cel-confetti i:nth-child(1)  { right: 4%;  animation-delay: .05s; }
.cel-confetti i:nth-child(2)  { right: 11%; animation-delay: .35s; }
.cel-confetti i:nth-child(3)  { right: 18%; animation-delay: .15s; }
.cel-confetti i:nth-child(4)  { right: 25%; animation-delay: .5s; }
.cel-confetti i:nth-child(5)  { right: 32%; animation-delay: .2s; }
.cel-confetti i:nth-child(6)  { right: 39%; animation-delay: .6s; }
.cel-confetti i:nth-child(7)  { right: 46%; animation-delay: .1s; }
.cel-confetti i:nth-child(8)  { right: 53%; animation-delay: .45s; }
.cel-confetti i:nth-child(9)  { right: 60%; animation-delay: .25s; }
.cel-confetti i:nth-child(10) { right: 67%; animation-delay: .55s; }
.cel-confetti i:nth-child(11) { right: 74%; animation-delay: .3s; }
.cel-confetti i:nth-child(12) { right: 81%; animation-delay: .65s; }
.cel-confetti i:nth-child(13) { right: 88%; animation-delay: .4s; }
.cel-confetti i:nth-child(14) { right: 95%; animation-delay: .7s; }


@keyframes cel-scroll { from { transform: translateX(0); } to { transform: translateX(50%); } }
@keyframes cel-in  { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes cel-glow { 0%, 100% { box-shadow: 0 0 0 3px rgba(255, 255, 255, .35); } 50% { box-shadow: 0 0 0 7px rgba(255, 255, 255, .12); } }
@keyframes cel-fall {
  0%   { opacity: 0; transform: translateY(0) rotate(0); }
  10%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(78px) rotate(320deg); }
}

/* ---------- الجوال ---------- */
@media (max-width: 760px) {
  .cel { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "head tools" "track track"; margin: 10px 12px 4px; }
  .cel-head  { grid-area: head; clip-path: none; border-radius: 0 0 0 14px; justify-self: start; padding: 6px 12px; }
  .cel-tools { grid-area: tools; }
  .cel-track { grid-area: track; height: 46px; }
  .cel-head__cup { width: 28px; height: 28px; }
  .cel-head__txt { flex-direction: row; gap: 5px; align-items: baseline; }
  .cel-head__txt b { font-size: 13px; }
  .cel-head__txt span { font-size: 12px; }
  .cel-more { display: none; }
}

/* ---------- تقليل الحركة ---------- */
@media (prefers-reduced-motion: reduce) {
  .cel, .cel-head__cup, .cel-reel, .cel--burst .cel-confetti i { animation: none !important; }
  .cel-track { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .cel-set[aria-hidden="true"] { display: none; }
}

/* ---------- الوضع الليلي ---------- */
html[data-theme="dark"] .cel {
  border-color: rgba(215, 193, 77, .4);
  background:
    radial-gradient(120px 60px at 12% 0%, rgba(215, 193, 77, .16), transparent 70%),
    linear-gradient(100deg, #0B3237 0%, #0E474E 55%, #12606A 100%);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .35);
}
html[data-theme="dark"] .cel-chip { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .14); }
