@import './theme.css';

.game-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease-out;
}

.game-modal-container {
  width: 95%;
  height: 95%;
  max-width: 1400px;
  max-height: 900px;
  background: white;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease-out;
  overflow: hidden;
}

.game-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--leno-gradient-primary, linear-gradient(135deg, #2563eb, #3b82f6));
  color: white;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.game-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
}

.game-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #1e293b;
  transition: all 0.2s ease;
  z-index: 10;
}

.game-modal-close:hover {
  background: rgba(0, 0, 0, 0.15);
  transform: scale(1.1);
}

.game-modal {
  background: white;
  border-radius: 24px;
  padding: 24px;
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease-out;
  position: relative;
}

.game-modal-content {
  flex: 1;
  position: relative;
  overflow: hidden;
  padding: 0;
}

.game-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.game-modal-expired {
  background: white;
  border-radius: 24px;
  padding: 48px;
  text-align: center;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease-out;
}

.game-modal-expired h2 {
  font-size: 32px;
  color: var(--leno-text-primary, #1e293b);
  margin-bottom: 16px;
}

.game-modal-expired p {
  font-size: 18px;
  color: var(--leno-text-secondary, #475569);
  margin-bottom: 12px;
  line-height: 1.6;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Game completion screen */
.game-complete {
  text-align: center;
  padding: 2rem;
}

.game-trophy-icon {
  width: 80px;
  height: 80px;
  color: #FFD700;
  margin: 0 auto 1.5rem;
}

.game-score {
  margin: 1.5rem 0;
}

.score-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--leno-text-primary, #1e293b);
}

.score-percentage {
  font-size: 1.25rem;
  color: var(--leno-text-secondary, #475569);
  margin-top: 0.5rem;
}

.game-message {
  font-size: 1.125rem;
  color: var(--leno-text-secondary, #475569);
  margin: 1.5rem 0;
}

.game-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.game-button {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.game-button-primary {
  background: var(--leno-gradient-primary, linear-gradient(135deg, #2563eb, #3b82f6));
  color: white;
}

.game-button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.game-button-secondary {
  background: #f3f4f6;
  color: #1e293b;
  border: 1px solid #e5e7eb;
}

.game-button-secondary:hover {
  background: #e5e7eb;
}

@media (max-width: 768px) {
  .game-modal {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
    padding: 16px;
  }

  .game-modal-container {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .game-modal-header {
    padding: 12px 16px;
  }

  .game-timer {
    font-size: 14px;
  }

  .game-actions {
    flex-direction: column;
  }

  .game-button {
    width: 100%;
  }
}