.game-container {
  max-width: 400px;
  margin: 0 auto;
  padding: 20px;
}

.realty-game {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  background: linear-gradient(to bottom, #87ceeb 0%, #98d8e8 50%, #b0e0e6 100%);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.realty-game canvas {
  display: block;
  width: 100%;
  height: auto;
  background: transparent;
}

.realty-game-ui {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.realty-game-hud {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
  z-index: 10;
}

.realty-game-score {
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 12px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 18px;
  color: #1f2937;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.realty-game-best {
  background: rgba(255, 255, 255, 0.8);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

.realty-game-controls {
  display: flex;
  gap: 8px;
}

.realty-game-btn {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.realty-game-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-1px);
}

.realty-game-btn:active {
  transform: translateY(0);
}

.realty-game-btn.primary {
  background: #186aff;
  color: white;
}

.realty-game-btn.primary:hover {
  background: #1557cc;
}

.realty-game-screen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  text-align: center;
  padding: 32px;
  pointer-events: auto;
}

.realty-game-screen.hidden {
  display: none;
}

.realty-game-screen h2 {
  font-size: 28px;
  margin: 0 0 16px 0;
  font-weight: bold;
}

/* Added subtitle styling for promo information */
.realty-game-screen .subtitle {
  font-size: 18px;
  margin: 0 0 8px 0;
  color: #186aff;
  font-weight: 600;
}

.realty-game-screen p {
  font-size: 16px;
  margin: 0 0 24px 0;
  line-height: 1.5;
  opacity: 0.9;
}

.realty-game-screen .welcome-description {
  font-size: 16px;
  margin: 0 0 32px 0;
  line-height: 1.6;
  opacity: 0.95;
  max-width: 280px;
}

.rules-link {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: #9ca3af;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.rules-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.realty-game-screen .score-display {
  font-size: 48px;
  font-weight: bold;
  margin: 16px 0;
  color: #fbbf24;
}

.realty-game-screen .promo-info {
  background: rgba(255, 255, 255, 0.1);
  padding: 16px;
  border-radius: 12px;
  margin: 16px 0;
  border: 2px solid #10b981;
}

.realty-game-screen .promo-amount {
  font-size: 24px;
  font-weight: bold;
  color: #10b981;
}

.realty-game-screen .buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 200px;
}

.realty-game-screen .buttons button {
  padding: 12px 24px;
  font-size: 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.realty-game-screen .buttons button.primary {
  background: #186aff;
  color: white;
}

.realty-game-screen .buttons button.primary:hover {
  background: #1557cc;
}

.realty-game-screen .buttons button.secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.realty-game-screen .buttons button.secondary:hover {
  background: rgba(255, 255, 255, 0.3);
}

.realty-game-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
}

.realty-game-modal.hidden {
  display: none;
}

.realty-game-modal-content {
  background: white;
  padding: 32px;
  border-radius: 16px;
  text-align: center;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.realty-game-modal h3 {
  font-size: 24px;
  margin: 0 0 16px 0;
  color: #1f2937;
}

.realty-game-modal .promo-description {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
  margin: 0 0 20px 0;
  text-align: left;
}

.realty-game-modal .promo-amount-title {
  color: #186aff;
  font-weight: bold;
}

.promo-code-container {
  position: relative;
  margin: 16px 0;
}

.realty-game-modal .promo-code {
  font-size: 18px;
  font-weight: bold;
  font-family: "Courier New", monospace;
  background: #f8fafc;
  padding: 16px 50px 16px 16px;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
  color: #1f2937;
  text-align: center;
}

.copy-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 20px;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.copy-icon:hover {
  background: #f1f5f9;
}

.realty-game-modal .buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.realty-game-modal button {
  margin-top: 10px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.realty-game-modal button.primary {
  background: #186aff;
  color: white;
}

.realty-game-modal button.primary:hover {
  background: #1557cc;
}

.realty-game-modal button.secondary {
  background: #f3f4f6;
  color: #374151;
}

.realty-game-perfect {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  font-weight: bold;
  color: #fbbf24;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 5;
  animation: perfectPulse 1s ease-out;
}

@keyframes perfectPulse {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }
}

/* Адаптивность */
@media (max-width: 480px) {
  .container {
    padding: 10px;
  }

  .realty-game-hud {
    top: 12px;
    left: 12px;
    right: 12px;
  }

  .realty-game-score {
    font-size: 16px;
    padding: 6px 10px;
  }

  .realty-game-screen {
    padding: 24px 16px;
  }

  .realty-game-screen h2 {
    font-size: 24px;
  }

  .realty-game-screen .score-display {
    font-size: 36px;
  }

  .realty-game-screen .welcome-description {
    font-size: 16px;
    margin: 0 0 32px 0;
    line-height: 1.6;
    opacity: 0.95;
    max-width: 280px;
  }

  .rules-link {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #9ca3af;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  .realty-game-screen {
    padding: 16px;
  }

  .realty-game-screen h2 {
    font-size: 20px;
    margin-bottom: 8px;
  }

  .realty-game-screen p {
    font-size: 14px;
    margin-bottom: 16px;
  }

  .realty-game-screen .score-display {
    font-size: 28px;
    margin: 8px 0;
  }

  .realty-game-screen .welcome-description {
    font-size: 16px;
    margin: 0 0 32px 0;
    line-height: 1.6;
    opacity: 0.95;
    max-width: 280px;
  }

  .rules-link {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #9ca3af;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
  }
}
