/* ===== Reset & base ===== */
*{ box-sizing:border-box; margin:0; padding:0; }
:root{ --topbar-height:56px; --tg-blue:#229ED9; --brand:#1a73e8; }

html, body{
  height:100%;
  font-family: Arial, Helvetica, sans-serif;

  /* background: 1) pattern, 2) gradient */
  background-image: url('pattern.png'), linear-gradient(to bottom, #a5d6a7, #fff59d);
  background-repeat: repeat, no-repeat;
  background-size: 520px auto, cover; /* tweak 480–600px if needed */
  background-position: top left, center;
  background-attachment: fixed, fixed;

  display:block; /* not flex */
}

/* ===== Top bar (Telegram-like) ===== */
.topbar{
  position:fixed; inset:0 0 auto 0; height:var(--topbar-height);
  background: linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.92) 100%);
  display:flex; align-items:center; justify-content:space-between;
  padding:0 16px; gap:16px;
  border-bottom:1px solid rgba(0,0,0,.06);
  z-index:10;
}

/* Левая часть — логотип и надпись */
.topbar__brand{ display:flex; align-items:center; gap:10px; text-decoration:none; }
.tg-icon{ display:inline-flex; width:34px; height:34px; }
.tg-icon svg{ width:34px; height:34px; display:block; }
.tg-title{ font-size:16px; font-weight:700; color:#2b2b2b; line-height:1; }

/* Правая кнопка Download — как у Telegram */
.topbar__btn{
  display:inline-flex; align-items:center; justify-content:center;
  height:32px; padding:0 14px;
  background:var(--tg-blue);
  color:#fff; font-weight:700; font-size:12px; letter-spacing:.2px;
  border-radius:18px; text-decoration:none; text-transform:uppercase;
  box-shadow:0 1px 0 rgba(0,0,0,.04);
  transition:filter .15s ease;
}
.topbar__btn:hover{ filter:brightness(.96); }
.topbar__btn:active{ filter:brightness(.9); }

/* ===== Page area under top bar ===== */
.page{
  min-height:100dvh;
  padding-top: calc(var(--topbar-height) + clamp(40px, 10vh, 96px));
  padding-left:16px; padding-right:16px;
  display:flex; justify-content:center; align-items:flex-start;
}

/* ===== Channel card ===== */
.card{
  width:360px; background:#fff; border-radius:16px;
  padding:32px; text-align:center; color:#111;
  box-shadow:0 4px 12px rgba(0,0,0,.12);
}
.avatar{
  width:120px; height:120px; margin:0 auto 16px; border-radius:50%;
  background-image:url('photo.jpg'); /* put photo.jpg nearby */
  background-size:cover; background-position:50% 28%;
}

/* Texts & links */
h1{ font-size:24px; margin-bottom:8px; }
.subscribers{ color:#555; margin-bottom:12px; }
.owner{ margin-bottom:16px; }
a{ color:var(--brand); text-decoration:none; }

/* Button inside the card */
.btn{
  display:inline-block; margin-top:16px; padding:12px 24px;
  background:var(--brand); color:#fff; border-radius:24px;
  font-weight:bold; text-transform:uppercase; transition:opacity .2s;
}
.btn:hover{ opacity:.9; }

/* ===== Responsive ===== */
@media (max-width:768px){
  :root{ --topbar-height:52px; }
  .page{ padding-top: calc(var(--topbar-height) + 24px); }
  .card{ width:min(92vw, 420px); padding:24px; }
  h1{ font-size:22px; }
}
