body {
  font-family: Arial, sans-serif;
  margin: 2em;
  background: #18181b;
  color: #f3f3f3;
}

.container {
  max-width: 400px;
  margin: auto;
  background: #232327;
  padding: 2em;
  border-radius: 8px;
  box-shadow: 0 2px 8px #0003;
}

input,
button {
  font-size: 1em;
  padding: 0.5em;
  border-radius: 4px;
  border: none;
}

input {
  width: 100%;
  margin-right: 0;
}

button {
  background: #9147ff;
  color: #fff;
  cursor: pointer;
}

button:disabled {
  background: #555;
}

.result,
.error {
  margin-top: 1em;
  padding: 0.75em;
  border-radius: 4px;
}

.result {
  background: #232f3e;
  color: #a3e635;
}

.error {
  background: #3e2323;
  color: #ff6b6b;
}

.hidden {
  display: none !important;
}

/* Tooltip styles for question mark icon */
#login-tooltip-icon {
  position: relative;
  margin-left: 0.4em;
}

#login-tooltip-icon .tooltip {
  visibility: hidden;
  opacity: 0;
  min-width: 140px;
  max-width: 200px;
  background: #232327;
  color: #f3f3f3;
  text-align: center;
  border-radius: 4px;
  padding: 0.35em 0.7em;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 140%;
  z-index: 10;
  font-size: 0.85em;
  box-shadow: 0 2px 8px #0003;
  transition: opacity 0.2s;
  pointer-events: none;
  white-space: normal;
}

#login-tooltip-icon:focus .tooltip,
#login-tooltip-icon:hover .tooltip {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* Remove old login-btn + .tooltip rules */
#login-btn + .tooltip {
  display: none !important;
}

@media (max-width: 600px) {
  body {
    margin: 0.5em;
    font-size: 1.1em;
    overflow-x: hidden;
  }
  .container {
    max-width: 100%;
    padding: 1em;
    border-radius: 0;
    box-shadow: none;
  }
  input,
  button {
    font-size: 1.1em;
    padding: 1em;
    width: 100%;
    margin: 0.5em 0 0 0;
    box-sizing: border-box;
  }
  input {
    margin-right: 0;
  }
  #lookup-form {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
  }
  #login-section {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5em;
  }
  #login-tooltip-icon .tooltip {
    position: static;
    left: auto;
    bottom: auto;
    transform: none;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto;
    margin-top: 0.5em;
    box-shadow: none;
    font-size: 1em;
  }
}

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

label[for="username"] {
  font-size: 1.08em;
  margin-bottom: 0.4em;
  display: block;
}

input[type="text"] {
  width: 100%;
  margin-right: 0;
  border: 1.5px solid #35353a;
  box-shadow: 0 1px 4px #0002;
  background: #18181b;
  color: #f3f3f3;
  transition: border 0.2s;
}
input[type="text"]:focus {
  border: 1.5px solid #9147ff;
  outline: none;
}

#lookup-form button[type="submit"] {
  width: fit-content;
  min-width: 140px;
  align-self: flex-start;
  margin-top: 0.2em;
  margin-bottom: 0.5em;
  box-shadow: 0 1px 4px #9147ff33;
}

#logout-btn {
  background: #444;
  color: #eee;
  margin-top: 1.2em;
  width: fit-content;
  min-width: 100px;
  align-self: flex-start;
  opacity: 0.85;
  font-size: 0.98em;
  box-shadow: 0 1px 4px #0002;
  transition: background 0.2s, color 0.2s;
}
#logout-btn:hover {
  background: #232327;
  color: #fff;
  opacity: 1;
}

@media (max-width: 600px) {
  label[for="username"] {
    font-size: 1em;
    margin-bottom: 0.2em;
  }
  #lookup-form {
    gap: 0.5em;
  }
  input,
  button {
    font-size: 1.1em;
    padding: 1em;
    width: 100%;
    margin: 0.5em 0 0 0;
    box-sizing: border-box;
  }
  #lookup-form button[type="submit"],
  #logout-btn {
    width: 100%;
    min-width: unset;
    align-self: stretch;
    margin: 0.5em 0 0 0;
  }
}
