/* === Page reset & centering === */
body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  background: linear-gradient(135deg, #ececec, #f5f5f5);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
}

/* === Phone-frame wrapper === */
.iphone {
  width: 320px;
  height: 640px;
  background: #000;
  border-radius: 40px;
  padding: 20px;
  box-shadow: 25px 25px 20px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}

/* === “Screen” area inside the phone === */
.screen {
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.9);
  border-radius: 30px;
  padding: 40px 20px;
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* === Logo fade (login page only) === */
.logo-container {
  position: absolute;
  top: 20px;
  margin: 10px 15px 15px;
  width: 80%;
  opacity: 0.5;
  z-index: 3;
  animation: logo-fade 6s infinite;
}
@keyframes logo-fade {
  0%   { opacity: 0.1; }
  50%  { opacity: 0.4; }
  75%  { opacity: 0.7; }
  100% { opacity: 1; }
}
.logo-container img {
  width: 100%;
}

/* === Login form styling === */
.login-container {
  text-align: center;
  width: 100%;
  z-index: 2;
}
.login-container h2 {
  margin-bottom: 40px;
  font-size: 24px;
  font-weight: 600;
  color: #333;
}
.login-container label {
  display: block;
  margin: 10px 0 5px;
  font-weight: 600;
  color: #333;
}
.login-container input {
  width: 90%;
  padding: 12px;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 16px;
  transition: border-color 0.3s;
}
.login-container input:focus {
  border-color: #007aff;
  outline: none;
}
.login-container button {
  width: 100%;
  padding: 12px;
  background-color: #007aff;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
  position: relative;
}
.login-container button:hover {
  background-color: #005bb5;
}
.error-message {
  color: red;
  display: none;
  font-size: 14px;
  margin-top: -10px;
}
.spinner {
  display: none;
  border: 4px solid rgba(0,0,0,0.1);
  border-radius: 50%;
  border-top: 4px solid #007aff;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  margin: 20px auto 0;
}
@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
