/* Defeat Modal Styles - Inspired by game UI boards */

.defeat-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.defeat-modal-overlay.show {
  opacity: 1;
}

.defeat-modal-container {
  animation: defeatBoardSlide 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes defeatBoardSlide {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-50px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Defeat Board - Wooden board style */
.defeat-board {
  position: relative;
  width: 450px;
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(135deg, #8B4513 0%, #A0522D 50%, #8B4513 100%);
  border: 8px solid #654321;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.8),
    inset 0 2px 4px rgba(255, 255, 255, 0.2),
    inset 0 -2px 4px rgba(0, 0, 0, 0.3);
  text-align: center;
}

/* Wood texture effect */
.defeat-board::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.03) 2px,
      rgba(0, 0, 0, 0.03) 4px
    );
  border-radius: 12px;
  pointer-events: none;
}

/* Defeat Banner */
.defeat-banner {
  margin-bottom: 20px;
  position: relative;
}

.defeat-banner-img {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.defeat-banner-text {
  background: linear-gradient(135deg, #DC143C 0%, #8B0000 100%);
  border: 4px solid #FFD700;
  border-radius: 15px;
  padding: 15px;
  box-shadow: 
    0 8px 16px rgba(0, 0, 0, 0.5),
    inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

.defeat-banner-text h1 {
  font-family: 'Luckiest Guy', cursive;
  font-size: 36px;
  color: #FFD700;
  text-shadow: 
    3px 3px 0 #8B0000,
    -1px -1px 0 #FFD700,
    1px -1px 0 #FFD700,
    -1px 1px 0 #FFD700,
    1px 1px 0 #FFD700,
    0 0 20px rgba(255, 215, 0, 0.8);
  margin: 0;
  letter-spacing: 2px;
}

/* Stats Section */
.defeat-stats {
  background: rgba(0, 0, 0, 0.3);
  border: 3px solid #654321;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 2px solid rgba(255, 215, 0, 0.3);
}

.stat-row:last-child {
  margin-bottom: 0;
}

.stat-label {
  font-family: 'Luckiest Guy', cursive;
  font-size: 18px;
  color: #FFD700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  letter-spacing: 1px;
}

.stat-value {
  font-family: 'Luckiest Guy', cursive;
  font-size: 24px;
  color: #FFF;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  min-width: 60px;
  text-align: right;
}

/* Buttons */
.defeat-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.defeat-btn {
  flex: 1;
  font-family: 'Luckiest Guy', cursive;
  font-size: 20px;
  padding: 15px 25px;
  border: 4px solid;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

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

.defeat-btn:hover::before {
  left: 100%;
}

.defeat-btn i {
  font-size: 22px;
}

/* Replay Button - Green */
.replay-btn {
  background: linear-gradient(135deg, #32CD32 0%, #228B22 100%);
  border-color: #FFD700;
  color: #FFF;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.replay-btn:hover {
  background: linear-gradient(135deg, #3FE03F 0%, #2BA52B 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.replay-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Lobby Button - Orange */
.lobby-btn {
  background: linear-gradient(135deg, #FF8C00 0%, #FF6347 100%);
  border-color: #FFD700;
  color: #FFF;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.lobby-btn:hover {
  background: linear-gradient(135deg, #FFA500 0%, #FF7F50 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.lobby-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  .defeat-board {
    width: 90%;
    max-width: 400px;
    padding: 25px;
  }
  
  .defeat-banner-text h1 {
    font-size: 36px;
  }
  
  .stat-label {
    font-size: 16px;
  }
  
  .stat-value {
    font-size: 20px;
  }
  
  .defeat-btn {
    font-size: 18px;
    padding: 12px 20px;
  }
}

@media (max-width: 480px) {
  .defeat-board {
    padding: 20px;
  }
  
  .defeat-banner-text h1 {
    font-size: 28px;
  }
  
  .defeat-buttons {
    flex-direction: column;
  }
  
  .defeat-btn {
    width: 100%;
  }
}
