/* ==========================================================================
 * SHARKS VS ORCAS SPECTACLE (Spectacle 2): the arena, the entrance, the shared effects.
 * The look is the owner's banner (/assets/sharks-vs-orcas/): an electric-blue shark against a violet orca over a
 * dark night sea, white surf, a gold lightning VS, red and gold marquee plates.
 * Decoration only: nothing here takes a tap (pointer-events: none) except the entrance, which a tap skips.
 * Ambient motion is slow and small, and every animation stops under prefers-reduced-motion.
 * ========================================================================== */

/* ---- THE ARENA: the felt of a Sharks vs Orcas table ---- */
.cc-felt--so .cc-felt__rail {
  border-color: rgb(14 22 52);
  background: radial-gradient(ellipse at 50% 46%, rgb(22 40 92), rgb(8 16 44) 58%, rgb(3 6 20) 100%);
  box-shadow:
    0 0 0 2px rgb(255 200 60 / 0.75) inset,
    0 0 0 1px rgb(255 200 60 / 0.5),
    -10px 0 26px rgb(40 150 255 / 0.45),
    10px 0 26px rgb(150 70 255 / 0.45),
    0 12px 30px rgb(0 0 0 / 0.6),
    inset 0 0 40px rgb(0 0 0 / 0.55);
}

.so-arena {
  position: absolute;
  inset: clamp(5px, 1.8vw, 12px);
  z-index: -1;
  overflow: hidden;
  border-radius: 44% / 26%;
  pointer-events: none;
  contain: strict;
}

.so-arena__sea {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 12% 60%, rgb(30 140 255 / 0.42), transparent 55%),
    radial-gradient(ellipse at 88% 60%, rgb(150 60 255 / 0.42), transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgb(200 230 255 / 0.18), transparent 45%),
    linear-gradient(rgb(6 12 40), rgb(10 24 70) 55%, rgb(4 10 32));
}

/* the two of them, jaws open, across the play surface */
.so-arena__beast {
  position: absolute;
  inset-block-end: 8%;
  block-size: 72%;
  inline-size: auto;
  max-inline-size: 58%;
  object-fit: contain;
  opacity: 0.66;
  filter: saturate(1.1) contrast(1.05);
  will-change: transform;
}
/* the cut-outs melt into the sea: no rectangle edge, no banner sky (the jaws stay solid) */
.so-arena__beast--shark,
.so-entrance__beast--shark {
  -webkit-mask-image: radial-gradient(ellipse 50% 46% at 58% 50%, rgb(0 0 0) 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 46% at 58% 50%, rgb(0 0 0) 40%, transparent 100%);
}
.so-arena__beast--orca,
.so-entrance__beast--orca {
  -webkit-mask-image: radial-gradient(ellipse 50% 46% at 42% 50%, rgb(0 0 0) 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 46% at 42% 50%, rgb(0 0 0) 40%, transparent 100%);
}
.so-arena__beast--shark { inset-inline-start: -20%; transform-origin: 30% 70%; animation: so-idle-shark 7s ease-in-out infinite; }
.so-arena__beast--orca { inset-inline-end: -20%; transform-origin: 70% 70%; animation: so-idle-orca 7.6s ease-in-out infinite; }

/* where they meet: a gold lightning glow (the banner's VS) */
.so-arena__clash {
  position: absolute;
  inset-inline-start: 50%;
  inset-block-start: 50%;
  inline-size: 46%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgb(255 210 70 / 0.34), rgb(255 150 30 / 0.12) 40%, transparent 68%);
  animation: so-pulse 6s ease-in-out infinite;
}

.so-arena__shaft {
  position: absolute;
  inset-block-start: -10%;
  block-size: 90%;
  inline-size: 18%;
  background: linear-gradient(rgb(170 210 255 / 0.16), transparent);
  filter: blur(6px);
  transform-origin: 50% 0;
}
.so-arena__shaft--1 { inset-inline-start: 28%; transform: rotate(14deg); animation: so-sway 11s ease-in-out infinite; }
.so-arena__shaft--2 { inset-inline-start: 58%; transform: rotate(-12deg); animation: so-sway 13s ease-in-out infinite reverse; }

