/* General Styles */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #101010;
  color: #efefef;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  flex-direction: column;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  width: 95%;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
  border: 1px solid rgba(239, 239, 239, 0.2);
}

h1 {
  font-size: 2.5em;
  margin-bottom: 20px;
  color: #efefef;
  /* Removed glowing text-shadow for a flat design */
}

/* Main Action Buttons */
.button-grid {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* For iPad and similar screens, force team buttons container onto its own line */
@media screen and (max-width: 1024px) {
  .button-grid.team {
    flex-direction: column;
    align-items: center;
  }
}

.button {
  background-color: transparent;
  border: 2px solid #208b8b;
  color: #208b8b;
  padding: 12px 25px;
  font-size: 16px;
  cursor: pointer;
  margin: 10px;
  border-radius: 5px;
  transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
  min-width: 160px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 50px;
  font-weight: bold;
  /* Removed text-shadow */
}

.button:hover {
  background-color: #208b8b;
  color: #101010;
  transform: scale(1.1);
  box-shadow: 0 0 5px rgba(32, 139, 139, 0.5);
}

/* Center the selection buttons using flexbox */
.select-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

/* Divider Style */
.divider {
  height: 1px;
  background-color: #208b8b;
  opacity: 0.3;
  margin: 20px 0 40px;
}

.divider-half {
  height: 1px;
  background-color: #208b8b;
  opacity: 0.3;
  margin: 20px auto;
  width: 50%;
}

/* Result Container */
.result-container {
  margin-top: 30px;
  margin-bottom: 0;
}

.result-container div {
  font-size: 18px;
  padding: 5px;
  color: #efefef;
  /* Removed text-shadow */
}

/* Operator Selection Styles */
.character-selection {
  margin-top: 30px;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 15px;
  justify-items: center;
}

.character-cell {
  background-color: transparent;
  border: 2px solid #208b8b;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s;
  border-radius: 5px;
  font-size: 16px;
  color: #208b8b;
  padding: 8px;
  box-sizing: border-box;
  font-weight: bold;
  height: 90px;
  width: 90px;
  white-space: normal;
  text-align: center;
}

.character-cell:hover {
  background-color: rgba(32, 139, 139, 0.1);
  transform: scale(1.05);
}

/* Ensure selected state is maintained even on hover/touch */
.character-cell.selected {
  background-color: #208b8b;
  color: #101010;
  box-shadow: 0 0 5px rgba(32, 139, 139, 0.5);
}

.character-cell.selected:hover {
  background-color: #208b8b;
  color: #101010;
  box-shadow: 0 0 5px rgba(32, 139, 139, 0.5);
  transform: none;
}

/* Media Queries for smaller screens */
@media screen and (max-width: 768px) {
  .button {
    font-size: 14px;
    padding: 12px 25px;
    min-width: 140px;
    height: 45px;
  }

  .result-container div {
    font-size: 16px;
  }

  .character-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 6px;
  }

  .character-cell {
    height: 80px;
    width: 80px;
    font-size: 14px;
    padding: 6px;
  }
}

@media screen and (max-width: 480px) {
  .button {
    font-size: 12px;
    padding: 10px 20px;
    min-width: 120px;
    height: 40px;
  }

  h1 {
    font-size: 2em;
  }

  .result-container div {
    font-size: 14px;
  }
  
  .character-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 4px;
  }
  
  .character-cell {
    height: 70px;
    width: 70px;
    font-size: 12px;
    padding: 4px;
  }
}

/* Operator Result Styles */
.operator-result {
  background-color: rgba(32, 139, 139, 0.1);
  border: 1px solid #208b8b;
  border-radius: 5px;
  padding: 10px;
  margin: 8px 0;
  text-align: left;
}

.operator-name {
  font-size: 1.2em;
  font-weight: bold;
  color: #208b8b;
  margin-bottom: 10px;
  text-align: center;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(32, 139, 139, 0.3);
}

.operator-loadout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
}

.operator-loadout > div {
  background-color: rgba(32, 139, 139, 0.05);
  padding: 6px;
  border-radius: 4px;
  font-size: 0.95em;
  color: #efefef;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.operator-loadout > div::before {
  content: attr(data-label);
  font-size: 0.75em;
  color: #208b8b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

/* Media Queries for smaller screens */
@media screen and (max-width: 768px) {
  .operator-result {
    padding: 8px;
    margin: 6px 0;
  }
  
  .operator-name {
    font-size: 1.1em;
    margin-bottom: 8px;
  }
  
  .operator-loadout {
    gap: 6px;
  }
  
  .operator-loadout > div {
    padding: 5px;
    font-size: 0.9em;
  }
}

@media screen and (max-width: 480px) {
  .operator-result {
    padding: 6px;
    margin: 4px 0;
  }
  
  .operator-name {
    font-size: 1em;
    margin-bottom: 6px;
  }
  
  .operator-loadout {
    gap: 4px;
  }
  
  .operator-loadout > div {
    padding: 4px;
    font-size: 0.85em;
  }
}

/* Footer Styles */
footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(32, 139, 139, 0.2);
  color: #888;
  font-size: 0.7em;
  line-height: 1.4;
}

footer p {
  margin: 5px 0;
}

footer .heart {
  font-size: 1.1em;
  margin-top: 10px;
  color: #208b8b;
}

@media screen and (max-width: 480px) {
  footer {
    font-size: 0.6em;
  }
}
