:root {
  --primary: #ff9800;
  --secondary: #2196f3;
  --dark: #1a1a1f;
  --darker: #121216;
  --success: #4caf50;
  --danger: #f44336;
  --text: #ffffff;

  --crypto-primary: #00e5ff;
  --crypto-secondary: #7700ff;
  --crypto-accent: #ff00aa;
  --crypto-dark: #0a0a1a;
  --crypto-darker: #050510;
  --crypto-text: #e0e0ff;
  --crypto-success: #00ffaa;
  --crypto-chip: #ffd700;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  max-width: 100%;
}

html {
  overflow-x: hidden;
  width: 100%;
}

body {
  margin: 0;
  font-family: "Rubik", sans-serif;
  background: linear-gradient(145deg, var(--crypto-darker), var(--crypto-dark));
  color: var(--crypto-text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: static;
  z-index: 0;
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

body.modal-open header .plus {
  visibility: hidden;
  pointer-events: none;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at center,
    rgba(0, 229, 255, 0.1) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-bottom: 20px;
  position: relative;
  z-index: 1;
  overflow-y: auto;
}

header {
  padding: 0.8rem 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  position: static;
  gap: 0.5rem;
  background: rgba(26, 26, 31, 0.8);
  /* backdrop-filter: blur(10px); */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: opacity 0.3s ease;
}

.header-top {
  display: flex;
  justify-content: space-between;
  width: 100%;
  order: 1;
}

.header-bottom {
  display: flex;
  justify-content: center;
  width: 100%;
  order: 2;
  margin-top: 0.5rem;
}

h2 {
  margin: 0;
  user-select: none;
  white-space: nowrap;
  font-weight: 700;
  font-size: 1.2rem;
  background: linear-gradient(
    to right,
    var(--crypto-primary),
    var(--crypto-accent)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 15px rgba(0, 229, 255, 0.5);
}

.balance {
  background: rgba(20, 20, 40, 0.8);
  padding: 0.4rem 0.8rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
  min-width: auto;
  justify-content: center;
  user-select: none;
  border: 1px solid rgba(0, 229, 255, 0.3);
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.balance::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  z-index: 1;
}

.balance:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.plus {
  background: var(--crypto-success);
  border: none;
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 50%;
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
  z-index: 2;
  box-shadow: 0 4px 8px rgba(0, 255, 170, 0.3);
}

.plus:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(76, 175, 80, 0.4);
}

.language-switcher {
  background-color: rgba(34, 34, 38, 0.8);
  border: 1px solid rgba(68, 68, 68, 0.5);
  border-radius: 8px;
  padding: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
  user-select: none;
  font-size: 12px;
  min-width: auto;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  height: 32px;
}

.language-btn {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 5px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.language-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.language-btn.active {
  background: rgba(255, 152, 0, 0.3);
  font-weight: bold;
}

.flag-icon {
  width: 16px;
  height: 12px;
  object-fit: cover;
  border-radius: 2px;
  user-select: none;
}

.wheel-container {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
  user-select: none;
  position: relative;
  padding: 15px;
  width: 100%;
  overflow: hidden;
}

.wheel-wrapper {
  position: relative;
  width: 240px;
  height: 240px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

.wheel-border {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(
    145deg,
    var(--crypto-primary),
    var(--crypto-secondary)
  );
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.7);
  animation: border-pulse 3s infinite alternate;
}

.wheel {
  position: relative;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  background: radial-gradient(circle, var(--darker) 0%, var(--dark) 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: transform 1.8s cubic-bezier(0.17, 0.67, 0.14, 0.93);
  transform: rotate(0deg);
  transform-origin: center center;
}

.wheel-highlight {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.3);
  z-index: 5;
  pointer-events: none;
  display: none;
  animation: highlightPulse 1.5s infinite;
}

@keyframes highlightPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(255, 215, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
  }
}

@keyframes slideDown {
  from {
    transform: translate(-50%, -50px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

.wheel-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-bottom: 28px solid var(--primary);
  z-index: 15;
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8));
  animation: pointerPulse 1.5s infinite;
  pointer-events: none;
}

@keyframes pointerPulse {
  0% {
    transform: translateX(-50%) scale(1);
    border-bottom-color: var(--primary);
  }
  50% {
    transform: translateX(-50%) scale(1.1);
    border-bottom-color: gold;
  }
  100% {
    transform: translateX(-50%) scale(1);
    border-bottom-color: var(--primary);
  }
}

.center-circle {
  position: absolute;
  width: 70px;
  height: 70px;
  background: var(--crypto-dark);
  border-radius: 50%;
  border: 2px solid rgba(0, 229, 255, 0.3);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
}

.center-text {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(
    to right,
    var(--crypto-primary),
    var(--crypto-accent)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.selected-gift {
  animation: selectedPulse 0.5s infinite alternate;
}

@keyframes selectedPulse {
  from {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  }
  to {
    transform: scale(1.05);
    box-shadow: 0 0 20px gold;
  }
}

.selected-gift-container {
  position: absolute;
  top: 20px;
  left: 50%;
  width: auto;
  white-space: nowrap;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: bold;
  z-index: 20;
  display: none;
  border: 2px solid var(--primary);
  box-shadow: 0 0 15px rgba(255, 152, 0, 0.5);
}

.gift-item {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 60px;
  height: 60px;
  z-index: 2;
  transform-origin: center center;
  transition: none !important;
}

.gift-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
  pointer-events: none;
  border-radius: 12px;
  border: 2px solid rgba(255, 215, 0, 0.5);
  background: rgba(0, 0, 0, 0.3);
  padding: 5px;
  box-sizing: border-box;
  transform: rotate(0deg) !important; /* Фіксуємо обертання */
  transition: none !important;
}

.stake-menu {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  margin: 1.5rem auto 1rem auto;
  z-index: 1;
  user-select: none;
  border-radius: 15px;
  padding: 0.8rem;
  background: rgba(15, 15, 30, 0.7);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5),
    inset 0 0 15px rgba(0, 229, 255, 0.3);
  border: 1px solid rgba(0, 229, 255, 0.2);
  max-width: 500px;
  min-width: 280px;

  width: calc(100% - 30px);
  box-sizing: border-box;
}

.stake-btn {
  padding: 0.6rem 1.2rem;
  background: linear-gradient(to bottom, #222244, #111133);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 12px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 1rem;
  user-select: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stake-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
  background: linear-gradient(to bottom, #333, #222) !important;
}

.stake-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: 0.5s;
}

.stake-btn:hover:not(:disabled) {
  background: linear-gradient(
    to bottom,
    var(--crypto-primary),
    var(--crypto-secondary)
  );
  color: #1b1b1b;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.5);
  transform: translateY(-3px);
}

.stake-btn:hover:not(:disabled)::before {
  left: 100%;
}

.stake-btn.active {
  background: linear-gradient(
    to bottom,
    var(--crypto-primary),
    var(--crypto-accent)
  );
  color: #1b1b1b;
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.7);
  transform: translateY(-2px);
}

.spin-btn {
  margin: 1rem auto 2rem auto;
  display: block;
  padding: 0.9rem 2.5rem;
  font-size: 1.1rem;
  background: linear-gradient(
    to right,
    var(--crypto-secondary),
    var(--crypto-primary)
  );
  color: white;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  user-select: none;
  transition: all 0.4s ease;
  z-index: 1;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: 0 8px 25px rgba(119, 0, 255, 0.5);
  position: relative;
  overflow: hidden;
}

.spin-btn::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 20%;
  height: 200%;
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(25deg);
  transition: 0.5s;
}

.spin-btn:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 12px 30px rgba(0, 229, 255, 0.6);
}

