body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: linear-gradient(135deg, #f0f4f8, #d9e4ec);
  display: flex; 
  justify-content: center; 
  align-items: center;
  height: 100vh;
}

.container {
  background: #fff; 
  padding: 2rem; 
  border-radius: 1rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1); 
  text-align: center; 
  width: 360px;
}

h1 { 
  font-size: 1.6rem; 
  margin-bottom: 1rem; 
  color: #333; 
}

h2 { 
  font-size: 1.2rem; 
  margin: 1rem 0; 
  color: #555; 
}

input[type="password"] {
  width: 100%; 
  padding: 0.6rem; 
  margin: 0.5rem 0 1rem;
  border: 1px solid #ccc; 
  border-radius: 0.5rem; 
  font-size: 1rem;
}

button {
  background: #007bff; 
  color: #fff; 
  border: none;
  padding: 0.6rem 1.2rem; 
  border-radius: 0.5rem;
  cursor: pointer; 
  font-size: 1rem; 
  transition: background 0.3s;
}

button:hover { background: #0056b3; }

#qrSection { display: none; }

#qrWrapper { 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
}

#qrLoading {
  width: 220px; 
  height: 220px; 
  display: flex; 
  justify-content: center; 
  align-items: center;
  font-size: 1rem; 
  color: #555; 
  margin: 1rem auto 0;
}

.spinner {
  border: 4px solid #f3f3f3; 
  border-top: 4px solid #007bff;
  border-radius: 50%; 
  width: 40px; 
  height: 40px; 
  animation: spin 1s linear infinite;
}

@keyframes spin { 
  100% { transform: rotate(360deg); } 
}

#qrcode {
  width: 220px; 
  height: 220px; 
  margin: 1rem auto 0; 
  border: 2px dashed #ccc;
  border-radius: 0.5rem; 
  display: none;
}

#qrTitle { 
  margin-top: 0.8rem; 
  font-size: 1rem; 
  color: #333; 
  text-align: center; 
}

#statusBtn {
  margin-top: 1rem; 
  padding: 0.5rem 1rem; 
  border-radius: 0.5rem; 
  border: none;
  font-weight: bold; 
  font-size: 0.9rem; 
  cursor: default;
}

#disconnectBtn {
  display: none; 
  margin-top: 0.5rem; 
  padding: 0.5rem 1rem; 
  border-radius: 0.5rem;
  border: none; 
  font-weight: bold; 
  font-size: 0.9rem; 
  cursor: pointer;
  background: #dc3545; 
  color: #fff;
}

.footer { 
  margin-top: 1.5rem; 
  font-size: 0.8rem; 
  color: #777; 
}
