/* ══════════════════════════════════════════════════════
   MrMoalemAI — تم تلگرام (Dark / Night)
   ══════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }

:root{
  --bg:        #0b131b;
  --bg-app:    #17212b;
  --card:      #1c2733;
  --card-2:    #22303e;
  --line:      rgba(255,255,255,.06);
  --text:      #e9f1f7;
  --muted:     #7f909c;
  --accent:    #64b5ef;
  --blue:      #2aabee;
  --blue-2:    #229ed9;
  --green:     #4dcd5e;
  --radius:    18px;
}

html { -webkit-text-size-adjust: 100%; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
  font-size: 15px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; display: block; }
p  { margin: 0; }

/* ── قالب کلی (ستون موبایلی وسط صفحه) ────────────────── */
.app{
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-app);
  background-image: radial-gradient(circle at 20% 0%, rgba(42,171,238,.08), transparent 55%);
  box-shadow: 0 0 90px rgba(0,0,0,.65);
  overflow: hidden;
  padding-bottom: 28px;
}

/* ── نوار بالای تلگرامی ──────────────────────────────── */
.topbar{
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: rgba(23,33,43,.86);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar img{
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--blue-2);
}
.topbar .t{ display: flex; flex-direction: column; line-height: 1.4; }
.topbar .t b{ font-size: 14px; font-weight: 600; }
.topbar .t span{ font-size: 11.5px; color: var(--muted); }
.verified{
  display: inline-block;
  font-size: 10px;
  color: #fff;
  background: var(--blue);
  width: 15px; height: 15px;
  border-radius: 50%;
  line-height: 15px;
  text-align: center;
  vertical-align: 1px;
}

/* ── هدر قهرمان ──────────────────────────────────────── */
.hero{
  position: relative;
  padding: 26px 18px 26px;
  text-align: center;
  background-color: var(--blue-2);
  /* اگر header.png نبود، فقط گرادیان نمایش داده می‌شود */
  background-image: url("header.png"), linear-gradient(135deg, #2aabee 0%, #229ed9 52%, #1a76a8 100%);
  background-size: cover;
  background-position: center;
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
}
.hero::after{
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(11,19,27,0) 0%, rgba(11,19,27,.22) 55%, rgba(23,33,43,.94) 100%);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }

.avatar-wrap{
  position: relative;
  width: 108px;
  margin: 0 auto 14px;
}
.avatar-wrap::after{
  content: "";
  position: absolute;
  left: 6px; bottom: 8px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: var(--green);
  border: 3px solid #1a76a8;
}
.avatar{
  width: 108px; height: 108px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--blue-2);
  border: 3px solid rgba(255,255,255,.92);
  box-shadow: 0 10px 26px rgba(0,0,0,.45);
}

.hero h1{
  margin: 0 0 2px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.2px;
}
.tagline{
  margin: 0 0 14px;
  font-size: 13px;
  color: rgba(255,255,255,.88);
}

.chips{
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.chip{
  font-size: 12px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,.17);
  border: 1px solid rgba(255,255,255,.18);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* ── سکشن‌ها ─────────────────────────────────────────── */
.section{ padding: 22px 14px 0; }
.section h2{
  margin: 0 6px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

/* ── لیست لینک‌ها (شبیه لیست چت تلگرام) ──────────────── */
.list{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.row{
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  color: inherit;
  border-bottom: 1px solid var(--line);
  transition: background .15s ease;
}
.row:last-child{ border-bottom: 0; }
.row:hover,
.row:active{ background: var(--card-2); }

.ico{
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex: none;
  font-size: 19px;
  font-weight: 700;
  color: #fff;
}
.ico-tg   { background: linear-gradient(135deg, #2aabee, #229ed9); }
.ico-bale { background: linear-gradient(135deg, #46b98a, #2e9e70); }
.ico-shad { background: linear-gradient(135deg, #5aa9f0, #3d7fd1); }

.row-txt{ display: flex; flex-direction: column; line-height: 1.5; min-width: 0; }
.row-txt b{ font-size: 14.5px; font-weight: 600; }
.row-txt small{
  font-size: 12.5px;
  color: var(--muted);
  direction: ltr;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chev{ margin-inline-start: auto; color: #4b5c68; flex: none; }

/* ── حباب‌های چت ─────────────────────────────────────── */
.bubbles{
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 14px;
}
.bubble{
  align-self: flex-start;         /* در RTL = سمت راست */
  max-width: 94%;
  padding: 11px 14px 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px 16px 5px 16px;  /* دُم در پایین-راست */
  box-shadow: 0 2px 10px rgba(0,0,0,.16);
}
.b-title{
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}
.b-text{
  font-size: 13.5px;
  line-height: 1.85;
  color: #b9c9d4;
}
.b-time{
  display: block;
  margin-top: 5px;
  font-size: 10.5px;
  color: #5d6f7c;
  text-align: left;
}

/* ── دکمهٔ اصلی ──────────────────────────────────────── */
.cta{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 24px 14px 0;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  box-shadow: 0 10px 26px rgba(34,158,217,.32);
  transition: transform .12s ease, box-shadow .12s ease;
}
.cta:hover{ box-shadow: 0 12px 30px rgba(34,158,217,.42); }
.cta:active{ transform: translateY(1px); }

/* ── فوتر ────────────────────────────────────────────── */
.footer{
  margin-top: 30px;
  padding: 20px 16px 10px;
  text-align: center;
  border-top: 1px solid var(--line);
}
.foot-brand{
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--accent);
  direction: ltr;
}
.foot-links{ font-size: 12.5px; margin-top: 2px; }
.foot-copy{
  font-size: 11.5px;
  color: #566875;
  margin-top: 8px;
}

/* ── ریسپانسیو / دسکتاپ ──────────────────────────────── */
@media (min-width: 560px){
  body{ padding: 0; }
  .app{ margin-top: 0; }
  .hero h1{ font-size: 23px; }
}

@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; }
}
