/* Anomaly OS — custom styles */

/* ── Fonts ─────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;300;400;500;600;700&display=swap');

/* ── Set Safety Locks ───────────────────────── */
/*
 * Prevent pull-to-refresh, rubber-banding, pinch-to-zoom, and browser
 * navigation gestures from breaking the OS illusion.
 * These rules apply to the AOS shell only; sub-apps set their own locks.
 */
html {
  /* Block pull-to-refresh and elastic scroll on iOS/Chrome */
  overscroll-behavior-y: none;
  /* Prevent double-tap zoom while still allowing panning */
  touch-action: pan-x pan-y;
}

/* ── Reset / base ───────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; overflow: hidden; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #000;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  /* Belt-and-suspenders: also set on body for older WebKit */
  overscroll-behavior: none;
  touch-action: pan-x pan-y;
}

/* ── Screen transitions ─────────────────────── */
.aos-screen { transition: opacity 0.35s ease, transform 0.35s ease; }

.aos-screen.aos-enter-from {
  opacity: 0;
  transform: scale(1.04);
}
.aos-screen.aos-leave-to {
  opacity: 0;
  transform: scale(0.96);
}

/* ── Lock screen swipe gesture ──────────────── */
#screen-lock {
  touch-action: pan-y;
  cursor: grab;
}

/* ── Glass card (notifications, dock, etc.) ─── */
.glass {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.12);
}

/* ── App icon ───────────────────────────────── */
.app-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.app-icon-img {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease, filter 0.12s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.app-icon:active .app-icon-img {
  transform: scale(0.88);
  filter: brightness(0.85);
}
.app-icon-label {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  max-width: 64px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Notification toast ─────────────────────── */
.notif-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(28,28,30,0.92);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  animation: toast-in 0.3s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
.notif-toast.hiding {
  animation: toast-out 0.25s ease forwards;
}
.notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notif-body { flex: 1; overflow: hidden; }
.notif-app  { font-size: 0.65rem; color: rgba(255,255,255,0.45); margin-bottom: 1px; }
.notif-title { font-size: 0.8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-text  { font-size: 0.75rem; color: rgba(255,255,255,0.65); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-16px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(-10px) scale(0.97); }
}

/* ── Lock screen notification cards ─────────── */
.lock-notif-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.12);
  animation: toast-in 0.3s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

/* ── Director panel scene cards ─────────────── */
.scene-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.scene-card:active,
.scene-card:hover { background: rgba(99,102,241,0.2); border-color: rgba(99,102,241,0.5); }
.scene-card.active { background: rgba(99,102,241,0.25); border-color: rgba(99,102,241,0.7); }

/* ── Director trigger ripple ────────────────── */
@keyframes tap-ripple {
  0%   { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(2);   opacity: 0; }
}
.director-tap-flash::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(99,102,241,0.6);
  animation: tap-ripple 0.4s ease-out forwards;
}

/* ── Home pill press ────────────────────────── */
#home-pill:active { opacity: 1; transform: translateX(-50%) scaleX(0.9); }

/* ── Scrollbar hide ─────────────────────────── */
::-webkit-scrollbar { display: none; }
* { scrollbar-width: none; }
