/* Trustera game */
.tr-app { position: absolute; inset: 0; background: #0B0C0F; padding-top: 50px; }
.tr-app iframe { width: 100%; height: 100%; border: 0; display: block; background: #0B0C0F; }

/* Drive */
#appview:has(.dr) { background: #fff; }
.dr { padding: 4px 12px 30px; }
.dr-logo { font-weight: 600; color: #5f6368; padding: 0 6px; }
.dr-sec { font-size: 13px; color: #5f6368; font-weight: 600; margin: 16px 6px 6px; }
.dr-row { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; padding: 10px 6px; text-align: start; color: inherit; border-radius: 10px; }
.dr-row:active { background: #f1f3f4; }
.dr-row span { flex: 1; display: flex; flex-direction: column; }
.dr-row small { color: #5f6368; font-size: 12.5px; }
.dr-row i { color: #5f6368; font-style: normal; }
.dr-row img, .dr-row .dr-pdf { width: 30px; height: 30px; object-fit: contain; }
.dr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.dr-file { border: 1px solid #e0e0e0; border-radius: 12px; background: #fff; padding: 0; overflow: hidden; text-align: start; display: flex; flex-direction: column; }
.dr-file b { font-size: 12px; font-weight: 500; padding: 8px 10px; direction: ltr; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-th { height: 104px; background: #F6F3EA; display: grid; place-items: center; }
.dr-th.dark { background: #0B0C0F; }
.dr-th img { max-width: 80%; max-height: 80px; object-fit: contain; }
.dr-pdf { display: grid; place-items: center; background: #E5252A; color: #fff; font-weight: 700; font-size: 12px; border-radius: 6px; width: 54px; height: 64px; }
.dr-view { min-height: calc(100% - 50px); display: grid; place-items: center; padding: 30px; background: #F6F3EA; }
.dr-view.dark { background: #0B0C0F; }
.dr-view img { max-width: 100%; max-height: 520px; object-fit: contain; }

/* Wallet */
#appview:has(.wl) { background: #000; }
.wl { padding: 0 16px 30px; color: #fff; }
.wl-top { display: flex; justify-content: space-between; align-items: center; }
.wl-top h1 { font-size: 33px; margin: 6px 0 14px; }
.wl-top span { width: 32px; height: 32px; border-radius: 50%; background: #1c1c1e; display: grid; place-items: center; color: #0A84FF; font-size: 20px; }
.wl-card { perspective: 900px; cursor: pointer; }
.wl-face { position: relative; aspect-ratio: 1.586; border-radius: 16px; overflow: hidden; padding: 20px;
  background: radial-gradient(120% 140% at 20% 0%, #3a3a3e 0%, #18181a 45%, #050505 100%); box-shadow: 0 18px 40px #000a, inset 0 0 0 1px #ffffff14; transition: transform .6s; }
.wl-card.flip .wl-face { transform: rotateY(8deg) rotateX(6deg) scale(1.02); }
.wl-sheen { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, #ffffff12 45%, transparent 60%); }
.wl-chip { width: 44px; height: 34px; border-radius: 7px; background: linear-gradient(135deg, #d8c08a, #9c8048); margin-top: 26px; box-shadow: inset 0 0 0 1px #0004; }
.wl-nfc { position: absolute; top: 22px; left: 20px; }
.wl-name { position: absolute; bottom: 38px; right: 20px; font-size: 17px; letter-spacing: 1.5px; color: #e9e9ea; direction: ltr; font-weight: 500; }
.wl-type { position: absolute; bottom: 18px; right: 20px; font-size: 11px; color: #9a9aa0; letter-spacing: 1px; direction: ltr; }
.wl-sec { font-size: 19px; font-weight: 700; margin: 24px 2px 8px; }
.wl-list { background: #1c1c1e; border-radius: 14px; padding: 0 12px; }
.wl-tx { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: .5px solid #2c2c2e; }
.wl-tx:last-child { border: 0; }
.wl-ic { width: 34px; height: 34px; border-radius: 9px; background: #2c2c2e; display: grid; place-items: center; font-weight: 700; }
.wl-tx > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; direction: ltr; text-align: right; }
.wl-tx b { font-size: 14px; font-weight: 600; }
.wl-tx small { color: #8e8e93; font-size: 12px; direction: rtl; }
.wl-amt { font-size: 14.5px; }

/* Weather */
.we { position: absolute; inset: 0; overflow-y: auto; padding: 60px 16px 40px; color: #fff; background: linear-gradient(180deg, #2F78C4 0%, #5AA6E8 55%, #8CC6F2 100%); scrollbar-width: none; }
.we::-webkit-scrollbar { display: none; }
.we.night { background: linear-gradient(180deg, #0B1A3A 0%, #1F3466 60%, #2B4A86 100%); }
.we-head { text-align: center; margin-bottom: 22px; text-shadow: 0 1px 6px #0003; }
.we-head small { font-size: 12px; opacity: .85; }
.we-head h1 { font-size: 32px; margin: 0; font-weight: 500; }
.we-t { font-size: 94px; font-weight: 200; line-height: 1; margin: 2px 0 2px 18px; direction: ltr; }
.we-head div { font-size: 18px; font-weight: 500; }
.we-card { background: #ffffff26; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: 16px; padding: 10px 14px; margin-bottom: 10px; }
.we-cap { font-size: 12px; opacity: .75; font-weight: 600; padding-bottom: 6px; border-bottom: .5px solid #ffffff40; margin-bottom: 6px; }
.we-hours { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; direction: rtl; }
.we-hours::-webkit-scrollbar { display: none; }
.we-hours div { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 36px; font-size: 15px; }
.we-hours small { font-size: 12.5px; }
.we-day { display: grid; grid-template-columns: 58px 28px 34px 1fr 34px; align-items: center; gap: 6px; padding: 7px 0; font-size: 16px; border-bottom: .5px solid #ffffff26; }
.we-day:last-child { border: 0; }
.we-day small { opacity: .7; text-align: center; font-size: 16px; }
.we-bar { height: 5px; border-radius: 3px; background: #ffffff33; position: relative; direction: ltr; }
.we-bar em { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg, #8ED1FC, #FFD43B, #FF9500); }
.we-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.we-grid .we-card { margin: 0; }
.we-grid b { font-size: 28px; font-weight: 400; }
.we-grid b.we-src { font-size: 17px; }

/* Calculator */
.calc { position: absolute; inset: 0; background: #000; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 16px 40px; }
.calc-d { color: #fff; font-size: 80px; font-weight: 300; text-align: left; direction: ltr; padding: 0 10px 10px; white-space: nowrap; overflow: hidden; }
.calc-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; direction: ltr; }
.calc-k { aspect-ratio: 1; border-radius: 50%; border: 0; font-size: 32px; background: #333; color: #fff; }
.calc-k.fn { background: #a5a5a5; color: #000; font-size: 26px; }
.calc-k.op { background: #FF9F0A; font-size: 36px; }
.calc-k.op.on { background: #fff; color: #FF9F0A; }
.calc-k.zero { grid-column: span 2; aspect-ratio: auto; border-radius: 40px; text-align: left; padding-left: 30px; }
.calc-k:active { filter: brightness(1.4); }

/* Quran */
#appview:has(.qr) { background: #FBF6EA; }
.qr { padding: 6px 14px 30px; font-family: 'Amiri Quran', 'Amiri', 'Traditional Arabic', serif; color: #1d1a13; }
.qr-top { display: flex; justify-content: space-between; font-size: 15px; color: #8a6d2e; padding: 0 6px 6px; font-family: var(--font); }
.qr-page { border: 3px double #C8A45A; border-radius: 6px; padding: 14px 14px 18px; background: #FFFCF4; }
.qr-band { text-align: center; font-size: 22px; padding: 6px; margin-bottom: 8px; border: 2px solid #C8A45A; border-radius: 30px; background: linear-gradient(#FFF7E2, #F3E3B5); color: #6b4f16; }
.qr-bas { text-align: center; font-size: 24px; margin: 6px 0 10px; }
.qr-text { font-size: 25px; line-height: 2.25; text-align: justify; margin: 0; }
.qr-n { color: #8a6d2e; font-size: 21px; white-space: nowrap; }
.qr-foot { text-align: center; color: #8a6d2e; margin-top: 8px; font-size: 16px; }

/* Athkar */
#appview:has(.ak) { background: #F2EFE6; }
.ak { padding: 0 16px 30px; }
.ak h1 { font-size: 30px; margin: 4px 0 10px; }
.ak-seg { width: auto; margin: 0 0 12px; }
.ak-prog { height: 6px; border-radius: 3px; background: #e2dccb; overflow: hidden; }
.ak-prog i { display: block; height: 100%; background: #1F6B4E; transition: width .3s; }
.ak-pl { font-size: 12.5px; color: #6e6e73; margin: 6px 2px 12px; }
.ak-card { background: #fff; border-radius: 16px; padding: 14px 16px; margin-bottom: 10px; box-shadow: 0 1px 3px #0000000d; transition: opacity .3s; }
.ak-card.done { opacity: .55; }
.ak-card p { font-family: 'Amiri', 'Traditional Arabic', serif; font-size: 19px; line-height: 2; margin: 0 0 8px; white-space: pre-line; }
.ak-row { display: flex; justify-content: space-between; align-items: center; }
.ak-row small { color: #8a8a8e; font-size: 12px; }
.ak-btn { min-width: 54px; height: 54px; border-radius: 50%; border: 0; background: #1F6B4E; color: #fff; font-size: 19px; font-weight: 700; }
.ak-card.done .ak-btn { background: #9db7aa; }
.ak-reset { width: 100%; border: 0; background: #fff; color: #FF3B30; border-radius: 12px; padding: 12px; font-size: 15px; }

/* Settings */
.st { padding: 0 16px 30px; }
.st h1 { font-size: 33px; margin: 4px 0 12px; }
.st-group { background: #fff; border-radius: 12px; overflow: hidden; margin-bottom: 22px; }
.st-row { display: flex; align-items: center; gap: 12px; padding: 0 14px; min-height: 46px; border-bottom: .5px solid #e5e5ea; cursor: pointer; }
.st-row:last-child { border: 0; }
.st-ic { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; font-size: 15px; color: #fff; flex-shrink: 0; }
.st-ic[style*="transparent"] { display: none; }
.st-l { flex: 1; font-size: 16px; display: flex; flex-direction: column; }
.st-l small { font-size: 12.5px; color: #6e6e73; }
.st-r { color: #8a8a8e; font-size: 15px; white-space: nowrap; }
.st-me { min-height: 74px; }
.st-av { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #A5ABB6, #6e7380); color: #fff; display: grid; place-items: center; font-size: 24px; }
.st-av.big { width: 90px; height: 90px; font-size: 38px; }
.st-prof { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0 20px; font-size: 20px; }
.st-cap { font-size: 12.5px; color: #6e6e73; margin: -14px 14px 16px; }
.st-group + .st-cap { margin-top: -14px; }
.st-look { display: flex; justify-content: space-around; padding: 16px; }
.st-look button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 14px; color: inherit; }
.st-look .lk { width: 64px; height: 120px; border-radius: 12px; border: 3px solid transparent; }
.st-look .lk.light { background: linear-gradient(#fff, #e9e9ee); box-shadow: inset 0 0 0 1px #ddd; }
.st-look .lk.dark { background: linear-gradient(#2c2c2e, #000); }
.st-look button.on .lk { border-color: var(--blue); }
.st-bright { display: flex; align-items: center; gap: 10px; padding: 14px; }
.st-bright input { flex: 1; accent-color: #fff; }
.st-chart { display: flex; align-items: flex-end; gap: 6px; height: 90px; padding: 12px; }
.st-chart i { flex: 1; background: #34C759; border-radius: 3px; }

/* Dark appearance (Settings → Display) for the light apps */
body.sim-dark #appview:not(.dark) { background: #000; color: #fff; }
body.sim-dark .navbar { background: #121214e6 !important; border-color: #ffffff1f; }
body.sim-dark .navbar .title { color: #fff; }
body.sim-dark .st-group, body.sim-dark .nt-card, body.sim-dark .card, body.sim-dark .note, body.sim-dark .ph-actions button { background: #1c1c1e; color: #fff; }
body.sim-dark .st-row, body.sim-dark .nt-row, body.sim-dark .nt-frow { border-color: #ffffff1f; }
body.sim-dark #appview:has(.nt-note), body.sim-dark #appview:has(.sm-root), body.sim-dark #appview:has(.sm-thread), body.sim-dark #appview:has(.cal), body.sim-dark #appview:has(.phs) { background: #000; }
body.sim-dark .sm-root, body.sim-dark .sm-thread, body.sim-dark .ph, body.sim-dark .ph-scroll { background: #000; color: #fff; }
body.sim-dark .sm-b { background: #262629; color: #fff; }
body.sim-dark .cal-sticky, body.sim-dark .cal-d, body.sim-dark .day { background: #000; color: #fff; }
body.sim-dark .search { background: #7676803d; color: #fff; }
body.sim-dark #status.dark, body.sim-dark #homebar.dark::after { color: #fff; background: #fff; }
body.sim-dark #status.dark { background: none; }

/* Messages: sent bubbles, padel info cards, composer */
.sm-b.me { align-self: flex-end; background: #0A84FF; color: #fff; }
.sm-b a { color: inherit; }
.sm-cardwrap { align-self: flex-start; margin: 3px 0; }
.sm-cardwrap.me { align-self: flex-end; }
.sm-card { width: 220px; border-radius: 18px; padding: 14px 16px; background: linear-gradient(160deg, #FF6FA8, #8E5BE8); color: #fff; display: flex; flex-direction: column; gap: 3px; box-shadow: 0 3px 10px #0002; }
.sm-cic { font-size: 26px; }
.sm-card b { font-size: 16px; margin-bottom: 2px; }
.sm-card span { font-size: 14px; }
.sm-card i { font-style: normal; font-size: 11px; opacity: .8; margin-top: 6px; direction: ltr; text-align: right; }
.sm-compose { display: flex; gap: 8px; align-items: center; margin-top: auto; padding: 14px 0 6px; position: sticky; bottom: 0; background: inherit; }
.sm-compose input { flex: 1; border: 1px solid #d1d1d6; border-radius: 20px; padding: 8px 14px; font-size: 16px; outline: none; background: transparent; color: inherit; }
.sm-compose button { width: 32px; height: 32px; border-radius: 50%; border: 0; background: #0A84FF; color: #fff; font-size: 17px; }

/* Gmail booking table (like the partnership booking form) */
.gm-booking { margin: 16px 0 8px; }
.gm-booking h3 { font-size: 22px; color: #1A73E8; margin: 0 0 10px; font-weight: 600; }
.gm-booking table { width: 100%; border-collapse: collapse; background: #F1F4F9; border-radius: 10px; overflow: hidden; }
.gm-booking th { text-align: start; font-weight: 400; color: #5f6368; font-size: 13px; padding: 10px 12px; width: 92px; vertical-align: top; }
.gm-booking td { font-weight: 600; font-size: 14.5px; padding: 10px 12px; unicode-bidi: plaintext; }
.gm-booking tr + tr th, .gm-booking tr + tr td { border-top: 1px solid #e3e7ee; }

/* Notes: new-note button, editable areas */
.nt-new { position: sticky; bottom: 10px; float: left; width: 46px; height: 46px; border-radius: 50%; border: 0; background: #E0A800; color: #fff; font-size: 22px; box-shadow: 0 4px 12px #0003; }
#nt-title, #nt-text { outline: none; }
#nt-text:empty::before { content: 'اكتبي هنا…'; color: #b0b0b5; }
.fl-count { text-align: center; color: #8a8a8e; font-size: 12.5px; margin-top: 24px; }

/* Camera viewfinder uses Alaa's photo */
.camera .cam-top { display: flex; justify-content: space-between; align-items: center; padding: 54px 18px 8px; }
.cam-ic { border: 0; background: #ffffff22; color: #fff; width: 34px; height: 34px; border-radius: 50%; font-size: 16px; }
.cam-ic.on { color: #FFD60A; }
.cam-live { font-variant-numeric: tabular-nums; color: #fff; font-size: 14px; }
.camera .vf { margin: 0; overflow: hidden; padding: 0; position: relative; }
.camera .vf img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.cam-zoom { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; background: #0006; border-radius: 20px; padding: 4px; direction: ltr; }
.cam-zoom button { border: 0; width: 34px; height: 34px; border-radius: 50%; background: #0008; color: #fff; font-size: 12px; font-weight: 700; }
.cam-zoom button.on { color: #FFD60A; }
.camera .shutter.rec::after { background: #FF3B30; }
.camera .modes span { cursor: pointer; }

/* Snapchat privacy screen */
.snap-lock { position: absolute; inset: 0; background: #FFFC00; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; color: #111; }
.snap-ghost { width: 120px; height: 120px; border-radius: 30px; overflow: hidden; animation: wobble 1.6s ease-in-out infinite; }
.snap-ghost svg { width: 100%; height: 100%; }
@keyframes wobble { 50% { transform: rotate(-8deg) scale(1.05) } }
.snap-lock h2 { font-size: 26px; margin: 22px 0 6px; }
.snap-lock p { font-size: 18px; margin: 0 0 26px; }
.snap-lock button { border: 0; background: #111; color: #FFFC00; border-radius: 24px; padding: 12px 26px; font-size: 16px; font-weight: 700; }

/* YouTube watch page */
.yt-watch { padding-bottom: 30px; }
.yt-player { background: #000; position: sticky; top: -54px; margin-top: -54px; padding-top: 54px; z-index: 3; }
.yt-player video { width: 100%; max-height: 420px; display: block; background: #000; }
.yt-info { padding: 12px 14px 4px; }
.yt-info h2 { font-size: 18px; margin: 0 0 4px; line-height: 1.4; }
.yt-info > small { color: #aaa; }
.yt-ch-row { display: flex; align-items: center; gap: 10px; margin: 12px 0; }
.yt-chimg { width: 36px; height: 36px; border-radius: 50%; background: #1A1C22; }
.yt-ch-row b { flex: 1; }
.yt-sub { border: 0; border-radius: 18px; background: #f1f1f1; color: #0f0f0f; padding: 7px 14px; font-weight: 600; }
.yt-sub.on { background: #272727; color: #f1f1f1; }
.yt-acts { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.yt-acts button { border: 0; border-radius: 18px; background: #272727; color: #f1f1f1; padding: 7px 14px; white-space: nowrap; font-size: 13.5px; }
.yt-acts button.on { background: #f1f1f1; color: #0f0f0f; }
.yt-comments { margin: 12px 14px; background: #272727; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.yt-c { display: flex; gap: 8px; font-size: 13.5px; }
.yt-c > span:last-child { display: flex; flex-direction: column; }
.yt-c small { color: #aaa; font-size: 11.5px; }
.yt-ca { width: 26px; height: 26px; border-radius: 50%; background: #6B4FBB; display: grid; place-items: center; font-size: 12px; flex-shrink: 0; }
.yt-sugg .yt-th { background-size: cover; background-position: center; }
.mu-apple { margin-top: 26px; color: #fff; background: #ffffff22; padding: 10px 18px; border-radius: 20px; text-decoration: none; font-size: 14px; }
.wa-pick .phs-grid { overflow-y: auto; }
.wa-link { text-decoration: none; color: inherit; }
