:root {
  --ball-size-base: 152px;
  --ball-size-small: 70px;
}

.aimingArea {
  position: absolute;
  bottom: 160px;
  left: 24px;
  z-index: 2000;
  pointer-events: auto;
}

.ballContainerWrapper {
  flex: 0 0 var(--ball-size-base);
  height: 70px;
  position: relative;
  z-index: 20;
  transition: flex 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.ballContainerWrapper.is-disabled {
  flex: 0 0 var(--ball-size-small);
}

.ballContainer {
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--ball-size-base);
  height: var(--ball-size-base);
  border-radius: 0 12px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #2d1e16;
  border-bottom: none;
  border-left: none;
  z-index: 20;
  background-color: var(--wood-dark);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Cfilter id='n' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.005 0.05' numOctaves='5' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.4 0 0 0 0 0.25 0 0 0 0 0.15 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  box-sizing: border-box;
  overflow: hidden;
}

.ballContainer.is-disabled {
  width: var(--ball-size-small);
  height: var(--ball-size-small);
  border-radius: 0;
  border-width: 0;
  box-shadow: none;
  background-color: transparent !important;
  background-image: none !important;
}

.cueBall {
  height: 90%;
  width: 90%;
  margin: auto;
  opacity: 1;
  background: radial-gradient(
    circle at 35% 35%,
    #fff 0%,
    rgb(255 255 255) 10%,
    rgb(220 220 220) 30%,
    #a0a0a0 65%,
    #606060 90%,
    #404040 100%
  );
  border-radius: 50%;
  position: absolute;
  top: 5%;
  left: 5%;
  z-index: 5;
  box-shadow:
    6px 12px 24px rgb(0 0 0 / 70%),
    inset -4px -6px 12px rgb(0 0 0 / 40%),
    inset 8px 10px 15px rgb(255 255 255 / 20%);
  transition: all 0.1s ease;
}

.cueBall::before {
  content: "";
  position: absolute;
  top: 18%;
  left: 18%;
  width: 25%;
  height: 25%;
  background: radial-gradient(
    circle,
    rgb(255 255 255 / 90%) 0%,
    transparent 80%
  );
  border-radius: 50%;
  pointer-events: none;
}

.cueBall.is-disabled {
  filter: grayscale(0.65) brightness(0.55);
  box-shadow: inset 0 0 0 2px rgb(220 220 220 / 25%);
}

.objectBall {
  height: 88%;
  width: 88%;
  border: 0.5px solid rgb(0 44 64);
  border-radius: 50%;
  z-index: 3;
  position: absolute;
  top: 6%;
  left: 6%;
  pointer-events: none;
  transition: all 0.1s ease;
}

.cueTip {
  height: 24px;
  width: 24px;
  background-color: #357abd;
  border-radius: 50%;
  z-index: 10;
  position: absolute;
  pointer-events: none;
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 2px rgb(0 0 0 / 60%),
    inset 0 1px 1px rgb(255 255 255 / 30%);
  transition: all 0.1s ease;
}

.ballContainer.is-disabled .cueTip {
  width: 12px;
  height: 12px;
}

.hitButton {
  width: 100px;
  height: 100px;
  margin: 0;
  aspect-ratio: auto;
  border-radius: 10px;
  border-width: 4px;
  font-size: 24px;
  user-select: none;
  box-sizing: border-box;
  padding: 0;
}

.hitButton:disabled {
  visibility: hidden;
  opacity: 0.75;
  cursor: not-allowed;
}

.hitButton:active {
  transform: scale(0.97);
}

.timeout-btn {
  --sweep: 360deg;
  --timer-color: #10b981;

  background:
    linear-gradient(#f4f4f5, #f4f4f5) padding-box,
    conic-gradient(var(--timer-color) var(--sweep), #e4e4e7 0deg) border-box;
  border: 4px solid transparent;
  border-radius: 14px;
  color: #18181b;
}

.timeout-btn:not(:disabled):hover {
  background:
    linear-gradient(#fff, #fff) padding-box,
    conic-gradient(var(--timer-color) var(--sweep), #e4e4e7 0deg) border-box;
}