.so-arena__bubbles { position: absolute; inset: 0; }
.so-arena__bubble {
  position: absolute;
  inset-block-end: -6%;
  inline-size: 6px;
  aspect-ratio: 1;
  border: 1px solid rgb(200 235 255 / 0.55);
  border-radius: 50%;
  opacity: 0;
  animation: so-bubble 9s linear infinite;
}
.so-arena__bubble--0 { inset-inline-start: 18%; animation-delay: 0s; }
.so-arena__bubble--1 { inset-inline-start: 31%; animation-delay: 3.1s; inline-size: 4px; }
.so-arena__bubble--2 { inset-inline-start: 44%; animation-delay: 6.2s; }
.so-arena__bubble--3 { inset-inline-start: 57%; animation-delay: 1.6s; inline-size: 5px; }
.so-arena__bubble--4 { inset-inline-start: 69%; animation-delay: 4.7s; inline-size: 4px; }
.so-arena__bubble--5 { inset-inline-start: 82%; animation-delay: 7.4s; }

/* the play surface stays readable: the centre (pile, colour, status) sits in a pool of shadow */
.so-arena__scrim {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 34% 30% at 50% 52%, rgb(2 6 20 / 0.6), transparent 100%);
}

/* every seat, the status and the centre words keep their own solid plate over the arena */
.cc-felt--so .cc-seat { background-color: rgb(6 12 34 / 0.88); }
.cc-felt--so .cc-status { background-color: rgb(4 8 26 / 0.86); }
.cc-felt--so .cc-pile__label,
.cc-felt--so .cc-pile__count,
.cc-felt--so .cc-direction {
  padding-inline: 0.4rem;
  border-radius: 999px;
  background-color: rgb(3 6 22 / 0.82);
}

@keyframes so-idle-shark { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-3px) rotate(-1.2deg); } }
@keyframes so-idle-orca { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-3px) rotate(1.2deg); } }
@keyframes so-pulse { 0%, 100% { opacity: 0.75; } 50% { opacity: 1; } }
@keyframes so-sway { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@keyframes so-bubble { 0% { transform: translateY(0); opacity: 0; } 12% { opacity: 0.8; } 100% { transform: translateY(-260px); opacity: 0; } }

/* ---- MY FP on my own strip (Sharks vs Orcas shows every player's) ---- */
.cc-me .cc-fp { margin-inline-start: auto; }

/* ---- THE SHARED EFFECTS LAYER ---- */
.so-fx {
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  overflow: hidden;
}
.so-fx > * { position: absolute; }

.so-fx__dim { inset: 0; background: rgb(0 2 12); opacity: 0; }

.so-fx__slam { inline-size: min(36vw, 190px); aspect-ratio: 200 / 280; filter: drop-shadow(0 0 18px rgb(255 200 60 / 0.8)); }
.so-fx__slam-art { display: block; inline-size: 100%; block-size: 100%; border: 3px solid rgb(255 207 58); border-radius: 0.8rem; }

.so-fx__wave {
  inline-size: 120px;
  aspect-ratio: 1;
  border: 6px solid rgb(255 214 90);
  border-radius: 50%;
  box-shadow: 0 0 24px rgb(255 190 40 / 0.9), inset 0 0 18px rgb(255 190 40 / 0.6);
}
/* EXPANSION D: a Shark's ocean energy in its own colour (and a knockout's cranberry wave) */
.so-fx__wave--frost { border-color: rgb(120 200 255); box-shadow: 0 0 24px rgb(60 150 255 / 0.9), inset 0 0 18px rgb(60 150 255 / 0.6); }
.so-fx__wave--evergreen { border-color: rgb(120 240 170); box-shadow: 0 0 24px rgb(40 200 120 / 0.9), inset 0 0 18px rgb(40 200 120 / 0.6); }
.so-fx__wave--cranberry { border-color: rgb(255 130 150); box-shadow: 0 0 24px rgb(230 50 90 / 0.9), inset 0 0 18px rgb(230 50 90 / 0.6); }
.so-fx__announce--cranberry .so-fx__announce-text { color: rgb(255 210 220); text-shadow: 0 0 18px rgb(230 50 90 / 0.95), 0 3px 0 rgb(80 0 20); }
.so-fx__wave--cyan { border-color: rgb(120 230 255); box-shadow: 0 0 24px rgb(60 200 255 / 0.9), inset 0 0 18px rgb(60 200 255 / 0.6); }

.so-fx__crown { inline-size: min(52vw, 260px); filter: drop-shadow(0 0 22px rgb(255 200 40 / 0.95)); }
.so-fx__crown--small { inline-size: 84px; }

.so-fx__announce {
  display: grid;
  justify-items: center;
  gap: 0.2rem;
  inline-size: max-content;
  max-inline-size: 92vw;
  text-align: center;
}
.so-fx__announce-text {
  font-size: clamp(1.7rem, 8.5vw, 3.4rem);
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  letter-spacing: 0.01em;
  color: rgb(255 226 120);
  -webkit-text-stroke: 1.5px rgb(110 50 0);
  text-shadow: 0 3px 0 rgb(120 40 0), 0 0 18px rgb(255 170 30 / 0.9), 0 0 40px rgb(255 120 0 / 0.6);
}
.so-fx__announce-sub {
  padding: 0.2rem 0.7rem;
  border: 2px solid rgb(255 207 58);
  border-radius: 0.5rem;
  background: rgb(150 16 30);
  color: rgb(255 240 200);
  font-size: clamp(0.72rem, 3.2vw, 1rem);
  font-weight: 900;
  letter-spacing: 0.06em;
}

.so-fx__coin {
  inline-size: 18px;
  aspect-ratio: 1;
  border: 2px solid rgb(140 80 0);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgb(255 250 200), rgb(255 200 40) 55%, rgb(190 120 0));
  box-shadow: 0 0 10px rgb(255 200 40 / 0.9);
}
.so-fx__amount {
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgb(10 6 2 / 0.85);
  font-size: 0.85rem;
  font-weight: 900;
  white-space: nowrap;
}
.so-fx__amount--lose { color: rgb(255 120 120); border: 1px solid rgb(255 120 120 / 0.7); }

