/* Podstawowe body */
body {
  margin: 0;
  padding: 2rem;
  background-color: #0f5d26;
  color: #fff0ff;
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

/* Nagłówek */
h1 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 2rem;
}

/* Formularz */
form#add-player-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

form input,
form button {
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  border-radius: 0.25rem;
  border: none;
}

form input {
  flex: 1 1 150px;
}

form button {
  background-color: #ffd700;
  color: #0f5d26;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
}

form button:hover {
  background-color: #ffc107;
}

/* Tabela */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 auto;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
  overflow: hidden;
}

thead {
  background-color: rgba(255, 255, 255, 0.15);
}

th, td {
  padding: 0.75rem 1rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tbody tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.05);
}

tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transition: background 0.2s;
}

/* Responsywność */
@media (max-width: 600px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }

  thead tr {
    display: none;
  }

  tbody tr {
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  }

  td {
    text-align: right;
    padding-left: 50%;
    position: relative;
  }

  td::before {
    content: attr(data-label);
    position: absolute;
    left: 1rem;
    font-weight: bold;
    text-transform: uppercase;
  }
}
/* Guzik */
.buttons-container button {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border: none;
  border-radius: 0.3rem;
  cursor: pointer;
  background-color: #ffd700;
  color: #0f5d26;
  font-weight: bold;
  transition: background 0.2s;
}

.buttons-container button:hover {
  background-color: #ffc107;
}

/* Modal */
.modal {
  display: none; /* domyślnie ukryty */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #0f5d26;
  color: #fff0ff;
  padding: 2rem;
  border-radius: 0.5rem;
  max-width: 500px;
  margin: 1rem;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  animation: fadeIn 0.3s ease-out;
}

.modal-content h2 {
  margin-top: 0;
}

.modal-content .close {
  color: #ffd700;
  float: right;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
}

.modal-content .close:hover {
  color: #ffc107;
}

/* Animacja */
@keyframes fadeIn {
  from {opacity: 0; transform: translateY(-20px);}
  to {opacity: 1; transform: translateY(0);}
}

