/* ATOM — shared styles */
:root{
  --bg:#07070c; --bg2:#0b0b13; --surface:#111119; --surface2:#171722;
  --line:#232333; --line2:#2e2e42;
  --text:#f3f4f9; --muted:#9aa1b8; --muted2:#6f7690;
  --brand:#5b8cff; --brand2:#8b5cf6; --accent:#22d3ee; --ok:#34d399;
  --radius:18px; --radius-sm:12px;
  --shadow:0 18px 50px rgba(0,0,0,.55);
  --grad:linear-gradient(135deg,#5b8cff 0%,#8b5cf6 55%,#22d3ee 100%);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background:var(--bg); color:var(--text);
  font-family:"IBM Plex Sans Arabic","Segoe UI",Tahoma,Arial,sans-serif;
  font-size:16px; line-height:1.7; -webkit-font-smoothing:antialiased;
  direction:rtl; text-align:right; min-height:100vh;
}
body::before{
  content:""; position:fixed; inset:0; z-index:-1; pointer-events:none;
  background:
    radial-gradient(60% 45% at 85% -5%, rgba(91,140,255,.16), transparent 70%),
    radial-gradient(45% 40% at 5% 5%, rgba(139,92,246,.13), transparent 70%),
    radial-gradient(40% 35% at 50% 100%, rgba(34,211,238,.07), transparent 70%);
}
a{color:inherit; text-decoration:none}
img{max-width:100%; display:block}
h1,h2,h3,h4{margin:0; line-height:1.35; font-weight:700; letter-spacing:-.2px}
p{margin:0 0 1em}
.wrap{width:100%; max-width:1180px; margin:0 auto; padding:0 20px}
.muted{color:var(--muted)}
.small{font-size:14px}

/* ---------- header ---------- */
header.site{
  position:sticky; top:0; z-index:50;
  background:rgba(7,7,12,.82); backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line);
}
.nav{display:flex; align-items:center; gap:14px; height:66px}
.logo{display:flex; align-items:center; gap:10px; font-weight:800; font-size:19px}
.logo .mark{
  width:32px;height:32px;border-radius:10px;background:var(--grad);
  display:grid;place-items:center;font-size:15px;color:#fff;font-weight:900;
  box-shadow:0 6px 18px rgba(91,140,255,.35);
}
.logo small{display:block; font-size:11px; color:var(--muted2); font-weight:500; line-height:1}
.nav .links{display:flex; gap:6px; margin-inline-start:auto; flex-wrap:wrap}
.nav .links a{
  padding:8px 14px; border-radius:10px; color:var(--muted); font-size:15px; font-weight:500;
  transition:.18s;
}
.nav .links a:hover{color:var(--text); background:var(--surface)}
.nav .links a.on{color:#fff; background:var(--surface2)}

/* ---------- hero ---------- */
.hero{padding:64px 0 34px; text-align:center}
.hero h1{font-size:clamp(34px,6vw,60px); letter-spacing:-1.5px}
.hero h1 .g{background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent}
.hero p{max-width:640px; margin:16px auto 0; color:var(--muted); font-size:17px}
.pill{
  display:inline-flex; align-items:center; gap:8px; padding:6px 14px; border-radius:999px;
  border:1px solid var(--line2); background:var(--surface); color:var(--muted);
  font-size:13px; margin-bottom:18px;
}
.pill .dot{width:7px;height:7px;border-radius:50%;background:var(--ok);box-shadow:0 0 10px var(--ok)}

/* ---------- cards ---------- */
.grid{display:grid; gap:16px}
.g2{grid-template-columns:repeat(2,1fr)}
.g3{grid-template-columns:repeat(3,1fr)}
.g4{grid-template-columns:repeat(4,1fr)}
@media(max-width:900px){.g3,.g4{grid-template-columns:repeat(2,1fr)}}
@media(max-width:640px){.g2,.g3,.g4{grid-template-columns:1fr}}
.card{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  padding:20px; transition:.2s;
}
a.card:hover{border-color:var(--line2); transform:translateY(-2px); box-shadow:var(--shadow)}
.svc{padding:26px; position:relative; overflow:hidden}
.svc .ic{
  width:52px;height:52px;border-radius:14px;display:grid;place-items:center;
  font-size:24px; margin-bottom:14px; background:var(--surface2); border:1px solid var(--line2);
}
.svc h3{font-size:21px; margin-bottom:6px}
.svc p{color:var(--muted); font-size:15px; margin-bottom:16px}
.svc .go{color:var(--brand); font-weight:600; font-size:14px}

/* ---------- app store ---------- */
.toolbar{display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin:22px 0 6px}
.search{
  flex:1; min-width:240px; display:flex; align-items:center; gap:10px;
  background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:0 16px;
}
.search input{
  flex:1; background:none; border:0; outline:0; color:var(--text);
  font:inherit; padding:14px 0;
}
.search input::placeholder{color:var(--muted2)}
.chips{display:flex; gap:8px; flex-wrap:wrap; margin:14px 0 26px}
.chip{
  padding:7px 15px; border-radius:999px; border:1px solid var(--line);
  background:var(--surface); color:var(--muted); font-size:14px; cursor:pointer; transition:.15s;
}
.chip:hover{color:var(--text); border-color:var(--line2)}
.chip.on{background:var(--grad); border-color:transparent; color:#fff; font-weight:600}
.appgrid{display:grid; gap:16px; grid-template-columns:repeat(4,1fr)}
@media(max-width:1000px){.appgrid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:760px){.appgrid{grid-template-columns:repeat(2,1fr)}}
.appcard{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  padding:18px; display:flex; flex-direction:column; gap:10px; transition:.2s;
}
.appcard:hover{border-color:var(--line2); transform:translateY(-2px); box-shadow:var(--shadow)}
.appcard .ico{
  width:60px;height:60px;border-radius:15px;background:#1b1b28; border:1px solid var(--line2);
  display:grid;place-items:center; overflow:hidden;
}
.appcard .ico img{width:44px;height:44px;object-fit:contain}
.appcard h3{font-size:16px; margin:2px 0 0}
.appcard .dev{font-size:13px; color:var(--muted2); margin-top:-6px}
.appcard .desc{font-size:13.5px; color:var(--muted); line-height:1.6; display:-webkit-box;
  -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:42px}
.appcard .foot{display:flex; align-items:center; gap:8px; margin-top:auto; padding-top:4px}
.badge{
  font-size:11.5px; padding:3px 9px; border-radius:999px; background:var(--surface2);
  color:var(--muted); border:1px solid var(--line2); white-space:nowrap;
}
.badge.free{color:var(--ok); border-color:rgba(52,211,153,.35); background:rgba(52,211,153,.08)}
.badge.atom{color:#c7b3ff; border-color:rgba(139,92,246,.4); background:rgba(139,92,246,.12)}

/* ---------- app detail ---------- */
.crumbs{font-size:13.5px; color:var(--muted2); margin:22px 0 18px}
.crumbs a:hover{color:var(--brand)}
.apphead{display:flex; gap:22px; align-items:center; flex-wrap:wrap; padding-bottom:24px; border-bottom:1px solid var(--line)}
.apphead .ico{
  width:96px;height:96px;border-radius:24px;background:#1b1b28;border:1px solid var(--line2);
  display:grid;place-items:center; overflow:hidden;
}
.apphead .ico img{width:70px;height:70px;object-fit:contain}
.apphead h1{font-size:30px}
.apphead .dev{color:var(--muted); font-size:15px; margin-top:2px}
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:9px;
  padding:13px 26px; border-radius:14px; font-weight:700; font-size:15px;
  background:var(--grad); color:#fff; border:0; cursor:pointer; transition:.2s;
  box-shadow:0 10px 26px rgba(91,140,255,.28);
}
.btn:hover{filter:brightness(1.08); transform:translateY(-1px)}
.btn.ghost{background:var(--surface2); color:var(--text); border:1px solid var(--line2); box-shadow:none}
.btn:disabled{opacity:.5; cursor:not-allowed; transform:none}
.actions{margin-inline-start:auto; display:flex; gap:10px; flex-wrap:wrap}
.detail{display:grid; grid-template-columns:1fr 320px; gap:26px; padding:26px 0 60px}
@media(max-width:860px){.detail{grid-template-columns:1fr}}
.panel{background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:22px}
.panel h3{font-size:16px; margin-bottom:14px; color:var(--muted); font-weight:600}
.kv{display:flex; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px dashed var(--line); font-size:14.5px}
.kv:last-child{border:0}
.kv .k{color:var(--muted2)}
.kv .v{color:var(--text); text-align:left}
.prose p{color:#cdd2e2; font-size:15.5px}
.prose h2{font-size:19px; margin:22px 0 10px}
ul.feats{list-style:none; padding:0; margin:0 0 8px}
ul.feats li{padding:7px 0; color:#cdd2e2; font-size:15px}
ul.feats li::before{content:"✓"; color:var(--ok); margin-inline-end:10px; font-weight:700}

/* ---------- video ---------- */
.vgrid{display:grid; gap:20px; grid-template-columns:repeat(3,1fr)}
@media(max-width:900px){.vgrid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:620px){.vgrid{grid-template-columns:1fr}}
.vcard{background:transparent; border:0; border-radius:0; padding:0; display:flex; flex-direction:column; gap:11px}
.vthumb{
  position:relative; border-radius:16px; overflow:hidden; background:#14141f;
  aspect-ratio:16/9; border:1px solid var(--line);
}
.vthumb img{width:100%;height:100%;object-fit:cover; transition:.35s}
.vcard:hover .vthumb img{transform:scale(1.04)}
.vthumb .dur{
  position:absolute; bottom:8px; left:8px; background:rgba(0,0,0,.82); color:#fff;
  font-size:12px; padding:2px 7px; border-radius:6px; font-variant-numeric:tabular-nums;
}
.vcard h3{font-size:15.5px; line-height:1.5; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden}
.vmeta{font-size:13px; color:var(--muted2)}
.player{background:#000; border-radius:18px; overflow:hidden; border:1px solid var(--line)}
.player video{width:100%; display:block; aspect-ratio:16/9; background:#000}
.watch{display:grid; grid-template-columns:1fr 340px; gap:26px; padding:24px 0 60px}
@media(max-width:960px){.watch{grid-template-columns:1fr}}
.chrow{display:flex; align-items:center; gap:12px; margin:18px 0}
.avatar{
  width:44px;height:44px;border-radius:50%; background:var(--grad); display:grid;place-items:center;
  font-weight:800; color:#fff; font-size:16px; flex:none;
}
.chrow .name{font-weight:700}
.chrow .sub{font-size:13px; color:var(--muted2)}
.vdesc{background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:16px 18px; color:#cdd2e2; font-size:14.5px; white-space:pre-wrap}

/* ---------- upload ---------- */
.form{max-width:640px; margin:0 auto; display:flex; flex-direction:column; gap:16px}
.field{display:flex; flex-direction:column; gap:7px}
.field label{font-size:14px; color:var(--muted)}
.field input,.field textarea,.field select{
  background:var(--surface); border:1px solid var(--line); border-radius:12px;
  padding:13px 15px; color:var(--text); font:inherit; outline:0; width:100%;
}
.field input:focus,.field textarea:focus,.field select:focus{border-color:var(--brand)}
.field textarea{min-height:110px; resize:vertical}
.drop{
  border:2px dashed var(--line2); border-radius:16px; padding:30px; text-align:center;
  color:var(--muted); cursor:pointer; transition:.2s; background:var(--surface);
}
.drop:hover,.drop.over{border-color:var(--brand); color:var(--text); background:rgba(91,140,255,.06)}
.progress{height:9px; background:var(--surface2); border-radius:99px; overflow:hidden; display:none}
.progress.on{display:block}
.progress .bar{height:100%; width:0; background:var(--grad); transition:width .25s}
.note{font-size:13.5px; color:var(--muted2); background:var(--surface); border:1px solid var(--line);
  border-radius:12px; padding:12px 15px}

/* ---------- footer ---------- */
footer.site{border-top:1px solid var(--line); margin-top:60px; padding:34px 0; color:var(--muted2); font-size:14px}
footer .row{display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; align-items:center}
footer a:hover{color:var(--text)}
.empty{padding:60px 0; text-align:center; color:var(--muted2)}
