.diamonds-body .diamonds-game-panel {
  display: grid;
  gap: 1rem;
  overflow: hidden;
}

.bet-stepper {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr) 3.2rem;
  gap: 0.45rem;
}

.bet-stepper input {
  min-width: 0;
}

.step-button {
  min-height: 2.7rem;
  border: 1px solid #335368;
  border-radius: 0.45rem;
  background: #102b38;
  color: #dcecf4;
  font-weight: 950;
  cursor: pointer;
}

.step-button:hover,
.step-button:focus-visible {
  border-color: #73cfff;
  background: #173849;
}

.diamonds-table {
  display: grid;
  gap: 0.7rem;
}

.diamonds-table h2 {
  margin: 0;
  color: #dff5ff;
  font-size: 1rem;
}

.paytable-rows {
  display: grid;
  grid-template-columns: repeat(7, minmax(5.8rem, 1fr));
  gap: 0.55rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
}

.paytable-row {
  display: grid;
  align-content: start;
  gap: 0.22rem;
  min-height: 5.8rem;
  padding: 0.62rem;
  border: 1px solid #25475a;
  border-radius: 0.45rem;
  background: #102d3a;
}

.paytable-row.active {
  border-color: #ffd84a;
  background: #4a3810;
  box-shadow: 0 0 0 1px rgba(255, 216, 74, 0.12), 0 0 1rem rgba(255, 216, 74, 0.16);
}

.paytable-row strong {
  color: #f8fcff;
  font-size: 0.9rem;
}

.paytable-row span {
  color: #aac8d7;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.25;
}

.paytable-row b {
  color: #22e07a;
  font-size: 1rem;
}

