:root {
    color-scheme: dark;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
    background: #000;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; touch-action: none; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; background: #000; touch-action: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.app-shell { position: fixed; inset: 0; width: 100%; height: 100%; background: #000; overflow: hidden; user-select: none; touch-action: none; }
.arm-screen { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: default; z-index: 2; overflow: hidden; touch-action: none; }

.arm-zoom {
    position: absolute;
    inset: 0;
    background: url("startup-bg.jpg") center/cover no-repeat;
    transform-origin: var(--eye-mid-x, 51.96%) var(--eye-mid-y, 35.6%);
    transform: scale(var(--arm-zoom-scale, 1));
    transition: transform .35s cubic-bezier(.22,.61,.36,1);
    will-change: transform;
}

.card-reveal {
    position: absolute;
    display: grid;
    place-items: center;
    width: 7%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.card-reveal-left { left: var(--eye-left-x, 40.1%); top: var(--eye-left-y, 35.5%); }
.card-reveal-right { left: var(--eye-right-x, 63.81%); top: var(--eye-right-y, 35.69%); }
.card-reveal svg,
.card-reveal span {
    transform: scale(var(--arm-zoom-reveal-scale, 1));
    transition: transform .35s cubic-bezier(.22,.61,.36,1);
}
.card-reveal svg { width: 5.5%; height: 5.5%; fill: #fff; filter: drop-shadow(0 0 3px rgba(255,255,255,.6)); }
.card-reveal span { display: block; font-weight: 800; font-size: .35vw; color: #fff; line-height: 1; text-shadow: 0 0 6px rgba(255,255,255,.6); }

.arm-screen.pinching .arm-zoom,
.arm-screen.pinching .card-reveal svg,
.arm-screen.pinching .card-reveal span { transition: none; }

.call-screen, .connected-screen { position: absolute; inset: 0; color: #fff; }
.ios-call { padding: max(72px, calc(env(safe-area-inset-top) + 48px)) 28px max(44px, calc(env(safe-area-inset-bottom) + 22px)); background: radial-gradient(circle at 50% 18%, #364049 0, #21282d 28%, #111518 75%, #090b0c 100%); }
.ios-top { text-align: center; }
.ios-contact-icon, .connected-avatar { width: 76px; height: 76px; margin: 0 auto 24px; border-radius: 50%; background: rgba(255,255,255,.2); position: relative; overflow: hidden; }
.ios-contact-icon span::before, .connected-avatar span::before, .android-avatar span::before { content: ""; position: absolute; left: 50%; top: 17%; transform: translateX(-50%); width: 27%; height: 27%; border-radius: 50%; background: rgba(255,255,255,.75); }
.ios-contact-icon span::after, .connected-avatar span::after, .android-avatar span::after { content: ""; position: absolute; left: 50%; bottom: -11%; transform: translateX(-50%); width: 72%; height: 54%; border-radius: 50% 50% 28% 28%; background: rgba(255,255,255,.75); }
.ios-top h1 { font-size: clamp(34px, 10vw, 48px); line-height: 1.08; font-weight: 500; letter-spacing: -.035em; margin: 0; overflow-wrap: anywhere; }
.ios-top p { margin: 10px 0 0; font-size: 20px; color: rgba(255,255,255,.75); }
.ios-actions { position: absolute; left: 44px; right: 44px; bottom: max(208px, calc(env(safe-area-inset-bottom) + 176px)); display: flex; justify-content: space-between; }
.ios-bottom { position: absolute; left: 42px; right: 42px; bottom: max(42px, calc(env(safe-area-inset-bottom) + 18px)); display: flex; justify-content: space-between; }
.round-action { display: flex; align-items: center; flex-direction: column; gap: 9px; border: 0; background: none; padding: 0; min-width: 76px; }
.round-action > span { display: grid; place-items: center; width: 66px; height: 66px; border-radius: 50%; font-size: 29px; }
.round-action b { font-size: 14px; font-weight: 500; white-space: nowrap; }
.secondary-action > span { background: rgba(255,255,255,.16); backdrop-filter: blur(10px); }
.action-glyph svg { width: 19px; height: 19px; }
.decline-button > span, .hangup-button { background: #ff3b30; }
.accept-button > span { background: #34c759; }
.phone-glyph svg { width: 21px; height: 21px; }
.phone-glyph.down svg { transform: rotate(135deg); }

.android-call { background: linear-gradient(155deg, #101a35 0%, #141726 52%, #090b11 100%); padding: max(42px, calc(env(safe-area-inset-top) + 22px)) 28px max(36px, calc(env(safe-area-inset-bottom) + 18px)); }
.android-glow { position: absolute; width: 130%; height: 48%; left: -20%; top: -12%; border-radius: 50%; background: rgba(66, 101, 199, .25); filter: blur(70px); }
.android-top { position: relative; text-align: center; }
.call-label { font-size: 15px; color: #bbc4e1; margin: 0 0 44px; }
.android-avatar { width: 106px; height: 106px; margin: 0 auto 28px; border-radius: 50%; background: linear-gradient(145deg, #7584a9, #39486d); position: relative; overflow: hidden; box-shadow: 0 14px 40px rgba(0,0,0,.3); }
.android-top h1 { font-size: clamp(34px, 10vw, 46px); line-height: 1.08; font-weight: 400; letter-spacing: -.025em; margin: 0; overflow-wrap: anywhere; }
.number-label { color: #bbc4d6; font-size: 16px; margin-top: 12px; }
.android-message { position: absolute; bottom: max(190px, calc(env(safe-area-inset-bottom) + 165px)); left: 0; right: 0; text-align: center; color: #d3d7e3; font-size: 14px; }
.android-message span { display: inline-flex; vertical-align: -3px; margin-right: 6px; }
.android-message svg { width: 13px; height: 13px; }
.android-call-actions { position: absolute; left: 44px; right: 44px; bottom: max(42px, calc(env(safe-area-inset-bottom) + 18px)); display: grid; grid-template-columns: 80px 1fr 80px; grid-template-rows: 80px 22px; column-gap: 30px; align-items: center; justify-items: center; }
.android-call-button { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; border: 0; }
.android-call-button .phone-glyph { display: grid; place-items: center; }
.android-decline { background: #e5484d; grid-column: 1; }
.android-answer { background: #36a867; grid-column: 3; }
.android-call-actions p { font-size: 13px; margin: 4px 0 0; }
.android-call-actions p:nth-of-type(1) { grid-column: 1; grid-row: 2; }
.android-call-actions p:nth-of-type(2) { grid-column: 3; grid-row: 2; }

.connected-screen { text-align: center; padding-top: max(86px, calc(env(safe-area-inset-top) + 62px)); background: radial-gradient(circle at 50% 20%, #33404a 0, #11161a 52%, #07090a 100%); }
.connected-screen h1 { margin: 0; font-weight: 400; font-size: clamp(34px, 10vw, 48px); }
.connected-screen p { color: #d1d5d8; font-variant-numeric: tabular-nums; font-size: 18px; }
.hangup-button { position: absolute; left: 50%; bottom: max(52px, calc(env(safe-area-inset-bottom) + 28px)); transform: translateX(-50%); display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; border: 0; }
.hangup-button .phone-glyph { display: grid; place-items: center; }
.status-toast { position: absolute; z-index: 10; left: 50%; bottom: max(25px, env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: calc(100% - 40px); padding: 12px 16px; border-radius: 14px; color: white; background: rgba(45,45,48,.92); font-size: 14px; text-align: center; backdrop-filter: blur(15px); }

.glitch-overlay { position: fixed; inset: 0; z-index: 30; background: #000; overflow: hidden; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.glitch-overlay.active, .glitch-overlay.settled { opacity: 1; pointer-events: auto; }
.glitch-overlay img { width: 100%; height: 100%; object-fit: cover; display: block; }
.glitch-overlay.active img { animation: glitchJitter .18s steps(2) infinite, glitchHue .5s linear infinite; filter: contrast(1.3) saturate(1.4); }
.glitch-overlay.active::before, .glitch-overlay.active::after { content: ""; position: absolute; inset: 0; mix-blend-mode: screen; pointer-events: none; }
.glitch-overlay.active::before { background: repeating-linear-gradient(0deg, rgba(255,0,60,.22) 0 2px, transparent 2px 4px); animation: glitchScan .12s linear infinite; }
.glitch-overlay.active::after { background: repeating-linear-gradient(90deg, transparent 0 6px, rgba(0,0,0,.3) 6px 8px); }
.glitch-overlay.settled img { animation: none; filter: none; transition: filter .5s ease; }

@keyframes glitchJitter {
    0% { transform: translate(0, 0); clip-path: inset(0 0 0 0); }
    20% { transform: translate(-2.5%, .8%); clip-path: inset(10% 0 60% 0); }
    40% { transform: translate(2%, -1.2%); clip-path: inset(50% 0 20% 0); }
    60% { transform: translate(-1.6%, 1.6%); clip-path: inset(70% 0 5% 0); }
    80% { transform: translate(2.4%, -.8%); clip-path: inset(20% 0 45% 0); }
    100% { transform: translate(0, 0); clip-path: inset(0 0 0 0); }
}
@keyframes glitchHue {
    0% { filter: hue-rotate(0deg) contrast(1.3) saturate(1.4); }
    100% { filter: hue-rotate(360deg) contrast(1.3) saturate(1.4); }
}
@keyframes glitchScan {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

html.has-bg-image .ios-call {
    background-image: linear-gradient(to bottom, rgba(9,11,12,0) 0%, rgba(17,21,24,.55) 55%, rgba(9,11,12,.94) 100%), var(--call-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
html.has-bg-image .android-call {
    background-image: linear-gradient(to bottom, rgba(9,11,17,0) 0%, rgba(15,18,30,.55) 55%, rgba(9,11,17,.94) 100%), var(--call-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
html.has-bg-image .connected-screen {
    background-image: linear-gradient(to bottom, rgba(7,9,10,0) 0%, rgba(13,16,18,.55) 55%, rgba(7,9,10,.94) 100%), var(--call-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

@media (max-height: 620px) {
    .ios-contact-icon { width: 58px; height: 58px; margin-bottom: 15px; }
    .ios-actions { bottom: 150px; }
    .ios-bottom { bottom: 22px; }
    .round-action > span { width: 58px; height: 58px; }
    .android-avatar { width: 80px; height: 80px; margin-bottom: 14px; }
    .call-label { margin-bottom: 20px; }
    .android-message { bottom: 135px; }
    .android-call-actions { bottom: 20px; }
}

