body {
  font-family: Arial, sans-serif;
  max-width: 1800px;
  margin: 0 auto;
  padding: 20px;
}
  
  header {
    background-color: #007bff;
    color: white;
    padding: 1em 0;
    text-align: center;
  }
  
  main {
    padding: 2em;
  }
  
  textarea {
    width: 100%;
    padding: 1em;
    font-family: monospace;
  }
  
  button {
    margin: 5px;
    padding: 10px 15px;
    background-color: #4CAF50;
    color: rgb(255, 255, 255);
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

button:hover {
    background-color: #45a049;
}
  
  #output {
    background-color: #eee;
    padding: 1em;
    margin-top: 1em;
    white-space: pre-wrap;
  }

  .CodeMirror {
    border: 1px solid #ccc;
    height: auto;
    min-height: 200px;
    background-color: #282a36; /* Donker thema */
  }

  body {
    font-family: Arial, sans-serif;
    margin: 20px;
  }

  #inputs {
    margin-bottom: 20px;
  }

  #inputs label {
    margin-right: 10px;
  }

  #inputs input, #inputs select {
    margin-right: 20px;
  }

  #pitch-container {
    margin-bottom: 20px;
  }

  table {
    width: 100%;
    border-collapse: collapse;
  }

  th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
  }

  th {
    background-color: #f4f4f4;
  }
  #pitch-video-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
  }
  
  #pitch-container {
    flex: 0 0 auto;
  }

#youtube-section {
  position: absolute;
  top: 115px;  /* Adjust this value to move it up or down */
  right: 790px; /* Adjust this value to move it left or right */
  width: 480px;
}

#youtube-player {
  margin-top: 10px;
}

  #event-table-container {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 20px;
}

/* Webkit browsers like Chrome, Safari */
#event-table-container::-webkit-scrollbar {
  width: 10px;
}

#event-table-container::-webkit-scrollbar-track {
  background: #d6d4d4;
}

#event-table-container::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 5px;
}

#event-table-container::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Firefox */
#event-table-container {
  scrollbar-width: thin;
  scrollbar-color: #888 #f1f1f1;
}


#eventTable {
  width: 100%;
  border-collapse: collapse;
}

#eventTable thead {
  position: sticky;
  top: 0;
  background-color: #f2f2f2;
  z-index: 1;
}

#eventTable th, #eventTable td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

#eventTable tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

#controls-container {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

#event-label {
  font-weight: bold;
  margin-right: 10px;
}

#event-buttons {
  display: flex;
  gap: 10px;
}

.event-button {
  flex: 0 0 auto;
}


.event-button.selected {
  background-color: #dd2323;
  color: white;
}

#team-selection {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-bottom: 20px;
}

#event-controls {
  margin-bottom: 20px;
}

.team-row {
  display: flex;
  align-items: center;
}

.team-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.team-label {
  font-weight: bold;
  margin-right: 10px;
  width: 100px; /* Adjust as needed for alignment */
}

.team-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

#home-team, #away-team {
  flex: 1;
  margin: 0 10px;
}

#home-team-select, #away-team-select {
  width: 150px;
}

.player-button, .player-item {
  display: inline-block;
  margin: 5px;
  padding: 5px 5px;
  background-color: #4CAF50;
  border: 1px solid #f00d0d;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.3s;
  width: 2cm;
}

.player-button.selected {
  background-color: #dd2323;
  color: white;
}

#manage-players-btn {
  align-self: flex-start;
  margin-left: 20px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

/* Export button */
#export-button {
  display: block;
  margin: 20px auto;
}

#home-players, #away-players {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* Responsive design */
@media (max-width: 768px) {
  #team-selection {
      flex-direction: column;
  }

  #home-team, #away-team {
      margin: 10px 0;
  }
}  

#pitch-and-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

#modal-home-players, #modal-away-players {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
  

/* .player-item {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
} */
.player-item {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  margin: 5px;
  padding: 5px 10px;
  background-color: #4CAF50;
  border: 1px solid #ccc;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.3s;
  color: white;
}

.player-item span {
  flex-grow: 1;
}

.player-item button {
  margin-left: 5px;
}

.edit-player-button,
.delete-player-button {
  margin-left: 5px;
  padding: 2px 5px;
  font-size: 12px;
  cursor: pointer;
}

.edit-player-button {
  background-color: #4CAF50;
  color: white;
  border: none;
}

.delete-player-button {
  background-color: #f44336;
  color: white;
  border: none;
}

.delete-player-button:hover {
  background-color: #ff1a1a;
}

.player-item.selected {
  background-color: #e0e0e0;
  font-weight: bold;
}