body {
  min-height: 100vh;
  background: url(../images/background.jpg);
  background-size: cover;
  background-position: cover;
  overflow: hidden;
}
.container {
  box-sizing: border-box;
  background-color: var(--base-color);
  height: 100vh;
  width: max(40%, 600px);
  padding: 10px;
  border-radius: 0 20px 20px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

h1 {
  font-size: 3rem;
  font-weight: 900;
  text-transform: uppercase;
}
form {
  width: min(400px, 100%);
  margin-top: 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

form > div {
  width: 100%;
  display: flex;
  justify-content: center;
}
form label {
  flex-shrink: 0;
  height: 50px;
  width: 50px;
  background-color: var(--accent-color);
  fill: var(--base-color);
  color: var(--base-color);
  border-radius: 10px 0 0 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}
form input {
  box-sizing: border-box;
  flex-grow: 1;
  min-width: 0;
  height: 50px;
  padding: 1rem;
  font: inherit;
  border-radius: 0 10px 10px 0;
  border: 2px solid var(--input-color);
  border-left: none;
  background-color: var(--input-color);
  transition: 150ms ease;
}
form input:hover {
  border-color: var(--accent-color);
}
form input:focus {
  outline: none;
  border-color: var(--text-color);
}

div:has(input:focus) > label {
  background-color: var(--text-color);
}
form input::placeholder {
  color: var(--text-color);
}
form button {
  margin-top: 10px;
  border: none;
  border-radius: 1000px;
  padding: 0.85em 4em;
  background-color: var(--accent-color);
  color: var(--base-color);
  font: inherit;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: 150ms ease;
}
form button[type="submit"]:hover {
  background-color: var(--text-color);
}
form button[type="submit"]:focus {
  outline: none;
  background-color: var(--text-color);
}
a {
  text-decoration: none;
  color: var(--accent-color);
}
a:hover {
  text-decoration: underline;
}

@media (max-width: 1100px) {
  .container {
    width: min(600px, 100%);
    border-radius: 0;
  }
}

form div.incorrect label {
  background-color: var(--error-color);
}
form div.incorrect input {
  border-color: var(--error-color);
}

#error-message {
  color: var(--error-color);
}

.password-wrapper {
  position: relative;
  width: 100%;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 0;
  bottom: 0;
  margin: auto 0;
  height: 32px;
  width: 32px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  fill: var(--secondary-text-color);
  opacity: 0.6;
  transition:
    opacity 150ms ease,
    fill 150ms ease;
  -webkit-tap-highlight-color: transparent;
}

.toggle-password:hover {
  opacity: 1;
}

.toggle-password:active {
  fill: var(--secondary-text-color);
  opacity: 1;
}

.toggle-password:focus {
  outline: none;
  opacity: 0.8;
  background-color: transparent;
}

.toggle-password:focus-visible {
  outline: none;
}

.password-wrapper input {
  padding-right: 44px;
}

.eye-open {
  display: none;
}
.eye-closed {
  display: block;
}

.password-wrapper.password-visible .eye-open {
  display: block;
}
.password-wrapper.password-visible .eye-closed {
  display: none;
}

.demo-btn {
  margin-top: 10px;
  border: 2px solid var(--accent-color);
  border-radius: 1000px;
  padding: 0.85em 4em;
  background-color: var(--base-color);
  color: var(--accent-color);
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: 150ms ease;
}

.demo-btn:hover {
  background-color: var(--accent-color);
  color: var(--base-color);
}

.demo-btn:focus {
  outline: none;
  background-color: var(--accent-color);
  color: var(--base-color);
}

.demo-hint {
  text-align: center;
  margin: 0.5rem 0 2.5rem; /* 底部 2.5rem 拉開跟 signup 距離 */
  color: var(--secondary-text-color);
  font-size: 0.8rem;
}
