/* ==========================================================================
   Demo phone — iPhone frame, lock screen, boot splash, the real app (iframe)
   The phone keeps a real phone width for the app and is scaled as a whole
   (--phone-scale, set by demo.js) so it always fits the window.
   ========================================================================== */

.phone-stage { width: calc(372px * var(--phone-scale, 1)); height: calc(781px * var(--phone-scale, 1)); position: relative; }
.phone {
  --pw: 372px;
  position: absolute; top: 0; left: 0;
  width: var(--pw); height: 781px; border-radius: 56px; padding: 11px;
  transform: scale(var(--phone-scale, 1)); transform-origin: top left;
  background: linear-gradient(145deg, #3a3d40, #16181a 40%, #2a2d30);
  box-shadow: 0 40px 80px -30px rgba(20, 40, 40, .45), 0 12px 30px -12px rgba(20, 40, 40, .3), inset 0 0 0 1.5px #5a5e62, inset 0 0 0 3px #111;
}
.phone::before { content: ""; position: absolute; left: -3px; top: 150px; width: 4px; height: 60px; border-radius: 3px; background: #2b2e31; box-shadow: 0 80px 0 #2b2e31; }
.side-btn { position: absolute; top: 200px; right: -5px; width: 5px; height: 90px; border-radius: 3px; background: #2b2e31; cursor: pointer; z-index: 2; }
.side-btn:hover { background: #45494d; }

.screen {
  --demo-bg: #fef7ff;
  position: relative; width: 100%; height: 100%; border-radius: 46px; overflow: hidden; isolation: isolate;
  background: var(--demo-bg); color: #1d1b20; user-select: none; -webkit-user-select: none;
}
[data-theme="dark"] .screen { --demo-bg: #0c0c0c; color: #eee; }

.statusbar { position: absolute; top: 0; left: 0; right: 0; height: 46px; display: flex; justify-content: space-between; align-items: center; padding: 6px 30px 0 34px; font: 600 14px "Titillium Web", system-ui, sans-serif; z-index: 71; direction: ltr; pointer-events: none; }
.statusbar .sb-r { display: flex; gap: 5px; align-items: center; }
.statusbar svg { height: 11px; width: auto; }
.screen:not(.unlocked) .statusbar { color: #fff; }
.island { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: 104px; height: 30px; background: #000; border-radius: 20px; z-index: 72; }
.home-ind { position: absolute; bottom: 7px; left: 50%; transform: translateX(-50%); width: 120px; height: 5px; border-radius: 3px; background: currentColor; opacity: .45; z-index: 72; pointer-events: none; }

.app-host { position: absolute; inset: 46px 0 0; z-index: 5; }
.app-host iframe { width: 100%; height: 100%; border: 0; display: block; background: var(--demo-bg); }

/* lock screen */
.lockscreen {
  position: absolute; inset: 0; z-index: 60; cursor: pointer; color: #fff; outline: none;
  display: flex; flex-direction: column; align-items: center; padding: 78px 18px 34px;
  background: radial-gradient(120% 70% at 20% 0%, rgba(255, 182, 0, .35), transparent 60%), linear-gradient(160deg, #258786 0%, #009688 45%, #305955 100%);
  transition: transform .55s cubic-bezier(.6, 0, .3, 1), opacity .45s;
}
[data-theme="dark"] .lockscreen { background: radial-gradient(120% 70% at 20% 0%, rgba(255, 150, 0, .22), transparent 60%), linear-gradient(160deg, #1b3f3a, #0c1a16 60%, #050807); }
.lockscreen:focus-visible { box-shadow: inset 0 0 0 3px #ffb600; }
.unlocked .lockscreen { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.lockscreen.nudge { animation: nudge .35s; }
@keyframes nudge { 40% { transform: translateY(-10px); } }
.ls-time { font: 700 78px/1 "Titillium Web", "IRANSansX", sans-serif; margin-top: 8px; text-shadow: 0 2px 20px rgba(0, 0, 0, .18); }
.ls-date { font-size: 15px; font-weight: 600; opacity: .92; margin-top: 8px; }
.ls-note { margin-top: auto; width: 100%; display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 22px; background: rgba(255, 255, 255, .18); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); text-align: start; }
.ls-note b { display: block; font-size: 14px; }
.ls-note small { font-size: 12px; opacity: .92; line-height: 1.45; display: block; }
.ls-icon { width: 44px; height: 44px; border-radius: 12px; background: #fff; display: grid; place-items: center; flex: none; --logo-ink: #414042; --logo-ink-2: #6d6e71; }
.ls-icon svg { width: 24px; height: 32px; }
.ls-hint { margin-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 700; }
.ls-taps { display: flex; gap: 8px; }
.ls-taps i { width: 14px; height: 14px; border-radius: 50%; background: rgba(255, 255, 255, .92); animation: tap 1.6s infinite; }
.ls-taps i:last-child { animation-delay: .22s; }
@keyframes tap { 0%, 40%, 100% { transform: scale(.7); opacity: .5; } 20% { transform: scale(1.1); opacity: 1; } }

/* boot splash while the app loads */
.boot { position: absolute; inset: 0; z-index: 55; background: var(--demo-bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; opacity: 0; visibility: hidden; transition: opacity .5s, visibility .5s; }
.boot.show { opacity: 1; visibility: visible; }
.boot-logo svg { width: 92px; height: 122px; animation: breathe 1.8s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.06); filter: drop-shadow(0 8px 18px rgba(255, 150, 0, .35)); } }
.boot-name { font: 700 22px "Titillium Web", sans-serif; letter-spacing: .35em; margin-inline-start: .35em; }
.boot-bar { width: 140px; height: 4px; border-radius: 2px; background: rgba(127, 127, 127, .2); overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 40%; border-radius: 2px; background: linear-gradient(90deg, #258786, #ffb600); animation: indet 1.2s ease-in-out infinite; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.boot-msg { font-size: 12.5px; opacity: .6; }
