/* ==========================================================
   Splash screen, video call strip, profile photo, fair-draw badge
   ========================================================== */

/* splash */
#splash {
  position: fixed; inset: 0; z-index: 500; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(ellipse at 50% 40%, #4a0c2c, #14040f 70%);
  transition: opacity .5s ease;
}
#splash.out { opacity: 0; pointer-events: none; }
#splash img { width: 150px; height: 150px; animation: coinspin 2.4s ease-in-out infinite; filter: drop-shadow(0 0 30px rgba(255, 190, 40, .7)); }
.sp-title { font-size: clamp(1.6rem, 6vw, 2.6rem); font-weight: 900; color: #fff; text-align: center; }
.sp-title b { background: linear-gradient(180deg, #fff6c8, #ffc21a 55%, #f08a0c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sp-bar { width: min(280px, 70vw); height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .12); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 215, 120, .4); }
.sp-bar i { display: block; height: 100%; width: 40%; border-radius: 999px; background: linear-gradient(90deg, #ff7a00, #ffd34d); box-shadow: 0 0 12px #ffb21a; animation: spload 1.3s ease-in-out infinite; }
@keyframes spload { 0% { transform: translateX(160%); } 100% { transform: translateX(-260%); } }
.sp-note { color: #e9cfe0; font-size: .85rem; }

/* fair-draw badge */
.fair-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; line-height: 1.05;
  font-size: .72rem; font-weight: 900; color: #fff; text-align: right;
  background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .5);
}
.fair-badge svg { width: 22px; height: 22px; color: #4ade80; flex: none; }

/* profile photo */
.avatar.photo { object-fit: cover; padding: 0; background: var(--c); }
.photo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.photo-row .btn { cursor: pointer; }

/* video button in the table header */
.video-btn { min-height: 40px; padding: 6px 14px; font-size: .95rem; }
.video-btn svg { width: 18px; height: 18px; fill: none; stroke: #fff; }
.video-btn.on { background: linear-gradient(90deg, #16a34a, #0f8a3c); box-shadow: 0 0 18px rgba(34, 197, 94, .6); }

/* video strip over the top of the table */
.video-strip {
  position: relative; z-index: 6; display: flex; align-items: center; gap: 10px; margin: 0 auto 10px; width: fit-content; max-width: 100%;
  padding: 8px 10px; border-radius: 18px; background: rgba(15, 4, 14, .82); backdrop-filter: blur(6px);
  box-shadow: 0 0 0 2px rgba(240, 180, 41, .7), 0 12px 30px rgba(0, 0, 0, .5);
}
.vs-tiles { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.v-tile { position: relative; margin: 0; width: 132px; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #000; flex: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
.v-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.v-tile.self video { transform: scaleX(-1); }
.v-tile figcaption { position: absolute; bottom: 4px; right: 6px; padding: 1px 8px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-size: .78rem; font-weight: 700; }
.v-tile .vt-state { position: absolute; inset: 0; display: grid; place-items: center; color: #fecaca; font-size: .8rem; font-weight: 700; pointer-events: none; }
.v-tile.bad { box-shadow: 0 0 0 2px #ef4444; }
.vs-bar { display: flex; flex-direction: column; gap: 6px; }
.vs-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); color: #fff; }
.vs-btn svg { width: 20px; height: 20px; }
.vs-btn.off { background: #b91c1c; }
.vs-btn.end { background: #e11d48; }

@media (max-width: 680px) {
  .video-btn span { display: none; }
  .video-btn { padding: 6px 10px; min-height: 40px; }
  .video-strip { padding: 6px; gap: 6px; border-radius: 14px; }
  .v-tile { width: 88px; }
  .vs-bar { flex-direction: row; }
  .vs-btn { width: 34px; height: 34px; }
  .video-strip { flex-direction: column; }
  .fair-badge { display: none; }
}
@media (max-width: 680px) {
  /* at a shared table the header holds video, reactions and the room code: the sign makes room for them */
  .game-head:has(.room-pill) h1 { display: none; }
  .game-head:has(.room-pill) .game-head-side { flex: 1; justify-content: flex-start; gap: 6px; }
  .room-pill span { white-space: nowrap; }
}
