/* ===== الهوية (غيّر الألوان هنا) ===== */
:root {
  --brand-dark: #0f1a2b;
  --brand: #1f6f5c;
  --brand-accent: #b6f33a;
  --brand-soft: #d2f671;
  --ios-red: #ff3b30;
  --ios-blue: #0a84ff;
  --ios-green: #30d158;
  --wa-green: #25d366;
  --bg: #000;
  --cell: #1c1c1e;
  --cell2: #2c2c2e;
  --label: #fff;
  --label2: rgba(235, 235, 245, .6);
  --label3: rgba(235, 235, 245, .3);
  --sep: rgba(84, 84, 88, .55);
  --status-h: 54px;
  --font: -apple-system, BlinkMacSystemFont, "SF Arabic", "SF Pro Text", "Noto Sans Arabic", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: #0b0b0d; color: var(--label); font-family: var(--font); overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; color: inherit; }

/* ===== الإطار ===== */
.stage { height: 100dvh; display: grid; place-items: center; background: radial-gradient(ellipse at center, #1a1a1f 0%, #070708 70%); }
.phone {
  position: relative;
  height: min(874px, calc(100dvh - 40px));
  aspect-ratio: 402 / 874;
  border-radius: 58px;
  padding: 12px;
  background: #1b1b1d;
  box-shadow: 0 0 0 2px #3a3a3e, 0 30px 80px rgba(0,0,0,.7);
}
.island { position: absolute; top: 23px; left: 50%; transform: translateX(-50%); width: 120px; height: 34px; background: #000; border-radius: 20px; z-index: 50; }
.screen { user-select: none; -webkit-user-select: none; position: relative; width: 100%; height: 100%; border-radius: 46px; overflow: hidden; background: #000; container-type: size; }

@media (max-width: 599px) {
  .stage { background: #000; }
  .phone { height: 100dvh; width: 100vw; aspect-ratio: auto; border-radius: 0; padding: 0; box-shadow: none; background: #000; }
  .island { display: none; }
  .screen { border-radius: 0; }
}

/* ===== شريط الحالة ===== */
.statusbar { position: absolute; inset: 0 0 auto 0; height: var(--status-h); display: flex; align-items: center; justify-content: space-between; padding: 14px 30px 0; font-size: 15px; font-weight: 600; z-index: 40; pointer-events: none; direction: ltr; }
.statusbar .sb-icons { display: flex; gap: 6px; align-items: center; }
.statusbar > span:first-child { font-family: -apple-system, "SF Pro Text", system-ui, sans-serif; font-size: 16px; letter-spacing: -.2px; min-width: 54px; text-align: center; }
.battery { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.battery i { position: relative; width: 25px; height: 12px; border: 1.5px solid rgba(255,255,255,.5); border-radius: 4px; display: inline-block; }
.battery i b { position: absolute; inset: 1.5px auto 1.5px 1.5px; background: #fff; border-radius: 1.5px; }
.battery.low i b { background: var(--ios-red); }

/* ===== الطبقات ===== */
.layer { position: absolute; inset: 0; }
.lock { z-index: 20; background: linear-gradient(170deg, #1b2440 0%, #2a1f3d 45%, #0b0c14 100%) center/cover; transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .35s; touch-action: none; }
.lock.gone { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.home { z-index: 5; background: linear-gradient(160deg, #20294a 0%, #3a2350 50%, #0e0f18 100%) center/cover; }
.app { z-index: 10; display: none; background: #000; }
.app.open { display: block; animation: app-in .28s cubic-bezier(.2,.8,.2,1); }
.overlay { z-index: 30; display: none; }
.overlay.open { display: block; }
.home-bar { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 134px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.85); z-index: 45; cursor: pointer; }
.home-bar::before { content: ""; position: absolute; inset: -14px -20px; }
@keyframes app-in { from { transform: scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }

/* ===== شاشة القفل ===== */
.lock-inner { height: 100%; display: flex; flex-direction: column; align-items: center; padding: calc(var(--status-h) + 14px) 14px 22px; }
.lock-date { font-size: 17px; font-weight: 600; opacity: .85; }
.lock-time { font-size: 92px; font-weight: 700; line-height: 1.05; letter-spacing: -2px; }
.lock-lost { text-align: center; margin: 6px 0 14px; }
.lock-lost h2 { font-size: 17px; }
.lock-lost p { font-size: 13px; opacity: .7; }
.notifs { width: 100%; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 1; scrollbar-width: none; }
.notif { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 20px; background: rgba(40,40,46,.62); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); text-align: start; width: 100%; animation: notif-in .45s both; }
.notif .ic { width: 36px; height: 36px; flex: none; border-radius: 9px; }
.notif .tx { flex: 1; min-width: 0; }
.notif .row { display: flex; justify-content: space-between; gap: 8px; }
.notif .ti { font-weight: 700; font-size: 14px; }
.notif .tm { font-size: 12px; opacity: .55; flex: none; }
.notif .bd { font-size: 14px; opacity: .9; line-height: 1.4; }
@keyframes notif-in { from { transform: translateY(14px); opacity: 0; } }
.lock-bottom { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 14px 28px 4px; }
.round-btn { width: 50px; height: 50px; border-radius: 50%; background: rgba(40,40,46,.55); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); display: grid; place-items: center; color: #fff; }
.round-btn.on { background: #fff; color: #000; }
.swipe-hint { font-size: 14px; opacity: .75; animation: hint 2.2s ease-in-out infinite; }
@keyframes hint { 50% { transform: translateY(-6px); opacity: 1; } }

/* ===== الشاشة الرئيسية ===== */
.home-inner { height: 100%; display: flex; flex-direction: column; padding: calc(var(--status-h) + 10px) 18px 14px; animation: home-in .4s both; }
@keyframes home-in { from { transform: scale(1.08); opacity: 0; } }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 10px; }
.icon-btn { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11px; position: relative; }
.icon-btn:active .ic { filter: brightness(.7); }
.ic { width: 60px; height: 60px; border-radius: 13.5px; display: block; position: relative; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.25); flex: none; }
.ic svg.full { width: 100%; height: 100%; display: block; }
.icon-btn .lbl { color: #fff; font-size: 11.5px; font-weight: 500; text-shadow: 0 1px 2px rgba(0,0,0,.45); white-space: nowrap; }
.badge { position: absolute; top: -5px; left: 4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--ios-red); color: #fff; font-size: 13px; font-weight: 600; display: grid; place-items: center; z-index: 2; }
.widget { grid-column: span 2; grid-row: span 2; border-radius: 22px; padding: 14px; text-align: start; display: flex; flex-direction: column; gap: 6px; }
.widget-notes { background: #fff; color: #111; }
.widget-notes .wh { background: #ffd60a; margin: -14px -14px 6px; padding: 10px 14px; border-radius: 22px 22px 0 0; font-weight: 700; font-size: 14px; }
.widget-notes .wt { font-weight: 700; font-size: 14px; }
.widget-notes .wb { font-size: 12px; color: #555; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.home-search { margin: auto auto 14px; padding: 6px 16px; border-radius: 16px; background: rgba(60,60,70,.55); backdrop-filter: blur(20px); font-size: 13px; }
.dock { display: grid; grid-template-columns: repeat(4, 1fr); padding: 14px 12px; border-radius: 32px; background: rgba(60,60,72,.45); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); }
.dock .icon-btn span.lbl { display: none; }

/* ===== هيكل التطبيقات ===== */
.view { position: absolute; inset: 0; display: flex; flex-direction: column; background: #000; animation: push .3s cubic-bezier(.2,.8,.2,1); }
@keyframes push { from { transform: translateX(-30%); opacity: .4; } }
.nav { padding: calc(var(--status-h) + 4px) 14px 6px; display: flex; align-items: center; justify-content: space-between; min-height: 44px; flex: none; }
.nav .back { color: var(--ios-blue); font-size: 17px; display: flex; align-items: center; gap: 6px; }
.chat-head .back { display: flex; align-items: center; }
.big-title { font-size: 32px; font-weight: 700; padding: 2px 16px 8px; }
.scroll { flex: 1; overflow-y: auto; padding-bottom: 40px; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }
.search { display: flex; align-items: center; gap: 6px; margin: 4px 16px 10px; padding: 8px 12px; border-radius: 10px; background: var(--cell); color: var(--label2); font-size: 15px; }
.list { margin: 0 16px 18px; border-radius: 12px; background: var(--cell); overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; width: 100%; text-align: start; border-bottom: .5px solid var(--sep); }
.list-row:last-child { border-bottom: 0; }
.list-row .main { flex: 1; min-width: 0; }
.list-row .t { font-size: 16px; }
.list-row .s { font-size: 13px; color: var(--label2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .end { color: var(--label2); font-size: 14px; flex: none; }
.list-row.missed .t { color: var(--ios-red); }
.section-h { margin: 6px 32px 6px; font-size: 13px; color: var(--label2); }
.empty { padding: 60px 30px; text-align: center; color: var(--label2); }
.tabbar { flex: none; display: flex; justify-content: space-around; padding: 8px 0 26px; border-top: .5px solid var(--sep); background: rgba(20,20,22,.95); font-size: 10px; color: var(--label2); }
.tabbar span.on { color: var(--ios-blue); }

/* ===== واتساب ===== */
.wa .nav .back, .wa .tabbar span.on { color: var(--wa-green); }
.wa .tabbar span.on { color: #fff; }
.wa-filters { display: flex; gap: 8px; padding: 0 16px 10px; overflow-x: auto; scrollbar-width: none; }
.wa-filters span { padding: 5px 13px; border-radius: 16px; background: var(--cell); font-size: 13px; white-space: nowrap; color: var(--label2); }
.wa-filters span.on { background: #103d2a; color: #4ee58f; }
.chat-row { display: flex; gap: 12px; align-items: center; padding: 9px 16px; width: 100%; text-align: start; }
.avatar { width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 20px; background-size: cover; background-position: center; }
.chat-row .main { flex: 1; min-width: 0; border-bottom: .5px solid var(--sep); padding-bottom: 10px; }
.chat-row .top { display: flex; justify-content: space-between; gap: 8px; }
.chat-row .nm { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-row .tm { font-size: 13px; color: var(--label2); flex: none; }
.chat-row .tm.unread { color: var(--wa-green); }
.chat-row .bot { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.chat-row .pv { font-size: 14px; color: var(--label2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-row .cnt { background: var(--wa-green); color: #000; border-radius: 11px; min-width: 21px; height: 21px; padding: 0 6px; font-size: 12px; font-weight: 700; display: grid; place-items: center; flex: none; }
.chat-head { padding: calc(var(--status-h) + 2px) 10px 8px; display: flex; align-items: center; gap: 10px; background: #111b21; flex: none; }
.chat-head .back { color: var(--wa-green); font-size: 28px; line-height: 1; padding: 0 6px; }
.chat-head .avatar { width: 38px; height: 38px; font-size: 15px; }
.chat-head .info { flex: 1; min-width: 0; text-align: start; }
.chat-head .nm { font-weight: 700; font-size: 16px; }
.chat-head .sub { font-size: 12px; color: var(--label2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-body { flex: 1; overflow-y: auto; padding: 10px 12px 16px; background: #0b141a center/cover; display: flex; flex-direction: column; gap: 3px; scrollbar-width: none; }
.e2e { align-self: center; max-width: 85%; text-align: center; font-size: 12px; background: #1d2a30; color: #e9d38c; padding: 7px 12px; border-radius: 8px; margin: 6px 0 10px; }
.day-sep { align-self: center; font-size: 12px; background: #1d2a30; color: var(--label2); padding: 4px 12px; border-radius: 8px; margin: 8px 0; }
.bubble { max-width: 78%; padding: 6px 9px 4px; border-radius: 10px; font-size: 15px; line-height: 1.45; position: relative; white-space: pre-wrap; word-wrap: break-word; }
.bubble.in { align-self: flex-start; background: #202c33; border-start-start-radius: 2px; }
.bubble.out { align-self: flex-end; background: #005c4b; border-start-end-radius: 2px; }
.bubble .from { font-size: 13px; font-weight: 700; margin-bottom: 1px; }
.bubble .meta { font-size: 11px; color: rgba(255,255,255,.55); text-align: end; margin-top: 1px; }
.bubble img, .bubble .ph { display: block; width: 220px; max-width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 7px; margin-bottom: 4px; }
.voice { display: flex; align-items: center; gap: 8px; min-width: 200px; padding: 4px 0; }
.voice .play { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; }
.voice .wave { flex: 1; height: 24px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.55) 0 2px, transparent 2px 5px); mask: linear-gradient(transparent 20%, #000 20% 80%, transparent 80%); border-radius: 2px; opacity: .8; }
.voice.playing .wave { animation: wave .6s linear infinite; }
@keyframes wave { 50% { opacity: .35; } }
.chat-input { flex: none; display: flex; gap: 8px; align-items: center; padding: 8px 10px 28px; background: #111b21; }
.chat-input div { flex: 1; padding: 8px 14px; border-radius: 20px; background: #2a3942; color: var(--label2); font-size: 15px; }
.typing { align-self: flex-start; font-size: 13px; color: var(--wa-green); padding: 4px 8px; }

/* ===== ملاحظات / مستند ===== */
.note-body { padding: 4px 20px 40px; font-size: 17px; line-height: 1.8; white-space: pre-wrap; }
.note-body h1 { font-size: 24px; margin-bottom: 4px; }
.note-date { text-align: center; color: var(--label2); font-size: 13px; margin-bottom: 10px; }
.notes-app .nav .back { color: #ffd60a; }
.code-view { padding: 12px 16px 40px; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; direction: ltr; text-align: left; color: #d4d4d4; }

/* ===== الصور ===== */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.photo-grid button { aspect-ratio: 1; position: relative; overflow: hidden; }
.photo-grid img, .ph-fill { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-fill { display: grid; place-items: center; font-size: 11px; color: rgba(255,255,255,.75); padding: 6px; text-align: center; }
.ph-fill.secret { filter: blur(0); background: #222 !important; font-size: 28px; }
.photo-full { flex: 1; display: grid; place-items: center; background: #000; padding: 10px; }
.photo-full img, .photo-full .ph-fill { max-width: 100%; max-height: 100%; width: 100%; aspect-ratio: 3/4; height: auto; border-radius: 4px; font-size: 16px; }
.photo-cap { text-align: center; padding: 10px 20px 40px; color: var(--label2); font-size: 14px; }

/* ===== Terminal ===== */
.term { flex: 1; overflow-y: auto; padding: 10px 14px 20px; font-family: var(--mono); font-size: 13px; line-height: 1.6; direction: ltr; text-align: left; background: #0d0d0d; color: #e6e6e6; }
.term .cmd { color: #fff; }
.term .cmd::before { content: attr(data-p) " "; color: var(--brand-accent); }
.term .out { color: #bdbdbd; white-space: pre-wrap; }
.term form { display: flex; gap: 6px; }
.term form label { color: var(--brand-accent); flex: none; }
.term input { flex: 1; background: transparent; border: 0; outline: 0; color: #fff; caret-color: var(--brand-accent); font-family: var(--mono); font-size: 13px; min-width: 0; }

/* ===== كاميرا ===== */
.cam { flex: 1; position: relative; background: radial-gradient(circle at 40% 40%, #3b3b3b, #0d0d0d 70%); animation: drift 8s ease-in-out infinite alternate; }
.cam video { width: 100%; height: 100%; object-fit: cover; }
@keyframes drift { to { background-position: 30px 20px; filter: brightness(1.15); } }
.cam-modes { display: flex; justify-content: center; gap: 18px; font-size: 13px; padding: 12px; color: var(--label2); }
.cam-modes .on { color: #ffd60a; }
.cam-bar { display: flex; justify-content: space-around; align-items: center; padding: 6px 0 34px; }
.shutter { width: 72px; height: 72px; border-radius: 50%; border: 4px solid #fff; padding: 4px; }
.shutter i { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; }
.flash { position: absolute; inset: 0; background: #fff; animation: flash .35s forwards; pointer-events: none; }
@keyframes flash { to { opacity: 0; } }

/* ===== Face ID / رمز ===== */
.lock-flow { position: absolute; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); display: grid; place-items: center; }
.faceid-card { width: 200px; padding: 26px 16px 18px; border-radius: 26px; background: rgba(50,50,56,.85); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.faceid-card svg { width: 70px; height: 70px; }
.faceid-card.scan svg { animation: scan 1s ease-in-out infinite; }
@keyframes scan { 50% { opacity: .4; transform: scale(.94); } }
.faceid-card.fail svg { color: var(--ios-red); }
.faceid-card button { color: var(--ios-blue); font-size: 15px; }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.passcode { position: absolute; inset: 0; background: rgba(10,10,14,.92); backdrop-filter: blur(20px); display: flex; flex-direction: column; align-items: center; padding-top: 110px; gap: 18px; }
.passcode-title { font-size: 19px; }
.dots { display: flex; gap: 22px; }
.dots span { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid #fff; }
.dots span.on { background: #fff; }
.pass-err { height: 20px; color: var(--ios-red); font-size: 14px; }
.pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 16px 24px; direction: ltr; }
.key { width: 76px; height: 76px; border-radius: 50%; background: rgba(255,255,255,.14); font-size: 32px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.key small { font-size: 9px; letter-spacing: 2px; opacity: .8; margin-top: 3px; }
.key:active { background: rgba(255,255,255,.4); }
.key.ghost { background: none; font-size: 16px; }

/* ===== الملف السري ===== */
.doc-view { background: radial-gradient(ellipse at top, #12352b 0%, var(--brand-dark) 60%); }
.doc-wrap { flex: 1; overflow-y: auto; padding: 8px 16px 30px; display: flex; flex-direction: column; gap: 16px; }
.doc { position: relative; border: 1px solid rgba(182,243,58,.35); border-radius: 16px; padding: 18px 16px; background: rgba(0,0,0,.25); }
.doc h2 { font-size: 17px; color: var(--brand-soft); text-align: center; margin-bottom: 14px; }
.doc dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 10px; font-size: 14px; }
.doc dt { color: var(--brand-accent); }
.doc .wide { grid-column: 1 / -1; }
.redact { background: #000; color: #000; border-radius: 3px; padding: 0 2px; user-select: none; }
mark.revealed { background: var(--brand-accent); color: #000; border-radius: 3px; padding: 0 4px; }
.stamp { position: absolute; top: 46%; left: 12%; transform: rotate(-14deg) scale(1.6); opacity: 0; border: 3px solid var(--ios-red); color: var(--ios-red); padding: 2px 12px; font-size: 22px; font-weight: 800; border-radius: 8px; animation: stamp .5s .6s forwards; }
@keyframes stamp { to { opacity: .85; transform: rotate(-14deg) scale(1); } }
.countdown { text-align: center; }
.countdown .lbl { font-size: 13px; color: var(--label2); margin-bottom: 8px; }
.cd { display: flex; justify-content: center; gap: 10px; }
.cd div { min-width: 64px; padding: 8px 4px; border-radius: 12px; background: rgba(255,255,255,.06); }
.cd b { display: block; font-size: 26px; color: var(--brand-accent); }
.cd small { font-size: 11px; color: var(--label2); }
.doc-cta { display: flex; flex-direction: column; gap: 8px; padding: 6px 16px 30px; flex: none; }
.cta-row { display: flex; gap: 8px; }
.cta-row > * { flex: 1; }
.btn-primary { padding: 14px; border-radius: 14px; background: var(--brand-accent); color: #0b1a10; font-weight: 700; font-size: 16px; text-align: center; text-decoration: none; display: block; }
.btn-ghost { padding: 12px; border-radius: 14px; border: 1px solid rgba(255,255,255,.18); font-size: 14px; text-align: center; color: #fff; text-decoration: none; display: block; }

/* نموذج «بلغني» */
.sheet-bg { position: absolute; inset: 0; background: rgba(0,0,0,.5); z-index: 5; display: flex; align-items: flex-end; }
.sheet { width: 100%; background: #1c1c1e; border-radius: 20px 20px 0 0; padding: 18px 18px 34px; display: flex; flex-direction: column; gap: 10px; animation: sheet-in .3s; }
@keyframes sheet-in { from { transform: translateY(100%); } }
.sheet h3 { font-size: 17px; text-align: center; }
.sheet input[type=text], .sheet input[type=email] { width: 100%; padding: 12px 14px; border-radius: 10px; border: 0; background: var(--cell2); font-size: 15px; outline: none; }
.sheet label.chk { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--label2); }
.sheet .err { color: var(--ios-red); font-size: 13px; min-height: 18px; }
.sheet .ok { text-align: center; padding: 20px 0; font-size: 16px; }

/* ===== المكالمة / المنبه ===== */
.call-screen { position: absolute; inset: 0; background: linear-gradient(180deg, #2b3a4a 0%, #0f141b 100%); display: flex; flex-direction: column; align-items: center; padding: 110px 20px 70px; animation: fade .3s; }
@keyframes fade { from { opacity: 0; } }
.call-screen .label { color: var(--label2); font-size: 15px; }
.call-screen .name { font-size: 34px; font-weight: 600; margin: 6px 0; }
.call-screen .status { color: var(--label2); font-size: 15px; }
.call-actions { margin-top: auto; display: flex; justify-content: space-around; width: 100%; }
.call-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; }
.call-btn i { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; font-style: normal; }
.call-btn.accept i { background: var(--ios-green); animation: pulse 1.2s infinite; }
.call-btn.decline i { background: var(--ios-red); }
@keyframes pulse { 50% { box-shadow: 0 0 0 14px rgba(48,209,88,.15); } }
.alarm-screen { position: absolute; inset: 0; background: rgba(0,0,0,.85); backdrop-filter: blur(20px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; animation: fade .3s; }
.alarm-screen .t { font-size: 80px; font-weight: 700; }
.alarm-screen .l { font-size: 20px; animation: hint 1s infinite; }
.alarm-screen .snooze { margin-top: 30px; padding: 14px 60px; border-radius: 30px; background: #ff9f0a; color: #000; font-weight: 700; font-size: 17px; }
.alarm-screen .stop { padding: 12px 40px; color: var(--label2); }

/* ===== البانرات ===== */
.banner-wrap { position: absolute; top: 48px; left: 8px; right: 8px; z-index: 42; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.banner { pointer-events: auto; animation: banner-in .4s cubic-bezier(.2,.9,.3,1.2); }
.banner.out { animation: banner-out .3s forwards; }
@keyframes banner-in { from { transform: translateY(-120%); opacity: 0; } }
@keyframes banner-out { to { transform: translateY(-120%); opacity: 0; } }

/* ===== تطبيقات بسيطة ===== */
.weather-hero { text-align: center; padding: 30px 0; }
.weather-hero .city { font-size: 30px; }
.weather-hero .temp { font-size: 90px; font-weight: 300; line-height: 1.1; }
.weather-view { background: linear-gradient(180deg, #2c5a85, #12263b); }
.storage-bar { height: 10px; border-radius: 5px; background: linear-gradient(90deg, #ff9f0a 0 40%, #ffd60a 40% 66%, #0a84ff 66% 99%, #555 99%); margin: 8px 0; }
.toast { position: absolute; bottom: 60px; left: 50%; transform: translateX(-50%); background: rgba(50,50,56,.95); padding: 10px 18px; border-radius: 14px; font-size: 14px; z-index: 46; animation: fade .2s; white-space: nowrap; }

/* ===== لمسات iOS ===== */
.tile { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; flex: none; }
.tile svg { width: 19px; height: 19px; }
.list-row .end { display: flex; align-items: center; gap: 8px; }
.list-row .end svg { color: var(--label3); }
.switch { width: 51px; height: 31px; border-radius: 16px; background: #39393d; position: relative; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; right: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.3); }
.avatar svg { width: 60%; }
.home-search { display: flex; align-items: center; gap: 5px; }
.lock-time { font-family: -apple-system, "SF Pro Rounded", "Noto Sans Arabic", system-ui, sans-serif; }

/* ===== لمسات iOS (٢) ===== */
.lock, .home { background-size: cover; background-position: center; }
.home::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.12); pointer-events: none; }
.lock::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.30), rgba(0,0,0,.05) 40%, rgba(0,0,0,.25)); pointer-events: none; }
.lock-inner, .home-inner { position: relative; }
.lock-date { font-size: 18px; font-weight: 600; opacity: .9; text-shadow: 0 1px 6px rgba(0,0,0,.2); }
.lock-time { font-size: 96px; font-weight: 600; letter-spacing: -1px; text-shadow: 0 2px 20px rgba(0,0,0,.15); opacity: .95; }
.lock-lost h2 { font-size: 16px; font-weight: 700; }
.lock-lost p { font-size: 12.5px; opacity: .75; }
.lock-spacer { flex: 1; min-height: 8px; }
.notifs { flex: 0 1 auto; max-height: 52%; padding-bottom: 4px; }
.notif { background: rgba(245,245,250,.16); backdrop-filter: blur(30px) saturate(1.6); -webkit-backdrop-filter: blur(30px) saturate(1.6); border-radius: 22px; padding: 11px 12px; align-items: center; }
.notif .ti { font-size: 14.5px; }
.notif .bd { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.n-av { position: relative; width: 38px; height: 38px; flex: none; }
.n-face { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 600; color: #fff; background: linear-gradient(#9b9ba3, #6c6c74) center/cover; }
.n-app { position: absolute; bottom: -3px; left: -3px; border-radius: 5px; box-shadow: 0 0 0 1.5px rgba(40,40,46,.5); }
.n-app .ic { border-radius: 4.5px !important; box-shadow: none; }
.banner .notif { background: rgba(60,60,68,.72); }
.swipe-hint { font-size: 0; width: 1px; animation: none; }
.round-btn { background: rgba(30,30,36,.35); backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5); }

/* أيقونات: لمعة الزجاج */
.ic { box-shadow: 0 2px 8px rgba(0,0,0,.28); }
.ic::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, rgba(255,255,255,.28) 0%, rgba(255,255,255,0) 38%, rgba(0,0,0,0) 70%, rgba(0,0,0,.10) 100%);
  box-shadow: inset 0 0 0 .6px rgba(255,255,255,.35), inset 0 1px 1px rgba(255,255,255,.35); }
.ic.img { background: none; box-shadow: none; }
.ic.img::after { display: none; }
.ic.img img { width: 100%; height: 100%; display: block; }
@keyframes icon-in { from { transform: scale(.4) translateY(30px); opacity: 0; } }
.home-inner { animation: none; }

/* ويدجت الطقس */
.widget-weather { background: linear-gradient(170deg, #4aa3f0 0%, #2a6fd0 100%); color: #fff; position: relative; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.widget-weather .ww-city { font-size: 14px; font-weight: 600; }
.widget-weather .ww-city small { font-size: 9px; }
.widget-weather .ww-temp { font-size: 40px; font-weight: 300; line-height: 1; }
.widget-weather .ww-desc { font-size: 11.5px; font-weight: 500; line-height: 1.45; margin-top: auto; }
.widget-notes { box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.widget { border-radius: 22px; }
.dock { background: rgba(255,255,255,.18); backdrop-filter: blur(30px) saturate(1.8); -webkit-backdrop-filter: blur(30px) saturate(1.8); border-radius: 34px; }
.home-search { background: rgba(255,255,255,.18); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6); }

/* ===== يكتب… ===== */
.app.still .view { animation: none; }
.is-typing { color: var(--wa-green) !important; }
.typing-dots { display: flex; gap: 4px; padding: 12px 14px !important; }
.typing-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.55); animation: tdot 1.2s infinite; }
.typing-dots i:nth-child(2) { animation-delay: .2s; }
.typing-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes tdot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

/* تقدم الرسالة الصوتية */
.voice .wave { position: relative; }
.voice .wave::after { content: ""; position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: calc(var(--p, 0) * 100%); background: repeating-linear-gradient(90deg, #53bdeb 0 2px, transparent 2px 5px); }
.voice.playing .wave { animation: none; }
.voice small { min-width: 30px; font-size: 11px; color: rgba(255,255,255,.6); }

/* Snapchat stories */
.snap-app { background:#fff; color:#16191c; }
.snap-header { display:flex;align-items:center;gap:12px;padding:calc(var(--status-h) + 10px) 18px 16px;background:#fffc00; }
.snap-header > img { width:44px;height:44px;border-radius:14px; }
.snap-header strong { display:block;font-size:20px; }
.snap-header small,.snap-profile small { display:block;font-size:12px;margin-top:3px;opacity:.6; }
.snap-body { padding:20px 16px; }
.snap-body h1 { font-size:25px;margin:0 0 22px; }
.snap-profile { display:flex;align-items:center;gap:12px; }
.snap-profile-ring { width:64px;height:64px;border:3px solid #b334e9;border-radius:50%;display:grid;place-items:center; }
.snap-profile-ring img { width:48px;height:48px;border-radius:50%; }
.snap-empty { text-align:center;color:#8d9398;padding:70px 16px; }
.snap-empty > span { display:block;font-size:42px;color:#b334e9; }
.snap-empty p { font-size:15px; }
.snap-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:26px; }
.snap-card { position:relative;aspect-ratio:9/16;overflow:hidden;border-radius:16px;background:#17191d;color:white; }
.snap-card > img { width:100%;height:100%;object-fit:cover; }
.snap-card-title { position:absolute;bottom:0;inset-inline:0;text-align:start;padding:20px 10px 12px;background:linear-gradient(transparent,#000b); }
.snap-play { font-size:32px; }
.snap-bottom { display:flex;justify-content:space-between;padding:15px 22px 30px;border-top:1px solid #eee;font-size:13px; }
.snap-bottom span:first-child { color:#963cff;font-weight:700; }
.snap-player video { width:100%;min-height:0;flex:1;object-fit:contain;background:#000; }

/* iPhone Photos viewer */
.ios-photo-library .photo-grid { gap:2px; }
.ios-photo-count { padding:22px 12px 38px;text-align:center;color:var(--label2);font-size:14px; }
.ios-photo-locked { width:100%;height:100%;display:grid;place-items:center;background:#242426; }
.ios-photo-viewer { background:#000; }
.ios-photo-top { position:absolute;top:var(--status-h);inset-inline:0;z-index:3;display:flex;align-items:center;justify-content:space-between;padding:10px 16px;background:linear-gradient(#000d,#0000);transition:opacity .2s; }
.ios-photo-top > button { width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#242426bb;backdrop-filter:blur(18px);font-size:22px; }
.ios-photo-top > div { padding:7px 22px;min-width:120px;text-align:center;border-radius:30px;background:#242426bb;backdrop-filter:blur(18px); }
.ios-photo-top strong { display:block;font-size:15px; }
.ios-photo-top small { display:block;font-size:11px;color:var(--label2);padding-top:2px; }
.ios-photo-stage { position:absolute;inset:112px 0 136px;display:flex;align-items:center;justify-content:center;touch-action:pan-y;overflow:hidden; }
.ios-photo-stage img { display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;user-select:none;-webkit-user-drag:none; }
.ios-photo-bottom { position:absolute;bottom:16px;inset-inline:0;z-index:3;transition:opacity .2s;background:linear-gradient(#0000,#000 28%); }
.ios-photo-filmstrip { display:flex;align-items:center;gap:3px;overflow-x:auto;scrollbar-width:none;height:56px;padding:3px calc(50% - 20px); }
.ios-photo-filmstrip::-webkit-scrollbar { display:none; }
.ios-photo-filmstrip button { width:24px;height:38px;flex:none;overflow:hidden;border-radius:3px;opacity:.65;transition:width .15s,opacity .15s; }
.ios-photo-filmstrip button.selected { width:40px;height:48px;opacity:1;border:2px solid #fff; }
.ios-photo-filmstrip img { width:100%;height:100%;object-fit:cover; }
.ios-photo-toolbar { display:flex;justify-content:space-around;align-items:center;padding:10px 24px; }
.ios-photo-toolbar button { width:44px;height:44px;display:grid;place-items:center;border-radius:50%;background:#242426aa; }
.ios-photo-toolbar svg { width:22px;height:22px; }
.ios-photo-viewer.controls-hidden .ios-photo-top,.ios-photo-viewer.controls-hidden .ios-photo-bottom { opacity:0;pointer-events:none; }
.ios-photo-viewer.controls-hidden .ios-photo-stage { inset:0; }

/* Snapchat friends and Discover */
.snap-section-title { font-size:19px;margin:22px 0 14px; }
.snap-friends { display:flex;gap:16px;overflow-x:auto;padding:3px 0 15px; }
.snap-friend { display:flex;flex-direction:column;align-items:center;gap:9px;min-width:74px;color:#16191c; }
.snap-friend strong { font-size:13px; }
.snap-discover-empty { color:#8d9398;font-size:14px;text-align:center;padding:35px 12px; }
.snap-story-header { z-index:3;position:absolute;top:var(--status-h);inset-inline:0;padding:8px 14px 20px;background:linear-gradient(#000a,transparent); }
.snap-story-progress { height:3px;border-radius:3px;background:#ffffff55;margin-bottom:13px; }
.snap-story-progress span { width:100%;height:100%;display:block;background:#fff;border-radius:3px; }
.snap-story-header > div:last-child { display:flex;align-items:center;gap:16px; }
.snap-story-header button { font-size:23px;min-width:34px;min-height:34px; }
.snap-story-header strong { font-size:16px; }
.snap-full-image { width:100%;height:100%;min-height:0;object-fit:contain;background:#000; }

.snap-friend .snap-profile-ring img { object-fit:cover; }

.ios-photo-stage video { display:block;width:100%;height:100%;object-fit:contain; }
.ios-photo-library .photo-grid > button { position:relative; }
.ios-video-duration { position:absolute;bottom:5px;right:5px;color:#fff;font-size:12px;text-shadow:0 1px 4px #000;direction:ltr; }

.statusbar { touch-action:none;pointer-events:auto; }

/* Snapchat stories proportions based on the supplied iPhone reference. */
.snap-app { background:#fff;color:#111; }
.snap-topbar { padding:calc(var(--status-h) + 8px) 9px 10px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px;direction:ltr;flex:none; }
.snap-topbar h1 { font-size:19px;font-weight:700;margin:0;direction:rtl; }
.snap-tools { display:flex;gap:7px;align-items:center; }
.snap-tools-end { justify-content:flex-end;gap:6px; }
.snap-tool { display:grid;place-items:center;background:#eff0f2;color:#6b737d;width:34px;height:34px;border-radius:50%;flex:none; }
.snap-tool svg { width:23px;height:23px; }
.snap-user svg { width:29px;height:29px; }
.snap-body { padding:0 9px 20px; }
.snap-section-title { display:flex;align-items:center;gap:4px;font-size:16px;margin:2px 0 8px;font-weight:700; }
.snap-section-title span { color:#8e9295;font-size:20px;font-weight:400; }
.snap-friends { gap:10px;margin:0 -9px 12px;padding:0 9px 7px;scrollbar-width:none; }
.snap-friends::-webkit-scrollbar,.snap-grid::-webkit-scrollbar { display:none; }
.snap-friend { width:23cqw;min-width:23cqw;gap:8px;justify-content:flex-start; }
.snap-profile-ring { width:23cqw;height:23cqw;border:2.5px solid #b92be8;padding:3px; }
.snap-profile-ring img { width:100%;height:100%;object-fit:cover;border-radius:50%; }
.snap-friend strong { font-size:14px;line-height:1.35;text-align:center;max-width:100%; }
.snap-grid { display:flex;gap:8px;margin:0 -9px;padding:0 9px 8px;overflow-x:auto;scrollbar-width:none; }
.snap-card { flex:0 0 27cqw;aspect-ratio:3/5;border-radius:6px; }
.snap-card-title { font-size:13px;font-weight:600;padding:25px 6px 7px;line-height:1.3; }
.snap-tabbar { display:flex;direction:ltr;align-items:center;justify-content:space-around;padding:17px 14px 30px;background:#fff;border-top:1px solid #f3f3f3;flex:none; }
.snap-tabbar > span { display:grid;place-items:center;width:34px;height:34px;color:#111; }
.snap-tabbar svg { width:24px;height:24px; }
.screen:has(.snap-app) .statusbar { color:#111; }
.screen:has(.snap-app) .statusbar svg { color:#111; }
.screen:has(.snap-app) .home-bar { background:#111; }
@media (max-width:350px) { .snap-tool { width:29px;height:29px; } .snap-tools,.snap-tools-end { gap:4px; } .snap-topbar { gap:5px; } }
.snap-profile-ring { position:relative;overflow:hidden;flex:none; } .snap-profile-ring img { position:absolute;inset:3px;width:calc(100% - 6px);height:calc(100% - 6px);display:block; } .screen:has(.snap-app) .statusbar svg [fill="#fff"] { fill:#111; } .screen:has(.snap-app) .statusbar svg [stroke="#fff"] { stroke:#111; }
.screen:has(.snap-app) .statusbar svg[fill="#fff"] { fill:#111; }

.snap-image-dismiss { display:block;width:100%;height:100%;min-height:0;overflow:hidden;touch-action:manipulation; }
.snap-player:has(.snap-image-dismiss) .snap-story-header { pointer-events:none; }
.snap-image-dismiss { transform-origin:88% 26%;transition:transform .19s ease-in,opacity .19s ease-in,border-radius .19s; }
.snap-closing .snap-image-dismiss { transform:scale(.16);opacity:0;border-radius:50%; }
.snap-closing .snap-story-header { opacity:0; }
@media(prefers-reduced-motion:reduce) { .snap-image-dismiss { transition:none; } }

/* Avoid painting obscured layers; keep the iPhone appearance with lighter blur. */
.screen:has(.app.open) .home { visibility:hidden; }
.lock.gone { visibility:hidden;transition:transform .35s,opacity .35s,visibility 0s .35s; }
.notif { backdrop-filter:blur(16px) saturate(1.4);-webkit-backdrop-filter:blur(16px) saturate(1.4); }
.dock { backdrop-filter:blur(18px) saturate(1.6);-webkit-backdrop-filter:blur(18px) saturate(1.6); }
.round-btn,.home-search { backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px); }
@media(prefers-reduced-motion:reduce) { .view,.app.open,.icon-btn,.notif { animation:none!important; } }
