/* ===========================================================================
   A streamer on the site: the card on /streamers/ and on the home page,
   after the «Animated Border Card» the owner picked.

   Small at rest: the channel's picture in a box standing half out of the top
   of the card, and its name. Pointed at (or focused, or on a phone that has
   no pointer), it grows: the picture grows with it and the numbers and the
   two buttons rise into view. A cyan light runs round the card's edge and a
   pink one round the picture's. With reduced motion the lights stand still
   and the card is shown open.
   =========================================================================== */

.smc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 340px));
  justify-content: center;
  gap: 8px 22px;
}

/* Each card in a cell tall enough for it open, so opening one moves nothing else. */
.smc-cell {
  display: grid;
  place-items: center;
  height: 520px;
}

.smc {
  --smc-line: #45f3ff;
  --smc-pic: #ff3c7b;
  position: relative;
  width: min(100%, 330px);
  height: 200px;
  margin-top: 50px;
  background: #050507;
  transition: height 0.5s ease;
  font-family: inherit;
  text-align: center;
}

.smc:hover,
.smc:focus-within,
.smc.is-open {
  height: 440px;
}

/* The light round the card: a bar turning behind a card that covers all but
   its edge. */
.smc__lines {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000;
}

.smc__lines::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 640px;
  height: 120px;
  background: linear-gradient(transparent, var(--smc-line), var(--smc-line), var(--smc-line), transparent);
  transform: translate(-50%, -50%);
  animation: smc-turn 4s linear infinite;
}

/* Dark, but a step lighter than the page behind it, and neutral: the
   colour belongs to the two lights, not to the whole card. */
.smc__lines::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: linear-gradient(180deg, #1a1c25 0%, #14161d 100%);
}

.smc__pic {
  position: absolute;
  top: -50px;
  left: 50%;
  z-index: 10;
  width: 150px;
  height: 150px;
  overflow: hidden;
  background: #000;
  transform: translateX(-50%);
  transition: width 0.5s ease, height 0.5s ease;
}

.smc:hover .smc__pic,
.smc:focus-within .smc__pic,
.smc.is-open .smc__pic {
  width: 230px;
  height: 230px;
}

.smc__pic::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 500px;
  height: 150px;
  background: linear-gradient(transparent, var(--smc-pic), var(--smc-pic), var(--smc-pic), transparent);
  transform: translate(-50%, -50%);
  animation: smc-turn 6s linear infinite;
}

.smc__pic::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: #14161d;
}

.smc__pic img,
.smc__pic span {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  object-fit: cover;
}

.smc__pic span {
  display: grid;
  place-items: center;
  background: #111116;
  color: var(--smc-line);
  font-size: 56px;
  font-weight: 900;
}

.smc__content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.smc__details {
  width: 100%;
  padding: 26px 24px 28px;
  transform: translateY(150px);
  transition: transform 0.5s ease;
}

.smc:hover .smc__details,
.smc:focus-within .smc__details,
.smc.is-open .smc__details {
  transform: translateY(0);
}

.smc__name {
  margin: 0;
  color: var(--smc-line);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.5;
}

.smc__bio {
  display: -webkit-box;
  margin: 2px 0 0;
  overflow: hidden;
  color: #e8eef8;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.smc__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 18px 0;
}

