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

body {
  font-family: "Arial", sans-serif;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* .slot-machine-container {
  perspective: 1000px;
  transform-style: preserve-3d;
} */

.machine-frame {
  background: linear-gradient(145deg, #2c3e50, #34495e);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5),
    inset 0 2px 4px rgba(255, 255, 255, 0.1),
    inset 0 -2px 4px rgba(0, 0, 0, 0.3);
  border: 3px solid #34495e;
  position: relative;
  /* min-width: 600px; */
}

.machine-top {
  text-align: center;
  margin-bottom: 20px;
}

.machine-title {
  font-size: 2.5em;
  font-weight: bold;
  color: #f5c45e;
  margin-bottom: 10px;
  letter-spacing: 3px;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0.3;
  }
}

.reels-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
  position: relative;
}

.reel-frame {
  width: 120px;
  height: 150px;
  background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
  border-radius: 10px;
  padding: 10px;
  box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.5), 0 4px 8px rgba(0, 0, 0, 0.3);
  border: 2px solid #444;
  overflow: hidden;
  position: relative;
}

.reel {
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.1s ease-out;
}

.reel-item {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8em;
  font-weight: bold;
  background: linear-gradient(145deg, #f8f9fa, #e9ecef);
  margin: 2px 0;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  border: 1px solid #dee2e6;
  color: #2c3e50;
  font-family: "Arial", sans-serif;
}

.payline {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  height: 4px;
  /* color: yellow; */
  background-color: rgba(249, 246, 32, 0.84);
  /* background: linear-gradient(90deg, transparent, #f39c12, transparent); */
  box-shadow: 0 0 22px #e8f312;
  z-index: 10;
  border-radius: 2px;
}

.control-panel {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 30px;
  padding: 20px;
  background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
  border-radius: 15px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.chord-type-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.play-button {
  position: relative;
  background: #be3d2a; /* translucent plastic look */
  border: 2px solid rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  width: 90px;
  height: 90px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4),
    /* outer shadow */ inset 0 4px 6px rgba(255, 255, 255, 0.2),
    /* inner highlight */ inset 0 -4px 6px rgba(0, 0, 0, 0.4); /* bottom shading */
  overflow: hidden;
}

.play-button .button-text {
  position: relative;
  z-index: 2;
  color: #102e50; /* slot machine buttons usually have black text */
  font-weight: bold;
  font-size: 1.5em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); /* slight plastic highlight */
}

.play-button .button-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle,
    rgba(255, 255, 200, 0.8) 0%,
    /* warm light center */ rgba(238, 216, 10, 0.1) 60%,
    transparent 100%
  );
  opacity: 0.2;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.play-button:active .button-glow {
  opacity: 1; /* light turns on when pressed */
}

.mode-button {
  position: relative;
  background: #f5c45e; /* translucent plastic look */
  border: 2px solid rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  width: 100px;
  height: 40px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4),
    /* outer shadow */ inset 0 3px 5px rgba(255, 255, 255, 0.2),
    /* top highlight */ inset 0 -3px 5px rgba(0, 0, 0, 0.4); /* bottom shading */
  overflow: hidden;
}

.mode-button:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.mode-button:active {
  transform: scale(0.98);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.mode-button.active {
  background: linear-gradient(145deg, #fc6101, #f62e18);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 2px rgba(255, 255, 255, 0.3), 0 0 20px rgba(243, 156, 18, 0.7);
}

/* .mode-button.active:hover {
  background: linear-gradient(145deg, #f1c40f, #f39c12);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 2px rgba(255, 255, 255, 0.3), 0 0 20px rgba(243, 156, 18, 0.7);
} */

.mode-button .button-text {
  position: relative;
  z-index: 2;
  color: #102e50;
  font-weight: bold;
  font-size: 0.8em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.mode-button .button-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mode-button:hover .button-glow {
  opacity: 1;
}

/* Spinning animation */
.reel.spinning {
  animation: spin 0.1s linear infinite;
}

@keyframes spin {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-50px);
  }
}

@media (max-height: 480px) {
  .machine-frame {
    padding: 10px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 0;
    margin: 0;
    overflow: hidden; /* prevent extra scroll */
  }

  .machine-frame {
    width: 95vw; /* full width */
    height: 80vh; /* full height */
    min-width: unset;
    /* border-radius: 0;  */
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    /* justify-content: ; */
    align-items: center;
  }

  .machine-title {
    font-size: 2em;
    margin-top: 10px;
  }

  .reels-container {
    flex: 1; /* take up available space */
    align-items: center;
    justify-content: center;
    /* gap: 15px; */
  }

  /* .reel-frame {
    width: 90px;
    height: 120px;
  }

  .reel-item {
    font-size: 1.4em;
    height: 40px;
  } */

  .payline {
    width: 240px;
    top: 58%;
    /* margin-top: px; */
    /* margin-bottom: 100px; */
  }

  .control-panel {
    flex-direction: row; /* keep buttons side by side */
    justify-content: space-evenly;
    padding: 15px;
    width: 100%;
    margin-top: 10px;
    /* margin-bottom: 45px; */
    padding: 10px;
    border-radius: 0;
  }

  .play-button {
    width: 70px;
    height: 70px;
  }

  .mode-button {
    width: 100px;
    height: 40px;
  }
}