.spin-btn:hover .crypto-sparkle {
  opacity: 0.8;
  transform: translate(-15px, 15px);
}

.spin-btn:hover::after {
  left: 120%;
}

.spin-btn:disabled {
  background: linear-gradient(to right, #666, #555);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000; /* Зменшено з 2147483647 до розумного значення */
  backdrop-filter: blur(5px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: linear-gradient(145deg, var(--crypto-dark), var(--crypto-darker));
  padding: 2rem;
  border-radius: 20px;
  text-align: center;
  max-width: 320px;
  width: 100%;
  color: var(--text);
  user-select: none;
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.5);
  border: 1px solid rgba(0, 229, 255, 0.3);
  position: relative;
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal.active .modal-content {
  transform: translateY(0);
}

.modal-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(
    to right,
    var(--crypto-secondary),
    var(--crypto-primary)
  );
}

.modal-content h3 {
  margin-bottom: 1.2rem;
  font-size: 1.3rem;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal-content select,
.modal-content button:not(.modal-close-btn) {
  margin-top: 1.2rem;
  width: 100%;
  padding: 0.7rem;
  font-size: 0.95rem;
  border-radius: 10px;
  border: none;
  background: rgba(50, 50, 55, 0.7);
  color: white;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
  outline: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-content select {
  background: rgba(40, 40, 45, 0.8);
}

.modal-content button:not(.modal-close-btn) {
  background: linear-gradient(to right, var(--success), #2e7d32);
  font-weight: 600;
  letter-spacing: 1px;
  box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.modal-content select:hover {
  border-color: var(--primary);
}

.modal-content button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(76, 175, 80, 0.6);
}

@keyframes border-pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.05);
    opacity: 1;
  }
}

.crypto-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
      circle at 20% 30%,
      rgba(0, 229, 255, 0.05) 0%,
      transparent 20%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(119, 0, 255, 0.05) 0%,
      transparent 20%
    ),
    radial-gradient(
      circle at 50% 10%,
      rgba(255, 0, 170, 0.05) 0%,
      transparent 20%
    );
}