.diamond-stage-surface {
  position: relative;
  display: grid;
  gap: 1rem;
  min-height: 20rem;
  padding: 1rem;
  overflow: hidden;
  border-radius: 0.45rem;
  background:
    radial-gradient(circle at 20% 18%, rgba(86, 179, 255, 0.14), transparent 11rem),
    radial-gradient(circle at 84% 14%, rgba(255, 85, 191, 0.12), transparent 10rem),
    linear-gradient(180deg, #071c27, #081721);
}

.diamond-stage-surface::before {
  content: "";
  position: absolute;
  inset: 0.7rem;
  border-radius: 0.45rem;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 4.4rem 4.4rem;
  pointer-events: none;
}

.gem-slots {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  gap: 0.9rem;
  min-height: 13.6rem;
}

.gem-slot {
  --gem-a: #30ff87;
  --gem-b: #0ba84d;
  --gem-c: #b8ffd3;
  position: relative;
  display: grid;
  justify-items: center;
  align-content: end;
  min-width: 0;
  min-height: 12.8rem;
  padding: 0.8rem 0.35rem 0;
  border: 1px solid transparent;
  border-radius: 0.45rem;
}

.gem-slot.match {
  border-color: rgba(255, 216, 74, 0.5);
  background: rgba(255, 216, 74, 0.08);
}

.gem-slot.spinning .gem-core {
  animation: gem-spin 0.18s linear infinite, gem-bob 0.34s ease-in-out infinite alternate;
}

.gem-slot.spinning .gem-shine {
  animation: gem-flash 0.42s linear infinite;
}

.gem.green {
  --gem-a: #3dff8f;
  --gem-b: #119c4d;
  --gem-c: #c7ffd8;
  --stand: #0d6b3d;
}

.gem.purple {
  --gem-a: #9b5cff;
  --gem-b: #4a13bc;
  --gem-c: #e1cfff;
  --stand: #4e13b9;
}

.gem.yellow {
  --gem-a: #ffe14a;
  --gem-b: #d39100;
  --gem-c: #fff7a6;
  --stand: #8f6d06;
}

.gem.red {
  --gem-a: #ff4968;
  --gem-b: #a3122f;
  --gem-c: #ffd0d8;
  --stand: #82122a;
}

.gem.cyan {
  --gem-a: #42e9ff;
  --gem-b: #0988a5;
  --gem-c: #c7fbff;
  --stand: #086579;
}

.gem.pink {
  --gem-a: #ff67c7;
  --gem-b: #b21878;
  --gem-c: #ffd6ef;
  --stand: #8c145f;
}

.gem.blue {
  --gem-a: #4e95ff;
  --gem-b: #1b4bb8;
  --gem-c: #c6ddff;
  --stand: #1b4179;
}

.gem {
  position: relative;
  display: grid;
  justify-items: center;
  align-items: end;
  width: min(6.8rem, 100%);
  min-height: 10.6rem;
}

.gem-core {
  position: relative;
  width: min(4.7rem, 90%);
  aspect-ratio: 0.78;
  clip-path: polygon(50% 0, 88% 22%, 74% 100%, 26% 100%, 12% 22%);
  background:
    linear-gradient(116deg, transparent 0 28%, rgba(255, 255, 255, 0.42) 29% 36%, transparent 37%),
    linear-gradient(68deg, rgba(255, 255, 255, 0.34) 0 18%, transparent 19% 42%, rgba(0, 0, 0, 0.18) 43% 100%),
    linear-gradient(145deg, var(--gem-c), var(--gem-a) 38%, var(--gem-b));
  filter: drop-shadow(0 0.5rem 0.35rem rgba(0, 0, 0, 0.32));
  transform-origin: 50% 72%;
}

.gem-core::before,
.gem-core::after {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(50% 0, 62% 22%, 56% 100%, 44% 100%, 38% 22%);
  background: rgba(255, 255, 255, 0.24);
  mix-blend-mode: screen;
}

.gem-core::after {
  clip-path: polygon(12% 22%, 38% 22%, 26% 100%);
  background: rgba(0, 0, 0, 0.18);
  mix-blend-mode: multiply;
}

.gem-shine {
  position: absolute;
  top: 28%;
  left: 57%;
  width: 0.62rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0.7rem rgba(255, 255, 255, 0.8);
}

.gem-base {
  width: min(5.6rem, 98%);
  height: 1.55rem;
  margin-top: 0.25rem;
  border-radius: 0.2rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 35%),
    var(--stand, #233d4c);
  box-shadow:
    inset 0 -0.42rem 0 rgba(0, 0, 0, 0.24),
    0 0.35rem 0 rgba(0, 0, 0, 0.28);
}

.gem-label {
  position: absolute;
  bottom: -0.45rem;
  color: #b9d3df;
  font-size: 0.72rem;
  font-weight: 850;
  opacity: 0;
}

.diamond-status {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 3.2rem;
  padding: 0.75rem;
  border-radius: 0.45rem;
  background: #102d3a;
  color: #c5dce7;
  text-align: center;
}

.diamond-status strong {
  color: #f8fcff;
  font-size: clamp(1.2rem, 4vw, 2rem);
}

.diamonds-result-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.diamonds-recent-results .recent-chip {
  min-width: 5.2rem;
}

@keyframes gem-spin {
  0% {
    transform: rotateY(0deg) rotateZ(-2deg);
  }

  50% {
    transform: rotateY(88deg) rotateZ(2deg);
  }

  100% {
    transform: rotateY(180deg) rotateZ(-2deg);
  }
}

@keyframes gem-bob {
  from {
    translate: 0 0;
  }

  to {
    translate: 0 -0.45rem;
  }
}

@keyframes gem-flash {
  0%,
  100% {
    opacity: 0.28;
    scale: 0.7;
  }

  50% {
    opacity: 1;
    scale: 1.3;
  }
}

@media (max-width: 900px) {
  .paytable-rows {
    grid-template-columns: repeat(7, minmax(7rem, 1fr));
  }

  .gem-slots {
    gap: 0.45rem;
  }

  .gem-slot {
    min-height: 10.6rem;
    padding-inline: 0.12rem;
  }

  .gem-core {
    width: min(3.9rem, 94%);
  }

  .gem-base {
    width: min(4.8rem, 100%);
  }
}

@media (max-width: 620px) {
  .diamond-stage-surface {
    min-height: 16rem;
    padding: 0.75rem;
  }

  .gem-slots {
    min-height: 10.8rem;
  }

  .gem-slot {
    min-height: 9.8rem;
  }

  .gem-core {
    width: min(3.2rem, 98%);
  }

  .gem-base {
    height: 1.05rem;
  }

  .diamond-status {
    display: grid;
    gap: 0.25rem;
  }

  .diamonds-result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
