/*
 * Some general styling
 */

* {
  box-sizing: border-box;
}

:root {
  --item-height: 100px;
}

body {
  background: url("bg.webp") no-repeat center center fixed;
  background-size: cover;
  margin: 0;
  font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/*
 * Style the orange box
 */

.start-button {
  display: block;
  margin: 1em auto;
  padding: 1em 2.5em;
  font-size: 1.5em;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(90deg, #ffb347 0%, #fd9b03 100%);
  border: none;
  border-radius: 1.5em;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25),
    0 2px 4px rgba(253, 155, 3, 0.2) inset;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}

.start-button:hover,
.start-button:focus {
  background: linear-gradient(90deg, #fd9b03 0%, #ffb347 100%);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3),
    0 2px 8px rgba(253, 155, 3, 0.25) inset;
  outline: none;
}

.start-button[disabled] {
  background: #ccc !important;
  color: #888 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  opacity: 0.7;
  pointer-events: none;
  transition: background 0.2s, color 0.2s, opacity 0.2s;
}

#container {
  background-color: #fd9b03;
  padding: 50px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
  border-radius: 1.5em;
}

.window {
  position: relative;
  overflow: hidden;
  height: calc(3 * var(--item-height));
}

.window::before {
  content: "";
  clear: both;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), transparent);
}

.window::after {
  content: "";
  clear: both;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.4));
}

.window-border {
  padding: 5px;
  background-image: linear-gradient(to bottom, #fcf8ad, #f8f3cd, #f9e13d);
  box-shadow: 0 6px 4px -5px #eca654 inset;
}

/*
 * Reels and icon styling
 */

.icon {
  width: 80px;
  height: var(--item-height);
  display: block;
  position: relative;

  /*animation: wiggle 0.1s linear infinite;*/
}

.outer-col {
  overflow-y: hidden;
  width: 100px;
  float: left;
  background-color: #eee;
  background-image: linear-gradient(#16013c, #741a5e, #430155, #16013c);
  height: calc(var(--item-height) * 3);
}

.outer-spacer {
  width: 8px;
  height: 100%;
  float: left;
  border-right: 2px solid #f7ce6c38;
  background-image: linear-gradient(#be4d01, #893802);
}

.col {
  padding: 0 10px;
  will-change: true;
  transform: translateY(calc(-100% + var(--item-height) * 3));
}

.col img {
  width: 100%;
  height: auto;
  margin: 10px 0;
  position: relative;
  z-index: 3;
}

/* shadow effect behind the items */
.col .icon::after {
  content: "";
  clear: both;
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 1px;
  background-color: white;
  box-shadow: 0 0 35px 30px rgba(12, 0, 14, 0.69);
  z-index: 2;
  border-radius: 100%;
}

/*
 * Spinning animation
 */

#container.spinning .outer-col:nth-of-type(2) .col {
  animation-delay: 0.01s;
}

#container.spinning .outer-col:nth-of-type(3) .col {
  animation-delay: 0.02s;
}

#container.spinning .outer-col:nth-of-type(4) .col {
  animation-delay: 0.03s;
}

#container.spinning .col {
  animation-name: scroll;
  animation-iteration-count: 1;
  animation-timing-function: cubic-bezier(0.65, 0.97, 0.72, 1);
}

@keyframes scroll {
  to {
    transform: translateY(0);
  }
}

/*@keyframes wiggle {
    0% {
        transform: rotate(7deg);
    }
    50% {
        transform: rotate(-7deg);
    }
    100% {
        transform: rotate(7deg);
    }
}*/

.scoreboard {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5em;
  font-size: 1.2em;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 1em;
  padding: 0.7em 1.5em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  color: #16013c;
  font-weight: bold;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  gap: 1.5em;
}

.scoreboard input[type="number"] {
  font-size: 1em;
  border-radius: 0.5em;
  border: 1px solid #fd9b03;
  padding: 0.2em 0.5em;
  width: 70px;
  text-align: right;
}

.win-description {
  min-height: 1.5em;
  text-align: center;
  font-size: 1.25em;
  font-weight: 700;
  margin-bottom: 1em;
  transition: opacity 0.3s, color 0.2s;
  opacity: 1;
}

.win-description.win-fruit {
  color: #2ecc40;
}

.win-description.win-big {
  color: #fd9b03;
}

.win-description.win-none {
  color: #888;
}

/* Выделение выигрышных символов */
.center-win {
  outline: 4px solid #fff700;
  background: linear-gradient(90deg, #fffbe0 0%, #ffe066 100%);
  border-radius: 0.7em;
  box-shadow: 0 0 16px 4px #ffe06699;
  transition: outline 0.2s, background 0.2s;
  position: relative;
  z-index: 10;
}