/* =========================================================
   lockscreen.css  —  잠금화면 / 알림 / 비밀번호 입력 (2단계)
   ========================================================= */

#lockscreen {
  position: absolute;
  inset: 0;
  z-index: 20;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.22, 0.8, 0.24, 1),
              opacity 0.38s ease;
}
/* 잠금 해제되면 위로 사라짐 */
#lockscreen.unlocked,
#lockscreen.unlocked * {
  pointer-events: none !important;
}
#lockscreen.unlocked {
  transform: translateY(-8%) scale(1.06);
  opacity: 0;
}

/* 잠금화면 배경 */
#lock-wallpaper {
  position: absolute;
  inset: -2px;
  background: linear-gradient(170deg, #5b6bd6 0%, #a45bc4 45%, #f08a5d 100%);
  background-size: cover;
  background-position: center;
  transition: filter 0.35s, transform 0.35s;
}
#lockscreen.show-passcode #lock-wallpaper {
  filter: brightness(0.5) blur(10px);
  transform: scale(1.06);
}

/* ---------- 잠금화면 기본 ---------- */
#lock-main {
  position: absolute;
  inset: 0;
  touch-action: none;
  transition: opacity 0.3s, transform 0.35s cubic-bezier(0.22, 0.8, 0.24, 1);
}
#lockscreen.show-passcode #lock-main {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-24px);
}

#lock-icon {
  position: absolute;
  top: 84px;
  left: 50%;
  transform: translateX(-50%);
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.25));
}

#lock-date {
  position: absolute;
  top: 128px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}

#lock-time {
  position: absolute;
  top: 154px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 100px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -3px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

/* ---------- 알림 목록 ---------- */
#notif-list {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 292px;
  bottom: 178px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  touch-action: pan-y;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 34px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 34px), transparent);
}
#notif-list::-webkit-scrollbar { display: none; }

.notif {
  flex: none;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 22px;
  background: rgba(238, 238, 242, 0.84);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  backdrop-filter: blur(24px) saturate(1.4);
  color: #111;
  cursor: pointer;
  transition: transform 0.15s;
}
.notif:active { transform: scale(0.97); }

.n-body { flex: 1; min-width: 0; }
.n-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.n-title {
  font-size: 15px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.n-time {
  flex: none;
  font-size: 12.5px;
  color: #6b6b73;
}
.n-msg {
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.36;
  color: #26262b;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 알림 앱 아이콘 */
.ni {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ni-kakao { background: #fae100; }
.k-bubble {
  position: relative;
  width: 26px;
  height: 20px;
  border-radius: 50%;
  background: #3b1e1e;
  color: #fae100;
  font-style: normal;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.k-bubble::after {
  content: "";
  position: absolute;
  left: 5px;
  bottom: -3px;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #3b1e1e;
}
.ni-x { background: #000; }
.ni-instagram {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}
.ni-messages { background: linear-gradient(#5bf675, #0cbd2a); }
.ni-phone    { background: linear-gradient(#5bf675, #0cbd2a); }
.ni-youtube  { background: #ff0033; }
.ni-default  { background: #8e8e93; }

/* ---------- 손전등 / 카메라 버튼 ---------- */
.round-btn {
  position: absolute;
  bottom: 92px;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  background: rgba(40, 40, 46, 0.55);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}
.round-btn:active { transform: scale(0.9); }
.round-btn.btn-left  { left: 46px; }
.round-btn.btn-right { right: 46px; }
.round-btn.on { background: #fff; color: #111; }

/* ---------- 위로 쓸어올려 잠금 해제 ---------- */
#lock-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 38px;
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

/* ---------- 비밀번호 입력 화면 ---------- */
#passcode {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
#lockscreen.show-passcode #passcode {
  opacity: 1;
  pointer-events: auto;
}

#pc-title {
  margin-top: 128px;
  font-size: 20px;
  font-weight: 500;
}

#pc-dots {
  display: flex;
  gap: 22px;
  height: 14px;
  margin-top: 24px;
}
.pc-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  transition: background 0.1s;
}
.pc-dot.filled { background: #fff; }
#pc-dots.shake { animation: pc-shake 0.4s; }
@keyframes pc-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-12px); }
  40% { transform: translateX(12px); }
  60% { transform: translateX(-8px); }
  80% { transform: translateX(8px); }
}

#pc-pad {
  display: grid;
  grid-template-columns: repeat(3, 78px);
  gap: 14px 22px;
  margin-top: 62px;
}
.pc-key {
  width: 78px;
  height: 78px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.35s;
}
.pc-key:active {
  background: rgba(255, 255, 255, 0.55);
  transition: background 0s;
}
.pc-key.zero { grid-column: 2; }
.pc-num { font-size: 34px; font-weight: 300; line-height: 1; }
.pc-sub {
  height: 12px;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
}

#pc-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 66px;
  display: flex;
  justify-content: space-between;
  padding: 0 52px;
}
.pc-link {
  border: 0;
  background: none;
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  padding: 8px;
  cursor: pointer;
}
.pc-link:active { opacity: 0.5; }