.so-fx__card {
  inline-size: 22px;
  aspect-ratio: 22 / 32;
  border: 2px solid rgb(255 255 255 / 0.9);
  border-radius: 4px;
  background: repeating-linear-gradient(45deg, rgb(120 20 40), rgb(120 20 40) 4px, rgb(70 10 24) 4px, rgb(70 10 24) 8px);
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.6);
}
.so-fx__badge {
  padding: 0.05rem 0.45rem;
  border: 2px solid rgb(255 255 255);
  border-radius: 999px;
  background: rgb(200 20 50);
  color: rgb(255 255 255);
  font-size: 0.95rem;
  font-weight: 900;
}

.so-fx__shield {
  inline-size: 110px;
  aspect-ratio: 1;
  border: 4px solid rgb(190 252 255);
  border-radius: 50%;
  background: radial-gradient(circle, rgb(63 240 255 / 0.1), rgb(63 240 255 / 0.45));
  box-shadow: 0 0 22px rgb(63 240 255 / 0.9);
}
.so-fx__shield--red { border-color: rgb(255 170 170); background: radial-gradient(circle, rgb(255 60 80 / 0.1), rgb(255 60 80 / 0.45)); box-shadow: 0 0 22px rgb(255 60 80 / 0.9); }
.so-fx__shield--gold { inline-size: 140px; border-color: rgb(255 236 160); background: radial-gradient(circle, rgb(255 200 40 / 0.15), rgb(255 190 30 / 0.5)); box-shadow: 0 0 30px rgb(255 190 30 / 0.95); }
.so-fx__tag {
  padding: 0.1rem 0.55rem;
  border: 2px solid rgb(190 252 255);
  border-radius: 0.4rem;
  background: rgb(4 30 52 / 0.92);
  color: rgb(220 252 255);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.so-fx__tag--red { border-color: rgb(255 140 150); background: rgb(70 6 16 / 0.92); color: rgb(255 220 224); }
.so-fx__tag--gold { border-color: rgb(255 207 58); background: rgb(60 34 0 / 0.92); color: rgb(255 236 160); }
.so-fx__bolt {
  block-size: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgb(127 246 255), rgb(255 255 255), rgb(127 246 255));
  box-shadow: 0 0 12px rgb(127 246 255);
  transform-origin: 0 50%;
}

