/* === Lock Screen === */
/* Note: We intentionally do NOT use body.locked { overflow: hidden } —
   that approach was removed because it caused a bug where body.locked
   persisted after unlock and prevented all scrolling. The lock screen
   itself is position:fixed covering the viewport, which is sufficient. */

.lock-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at top right, rgba(255, 120, 73, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(74, 63, 124, 0.4) 0%, transparent 50%),
    linear-gradient(180deg, #1A1F3A 0%, #2D3561 100%);
  animation: fadeIn 0.4s ease-out;
}

.lock-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: lockCardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.lock-emoji {
  font-size: 56px;
  text-align: center;
  margin-bottom: 16px;
  animation: lockBounce 2s ease-in-out infinite;
  display: block;
}

.lock-title {
  font-family: 'Bagel Fat One', 'Zen Maru Gothic', sans-serif;
  font-size: 32px;
  color: var(--night);
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.lock-sub {
  text-align: center;
  color: var(--gray);
  font-size: 15px;
  margin-bottom: 28px;
}

.lock-input-wrap {
  position: relative;
  margin-bottom: 16px;
}

.lock-input {
  width: 100%;
  padding: 16px 50px 16px 18px;
  font-size: 17px;
  font-family: inherit;
  font-weight: 600;
  color: var(--night);
  background: var(--cream);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.3s;
  letter-spacing: 2px;
}

.lock-input:focus {
  border-color: var(--sunset);
  background: white;
  box-shadow: 0 0 0 4px rgba(255, 120, 73, 0.1);
}

.lock-input::placeholder {
  color: var(--gray);
  letter-spacing: normal;
  font-weight: 400;
}

.lock-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray);
  font-size: 20px;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: all 0.2s;
}

.lock-toggle:hover {
  background: var(--cream-2);
  color: var(--night);
}

.lock-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--sunset), var(--sunset-deep));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 17px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 6px 20px rgba(255, 120, 73, 0.3);
}

.lock-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 120, 73, 0.4);
}

.lock-btn:active {
  transform: translateY(0);
}

.lock-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.lock-error {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(239, 71, 111, 0.1);
  color: var(--coral);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  min-height: 20px;
  display: none;
}

.lock-error.show { display: block; animation: shake 0.4s; }

.lock-options {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--gray);
  cursor: pointer;
  user-select: none;
}

.lock-options input { width: 18px; height: 18px; accent-color: var(--sunset); }

.lock-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--cream-2);
  text-align: center;
  font-size: 12px;
  color: var(--gray);
  line-height: 1.6;
}

.lock-setup {
  padding: 24px;
  text-align: center;
}

.lock-setup-icon {
  font-size: 64px;
  margin-bottom: 16px;
  display: block;
}

.lock-setup h3 {
  font-family: 'Bagel Fat One', sans-serif;
  color: var(--night);
  font-size: 22px;
  margin-bottom: 12px;
}

.lock-setup p {
  color: var(--brown);
  font-size: 14px;
  margin-bottom: 8px;
}

.lock-setup code {
  display: block;
  background: var(--night);
  color: var(--gold);
  padding: 12px 16px;
  border-radius: 8px;
  font-family: 'Menlo', monospace;
  font-size: 13px;
  text-align: left;
  margin: 12px 0;
  word-break: break-all;
}
