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

html, body {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

#unity-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

#unity-canvas {
  display: block;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #231F20;
}

#unity-loading-bar {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: none;
}

#unity-logo {
  width: 154px;
  height: 130px;
  background: url('unity-logo-dark.png') no-repeat center;
}

#unity-progress-bar-empty {
  width: 141px;
  height: 18px;
  margin-top: 10px;
  margin-left: 6.5px;
  background: url('progress-bar-empty-dark.png') no-repeat center;
}

#unity-progress-bar-full {
  width: 0%;
  height: 18px;
  margin-top: 10px;
  background: url('progress-bar-full-dark.png') no-repeat center;
}

#unity-warning {
  position: absolute;
  left: 50%;
  top: 5%;
  transform: translate(-50%);
  background: white;
  padding: 10px;
  display: none;
}

/* ========================================================================
   HTML Login Form Overlay - Password Manager Compatible
   ======================================================================== */

#login-form-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 1001;
  background-color: #1a1a2e;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

#login-form {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.login-form-container {
  background-color: #16213e;
  border-radius: 12px;
  border: 1px solid #0f3460;
  padding: 32px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.login-form-title {
  color: #ffffff;
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  margin: 0 0 8px 0;
}

.login-form-subtitle {
  color: #94a3b8;
  font-size: 14px;
  text-align: center;
  margin: 0 0 24px 0;
}

.form-field {
  margin-bottom: 16px;
}

.form-field label {
  display: block;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-field input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  background-color: #1a1a2e;
  border: 1px solid #0f3460;
  border-radius: 8px;
  color: #ffffff;
  font-size: 15px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-field input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-field input::placeholder {
  color: #64748b;
}

.login-form-error {
  color: #f87171;
  font-size: 13px;
  text-align: center;
  margin-bottom: 16px;
  padding: 10px;
  background-color: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 6px;
}

.login-form-button {
  width: 100%;
  height: 48px;
  background-color: #6366f1;
  border: none;
  border-radius: 8px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

.login-form-button:hover {
  background-color: #5558e3;
}

.login-form-button:active {
  transform: scale(0.98);
}

.login-form-button:disabled {
  background-color: #374151;
  cursor: not-allowed;
  transform: none;
}

.login-form-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.login-form-links .link-button {
  background: none;
  border: none;
  color: #6366f1;
  font-size: 13px;
  cursor: pointer;
  padding: 8px 4px;
  transition: color 0.2s;
}

.login-form-links .link-button:hover {
  color: #818cf8;
  text-decoration: underline;
}

.login-form-links .link-separator {
  color: #475569;
  font-size: 13px;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  #login-form {
    padding: 16px;
  }

  .login-form-container {
    padding: 24px 20px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .login-form-title {
    font-size: 22px;
  }

  .form-field input {
    height: 48px;
    font-size: 16px; /* Prevents iOS zoom on focus */
  }

  .login-form-button {
    height: 52px;
    font-size: 16px;
  }
}