/* a seat (or my strip) lit as the beat's source (the King) or a target (who pays) */
.so-hl--source { box-shadow: 0 0 0 3px rgb(255 207 58), 0 0 22px rgb(255 190 40 / 0.95) !important; }
.so-hl--target { box-shadow: 0 0 0 3px rgb(255 90 110), 0 0 18px rgb(255 60 90 / 0.85) !important; }
.so-fx-counting { color: rgb(255 226 120); border-color: rgb(255 207 58); }

/* ---- THE ENTRANCE ---- */
.so-entrance {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: hidden;
  background: rgb(3 6 20);
  cursor: pointer;
}
.so-entrance > * { position: absolute; pointer-events: none; }
.so-entrance__sea {
  inset: 0;
  background:
    radial-gradient(ellipse at 18% 55%, rgb(30 140 255 / 0.5), transparent 55%),
    radial-gradient(ellipse at 82% 55%, rgb(150 60 255 / 0.5), transparent 55%),
    linear-gradient(rgb(6 12 40), rgb(12 28 80) 60%, rgb(3 8 28));
}
.so-entrance__beast { inset-block-start: 50%; block-size: min(62vh, 92vw); inline-size: auto; max-inline-size: 70vw; object-fit: contain; margin-block-start: calc(min(62vh, 92vw) / -2); }
.so-entrance__beast--shark { inset-inline-start: -4vw; }
.so-entrance__beast--orca { inset-inline-end: -4vw; }
/* face to face at the centre: below the jaws both fade into the dark (where the banner's lettering was cut away) */
.so-entrance__beast--shark {
  -webkit-mask-image: radial-gradient(ellipse 50% 46% at 58% 50%, rgb(0 0 0) 40%, transparent 100%), linear-gradient(rgb(0 0 0) 58%, transparent 72%);
  mask-image: radial-gradient(ellipse 50% 46% at 58% 50%, rgb(0 0 0) 40%, transparent 100%), linear-gradient(rgb(0 0 0) 58%, transparent 72%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.so-entrance__beast--orca {
  -webkit-mask-image: radial-gradient(ellipse 50% 46% at 42% 50%, rgb(0 0 0) 40%, transparent 100%), linear-gradient(rgb(0 0 0) 58%, transparent 72%);
  mask-image: radial-gradient(ellipse 50% 46% at 42% 50%, rgb(0 0 0) 40%, transparent 100%), linear-gradient(rgb(0 0 0) 58%, transparent 72%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.so-entrance__flash { inset: 0; background: radial-gradient(circle at 50% 50%, rgb(255 250 220), rgb(255 200 60 / 0.6) 30%, transparent 65%); opacity: 0; }
.so-entrance__ring {
  inset-inline-start: 50%;
  inset-block-start: 50%;
  inline-size: 160px;
  aspect-ratio: 1;
  border: 8px solid rgb(255 230 140);
  border-radius: 50%;
  box-shadow: 0 0 30px rgb(255 200 60), inset 0 0 24px rgb(120 210 255);
  opacity: 0;
}
.so-entrance__title { inset-inline-start: 50%; inset-block-start: 50%; inline-size: min(94vw, 760px); block-size: auto; opacity: 0; filter: drop-shadow(0 6px 18px rgb(0 0 0 / 0.8)); }

@media (prefers-reduced-motion: reduce) {
  .so-arena *,
  .so-fx *,
  .so-entrance * { animation: none !important; transition: none !important; }
  .so-entrance { display: none; }
}

/* so-v3: the Shark's BITE (the banner's shark lunging up, a bite mark left in the felt) and the Orca's CIRCLE */
.so-fx__lunge { position: absolute; inline-size: min(46vw, 260px); pointer-events: none; filter: drop-shadow(0 6px 18px rgb(0 0 0 / 0.6)); }
.so-fx__bite {
  position: absolute;
  inline-size: min(30vw, 150px);
  block-size: min(12vw, 60px);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  background:
    radial-gradient(circle at 10% 0, transparent 9px, rgb(4 18 30 / 0.92) 10px) 0 0 / 22px 22px repeat-x;
  box-shadow: inset 0 -6px 12px rgb(0 0 0 / 0.55);
  pointer-events: none;
}
.so-fx__swimmer { position: absolute; inline-size: min(34vw, 170px); pointer-events: none; filter: drop-shadow(0 4px 12px rgb(0 40 70 / 0.7)); }
@media (prefers-reduced-motion: reduce) { .so-fx__lunge, .so-fx__bite, .so-fx__swimmer { display: none; } }
