/* Shwazi — black stage, solid finger dots, white time track */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

:root {
  color-scheme: dark;
  --ring: 88px;
}

html,
body {
  height: 100%;
  background: #000;
  color: #f4f4f6;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

#stage {
  position: fixed;
  inset: 0;
}

/* finger dots */

.ring {
  position: absolute;
  width: var(--ring);
  height: var(--ring);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 3px solid #fff;
  background: var(--c);
  transition: opacity 0.3s ease, transform 0.12s ease;
}

.ring.hot {
  transform: translate(-50%, -50%) scale(1.18);
}

.ring.dim {
  opacity: 0.3;
}

.ring.winner {
  z-index: 5;
  animation: pop 0.9s ease-in-out infinite;
}

@keyframes pop {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1.15);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.4);
  }
}

/* time track around the screen edge */

#track {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
  transition: opacity 0.3s ease;
}

#track.fade {
  opacity: 0;
}

#trackPath {
  fill: none;
  stroke: #fff;
  stroke-width: 7;
  stroke-linecap: round;
}

#trackDot {
  fill: #fff;
}

/* winner banner */

.banner {
  position: fixed;
  z-index: 6;
  left: 0;
  top: 0;
  transform: translate(-50%, -100%);
  background: #ffffff;
  color: #14141a;
  font-size: 17px;
  font-weight: 800;
  padding: 10px 18px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  animation: rise 0.25s ease;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translate(-50%, -85%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -100%);
  }
}

/* bottom controls */

#controls {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 0 20px calc(26px + env(safe-area-inset-bottom));
  pointer-events: none;
  z-index: 5;
}

.btn {
  font: inherit;
  font-weight: 800;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.12s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.btn:active {
  transform: scale(0.94);
}

.post {
  display: flex;
  gap: 12px;
  pointer-events: auto;
}

.post .btn {
  padding: 16px 30px;
  font-size: 17px;
}

#againBtn {
  background: #f4f4f6;
  color: #14141a;
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #f4f4f6;
}