.crypto-grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(
      rgba(0, 229, 255, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  z-index: 0;
  pointer-events: none;
}

.crypto-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px dashed rgba(0, 229, 255, 0.3);
  pointer-events: none;
  animation: rotateRing 20s linear infinite;
}

.crypto-ring-outer {
  width: 300px;
  height: 300px;
  border-color: rgba(119, 0, 255, 0.3);
  animation-duration: 25s;
  animation-direction: reverse;
}

.crypto-ring-inner {
  width: 200px;
  height: 200px;
  border-color: rgba(255, 0, 170, 0.3);
}

.crypto-modal-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.crypto-chip {
  display: none; /* Приховати, якщо не потрібен */
  /* або оновити позиціонування */
  position: absolute;
  top: -10px;
  right: 30px; /* Зміщено, щоб не заважав кнопці */
  width: 20px;
  height: 20px;
  background: var(--crypto-chip);
  border-radius: 50%;
  filter: blur(1px);
  opacity: 0.7;
  z-index: 1;
}

.crypto-select-wrapper {
  position: relative;
}

.crypto-select-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.crypto-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.crypto-buy-btn {
  position: relative;
  overflow: hidden;
  background: linear-gradient(to right, var(--crypto-success), #00cc88);
  box-shadow: 0 5px 15px rgba(0, 255, 170, 0.5);
}

.crypto-arrow {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid white;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  transition: all 0.3s ease;
}

.crypto-buy-btn:hover .crypto-arrow {
  right: 15px;
}

.crypto-warning {
  color: #ff5555;
  margin-top: 10px;
  font-size: 14px;
  text-align: center;
}

.crypto-loader {
  border-top-color: var(--crypto-primary);
}

.crypto-sparkle {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0;
  transition: all 0.3s ease;
}

.crypto-trophy {
  width: 60px;
  height: 60px;
  margin: 0 auto 15px;
  background: linear-gradient(to bottom, var(--crypto-chip), #ffaa00);
  clip-path: polygon(
    50% 0%,
    60% 30%,
    90% 30%,
    65% 50%,
    75% 80%,
    50% 60%,
    25% 80%,
    35% 50%,
    10% 30%,
    40% 30%
  );
}

.crypto-win-btn {
  background: linear-gradient(
    to right,
    var(--crypto-primary),
    var(--crypto-accent)
  );
}

.crypto-confetti {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(
      circle at 20% 30%,
      rgba(0, 229, 255, 0.3) 0%,
      transparent 20%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(119, 0, 255, 0.3) 0%,
      transparent 20%
    ),
    radial-gradient(
      circle at 50% 10%,
      rgba(255, 0, 170, 0.3) 0%,
      transparent 20%
    );
}

@keyframes rotateRing {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.win-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1001;
  animation: fadeIn 0.5s forwards;
}

.win-content {
  text-align: center;
  padding: 2rem;
  background: linear-gradient(145deg, var(--crypto-darker), var(--crypto-dark));
  border-radius: 20px;
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.8);
  border: 2px solid var(--crypto-chip);
  max-width: 350px;
  width: 90%;
  animation: scaleIn 0.5s forwards;
}

.win-content h2 {
  font-size: 2rem;
  margin-bottom: 1.2rem;
  color: gold;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

.win-content p {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: white;
}

.win-content button {
  padding: 0.7rem 2rem;
  font-size: 1.1rem;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

.win-content button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(255, 152, 0, 0.7);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0.8);
  }
  to {
    transform: scale(1);
  }
}

.result-indicator {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  font-weight: 700;
  z-index: 20;
  display: none;
  animation: slideDown 0.5s forwards;
  border: 2px solid var(--primary);
  box-shadow: 0 0 15px rgba(255, 152, 0, 0.5);
}

.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 2s linear infinite;
  margin: 10px auto;
}

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

label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
  color: #333;
}

