/*
  Global styles for the NHL 25 Tournament Manager.
  The application uses a dark theme inspired by gaming dashboards. Cards
  separate each major section and forms are styled for clarity. The
  bracket uses a flexible row/column layout to display rounds side by
  side. By default, overflow on the bracket scrolls horizontally so
  long brackets remain accessible on smaller screens.
*/

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #0a192f;
  color: #e0e6ed;
  line-height: 1.4;
}

header {
  text-align: center;
  padding: 20px 0;
  background: #112240;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

header h1 {
  margin: 0;
  font-size: 28px;
  color: #64ffda;
}

main {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Card container styling */
.card {
  background: #112240;
  border-radius: 8px;
  padding: 20px;
  flex: 1 1 500px;
  max-width: 600px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.card h2 {
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #233554;
  color: #64ffda;
}

.form-row {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
}

.form-row label {
  margin-bottom: 4px;
  font-weight: 600;
  color: #a3aed0;
}

.form-row input {
  padding: 8px;
  border: none;
  border-radius: 4px;
  background: #0f2747;
  color: #e0e6ed;
}

/* Container for dynamically added player fields */
#playersContainer {
  margin-top: 10px;
}

#playersContainer h3 {
  margin-bottom: 8px;
  font-size: 16px;
  color: #64ffda;
}

.player-row {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.player-row input {
  flex: 1;
  padding: 6px;
  background: #0f2747;
  border: none;
  border-radius: 4px;
  color: #e0e6ed;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

button {
  padding: 8px 14px;
  border: none;
  border-radius: 4px;
  background: #3a6ea5;
  color: #ffffff;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s ease;
}

button:hover {
  background: #2d5c87;
}

/* Registered teams list */
#teamsList {
  margin-top: 16px;
}

#teamsList h3 {
  margin-bottom: 8px;
  font-size: 18px;
  color: #64ffda;
}

#teamListUl {
  list-style: none;
  padding-left: 0;
  margin: 0;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #233554;
  border-radius: 4px;
}

#teamListUl li {
  padding: 6px 10px;
  border-bottom: 1px solid #233554;
  color: #e0e6ed;
}

#teamListUl li:last-child {
  border-bottom: none;
}

/* Team selection checkboxes for tournaments */
#teamSelection {
  margin-top: 12px;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #233554;
  padding: 8px;
  border-radius: 4px;
}

#teamSelection h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: #64ffda;
}

#teamSelection label {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
  font-weight: 500;
  color: #e0e6ed;
}

#teamSelection input[type="checkbox"] {
  margin-right: 8px;
}

/* Bracket styles */
#bracketContainer {
  margin-top: 20px;
}

.bracket {
  display: flex;
  justify-content: center;
  gap: 30px;
  overflow-x: auto;
  padding-bottom: 20px;
}

.round {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.round-title {
  text-align: center;
  margin-bottom: 8px;
  font-weight: 600;
  color: #64ffda;
}

.match {
  border: 1px solid #233554;
  border-radius: 4px;
  padding: 6px 10px;
  min-width: 160px;
  background: #0f2747;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.team {
  padding: 2px 0;
  color: #e0e6ed;
}

.team.empty {
  opacity: 0.5;
  font-style: italic;
}