.login-box {
  position: relative;
  width: 400px;
  padding: 40px;
  margin: 100px auto 0;
  background: #a02334;
  box-sizing: border-box;
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.6);
  border-radius: 10px;
}

.login-box .user-box {
  position: relative;
  margin-bottom: 45px;
}

.login-box .user-box input {
  width: 100%;
  padding: 10px 0;
  font-size: 16px;
  color: #fff;
  margin-bottom: 0;
  border: none;
  border-bottom: 2px solid #fff;
  outline: none;
  background: transparent;
}

/* Automatikus kitöltés esetén */
.login-box .user-box input:-webkit-autofill,
.login-box .user-box input:-webkit-autofill:hover,
.login-box .user-box input:-webkit-autofill:focus,
.login-box .user-box input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px #a02334 inset !important;
  -webkit-text-fill-color: #fff !important;
  transition: background-color 5000s ease-in-out 0s;
}

.login-box .user-box label {
  position: absolute;
  top: 0;
  left: 0;
  padding: 10px 0;
  font-size: 16px;
  color: #fff;
  pointer-events: none;
  transition: 0.5s;
}

.login-box .user-box input:focus ~ label,
.login-box .user-box input:valid ~ label,
.login-box .user-box input:not(:placeholder-shown) ~ label {
  top: -20px;
  left: 0;
  color: #fff;
  font-size: 12px;
}

.login-box .user-box input::placeholder {
  color: transparent;
}

