:root {
  color-scheme: dark;
  font-family: "Pretendard", "Segoe UI", sans-serif;
  color: #ffffff;
  background: #07090d;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #07090d;
}

button {
  border: 0;
  font: inherit;
}

.lockscreen-app {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
  background: #07090d;
}

.home-screen,
.lock-screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.home-screen {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  min-height: 100%;
  padding: max(16px, env(safe-area-inset-top)) 22px
    max(12px, env(safe-area-inset-bottom));
  background:
    linear-gradient(
      to bottom,
      rgba(8, 14, 26, 0.14),
      rgba(5, 8, 14, 0.04) 52%,
      rgba(0, 0, 0, 0.18) 76%,
      rgba(0, 0, 0, 0.36) 100%
    ),
    url("../../assets/images/photo2.png") center / cover no-repeat;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 28px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 13px;
  font-weight: 700;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.status-icons {
  display: flex;
  gap: 7px;
  align-items: center;
}

.status-icons iconify-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.battery-gauge {
  position: relative;
  display: block;
  width: 23px;
  height: 12px;
  border: 1.6px solid rgba(255, 255, 255, 0.9);
  border-radius: 4px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

.battery-gauge::after {
  position: absolute;
  top: 3px;
  right: -4px;
  width: 2px;
  height: 5px;
  border-radius: 0 2px 2px 0;
  background: rgba(255, 255, 255, 0.9);
  content: "";
}

.battery-level {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: 70%;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.9);
}

.app-grid {
  align-self: end;
  display: grid;
  grid-template-columns: repeat(4, minmax(58px, 1fr));
  gap: clamp(18px, 3.5vh, 26px) clamp(12px, 4vw, 28px);
  width: min(520px, 100%);
  margin: 0 auto clamp(20px, 4vh, 32px);
}

.home-app {
  display: grid;
  gap: 7px;
  justify-items: center;
  min-width: 0;
  padding: 0;
  color: #ffffff;
  background: transparent;
  cursor: pointer;
}

.app-spacer {
  min-width: 0;
  min-height: calc(clamp(48px, 10vw, 54px) + 20px);
  pointer-events: none;
}

.home-icon {
  display: grid;
  place-items: center;
  width: clamp(48px, 10vw, 54px);
  aspect-ratio: 1;
  color: #ffffff;
  border-radius: 15px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 8px 18px rgba(0, 0, 0, 0.24);
}

.home-icon iconify-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68%;
  height: 68%;
  font-size: 34px;
  line-height: 1;
}

.app-label {
  max-width: 100%;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.94);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.85),
    0 3px 10px rgba(0, 0, 0, 0.65);
  white-space: nowrap;
}

