@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

html {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  font-family: 'Poppins', sans-serif;
  color: #e0e0e0;
}

body {
  background: url("../assets/background/fond.webp") center/cover no-repeat fixed;
}

/* ------------------ Header ------------------ */

header {
  padding-top: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
}

header h1 {
  margin: 0;
}

/* ------------------ Container agents ------------------ */

.container {
  display: flex;
  justify-content: center;
  gap: 300px;
  padding: 20px;
}

.defense,
.attack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  width: 200px;
  min-height: 250px;
  padding: 10px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  border-radius: 12px;
}

.defense button,
.attack button {
  color: #fff;
  padding: 8px 15px;
  background-color: #ff6f00;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.defense button:hover,
.attack button:hover {
  transform: scale(1.05);
  background-color: #ff8f00;
}

.defense img,
.attack img {
  width: 100%;
  height: auto;
}

.defense-output p,
.attack-output p {
  text-align: center;
  font-size: 1.1rem;
  margin: 0;
  animation: fadeIn 0.5s ease forwards;
}

/* ------------------ Pick Both button ------------------ */

.pick-both-container {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.pick-both-container button {
  padding: 10px 25px;
  background-color: #ff6f00;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.pick-both-container button:hover {
  transform: scale(1.05);
  background-color: #ff8f00;
}

/* ------------------ Map block ------------------ */

.map {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  width: 200px;
  min-height: 250px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  border-radius: 12px;
  padding: 10px;
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
}

.map button {
  color: #fff;
  padding: 8px 15px;
  background-color: #ff6f00;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.map button:hover {
  transform: scale(1.05);
  background-color: #ff8f00;
}

.map img {
  width: 100%;
  height: auto;
}

.map-output p {
  text-align: center;
  font-size: 1.1rem;
  margin: 0;
  animation: fadeIn 0.5s ease forwards;
}

/* ------------------ Loader ------------------ */

.loader {
  position: fixed;
  inset: 0;
  background: #111;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.8s ease;
}

.loader::after {
  content: "";
  width: 50px;
  height: 50px;
  border: 5px solid #fff;
  border-top-color: #ff6f00;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.fade-out {
  opacity: 0;
  pointer-events: none;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.defense-output,
.attack-output,
.map-output {
  width: 100%;
  min-height: 250px; 
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
