:root {
  --phone-w: 393px;
  --phone-h: 852px;
  --radius: 40px;
}

* {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial,
    "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
}

.phone-shell {
  display: grid;
  place-items: center;
}

.phone {
  width: var(--phone-w);
  height: var(--phone-h);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0b1220;
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
}

.status-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  padding: 14px 16px 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 30;
  backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(2, 6, 23, 0.65), rgba(2, 6, 23, 0));
}

.app-viewport {
  position: absolute;
  inset: 0;
  padding-top: 48px;
  padding-bottom: 84px;
}

.tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 84px;
  padding: 10px 12px 18px 12px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  z-index: 30;
  backdrop-filter: blur(16px);
  background: linear-gradient(to top, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.45));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tab {
  display: grid;
  place-items: center;
  gap: 6px;
  border-radius: 18px;
  color: rgba(226, 232, 240, 0.85);
  font-size: 11px;
  padding: 10px 0;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.tab i {
  font-size: 18px;
}

.tab.active {
  background: rgba(99, 102, 241, 0.18);
  color: white;
}

.tab:active {
  transform: scale(0.98);
}

.page-enter {
  animation: pageEnter 240ms ease-out both;
}
.page-exit {
  animation: pageExit 200ms ease-in both;
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pageExit {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.toast-host {
  position: absolute;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  display: grid;
  gap: 10px;
  z-index: 50;
  pointer-events: none;
}

.toast {
  pointer-events: none;
  background: rgba(2, 6, 23, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: white;
  padding: 10px 12px;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  max-width: min(420px, 92vw);
  animation: toastIn 220ms ease-out both;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.wiggle-soft {
  animation: wiggleSoft 0.6s ease-in-out both;
}

@keyframes wiggleSoft {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  50% {
    transform: translateX(6px);
  }
  75% {
    transform: translateX(-4px);
  }
  100% {
    transform: translateX(0);
  }
}