.login-box form a {
  position: relative;
  display: inline-block;
  padding: 10px 20px;
  color: #ffffff;
  font-size: 16px;
  text-decoration: none;
  text-transform: uppercase;
  overflow: hidden;
  transition: 0.5s;
  margin-top: 40px;
  letter-spacing: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.login-box a:hover {
  background: #96ceb4;
  color: #fff;
  border-radius: 5px;
  box-shadow: 0 0 5px #96ceb4, 0 0 25px #96ceb4, 0 0 50px #96ceb4,
    0 0 100px #96ceb4;
}

.login-box a span {
  position: absolute;
  display: block;
}

@keyframes btn-anim1 {
  0% {
    left: -100%;
  }
  50%,
  100% {
    left: 100%;
  }
}

.login-box a span:nth-child(1) {
  bottom: 2px;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #96ceb4);
  animation: btn-anim1 2s linear infinite;
}

@keyframes btn-anim2 {
  0% {
    top: -100%;
  }
  50%,
  100% {
    top: 100%;
  }
}

.login-box a span:nth-child(2) {
  top: -100%;
  right: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, transparent, #96ceb4);
  animation: btn-anim2 2s linear infinite;
  animation-delay: 0.5s;
}

@keyframes btn-anim3 {
  0% {
    right: -100%;
  }
  50%,
  100% {
    right: 100%;
  }
}

.login-box a span:nth-child(3) {
  bottom: 0;
  right: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(270deg, transparent, #96ceb4);
  animation: btn-anim3 2s linear infinite;
  animation-delay: 1s;
}

@keyframes btn-anim4 {
  0% {
    bottom: -100%;
  }
  50%,
  100% {
    bottom: 100%;
  }
}

.login-box a span:nth-child(4) {
  left: 0;
  bottom: -100%;
  width: 2px;
  height: 100%;
  background: linear-gradient(360deg, transparent, #96ceb4);
  animation: btn-anim4 2s linear infinite;
  animation-delay: 1.5s;
}

.radio-input {
  position: relative;
  display: flex;
  flex-direction: row;
  gap: 5px;
  margin: 20px 0 45px 0;
  justify-content: center;
}

.radio-input * {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

.radio-input label {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0px 20px;
  width: 160px;
  cursor: pointer;
  height: 50px;
  position: relative;
}

.radio-input label::before {
  position: absolute;
  content: "";
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 160px;
  height: 45px;
  z-index: -1;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border-radius: 10px;
  border: 2px solid transparent;
}

.radio-input label:hover::before {
  transition: all 0.2s ease;
  background-color: rgba(24, 20, 20, 0.5);
}

.radio-input .label:has(input:checked)::before {
  background-color: rgba(24, 20, 20, 0.5);
  border-color: #96ceb4;
  height: 50px;
}

.radio-input .label .text {
  color: #fff;
  margin: 0;
}

.radio-input .label input[type="radio"] {
  background-color: #fff;
  appearance: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  border: 2px solid rgba(24, 20, 20, 0.5);
  margin-right: 10px;
}

.radio-input .label input[type="radio"]:checked {
  background-color: #96ceb4;
  border-color: #96ceb4;
  animation: pulse 0.7s forwards;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* Hibaüzenetek stílusa */
.error-message {
  color: #ff4444;
  font-size: 0.8rem;
  display: none;
  position: absolute;
  bottom: -20px;
  left: 0;
  width: 100%;
  text-align: left;
}

/* Input mezők hibakezelése */
.user-box.error input {
  border-color: #ff4444;
}

.user-box.error .error-message {
  display: block;
}

/* Radio gombok hibakezelése */
.radio-input.error {
  margin-bottom: 60px;
}

.radio-input .error-message {
  display: none;
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  white-space: nowrap;
  text-align: center;
  color: #ff4444;
  font-size: 0.8rem;
}

.radio-input.error .error-message {
  display: block;
}

/* Karakter számlálók stílusa */
.game-code-counter,
.team-name-counter {
  position: absolute;
  right: 0;
  top: -20px;
  font-size: 0.8rem;
  color: #bdb8b8;
}

/* Input mezők stílusa */
.user-box {
  position: relative;
  margin-bottom: 45px;
}

.user-box input {
  width: 100%;
  padding: 10px 0;
  font-size: 16px;
  color: #fff;
  border: none;
  border-bottom: 2px solid #fff;
  outline: none;
  background: transparent;
  transition: border-color 0.3s ease;
}

.user-box label {
  position: absolute;
  top: 0;
  left: 0;
  padding: 10px 0;
  font-size: 16px;
  color: #fff;
  pointer-events: none;
  transition: 0.3s ease all;
}

.user-box input:focus ~ label,
.user-box input:valid ~ label {
  top: -20px;
  font-size: 12px;
  color: #03e9f4;
}

.user-box input:focus {
  border-bottom-color: #03e9f4;
}

/* Start gomb stílusa */
.start-btn {
  position: relative;
  display: inline-block;
  padding: 10px 20px;
  color: #fff;
  font-size: 16px;
  text-decoration: none;
  text-transform: uppercase;
  overflow: hidden;
  transition: 0.5s;
  margin-top: 40px;
  letter-spacing: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.start-btn:hover {
  background: #03e9f4;
  color: #fff;
  box-shadow: 0 0 5px #03e9f4, 0 0 25px #03e9f4, 0 0 50px #03e9f4,
    0 0 100px #03e9f4;
}

.start-btn span {
  position: absolute;
  display: block;
}

.start-btn span:nth-child(1) {
  bottom: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #03e9f4);
  animation: btn-anim1 1s linear infinite;
}

@keyframes btn-anim1 {
  0% {
    left: -100%;
  }
  50%,
  100% {
    left: 100%;
  }
}

.start-btn span:nth-child(2) {
  top: -100%;
  right: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, transparent, #03e9f4);
  animation: btn-anim2 1s linear infinite;
  animation-delay: 0.25s;
}

@keyframes btn-anim2 {
  0% {
    top: -100%;
  }
  50%,
  100% {
    top: 100%;
  }
}

.start-btn span:nth-child(3) {
  bottom: 0;
  right: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(270deg, transparent, #03e9f4);
  animation: btn-anim3 1s linear infinite;
  animation-delay: 0.5s;
}

@keyframes btn-anim3 {
  0% {
    right: -100%;
  }
  50%,
  100% {
    right: 100%;
  }
}

.start-btn span:nth-child(4) {
  bottom: -100%;
  left: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(360deg, transparent, #03e9f4);
  animation: btn-anim4 1s linear infinite;
  animation-delay: 0.75s;
}

@keyframes btn-anim4 {
  0% {
    bottom: -100%;
  }
  50%,
  100% {
    bottom: 100%;
  }
}

.start-btn:disabled {
  background: #cccccc;
  cursor: not-allowed;
  opacity: 0.7;
  box-shadow: none;
}

@media screen and (max-width: 480px) {
  .login-box .user-box .game-code-counter,
  .login-box .user-box .team-name-counter {
    position: absolute !important;
    right: 0 !important;
    top: -20px !important;
    color: #bdb8b8 !important;
    font-size: 12px !important;
    pointer-events: none !important;
    z-index: 10 !important;
  }
}

.checkbox-input {
  margin: 20px 0;
  text-align: left;
}

.checkbox-input label {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
}

.checkbox-input input[type="checkbox"] {
  margin-right: 10px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checkbox-input .text {
  margin-left: 5px;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
}
