@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap");

body {
  background-color: #ffeead;
  font-family: "Montserrat", sans-serif;
}

.leaderboard-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.main-content-box {
  position: relative;
  width: 100%;
  height: auto;
  padding: 40px;
  background: #a02334;
  box-sizing: border-box;
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.6);
  border-radius: 10px;
  color: #fff;
}

.leaderboard-title {
  text-align: center;
  color: #333;
  margin-bottom: 40px;
}

.filter-container {
  margin-bottom: 40px;
}

.filter-box {
  position: relative;
  width: 100%;
  height: auto;
  padding: 0;
}

.filter-form {
  margin-bottom: 40px;
}

.user-box {
  position: relative;
  margin-bottom: 30px;
  width: 300px;
  margin-left: 40px;
}

.user-box input {
  width: 100%;
  padding: 10px 0;
  font-size: 16px;
  color: #fff !important;
  margin-bottom: 30px;
  border: none !important;
  border-bottom: 1px solid #fff !important;
  outline: none !important;
  background: transparent;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  box-shadow: none !important;
  text-align: left !important;
  text-indent: 0 !important;
  padding-left: 0 !important;
  margin-right: 25px !important;
}

.user-box select {
  width: 100%;
  padding: 10px 0;
  font-size: 16px;
  color: #fff;
  margin-bottom: 30px;
  border: none;
  border-bottom: 1px solid #fff;
  outline: none;
  background: transparent;
  height: auto;
  min-height: 40px;
  line-height: 1.5;
  padding-bottom: 5px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  text-align: left;
  margin-right: 25px !important;
}

.user-box select option {
  background: #a02334;
  color: #fff;
  padding: 10px;
}

.user-box label {
  position: absolute;
  top: 0;
  left: 0;
  padding: 10px 0;
  font-size: 16px;
  color: #969696;
  pointer-events: none;
  transition: 0.5s;
}

.user-box input:focus ~ label,
.user-box input:valid ~ label {
  top: -22px;
  left: 0;
  color: #fff;
  font-size: 16px;
}

#filter-button {
  position: relative;
  display: block;
  width: fit-content;
  padding: 10px 20px;
  color: #fff;
  font-size: 16px;
  text-decoration: none;
  text-transform: uppercase;
  overflow: hidden;
  transition: 0.5s;
  margin-top: 10px;
  margin-left: 40px;
  letter-spacing: 4px;
  background: transparent;
  border: 2px solid #fff;
  border-radius: 5px;
  cursor: pointer;
  text-align: center;
}

#filter-button:hover {
  background: #96ceb4;
  color: #a02334;
  box-shadow: 0 0 5px #fff, 0 0 25px #fff, 0 0 50px #fff, 0 0 100px #fff;
}

#filter-button span {
  position: absolute;
  display: block;
  bottom: 2px;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #fff);
  animation: btn-anim1 2s linear infinite;
}

@keyframes btn-anim1 {
  0% {
    left: -100%;
  }
  50%,
  100% {
    left: 100%;
  }
}

.leaderboard-table {
  width: 100%;
  margin: 0;
  padding: 0;
}

.leaderboard-table table {
  width: 100%;
  border-collapse: collapse !important;
  margin: 0;
  border: none !important;
  border-spacing: 0 !important;
  outline: none !important;
}

.leaderboard-table td,
.leaderboard-table th {
  padding: 15px;
  text-align: center;
  color: #fff;
  border: none !important;
  border-width: 0 !important;
  border-style: none !important;
  border-color: transparent !important;
  outline: none !important;
}

.leaderboard-table tr {
  border: none !important;
  border-width: 0 !important;
  border-style: none !important;
  border-color: transparent !important;
  outline: none !important;
}

.leaderboard-table thead th {
  font-size: 1.3em;
  font-weight: 700;
  padding: 15px;
  padding-bottom: 25px;
  margin-bottom: 20px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2) !important;
}

.leaderboard-table tbody tr {
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 5px;
  position: relative;
}

.leaderboard-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.leaderboard-table tbody td {
  padding: 15px;
  font-size: 1.1em;
}

.leaderboard-table tbody tr:first-child td {
  padding-top: 25px;
}

.user-box input:focus {
  color: #fff !important;
}

.user-box select,
.user-box select option,
.user-box select:focus,
.user-box select option:checked {
  color: #fff !important;
}

/* Lefelé mutató nyíl a select mezőhöz */
.filter-box .user-box .select-wrapper::after {
  content: "▼";
  position: absolute;
  right: 5px;
  top: 12px;
  color: #fff;
  font-size: 12px;
  pointer-events: none;
  z-index: 2;
  display: block !important;
  width: 20px;
  text-align: center;
}

/* X gomb az input mezőhöz */
.filter-box .user-box .clear-input {
  content: "×";
  position: absolute;
  right: 5px;
  top: 12px;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  pointer-events: auto;
  z-index: 2;
  width: 20px;
  height: 20px;
  text-align: center;
  line-height: 20px;
  display: none !important;
  background: transparent;
}

.filter-box .user-box input:valid ~ .clear-input {
  display: block !important;
}

/* Minden szövegbeviteli mező színének explicit beállítása */
.user-box input,
.user-box input:focus,
.user-box input:valid,
.user-box input:active,
.user-box input::placeholder {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* Reszponzív stílusok */
@media screen and (max-width: 768px) {
  .main-content-box {
    padding: 20px;
  }

  .filter-box {
    flex-direction: column;
  }

  .user-box {
    width: 100%;
    margin-left: 0;
    margin-bottom: 20px;
  }

  .leaderboard-table {
    overflow-x: auto;
  }

  .leaderboard-table table {
    min-width: 400px;
  }

  /* Mobil nézetben csak a helyezés, csapatnév és összpontszám látszik */
  .leaderboard-table th:nth-child(n + 4),
  .leaderboard-table td:nth-child(n + 4) {
    display: none;
  }

  /* A látható oszlopok szélességének beállítása */
  .leaderboard-table th:nth-child(1),
  .leaderboard-table td:nth-child(1) {
    width: 8%;
    padding: 8px 2px;
    font-size: 1.1em;
    font-weight: bold;
  }

  .leaderboard-table th:nth-child(2),
  .leaderboard-table td:nth-child(2) {
    width: 62%;
    padding: 8px 4px;
  }

  .leaderboard-table th:nth-child(3),
  .leaderboard-table td:nth-child(3) {
    width: 30%;
    padding: 8px 4px;
  }

  /* A szűrő gomb teljes szélességű */
  #filter-button {
    width: 100%;
    margin-left: 0;
  }

  /* Kisebb betűméret mobil nézetben */
  .leaderboard-table td {
    font-size: 0.9em;
  }
}

/* Tablet nézet */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .main-content-box {
    padding: 30px;
  }

  .user-box {
    width: 45%;
  }

  /* Tablet nézetben minden oszlop látható, de kisebb padding */
  .leaderboard-table td,
  .leaderboard-table th {
    padding: 8px 4px;
  }
}
