body {
  font-family: Arial, sans-serif;
  background-color: #f8f9fa;
  margin: 0;
  padding: 0;
}

nav {
  background-color: #222;
  padding: 1em;
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s;
}

nav a:hover {
  color: #ff9800;
}

nav a.active {
  color: #ff9800;
  border-bottom: 2px solid #ff9800;
}

nav a, nav form {
  font-size: 1em;
}

/* Make form inputs scale properly */
input, select, button {
  font-size: 1em;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}


main {
  max-width: 100%;
  margin: 2em auto;
  background: #fff;
  padding: 1.5em;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

h1 {
  color: #222;
  margin-bottom: 1em;
  font-size: 2em;
  text-align: center;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1em;
}

input[type="text"], select {
  padding: 0.5em;
  border: 1px solid #bbb;
  border-radius: 4px;
  font-size: 1em;
}

button[type="submit"] {
  background-color: #2e200b;
  color: #fff;
  border: none;
  padding: 0.7em 1.5em;
  border-radius: 4px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

button[type="submit"]:hover {
  background-color: #e68900;
}

button {
  transition: background 0.2s, transform 0.1s;
}

button:hover {
  transform: translateY(-1px);
}


ul {
  list-style: none;
  padding: 0;
}

li {
  background: #f1f1f1;
  margin-bottom: 0.5em;
  padding: 0.7em 1em;
  border-radius: 4px;
  font-size: 1.1em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
}

li:hover {
  transform: scale(1.02);
}

.result-win {
  color: green;
  font-weight: bold;
}

.result-loss {
  color: red;
  font-weight: bold;
}


.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 0.5em;
}

.trophy {
  display: inline-block;
  width: 1.5em;
  text-align: center;
}



.player-info {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.medium_avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 1em auto;
}

.match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin: 2rem auto;
  max-width: 1200px;
  padding: 0 1rem;
}

.match-entry {
  /* background: #f9f9f9;
  margin-bottom: 0.75em;
  padding: 0.8em 1em;
  border-radius: 6px;
  font-size: 1em;
  display: flex;
  flex-direction: column;
  gap: 0.4em;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  cursor: pointer; */
  background: #f9f9f9;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.2s ease;
  flex-direction: column;
  gap: 0.4em;
  max-width: 250px;
}

.match-entry:hover {
  transform: translateY(-2px);
}

.match-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.match-score {
  font-weight: bold;
  margin: 0 1em;
}

.match-time {
  font-size: 0.85em;
  color: #777;
}

.positive-diff {
  color: green;
  font-weight: bold;
}

.negative-diff {
  color: red;
  font-weight: bold;
}

.even-diff {
  color: black;
  font-weight: bold;
}

.opp-link {
  display: flex;
  align-items: center;
  gap: 0.5em;
  text-decoration: none;
  color: inherit;
}

.opp-link:hover {
  text-decoration: underline;
}

.match-link {
  display: flex;
  align-items: center;
  gap: 0.5em;
  text-decoration: none;
  color: inherit;
}


.page-container {
  display: flex;
  gap: 2em;
  padding: 2em;
}

.sidebar {
  width: 200px;
  background: #f2f2f2;
  padding: 1em;
  border-radius: 6px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.sidebar a {
  display: block;
  padding: 0.5em;
  margin-bottom: 0.5em;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
}

.sidebar a:hover {
  background-color: #ddd;
  transform: translateX(2px);
}

.sidebar a.active {
  background-color: #e68900;
  color: #fff;
}

.player-row {
  display: flex;
  align-items: center;
  gap: 1em;
  margin-bottom: 1em;
}

.unlock-form {
  margin-top: 1em;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.unlock-form input {
  padding: 0.4em;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.unlock-form button {
  padding: 0.4em;
  background-color: #222;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.logout-form {
  margin-top: 1em;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.logout-form button {
  padding: 0.4em;
  background-color: #222;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

@media (max-width: 600px) {
  .page-container {
    flex-direction: column;
    padding: 1em;
  }

  .sidebar {
    width: 100%;
  }

  main {
    padding: 1em;
  }
}

.score-pair button {
  padding: 0.4em 0.8em;
  background-color: #2e200b;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.game-row {
  background: #f9f9f9;
  margin-bottom: 0.75em;
  padding: 0.8em 1em;
  border-radius: 6px;
  font-size: 1em;
  display: flex;
  flex-direction: column;
  gap: 0.4em;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.score-pair {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.score-pair input[type="number"] {
  padding: 0.4em;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1em;
}
.hover-container {
  position: relative;
}

.game-hover-box {
  display: none;
  position: absolute;
  bottom: -50%;
  left: 115%;
  background: #f0f0f0;
  border: 1px solid #0c0c0c;
  padding: 0.5em;
  z-index: 10;
  width: max-content;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.hover-container:hover .game-hover-box {
  display: block;
}

.game-hover-box ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.game-hover-box li {
  padding: 2px 0;
}