
:root{
  --bg:#f8fafc;
  --bg-soft:#ffffff;
  --card:#ffffff;
  --text:#1f2937;
  --muted:#6b7280;
  --brand1:#7C3AED;
  --brand2:#06B6D4;
  --accent:#22D3EE;
  --success:#10B981;
  --warning:#F59E0B;
  --danger:#EF4444;
  --shadow: 0 20px 60px rgba(0,0,0,.35);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: "Tajawal", Tahoma, Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 90% -10%, rgba(124,58,237,.25), transparent 60%),
    radial-gradient(1000px 600px at -10% 110%, rgba(6,182,212,.22), transparent 60%),
    var(--bg);
  color:var(--text);
  direction: rtl;
}

.container{
  width:100%;
  max-width:980px;
  margin:0 auto;
  padding:24px;
}

.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-top:8px;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
}
.brand img{width:42px;height:42px}
.brand h1{font-size:22px;margin:0; font-weight:800; letter-spacing:.3px}
.toggle{
  border:1px solid rgba(255,255,255,.08);
  background:linear-gradient(135deg, rgba(124,58,237,.18), rgba(6,182,212,.12));
  color:var(--text);
  padding:10px 14px;
  border-radius:12px;
  cursor:pointer;
}

.hero{
  margin:38px 0 22px;
  text-align:center;
}
.hero h2{
  font-size:36px;
  margin:0 0 10px;
  background: linear-gradient(90deg,var(--brand1),var(--brand2));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  font-weight:900;
}
.hero p{color:var(--muted); margin:0 auto; max-width:700px; line-height:1.8}

.panel{
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border:1px solid rgba(255,255,255,.12);
  border-radius:18px;
  padding:24px;
  box-shadow: var(--shadow);
}

.search{
  display:grid;
  grid-template-columns: 140px 1fr auto;
  gap:12px;
  align-items:center;
  margin-top:16px;
}
@media (max-width:680px){
  .search{grid-template-columns:1fr}
}

.select, .input, .btn{
  width:100%;
  border:1px solid rgba(255,255,255,.14);
  background: var(--bg-soft);
  color:var(--text);
  padding:14px 16px;
  border-radius:12px;
  outline:none;
}
.select{appearance:none; background-image: linear-gradient(45deg, transparent 50%, var(--text) 50%), linear-gradient(135deg, var(--text) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(1em + 2px), calc(100% - 15px) calc(1em + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;}

.btn{
  background: linear-gradient(90deg, var(--brand1), var(--brand2));
  border:none;
  font-weight:700;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .2s ease;
}
.btn:hover{transform: translateY(-2px); box-shadow:0 10px 30px rgba(124,58,237,.35), 0 6px 18px rgba(6,182,212,.25)}

.trust{
  display:flex; flex-wrap:wrap; gap:10px; margin-top:14px; color:var(--muted); font-size:14px;
}
.badge{
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  padding:8px 12px; border-radius:999px;
}

.section{margin-top:28px}

.ad-slot{
  height:90px;
  border:1px dashed rgba(255,255,255,.22);
  border-radius:14px;
  display:flex; align-items:center; justify-content:center;
  color:var(--muted);
  background: rgba(255,255,255,.03);
}

.result-card{
  margin-top:16px;
  display:none;
  gap:16px;
}
.card{
  flex:1;
  background: var(--card);
  border:1px solid rgba(255,255,255,.12);
  border-radius:16px;
  padding:18px;
  box-shadow: var(--shadow);
}
.card h3{margin:0 0 8px}
.meta{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.kpi{
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  padding:10px 12px; border-radius:12px; min-width:120px; text-align:center;
}
.progress{
  height:10px; width:100%; background:rgba(255,255,255,.08); border-radius:999px; overflow:hidden; margin-top:6px
}
.progress > span{display:block; height:100%; background:linear-gradient(90deg, var(--warning), var(--danger)); width:0%}

.skeleton{
  display:none;
  margin-top:16px;
  gap:16px;
}
.shimmer{
  height:140px;
  border-radius:16px;
  background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.14), rgba(255,255,255,.06));
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer{
  0%{background-position: 200% 0}
  100%{background-position: -200% 0}
}

.footer{
  margin:40px 0 20px;
  text-align:center;
  color:var(--muted);
}
.footer a{color:var(--text); opacity:.9; text-decoration:none; margin:0 8px}
.footer a:hover{text-decoration:underline}

.note{
  color:var(--muted); font-size:12px; margin-top:8px
}
