.r8-spin-viewer {
  position: relative;
  width: min(100%, 920px);
  margin: 0 auto;
  color: #f7fbff;
}

.r8-spin-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(280px, 38vw, 520px);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(125, 218, 255, 0.34);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 84%, rgba(92, 214, 255, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(4, 20, 40, 0.94), rgba(6, 44, 78, 0.76));
  box-shadow: 0 32px 80px rgba(0, 28, 56, 0.2);
  cursor: grab;
  touch-action: none;
  isolation: isolate;
}

.r8-spin-stage:active {
  cursor: grabbing;
}

.r8-spin-stage::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 18px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.1), transparent 42%),
    radial-gradient(circle at 84% 18%, rgba(0, 199, 255, 0.2), transparent 32%);
  pointer-events: none;
}

.r8-spin-stage::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: 10%;
  height: 18%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 9, 22, 0.38), transparent 68%);
  filter: blur(16px);
  opacity: 0.8;
  pointer-events: none;
}

.r8-spin-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: 96%;
  max-height: 92%;
  object-fit: contain;
  filter: drop-shadow(0 28px 42px rgba(0, 0, 0, 0.34));
  user-select: none;
  pointer-events: none;
}

.r8-spin-chrome {
  position: absolute;
  z-index: 3;
  left: 18px;
  right: 18px;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  pointer-events: none;
}

.r8-spin-hint,
.r8-spin-counter {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(158, 225, 255, 0.34);
  border-radius: 999px;
  background: rgba(1, 18, 36, 0.72);
  color: rgba(247, 252, 255, 0.92);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  backdrop-filter: blur(14px);
}

.r8-spin-counter {
  min-width: 68px;
  justify-content: center;
}

.r8-spin-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.r8-spin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(101, 205, 255, 0.48);
  border-radius: 50%;
  background: linear-gradient(135deg, #06386a, #08bde8);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 900;
  box-shadow: 0 16px 32px rgba(0, 62, 126, 0.16);
  cursor: pointer;
}

.r8-spin-button:hover {
  transform: translateY(-1px);
}

.r8-spin-progress {
  position: relative;
  flex: 1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(4, 35, 65, 0.12);
}

.r8-spin-progress::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--spin-progress, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, #06386a, #08bde8);
}

.r8-spin-note {
  margin-top: 10px;
  color: rgba(5, 27, 52, 0.64);
  font-size: 0.9rem;
  font-weight: 700;
}

@media (max-width: 760px) {
  .r8-spin-viewer {
    width: 100%;
  }

  .r8-spin-stage {
    min-height: 260px;
    border-radius: 18px;
  }

  .r8-spin-chrome {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .r8-spin-hint {
    max-width: calc(100% - 84px);
    font-size: 0.74rem;
  }
}
