/* ==================== GAME COMPLETION SCREENS ==================== */
/* Trophy Account System - Game Mastered, Welcome Back Legend, New Journey Modal */

/* ==================== GAME MASTERED SCREEN ==================== */
/* Trophy Account Achievement Display - shown when player beats all 12 levels */

.game-mastered-screen {
  display: none !important;
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow-y: auto;
  box-sizing: border-box;
}

.game-mastered-screen.active {
  display: flex !important;
}

.game-mastered-content {
  text-align: center;
  max-width: 400px;
  width: 100%;
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.game-mastered-trophy {
  font-size: 5em;
  margin-bottom: 10px;
  animation: trophyGlow 2s ease-in-out infinite;
}

@keyframes trophyGlow {
  0%, 100% {
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.9));
  }
}

.game-mastered-title {
  font-size: 2.2em;
  color: #ffd700;
  margin: 0 0 10px 0;
  font-weight: bold;
  text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.game-mastered-subtitle {
  font-size: 1.1em;
  color: #a0a0c0;
  margin: 0 0 25px 0;
  line-height: 1.5;
}

.game-mastered-stats {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-mastered-stats-title {
  font-size: 0.9em;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.game-mastered-stats-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  margin: 12px 0;
}

.game-mastered-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.game-mastered-stat-label {
  color: #a0a0c0;
  font-size: 0.95em;
}

.game-mastered-stat-value {
  color: #fff;
  font-weight: bold;
  font-size: 1em;
}

.game-mastered-frozen-notice {
  font-size: 0.85em;
  color: #27ae60;
  margin: 0 0 25px 0;
  font-style: italic;
}

.game-mastered-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.game-mastered-btn {
  padding: 14px 24px;
  font-size: 1em;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.game-mastered-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.game-mastered-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.game-mastered-btn-secondary {
  background: transparent;
  color: #a0a0c0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.game-mastered-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

/* ==================== WELCOME BACK LEGEND SCREEN ==================== */
/* Shown when a returning player who has completed the game logs in */

.welcome-legend-screen {
  display: none !important;
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow-y: auto;
  box-sizing: border-box;
}

.welcome-legend-screen.active {
  display: flex !important;
}

.welcome-legend-content {
  text-align: center;
  max-width: 400px;
  width: 100%;
  animation: fadeInUp 0.6s ease-out;
}

.welcome-legend-crown {
  font-size: 4em;
  margin-bottom: 10px;
  animation: crownFloat 3s ease-in-out infinite;
}

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

.welcome-legend-title {
  font-size: 1.8em;
  color: #ffd700;
  margin: 0 0 20px 0;
  font-weight: bold;
}

.welcome-legend-stats {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.welcome-legend-stats-title {
  font-size: 0.85em;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.welcome-legend-stats-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  margin: 12px 0;
}

.welcome-legend-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}

.welcome-legend-stat-label {
  color: #a0a0c0;
  font-size: 0.9em;
}

.welcome-legend-stat-value {
  color: #fff;
  font-weight: bold;
  font-size: 0.95em;
}

.welcome-legend-message {
  font-size: 0.95em;
  color: #a0a0c0;
  margin: 0 0 25px 0;
  line-height: 1.6;
}

.welcome-legend-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.welcome-legend-btn {
  padding: 12px 20px;
  font-size: 0.95em;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.welcome-legend-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.welcome-legend-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.welcome-legend-btn-secondary {
  background: rgba(255, 215, 0, 0.1);
  color: #ffd700;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.welcome-legend-btn-secondary:hover {
  background: rgba(255, 215, 0, 0.2);
}

.welcome-legend-btn-tertiary {
  background: transparent;
  color: #888;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.welcome-legend-btn-tertiary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #a0a0c0;
}

/* ==================== NEW JOURNEY MODAL ==================== */
/* Confirmation modal for starting fresh with a new account */

.new-journey-modal {
  display: none !important;
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 3000;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.new-journey-modal.active {
  display: flex !important;
}

.new-journey-modal-content {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 16px;
  padding: 30px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.new-journey-icon {
  font-size: 3em;
  margin-bottom: 15px;
}

.new-journey-title {
  font-size: 1.4em;
  color: #fff;
  margin: 0 0 20px 0;
}

.new-journey-info {
  text-align: left;
  margin-bottom: 20px;
}

.new-journey-subtitle {
  color: #a0a0c0;
  font-size: 0.95em;
  margin: 0 0 12px 0;
}

.new-journey-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.new-journey-list li {
  color: #27ae60;
  font-size: 0.9em;
  padding: 6px 0;
}

.new-journey-current {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  text-align: center;
}

.new-journey-current-label {
  display: block;
  color: #888;
  font-size: 0.8em;
  margin-bottom: 5px;
}

.new-journey-current-username {
  display: block;
  color: #667eea;
  font-size: 1.1em;
  font-weight: bold;
  margin-bottom: 5px;
}

.new-journey-current-note {
  display: block;
  color: #666;
  font-size: 0.75em;
  font-style: italic;
}

.new-journey-prompt {
  color: #fff;
  font-size: 1em;
  margin: 0 0 20px 0;
}

.new-journey-actions {
  display: flex;
  gap: 12px;
}

.new-journey-btn {
  flex: 1;
  padding: 12px 16px;
  font-size: 0.95em;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.new-journey-btn-cancel {
  background: rgba(255, 255, 255, 0.1);
  color: #a0a0c0;
}

.new-journey-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.15);
}

.new-journey-btn-confirm {
  background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
  color: white;
}

.new-journey-btn-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

/* ==================== RESPONSIVE STYLES ==================== */

/* Tablet and smaller screens */
@media (max-width: 768px) {
  .game-mastered-content,
  .welcome-legend-content {
    max-width: 360px;
    padding: 0 15px;
  }

  .game-mastered-trophy {
    font-size: 4em;
  }

  .game-mastered-title {
    font-size: 1.9em;
  }

  .welcome-legend-crown {
    font-size: 3.5em;
  }

  .welcome-legend-title {
    font-size: 1.6em;
  }
}

/* Small mobile screens */
@media (max-width: 480px) {
  .game-mastered-screen,
  .welcome-legend-screen {
    padding: 15px;
  }

  .game-mastered-content,
  .welcome-legend-content {
    max-width: 100%;
    padding: 0 10px;
  }

  .game-mastered-trophy {
    font-size: 3.5em;
    margin-bottom: 8px;
  }

  .game-mastered-title {
    font-size: 1.7em;
  }

  .game-mastered-subtitle {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .game-mastered-stats {
    padding: 15px;
  }

  .game-mastered-stats-title {
    font-size: 0.8em;
  }

  .game-mastered-stat-row {
    padding: 6px 0;
  }

  .game-mastered-stat-label,
  .game-mastered-stat-value {
    font-size: 0.9em;
  }

  .game-mastered-frozen-notice {
    font-size: 0.8em;
  }

  .game-mastered-btn {
    padding: 12px 20px;
    font-size: 0.95em;
  }

  .welcome-legend-crown {
    font-size: 3em;
    margin-bottom: 8px;
  }

  .welcome-legend-title {
    font-size: 1.5em;
    margin-bottom: 15px;
  }

  .welcome-legend-stats {
    padding: 15px;
  }

  .welcome-legend-stats-title {
    font-size: 0.8em;
  }

  .welcome-legend-stat-row {
    padding: 5px 0;
  }

  .welcome-legend-stat-label,
  .welcome-legend-stat-value {
    font-size: 0.85em;
  }

  .welcome-legend-message {
    font-size: 0.9em;
    margin-bottom: 20px;
  }

  .welcome-legend-btn {
    padding: 11px 18px;
    font-size: 0.9em;
  }

  .new-journey-modal-content {
    padding: 25px 20px;
    max-width: 340px;
  }

  .new-journey-icon {
    font-size: 2.5em;
    margin-bottom: 12px;
  }

  .new-journey-title {
    font-size: 1.2em;
  }

  .new-journey-subtitle {
    font-size: 0.9em;
  }

  .new-journey-list li {
    font-size: 0.85em;
    padding: 5px 0;
  }

  .new-journey-current {
    padding: 12px;
  }

  .new-journey-current-label {
    font-size: 0.75em;
  }

  .new-journey-current-username {
    font-size: 1em;
  }

  .new-journey-current-note {
    font-size: 0.7em;
  }

  .new-journey-prompt {
    font-size: 0.95em;
  }

  .new-journey-btn {
    padding: 11px 14px;
    font-size: 0.9em;
  }
}

/* Very small mobile screens */
@media (max-width: 375px) {
  .game-mastered-trophy {
    font-size: 3em;
  }

  .game-mastered-title {
    font-size: 1.5em;
  }

  .game-mastered-subtitle {
    font-size: 0.9em;
  }

  .welcome-legend-crown {
    font-size: 2.5em;
  }

  .welcome-legend-title {
    font-size: 1.4em;
  }

  .new-journey-modal-content {
    padding: 20px 15px;
  }

  .new-journey-actions {
    flex-direction: column;
    gap: 10px;
  }

  .new-journey-btn {
    width: 100%;
  }
}
