/**
 * iPhone 15 外观模拟（约 6.1" 逻辑尺寸 393×852 pt）
 * 与 Tailwind 配合：设备外框、灵动岛、安全区
 */

:root {
  --device-w: 393px;
  --device-h: 852px;
  --device-radius: 55px;
  --device-bezel: 12px;
  --screen-radius: 47px;
  --island-w: 126px;
  --island-h: 37px;
  --safe-top: 59px;
  --safe-bottom: 34px;
}

.device-shell {
  position: relative;
  width: calc(var(--device-w) + var(--device-bezel) * 2);
  padding: var(--device-bezel);
  border-radius: var(--device-radius);
  background: linear-gradient(145deg, #2a2a2e 0%, #0d0d0f 40%, #1c1c22 100%);
  box-shadow:
    0 50px 100px -20px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

.device-screen {
  position: relative;
  width: var(--device-w);
  height: var(--device-h);
  border-radius: var(--screen-radius);
  overflow: hidden;
  background: #0b1220;
}

/* 灵动岛 */
.dynamic-island {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: var(--island-w);
  height: var(--island-h);
  border-radius: 999px;
  background: #000;
  z-index: 50;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* 侧键装饰（视觉） */
.device-shell::before,
.device-shell::after {
  content: "";
  position: absolute;
  background: linear-gradient(90deg, #3a3a40, #1a1a1e);
  border-radius: 2px;
}

.device-shell::before {
  right: -3px;
  top: 120px;
  width: 4px;
  height: 72px;
}

.device-shell::after {
  left: -3px;
  top: 100px;
  width: 4px;
  height: 96px;
}

.home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  z-index: 40;
  pointer-events: none;
}

.safe-stack {
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* 轻量页面切换动画 */
.screen-enter {
  animation: screenIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