.smc__stats b {
  display: block;
  color: var(--smc-line);
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.smc__stats span {
  color: #c9d1de;
  font-size: 11px;
}

.smc__btns {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* Two pills: «تماشای لایو» lit in the card's colour, «کانال» quiet beside it. */
.smc__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 118px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #e9edf5;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.smc__btn svg {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.smc__btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
  text-decoration: none;
}

.smc__btn--main {
  border-color: color-mix(in srgb, var(--smc-line) 70%, transparent);
  background: color-mix(in srgb, var(--smc-line) 14%, #14161d);
  color: #fff;
  box-shadow: 0 0 18px -6px var(--smc-line);
}

.smc__btn--main:hover {
  border-color: var(--smc-line);
  background: color-mix(in srgb, var(--smc-line) 24%, #14161d);
  box-shadow: 0 0 24px -4px var(--smc-line);
}

/* The live dot, breathing. */
.smc__btn i {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff3b5c;
}

.smc__btn i::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #ff3b5c;
  opacity: 0;
  animation: smc-live 1.6s ease-out infinite;
}

.smc__btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@keyframes smc-live {
  0% {
    opacity: 0.8;
    transform: scale(0.6);
  }
  100% {
    opacity: 0;
    transform: scale(1.6);
  }
}

@media (prefers-reduced-motion: reduce) {
  .smc__btn i::after {
    animation: none;
  }
}

@keyframes smc-turn {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* No pointer to point with: open from the start. */
@media (hover: none) {
  .smc {
    height: 440px;
  }

  .smc .smc__pic {
    width: 230px;
    height: 230px;
  }

  .smc .smc__details {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .smc__lines::before,
  .smc__pic::before {
    animation: none;
  }

  .smc,
  .smc__pic,
  .smc__details {
    transition: none;
  }

  .smc {
    height: 440px;
  }

  .smc .smc__pic {
    width: 230px;
    height: 230px;
  }

  .smc .smc__details {
    transform: none;
  }
}

/* ===========================================================================
   Four to six to a row (2026-10-20): the same card as above, every part of
   it, only smaller — opening on hover as it always did. The row is let out
   wider than the page's text so a fifth and sixth fit on a wide screen.
   =========================================================================== */
.smc-grid--dense {
  /* No width of its own: two equal negative margins let it out to both sides. */
  margin-inline: calc((100% - min(94vw, 1480px)) / 2);
  grid-template-columns: repeat(auto-fit, min(100%, 250px));
  justify-content: center;
  gap: 0 14px;
}

.smc-grid--dense .smc-cell {
  zoom: 0.72;
}

/* Live now. */
.smc.is-live {
  --smc-pic: #ef4444;
}

.smc__live {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  z-index: 11;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11.5px;
  font-weight: 900;
  box-shadow: 0 6px 18px -6px rgba(239, 68, 68, 0.9);
}

.smc__live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: smc-blink 1.4s ease-in-out infinite;
}

.smc__watch {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  z-index: 11;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fecaca;
  font-size: 11.5px;
  font-weight: 800;
}

@keyframes smc-blink {
  50% {
    opacity: 0.25;
  }
}

/* ===========================================================================
   «همین حالا روی آنتن» on the home page (2026-10-20): the streamers using
   the bot who are live right now, one large with its cover, the rest in a
   list beside it.
   =========================================================================== */
.onair__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 22px;
}

.onair__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: #c9d1de;
  font-size: 14px;
}

.onair__chip b {
  color: #fff;
  font-size: 18px;
}

.onair__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

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

.onair__main {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 20px;
  background: #0b0d14;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 30px 60px -30px rgba(239, 68, 68, 0.5);
}

.onair__main img,
.onair__main > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.onair__main:hover > video,
.onair__main:hover img {
  transform: scale(1.04);
}

.onair__main::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 8, 18, 0) 40%, rgba(5, 8, 18, 0.92) 100%);
}

.onair__badge {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #ef4444;
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 0.04em;
  direction: ltr;
}

.onair__badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: smc-blink 1.4s ease-in-out infinite;
}

.onair__viewers {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  font-size: 12.5px;
  font-weight: 800;
}

.onair__who {
  position: absolute;
  right: 18px;
  bottom: 16px;
  left: 18px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
}

.onair__who img,
.onair__who span.onair__ini {
  position: static;
  width: 52px;
  height: 52px;
  flex: none;
  border: 2px solid #ef4444;
  border-radius: 50%;
  object-fit: cover;
}

.onair__ini {
  display: grid;
  place-items: center;
  background: #111;
  font-weight: 900;
}

.onair__who b {
  display: block;
  font-size: 19px;
}

.onair__who small {
  display: block;
  color: #cbd5e1;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.onair__side h3 {
  margin: 0 0 10px;
  color: #97a6bf;
  font-size: 14px;
  font-weight: 700;
}

.onair__list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.onair__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.onair__item:hover {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.06);
}

.onair__thumb {
  position: relative;
  width: 112px;
  aspect-ratio: 16 / 9;
  flex: none;
  overflow: hidden;
  border-radius: 10px;
  background: #0b0d14;
}

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

.onair__thumb em {
  position: absolute;
  bottom: 4px;
  left: 4px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.7);
  color: #fecaca;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.onair__item b {
  display: block;
  font-size: 15px;
}

.onair__item small {
  display: -webkit-box;
  overflow: hidden;
  color: #97a6bf;
  font-size: 12.5px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.onair__more {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}
