/* public/css/login.css */

@font-face {
  src: url("../fonts/Terminus.ttf"); /* Updated path for static serving */
  font-family: Terminus;
}

/* prevent text-size adjustments in mobile Safari */
html {
  -webkit-text-size-adjust: 100%;
  -webkit-overflow-scrolling: touch;
}

body {
  -webkit-overflow-scrolling: touch;
  background: #101010;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  color: #00ff00;
  font-family: Terminus, monospace;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 95vh;
  margin: 0;
  position: relative;
  box-sizing: border-box;
}

header {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 50px; /* adjust size */
}

.join-btn {
  font-size: 12px;
  font-family: Terminus, monospace;
  border-radius: 5px;
  padding: 8px 16px;
  width: 80px;
  background-color: transparent;
  color: #7d7d7d;
  border: 1px solid #323232;
}

.join-btn:hover {
  background-color: #00ff00;
  color: black;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 10px #00ff00;
  transition: background-color 0.3s, color 0.3s;
}

.login {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%; /* Changed from 100% for consistency */
  max-width: 400px;
  padding: 30px 20px;
  border: 1px solid #323232;

  border-radius: 10px;
  box-shadow: 0 0 15px #000000;
  text-align: center;
  box-sizing: border-box;

  background-color: #141414;
  backdrop-filter: blur(7px); /* Glassy blur effect */
  -webkit-backdrop-filter: blur(8px);
}

button {
  font-family: Terminus, monospace;
  background-color: transparent;
  color: #0f0f0f;
  border: none;

  width: 100%;
  font-size: 16px; /* >=16px prevents mobile auto-zoom */
  margin-bottom: 15px;
  padding: 12px;
  box-sizing: border-box;
}

button {
  background-color: #a0a0a0;

  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  border-radius: 10px;
}
button:hover {
  background-color: #00ff00;
  color: black;
}

.input-container {
  position: relative;
  width: 100%;
}

input {
  border: none;
  font-family: Terminus, monospace;
  border: 1px solid #323232;
  border-radius: 10px;
  background: #0d0d0d;
  color: #00ff00;
  width: 100%;
  font-size: 16px;
  margin-bottom: 15px;
  padding: 12px;
  box-sizing: border-box;
  transition: all 0.3s;
}

input#password {
  padding-right: 40px; /* Make space for icon */
}

.input-container i {
  position: absolute;
  right: 10px;
  top: 12px; /* Adjust vertical position */
  cursor: pointer;
  color: #7d7d7d;
}

input:focus {
  outline: none;
  border: 1px solid #00ff00; /* full border overrides bottom */
  border-radius: 10px;
}

#message {
  margin-top: 15px;
  font-size: 0.9em;
  text-align: center;
}
.ok {
  color: #00ff00;
}
.err {
  color: red;
}

.forgot-container {
  display: flex;
  justify-content: flex-end;
  margin-top: -10px; /* pull closer to password input */
  margin-bottom: 10px;
}

.forgot-link {
  background: none;
  border: none;
  color: #7d7d7d;
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  text-align: right;
}

.forgot-link:hover {
  background-color: transparent;
  color: #f50000;
  text-decoration: none;
}

/* ensure font-size stays at 16px on small screens */
@media (max-width: 400px) {
  .terminal {
    padding: 20px 15px;
  }
  input,
  button {
    font-size: 16px;
    padding: 12px;
  }
}