.select {
  width: 100%;
  padding: 8px 12px;
  font-size: 15px;
  border: 1.5px solid #ccc;
  border-radius: 6px;
  background-color: #fff; /* світлий фон */
  color: #000; /* темний текст */
  transition: border-color 0.3s ease;
  cursor: pointer;

  padding-right: 40px;
}

.select:hover,
.select:focus {
  border-color: #007bff;
  outline: none;
  background-color: #f9faff;
  color: #000; /* також темний текст на ховері/фокусі */
}

/* Додайте в кінець файлу style.css */
.site-footer {
  background: rgba(10, 10, 26, 0.9);
  backdrop-filter: blur(10px);
  padding: 1.5rem 1rem;
  border-top: 1px solid rgba(0, 229, 255, 0.2);
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
  z-index: 10;
  position: relative;
  flex-shrink: 0;
  padding-top: 50px;

  width: 100vw;
  left: 0;
  right: 0;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  opacity: 0.8;
}

.footer-link:hover {
  color: var(--crypto-primary);
  opacity: 1;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

.footer-contacts {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

.footer-contact {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  opacity: 0.8;
}

.footer-contact:hover {
  color: var(--crypto-secondary);
  opacity: 1;
}

.footer-contact i {
  font-size: 1.1rem;
}

.footer-copyright {
  font-size: 0.8rem;
  opacity: 0.6;
  margin-top: 1rem;
}

.modal-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
  color: white;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.25);

  animation: fadeInZoom 0.4s ease;
}

@keyframes fadeInZoom {
  from {
    opacity: 0;
    transform: scale(0.7);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-close-btn:hover {
  background: rgba(255, 0, 0, 0.1);
  color: #ff5555;
}

/* leaderboard */
#leaderboardModal .modal-content {
  max-width: 90%;
  width: 100%;
  padding: 1.5rem;
  background: linear-gradient(145deg, var(--crypto-dark), var(--crypto-darker));
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

#leaderboardModal .modal-content.leaderboard-content {
  max-width: 800px;
  padding: 1.5rem;
}

#leaderboardTitle {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--crypto-primary);
  text-align: center;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

.leaderboard-container {
  width: 100%;
  overflow-y: auto;
  max-height: 70vh;
  padding: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--crypto-primary) rgba(0, 0, 0, 0.2);
}

.leaderboard-container::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.leaderboard-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

.leaderboard-container::-webkit-scrollbar-thumb {
  background-color: var(--crypto-primary);
  border-radius: 10px;
}

#leaderboardTable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
  color: var(--crypto-text);
}

#leaderboardTable thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

#leaderboardTable th {
  background: linear-gradient(
    to right,
    var(--crypto-secondary),
    var(--crypto-primary)
  );
  color: white;
  padding: 0.8rem 0.5rem;
  text-align: left;
  font-weight: 600;
  position: relative;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

#leaderboardTable th:first-child {
  border-top-left-radius: 10px;
  padding-left: 1rem;
}

#leaderboardTable th:last-child {
  border-top-right-radius: 10px;
  padding-right: 1rem;
}

#leaderboardTable th::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

#leaderboardTable tbody tr {
  transition: all 0.2s ease;
  background: rgba(20, 20, 40, 0.5);
}

#leaderboardTable tbody tr:nth-child(even) {
  background: rgba(30, 30, 50, 0.5);
}

#leaderboardTable tbody tr:hover {
  background: rgba(40, 40, 60, 0.7);
  transform: translateX(5px);
}

#leaderboardTable td {
  padding: 0.8rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

#leaderboardTable td:first-child {
  padding-left: 1rem;
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

#leaderboardTable td:last-child {
  padding-right: 1rem;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

.leaderboard-rank {
  font-weight: 700;
  color: var(--crypto-chip);
  text-align: center;
  min-width: 40px;
}

.leaderboard-user {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.leaderboard-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(0, 229, 255, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  background-color: #0088cc;
}

tr.current-user {
  background: rgba(0, 229, 255, 0.15) !important;
  border-left: 3px solid var(--crypto-primary);
}

tr.current-user td:first-child {
  border-left: none;
}

/* Медіа-запити для адаптації */
@media (max-width: 768px) {
  .leaderboard-btn {
    width: 45px;
    height: 45px;
    top: -30px; /* Змінив з -20px на -30px */
    right: 15px;
  }

  .leaderboard-btn i {
    font-size: 1.3rem;
  }

  #leaderboardModal .modal-content {
    max-width: 95%;
    padding: 1rem;
  }

  #leaderboardTable {
    font-size: 0.8rem;
  }

  .leaderboard-user {
    gap: 0.5rem;
  }

  .leaderboard-avatar {
    width: 30px;
    height: 30px;
  }

  #leaderboardTable th,
  #leaderboardTable td {
    padding: 0.6rem 0.3rem;
  }

  #leaderboardTable td:first-child {
    padding-left: 0.5rem;
  }

  #leaderboardTable td:last-child {
    padding-right: 0.5rem;
  }
}