.gallery-app .home-icon {
  background: linear-gradient(145deg, #5fdc95, #2c9c7c);
}

.camera-app .home-icon {
  background: linear-gradient(145deg, #ef6f94, #bd315d);
}

.message-app .home-icon {
  background: linear-gradient(145deg, #43bde8, #236fc5);
}

.profile-app .home-icon {
  background: linear-gradient(145deg, #8d9dff, #6170d8);
}

.music-app .home-icon {
  background: linear-gradient(145deg, #f36f9f, #ba456f);
}

.settings-app .home-icon {
  background: linear-gradient(145deg, #9da6b4, #626c7b);
}

.bottom-dock {
  align-self: end;
  display: grid;
  grid-template-columns: repeat(4, minmax(44px, 1fr));
  gap: clamp(18px, 5vw, 42px);
  align-items: center;
  width: min(440px, calc(100vw - 38px));
  margin: 0 auto;
  padding: 10px clamp(18px, 5vw, 30px);
  border-radius: 26px;
  background: rgba(12, 16, 28, 0.54);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    0 14px 30px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(16px) saturate(1.08);
}

.dock-app {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.dock-icon {
  display: grid;
  place-items: center;
  width: clamp(42px, 9.2vw, 50px);
  aspect-ratio: 1;
  color: #ffffff;
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 8px 16px rgba(0, 0, 0, 0.24);
}

.dock-icon iconify-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 66%;
  height: 66%;
  font-size: 31px;
  line-height: 1;
}

.phone-app .dock-icon {
  background: linear-gradient(145deg, #48d279, #15985a);
}

.message-app .dock-icon {
  background: linear-gradient(145deg, #43bde8, #236fc5);
}

.camera-app .dock-icon {
  background: linear-gradient(145deg, #181717, #bd315d);
}

.browser-app .dock-icon {
  background: linear-gradient(145deg, #78d48b, #3c70c7 48%, #d64f43);
  border-radius: 50%;
}

.gesture-bar {
  align-self: end;
  width: 82px;
  height: 4px;
  margin: 10px auto 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.lock-screen {
  z-index: 5;
  touch-action: none;
  user-select: none;
  cursor: grab;
}

.lock-screen.is-dragging {
  cursor: grabbing;
}

.lock-screen.is-unlocked {
  opacity: 0;
  pointer-events: none;
  transition: opacity 420ms ease;
}

.lock-background {
  position: absolute;
  inset: -36px;
  background:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.12),
      rgba(0, 0, 0, 0.24)
    ),
    url("../../assets/images/photo2.png") center / cover no-repeat;
  filter:
    blur(var(--lock-blur, 18px))
    saturate(var(--lock-saturate, 1.12))
    brightness(var(--lock-brightness, 0.82));
  transform: scale(1.1);
  transition:
    filter 180ms ease,
    opacity 180ms ease;
}

.lock-screen.is-unlocked .lock-background {
  filter: blur(0) saturate(1) brightness(1);
}

.lock-clock {
  position: absolute;
  z-index: 2;
  top: clamp(30px, 8vh, 72px);
  right: 24px;
  left: 24px;
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
  opacity: var(--lock-content-opacity, 1);
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.45);
}

.lock-time {
  font-size: clamp(54px, 15vw, 112px);
  font-weight: 800;
  line-height: 0.95;
}

.lock-date {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(15px, 3.4vw, 22px);
  font-weight: 700;
}

.drag-veil {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    radial-gradient(
      circle at 50% 18%,
      rgba(255, 255, 255, 0.16),
      transparent 28%
    ),
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.02),
      rgba(0, 0, 0, 0.34)
    );
  opacity: var(--drag-veil-opacity, 1);
}

.greeting-pill {
  position: absolute;
  z-index: 3;
  bottom: clamp(38px, 9vh, 72px);
  left: clamp(16px, 5vw, 42px);
  display: inline-flex;
  gap: 10px;
  align-items: center;
  max-width: min(84vw, 360px);
  min-height: 46px;
  padding: 11px 15px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  opacity: var(--lock-content-opacity, 1);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
}

.greeting-pill svg {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  stroke-width: 2.4;
}

.greeting-pill span {
  overflow: hidden;
  font-size: clamp(14px, 3.7vw, 17px);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unlock-indicator {
  position: absolute;
  z-index: 3;
  right: 24px;
  bottom: clamp(46px, 9vh, 78px);
  display: grid;
  grid-template-columns: repeat(4, 5px);
  gap: 5px;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 24px;
  opacity: var(--lock-content-opacity, 0.82);
}

.unlock-indicator span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  animation: dot-pulse 1.15s ease-in-out infinite;
}

.unlock-indicator span:nth-child(2) {
  animation-delay: 90ms;
}

.unlock-indicator span:nth-child(3) {
  animation-delay: 180ms;
}

.unlock-indicator span:nth-child(4) {
  animation-delay: 270ms;
}

@keyframes dot-pulse {
  0%,
  100% {
    transform: translateY(2px);
    opacity: 0.45;
  }

  50% {
    transform: translateY(-2px);
    opacity: 1;
  }
}

@media (max-width: 520px) {
  .home-screen {
    padding-right: 16px;
    padding-left: 16px;
  }

  .app-grid {
    grid-template-columns: repeat(4, minmax(52px, 1fr));
    gap: 17px 10px;
    margin-bottom: 18px;
  }

  .bottom-dock {
    width: min(100%, 390px);
    gap: 14px;
    border-radius: 24px;
  }

  .dock-icon {
    border-radius: 14px;
  }

  .browser-app .dock-icon {
    border-radius: 50%;
  }
}

@media (max-height: 560px) {
  .lock-clock {
    top: 24px;
  }

  .app-grid {
    gap: 12px 10px;
    margin-bottom: 14px;
  }

  .home-icon {
    width: 44px;
  }

  .app-label {
    font-size: 11px;
  }

  .bottom-dock {
    padding-top: 9px;
    padding-bottom: 9px;
  }
}
