 * {
     box-sizing: border-box;
     margin: 0;
     padding: 0;
 }

 body.locked {
     overflow: hidden;
 }

 /* ====== Modal Overlay ====== */
 #password-modal {
     position: fixed;
     inset: 0;
     background: rgba(0, 0, 0, 0.85);
     /* darker overlay */
     backdrop-filter: blur(20px);
     /* heavy blur */
     -webkit-backdrop-filter: blur(20px);
     /* Safari support */
     display: flex;
     align-items: center;
     justify-content: center;
     z-index: 9999;
     transition: opacity 0.3s ease;
 }

 /* ====== Modal Box ====== */

.modal-box {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  width: 90%;
  max-width: 400px;
  animation: fadeIn 0.3s ease;
}

.modal-box h2 {
  font-size: 1.4rem;
  margin-bottom: 1.2rem;
  color: #222;
  font-weight: 600;
}

.modal-box input[type="password"] {
  width: 100%;
  padding: 0.7rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 1.2rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.modal-box input[type="password"]:focus {
  border-color: #0078ff;
  box-shadow: 0 0 0 2px rgba(0, 120, 255, 0.2);
}

.modal-box button {
  position: relative;
  align-self: center;
  background: linear-gradient(135deg, #0078ff, #005fcc);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.6rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 120, 255, 0.4);
  transition: all 0.25s ease;
  margin-top: 0.5rem;
}

.modal-box button:hover {
  background: linear-gradient(135deg, #3399ff, #0078ff);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 120, 255, 0.45);
}

.modal-box button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 120, 255, 0.3);
}

 .error-text {
     color: red;
     font-size: 0.9rem;
     height: 1.2rem;
 }

 @keyframes fadeIn {
     from {
         opacity: 0;
         transform: scale(0.95);
     }

     to {
         opacity: 1;
         transform: scale(1);
     }
 }

 /* Optional background blur for content */
 main.locked-blur {
     filter: blur(20px) brightness(0.3);
     transition: filter 0.3s ease;
 }