@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@200;300;400;500;600;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Open Sans", sans-serif;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  padding: 0 10px;
}

.wrapper {
  width: 280px;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10;
  position: relative;
}

form {
  display: flex;
  flex-direction: column;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #fff;
}

.input-field {
  position: relative;
  border-bottom: 1px solid #ccccccda;
  margin: 11px 0;
}

.input-field label {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  color: #ffffffd8;
  font-size: 11px;
  pointer-events: none;
  transition: 0.15s ease;
}

.input-field input {
  width: 100%;
  height: 30px;
  background: transparent;
  border: none;
  outline: none;
  font-size: 11px;
  color: #ffffffad;
}

.input-field input:focus ~ label,
.input-field input:valid ~ label {
  font-size: 0.8rem;
  top: 10px;
  transform: translateY(-120%);
}

.forget {
  display: flex;
  font-size: 8px;
  align-items: center;
  justify-content: space-between;
  margin: 25px 0 35px 0;
  color: #fff;
}

#remember {
  accent-color: #fff;
}

.forget label {
  display: flex;
  align-items: center;
}

.forget label p {
  margin-left: 8px;
}

.wrapper a {
  color: #efefef;
  text-decoration: none;
}

.wrapper a:hover {
  text-decoration: underline;
}

button {
  background: #ffffffab;
  color: #ffffff;
  font-weight: 600;
  border: none;
  padding: 8px 14px;
  cursor: pointer;
  border-radius: 3px;
  font-size: 10px;
  border: 2px solid transparent;
  transition: 0.3s ease;
}

button:hover {
  color: #fff;
  border-color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.register {
  text-align: center;
  margin-top: 30px;
  color: #fff;
  font-size: 11px;
}

#background-video {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 110vw;
  height: 110vh;
  object-fit: cover;
  z-index: -1;
  transform: translate(-50%, -50%);
  transition: transform 1.5s ease;
  pointer-events: none;
}

#language-selector {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999; /* manter alto para aparecer sobre outros elementos */
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  cursor: pointer;
  position: fixed;
  z-index: 9999;
  touch-action: manipulation;
}

/* Estilo padrão (desktop): mostrar nomes completos */
.dropdown-options li .abbr {
  display: none;
}
.dropdown-options li .full {
  display: inline;
}

.custom-dropdown {
  display: flex;
  align-items: center;
  gap: 8px;
}

.language-icon {
  width: 22px;
  height: 22px;
  fill: rgba(255, 255, 255, 0.8);
}

.dropdown-selected {
  padding: 2px 6px;
  font-weight: 600;
  font-family: "Open Sans", sans-serif;
  min-width: 24px;
  text-align: center;
}

.dropdown-options {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 5px;
  background: rgba(0, 0, 0, 0.349);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.171);
  border-radius: 8px;
  list-style: none;
  padding: 5px 0;
  min-width: 100px;
}

.dropdown-options li {
  padding: 8px 12px;
  color: white;
  transition: background 0.2s;
  font-size: 11px;
  cursor: pointer;
}

.dropdown-options li:hover {
  background: rgba(255, 255, 255, 0.315);
}

@media (max-width: 768px) {
  .custom-dropdown {
    top: 14px;
    right: 14px;
    font-size: 13px;
    padding: 4px 10px;
    gap: 6px;
  }

  .language-icon {
    width: 20px;
    height: 20px;
  }

  .dropdown-options li {
    font-size: 13px;
    padding: 6px 10px;
  }
}

@media (max-width: 480px) {
  #language-selector {
    padding: 6px 8px;
    top: 10px;
    right: 10px;
    font-size: 14px;
    gap: 6px;
  }

  .language-icon {
    width: 20px;
    height: 20px;
  }

  .dropdown-selected {
    min-width: auto;
    padding: 2px 4px;
  }

  .dropdown-options {
    min-width: 100px;
  }
}

@media (max-width: 480px) {
  .wrapper {
    width: 90%;
    max-width: 360px;
    padding: 20px;
  }

  body {
    padding: 20px 10px;
  }
}

@media (max-width: 600px) {
  .wrapper {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 360px;
    padding: 20px;
    z-index: 10;
  }

  body {
    overflow: hidden;
  }
}

/* Em telas pequenas (mobile): mostrar abreviações */
@media (max-width: 768px) {
  .dropdown-options li .abbr {
    display: inline;
  }
  .dropdown-options li .full {
    display: none;
  }
}

/* Garante que o botão continue visível no mobile */
@media (max-width: 768px) {
  #language-selector {
    font-size: 10px;
    padding: 4px 8px;
    top: 12px;
    right: 12px;
  }
}