@media (max-width: 480px) {
  .leaderboard-btn {
    width: 40px;
    height: 40px;
    top: -25px; /* Змінив з -15px на -25px */
    right: 10px;
  }

  .leaderboard-btn i {
    font-size: 1.2rem;
  }

  #leaderboardTable {
    font-size: 0.75rem;
  }

  .leaderboard-rank {
    min-width: 30px;
  }

  #leaderboardTable th {
    padding: 0.5rem 0.3rem;
    font-size: 0.7rem;
  }

  #leaderboardTable td {
    padding: 0.5rem 0.3rem;
  }

  .leaderboard-user {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .leaderboard-avatar {
    width: 25px;
    height: 25px;
  }
}

.leaderboard-btn {
  position: absolute;
  right: 20px;
  top: -35px; /* Змінив з -25px на -35px (підняли вище) */
  width: 50px;
  height: 50px;
  background: linear-gradient(145deg, #ffd700, #ffaa00);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 20;
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.leaderboard-btn i {
  color: white;
  font-size: 1.5rem;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.leaderboard-btn:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 20px rgba(255, 215, 0, 0.7);
}

.leaderboard-btn:active {
  transform: translateY(0) scale(0.95);
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }

  .footer-links {
    order: 1;
  }

  .footer-contacts {
    order: 3;
    margin-top: 0;
  }

  .footer-copyright {
    order: 2;
    margin-top: 0;
  }
}

/* Адаптація для планшетів та десктопів */

@media (min-width: 481px) {
  header {
    padding: 1rem 1.5rem;
    gap: 1rem;
    flex-wrap: nowrap;
  }

  .header-top {
    display: contents;
  }

  .header-bottom {
    display: contents;
    margin-top: 0;
  }

  h2 {
    font-size: 1.5rem;
  }

  .balance {
    padding: 0.5rem 1rem;
    font-size: 1rem;
  }

  .plus {
    padding: 0.3rem 0.7rem;
    font-size: 1.1rem;
  }

  .language-switcher {
    padding: 6px;
    font-size: 14px;
    min-width: 120px;
  }

  .language-btn {
    font-size: 14px;
    padding: 4px 10px;
  }

  .flag-icon {
    width: 18px;
    height: 12px;
  }

  .wheel-wrapper {
    width: 280px;
    height: 280px;
  }

  .wheel {
    width: 260px;
    height: 260px;
    background: radial-gradient(
      circle,
      var(--crypto-darker) 0%,
      var(--crypto-dark) 100%
    );
  }

  .center-circle {
    width: 80px;
    height: 80px;
  }

  .stake-menu {
    margin: 2rem auto 1.5rem auto;
    padding: 1rem 1.8rem;
    gap: 1rem;
  }

  .stake-btn {
    padding: 0.8rem 1.8rem;
    font-size: 1.1rem;
  }

  .spin-btn {
    padding: 1rem 3rem;
    font-size: 1.3rem;
    margin: 1.5rem auto 2.5rem auto;
  }

  .modal-content {
    padding: 2.5rem;
    max-width: 350px;
  }

  .modal-content h3 {
    font-size: 1.5rem;
  }

  .modal-content select,
  .modal-content button {
    padding: 0.8rem;
    font-size: 1rem;
  }

  .win-content {
    padding: 3rem;
    max-width: 400px;
  }

  .win-content h2 {
    font-size: 2.5rem;
  }

  .win-content p {
    font-size: 1.8rem;
  }

  body:before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: none;
  }

  body.blocked:before {
    display: block;
  }
}

@media (max-width: 480px) {
  body {
    overflow-x: hidden;
    position: relative;
  }

  body.modal-open {
    position: fixed;
    overflow: hidden;
    width: 100%;
  }

  .content-wrapper {
    width: 100vw;
    overflow-x: hidden;
  }

  header {
    width: 100vw;
  }

  .wheel-wrapper {
    width: 280px;
    height: 280px;
  }

  .wheel {
    width: 260px;
    height: 260px;
  }

  .gift-item {
    width: 60px;
    height: 60px;
  }

  .center-circle {
    width: 60px;
    height: 60px;
  }

  .wheel-border {
    width: 280px;
    height: 280px;
  }

  .site-footer {
    padding: 1rem;
  }
}
