@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,200;0,300;0,500;0,600;0,700;0,800;0,900;1,400&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Play:wght@400;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap");

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

body {
  background: linear-gradient(135deg, #eaba66 0%, #e88b00 25%, #fb93a1 50%, #f5576c 75%, #fe4fd2 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  min-height: 100vh;
  font-family: "Poppins", "Play", sans-serif;
  display: grid;
  gap: 10px;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.main-div {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  font-family: "Poppins", "Play", sans-serif;
  flex-shrink: 0;
  padding: 20px;
  height: 100vh;
  width: 100%;
  overflow-y: auto;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.top-text {
  display: flex;
  margin-top: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  margin-bottom: 20px;
  width: 100%;
  text-align: center;
}

.heading-text {
  font-size: 2.5rem;
  font-family: "Orbitron", "Gill Sans", sans-serif;
  font-weight: 900;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7);
  background-size: 300% 300%;
  animation: gradientShift 3s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  letter-spacing: 2px;
  margin-bottom: 5px;
}

.heading-text h2 {
  margin: 0;
}

.money-stat-container {
  display: flex;
  width: 100%;
  max-width: 600px;
  justify-content: space-evenly;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  margin: 20px auto;
}

.individual-container {
  display: flex;
  flex-grow: 1;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.inner-div {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  padding: 15px 20px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.inner-div:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.inner-div img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.money-value {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  min-width: 80px;
  text-align: center;
}

.money-label {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.bet-input {
  width: 120px !important;
  font-size: 1rem;
  padding: 8px 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  outline: none;
  transition: all 0.3s ease;
  text-align: center;
  backdrop-filter: blur(5px);
}

.bet-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.bet-input:focus {
  border-color: #4facfe;
  box-shadow: 0 0 15px rgba(79, 172, 254, 0.5);
  background: rgba(255, 255, 255, 0.2);
}

.main-grid {
  display: flex;
  flex-shrink: 0;
  flex-direction: row;
  gap: 30px;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.game-grid {
  display: grid;
  margin: 0;
  grid-template-rows: repeat(3, 100px);
  grid-template-columns: repeat(3, 100px);
  gap: 4px;
  background: rgba(0, 0, 0, 0.3);
  padding: 15px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.box {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3rem;
  font-family: "Play", "Poppins", sans-serif;
  border-radius: 12px;
  background: linear-gradient(145deg, #ffffff, #e6e6e6);
  color: rgb(0, 78, 167);
  cursor: pointer;
  position: relative;
  height: 100px;
  width: 100px;
  overflow: hidden;
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.8),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1),
    0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.box:hover {
  transform: scale(1.02);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.8),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1),
    0 8px 16px rgba(0, 0, 0, 0.3);
}

.box.spin-anim {
  animation: spinBox 0.5s ease-in-out;
}

@keyframes spinBox {
  0% {
    transform: scale(1) rotate(0deg);
  }

  50% {
    transform: scale(1.1) rotate(180deg);
  }

  100% {
    transform: scale(1) rotate(360deg);
  }
}

.multiplier-container {
  display: flex;
  color: #fff;
  flex-direction: column;
  gap: 10px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  min-width: 150px;
  align-self: flex-start;
}

.multiplier-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.multiplier-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.multiply-symbol {
  font-size: 18px;
  font-weight: bold;
  color: #4facfe;
}

.multiply-val {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.bet-group {
  display: flex;
  align-items: center;
}

.multiply-bet {
  font-size: 16px;
  font-weight: 700;
  color: #4facfe;
  text-shadow: 0 0 10px rgba(79, 172, 254, 0.5);
}

.spin-container {
  display: flex;
  margin: 20px 0;
  text-align: center;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  width: 100%;
}

.spin-button {
  display: flex;
  color: white;
  justify-content: center;
  align-items: center;
  font-size: 1.1rem;
  font-weight: 700;
  transition: all 0.3s ease;
  cursor: pointer;
  padding: 12px 25px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 20px;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

.spin-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.spin-button:hover::before {
  left: 100%;
}

.spin-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(102, 126, 234, 0.6);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.spin-button:active {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.spin-button-contents {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1;
}

.spin-image {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

.spin-button:hover .spin-image {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.reel-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1);
  will-change: transform;
  min-width: 120px;
}

.reel-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  width: 100%;
  padding: 8px;
}

.slot-svg {
  width: 70px;
  height: 70px;
  border-radius: 12px;
  background: linear-gradient(145deg, #ffffff, #f0f0f0);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: block;
  margin: 0 auto;
  object-fit: cover;
  border: 2px solid #e0e0e0;
  transition: all 0.3s ease;
}

.slot-svg:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Адаптивность для мобильных устройств */

/* Планшеты */
@media (max-width: 1024px) {
  .main-div {
    padding: 15px;
    gap: 15px;
  }

  .heading-text {
    font-size: 2.2rem;
    margin-bottom: 10px;
  }

  .money-stat-container {
    width: 100%;
    max-width: 500px;
    padding: 12px;
    margin: 15px auto;
  }

  .main-grid {
    gap: 20px;
    max-width: 700px;
  }

  .game-grid {
    grid-template-rows: repeat(3, 95px);
    grid-template-columns: repeat(3, 95px);
    gap: 3px;
    padding: 12px;
  }

  .box {
    height: 95px;
    width: 95px;
  }

  .reel-symbol {
    height: 95px;
    padding: 6px;
  }

  .slot-svg {
    width: 65px;
    height: 65px;
  }

  .multiplier-container {
    min-width: 130px;
  }
}

/* Мобильные устройства (портретная ориентация) */
@media (max-width: 768px) {
  .main-div {
    padding: 8px;
    justify-content: space-between;
    gap: 8px;
  }

  .heading-text {
    font-size: 1.8rem;
    letter-spacing: 1px;
    margin-bottom: 3px;
  }

  .money-stat-container {
    width: 95%;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    margin: 5px 0;
  }

  .inner-div {
    padding: 12px 15px;
    gap: 10px;
  }

  .inner-div img {
    width: 35px;
    height: 35px;
  }

  .money-value {
    font-size: 20px;
    min-width: 70px;
  }

  .money-label {
    font-size: 12px;
  }

  .bet-input {
    width: 100px !important;
    font-size: 0.9rem;
    padding: 6px 10px;
  }

  .main-grid {
    flex-direction: column;
    gap: 15px;
    width: 100%;
    align-items: center;
  }

  .game-grid {
    grid-template-rows: repeat(3, 80px);
    grid-template-columns: repeat(3, 80px);
    gap: 2px;
    padding: 8px;
    width: 100%;
    max-width: 280px;
  }

  .box {
    height: 80px;
    width: 80px;
    border-radius: 10px;
  }

  .reel-symbol {
    height: 80px;
    padding: 6px;
  }

  .slot-svg {
    width: 50px;
    height: 50px;
    border-radius: 10px;
  }

  .multiplier-container {
    min-width: 100px;
    padding: 12px;
    gap: 10px;
  }

  .multiplier-row {
    padding: 8px;
  }

  .multiply-symbol {
    font-size: 16px;
  }

  .multiply-val {
    font-size: 14px;
  }

  .multiply-bet {
    font-size: 14px;
  }

  .spin-button {
    padding: 12px 25px;
    font-size: 1rem;
    letter-spacing: 1px;
  }

  .spin-button-contents {
    gap: 8px;
  }

  .spin-image {
    width: 20px;
    height: 20px;
  }
}

/* Маленькие мобильные устройства */
@media (max-width: 480px) {
  .main-div {
    padding: 8px;
    gap: 12px;
  }

  .heading-text {
    font-size: 1.5rem;
    letter-spacing: 1px;
  }

  .money-stat-container {
    width: 98%;
    padding: 12px;
    gap: 10px;
  }

  .inner-div {
    padding: 10px 12px;
    gap: 8px;
  }

  .inner-div img {
    width: 30px;
    height: 30px;
  }

  .money-value {
    font-size: 18px;
    min-width: 60px;
  }

  .money-label {
    font-size: 11px;
  }

  .bet-input {
    width: 80px !important;
    font-size: 0.8rem;
    padding: 5px 8px;
  }

  .game-grid {
    grid-template-rows: repeat(3, 80px);
    grid-template-columns: repeat(3, 80px);
    gap: 2px;
    padding: 10px;
    max-width: 280px;
  }

  .box {
    height: 80px;
    width: 80px;
    border-radius: 10px;
  }

  .reel-symbol {
    height: 80px;
    padding: 6px;
  }

  .slot-svg {
    width: 45px;
    height: 45px;
    border-radius: 10px;
  }

  .multiplier-container {
    min-width: 90px;
    padding: 10px;
    gap: 8px;
  }

  .multiplier-row {
    padding: 6px;
  }

  .multiply-symbol {
    font-size: 14px;
  }

  .multiply-val {
    font-size: 12px;
  }

  .multiply-bet {
    font-size: 12px;
  }

  .spin-button {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .spin-image {
    width: 18px;
    height: 18px;
  }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
  .heading-text {
    font-size: 1.3rem;
  }

  .game-grid {
    grid-template-rows: repeat(3, 70px);
    grid-template-columns: repeat(3, 70px);
    max-width: 240px;
  }

  .box {
    height: 70px;
    width: 70px;
  }

  .reel-symbol {
    height: 70px;
  }

  .slot-svg {
    width: 40px;
    height: 40px;
  }

  .money-stat-container {
    padding: 10px;
  }

  .inner-div {
    padding: 8px 10px;
  }

  .inner-div img {
    width: 25px;
    height: 25px;
  }

  .money-value {
    font-size: 16px;
  }

  .bet-input {
    width: 70px !important;
    font-size: 0.7rem;
  }
}

/* Ландшафтная ориентация на мобильных */
@media (max-width: 768px) and (orientation: landscape) {
  .main-div {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px;
  }

  .top-text {
    width: 100%;
    margin-bottom: 5px;
  }

  .heading-text {
    font-size: 1.8rem;
  }

  .money-stat-container {
    width: 30%;
    min-width: 200px;
    flex-direction: row;
    gap: 10px;
  }

  .individual-container {
    flex-direction: row;
    gap: 8px;
  }

  .inner-div {
    padding: 8px 12px;
  }

  .inner-div img {
    width: 25px;
    height: 25px;
  }

  .money-value {
    font-size: 16px;
  }

  .money-label {
    font-size: 10px;
  }

  .main-grid {
    width: 60%;
    flex-direction: row;
    gap: 10px;
  }

  .game-grid {
    grid-template-rows: repeat(3, 70px);
    grid-template-columns: repeat(3, 70px);
    gap: 2px;
    padding: 8px;
  }

  .box {
    height: 70px;
    width: 70px;
  }

  .reel-symbol {
    height: 70px;
  }

  .slot-svg {
    width: 40px;
    height: 40px;
  }

  .multiplier-container {
    min-width: 80px;
    padding: 8px;
  }

  .spin-container {
    width: 100%;
    margin: 5px;
  }

  .spin-button {
    padding: 8px 16px;
    font-size: 0.8rem;
  }
}

/* Улучшения для устройств с высоким DPI */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
  .slot-svg {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Поддержка темной темы */
@media (prefers-color-scheme: dark) {
  .slot-svg {
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border-color: #444;
  }

  .box {
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    color: #fff;
  }
}

/* Улучшения для устройств с поддержкой hover */
@media (hover: hover) {
  .box:hover {
    transform: scale(1.05);
  }

  .inner-div:hover {
    transform: translateY(-3px);
  }
}

/* Улучшения для устройств без поддержки hover */
@media (hover: none) {
  .box:active {
    transform: scale(0.98);
  }

  .inner-div:active {
    transform: translateY(-1px);
  }
}

/* Анимации для выигрышных комбинаций */
@keyframes winPulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

.win-animation {
  animation: winPulse 0.5s ease-in-out 3;
}

/* Стили для сообщений */
#game-message {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  font-size: 1.2rem;
  font-weight: bold;
  padding: 15px 25px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: none;
  animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}