/* Wardogs News — сайт-лента. Цвета и шрифты — как в ленте для стрима (Media Pack/Stream/Telegram Feed). */
@font-face { font-family: "Golos"; font-weight: 500; font-display: swap; src: url("fonts/GolosText-Medium.ttf"); }
@font-face { font-family: "Golos"; font-weight: 700; font-display: swap; src: url("fonts/GolosText-Bold.ttf"); }
@font-face { font-family: "Golos"; font-weight: 800; font-display: swap; src: url("fonts/GolosText-ExtraBold.ttf"); }
@font-face { font-family: "AeroportMono"; font-display: swap; src: url("fonts/AeroportMono.otf"); }

:root {
  --red: #ff0035;
  --red-soft: #ff3d63;
  --bg: #050002;
  --bubble: rgba(14, 8, 11, 0.94);
  --bubble-line: rgba(255, 0, 53, 0.22);
  --ink: #f4f0f1;
  --muted: rgba(244, 240, 241, 0.5);
  --bar-h: 64px;
  --cta-h: 52px;
  --mono: "AeroportMono", ui-monospace, monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-padding-top: calc(var(--bar-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 500 16px/1.45 "Golos", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); letter-spacing: 0.08em; }

#bg {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0;
  image-rendering: pixelated; pointer-events: none;
}

/* ---------- шапка ---------- */
.bar {
  position: sticky; top: 0; z-index: 10;
  height: var(--bar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 max(16px, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(5, 0, 2, 0.97), rgba(5, 0, 2, 0.86));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 0, 53, 0.35);
}
.bar::after { /* тонкая светящаяся линия */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  animation: sweep 6s ease-in-out infinite;
}
@keyframes sweep { 0%, 100% { transform: scaleX(0.25); opacity: 0.3; } 50% { transform: scaleX(1); opacity: 1; } }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none;
  box-shadow: 0 0 0 2px var(--red), 0 0 18px rgba(255, 0, 53, 0.45);
}
.who { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.name {
  font-weight: 800; font-size: 18px; letter-spacing: 0.01em;
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.check { width: 16px; height: 16px; flex: none; }
.sub { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--red); margin-top: 3px; }
.join {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px;
  background: var(--red); color: #fff; border-radius: 10px;
  font-weight: 700; font-size: 15px;
  box-shadow: 0 0 22px rgba(255, 0, 53, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.join svg { width: 18px; height: 18px; }
.join:hover { box-shadow: 0 0 30px rgba(255, 0, 53, 0.6); }
.join:active { transform: scale(0.97); }

/* ---------- раскладка ---------- */
.page {
  position: relative; z-index: 1;
  max-width: 680px; margin: 0 auto;
  padding: 0 16px calc(var(--cta-h) + 24px + env(safe-area-inset-bottom));
}
@media (min-width: 1100px) {
  .page {
    max-width: 1060px;
    display: grid; grid-template-columns: 320px minmax(0, 680px); gap: 40px; align-items: start;
  }
  .about { position: sticky; top: calc(var(--bar-h) + 24px); }
}

/* карточка канала: на компьютере — слева, на телефоне — в самом начале ленты */
.about { padding-top: 24px; }
.card {
  background: var(--bubble); border: 1px solid var(--bubble-line); border-radius: 16px;
  padding: 24px 20px 20px; text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.big-avatar {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 3px var(--red), 0 0 30px rgba(255, 0, 53, 0.45);
}
.card h1 { font-weight: 800; font-size: 24px; letter-spacing: 0.01em; margin-top: 14px; }
.card h1 .mono {
  display: block; font-weight: 400; font-size: 12px; color: var(--red); margin-top: 4px; text-transform: uppercase;
}
.desc { margin-top: 14px; font-size: 15px; color: rgba(244, 240, 241, 0.82); overflow-wrap: anywhere; }
.desc a { color: var(--red-soft); }
/* кнопки соцсетей — в фирменных цветах площадок */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  margin-top: 18px; padding: 12px 14px; border-radius: 10px;
  color: #fff; font-weight: 700; font-size: 15px;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: scale(0.98); }
.btn.tg { background: #229ed9; box-shadow: 0 0 22px rgba(34, 158, 217, 0.35); }
.btn.yt { background: #ff0000; }
.btn.tt { background: #000; border: 1px solid rgba(255, 255, 255, 0.18); }
.links { display: flex; gap: 8px; margin-top: 8px; }
.links .btn { flex: 1; margin-top: 0; font-size: 14px; padding: 10px; }
.fan { margin-top: 16px; font-size: 12px; line-height: 1.5; color: var(--muted); }

/* ---------- лента ---------- */
.feed { padding-top: 8px; }
.start {
  text-align: center; font-size: 11px; color: var(--muted); padding: 24px 0 4px;
}
.day { display: flex; justify-content: center; padding: 20px 0 4px; position: sticky; top: calc(var(--bar-h) + 8px); z-index: 2; }
.day span {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(40, 4, 14, 0.9); border: 1px solid rgba(255, 0, 53, 0.3);
  padding: 5px 12px 4px; border-radius: 20px;
}

.post {
  position: relative;
  margin: 12px 0 0 8px;
  background: var(--bubble);
  border: 1px solid var(--bubble-line);
  border-radius: 16px 16px 16px 5px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  transition: border-color 1.2s ease;
}
.post::before { /* хвостик пузыря, как в Telegram */
  content: ""; position: absolute; left: -8px; bottom: -1px;
  width: 9px; height: 14px;
  background: var(--bubble);
  border-left: 1px solid var(--bubble-line);
  border-bottom: 1px solid var(--bubble-line);
  border-bottom-left-radius: 10px 14px;
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}
.post:target, .post.lit { border-color: rgba(255, 0, 53, 0.9); }

/* появление при прокрутке (только с JS: без него всё видно сразу) */
.js .post { opacity: 0; transform: translateY(26px) scale(0.975); transform-origin: 0 100%;
  transition: opacity 0.5s ease, transform 0.7s cubic-bezier(0.2, 0.9, 0.25, 1.1), border-color 1.2s ease; }
.js .post.in { opacity: 1; transform: none; }
.clip { border-radius: inherit; overflow: hidden; position: relative; }
.scan { /* красная полоса проходит по посту при появлении */
  position: absolute; left: 0; right: 0; top: 0; height: 22%;
  background: linear-gradient(180deg, transparent, rgba(255, 0, 53, 0.2) 70%, rgba(255, 0, 53, 0.5));
  mix-blend-mode: screen; pointer-events: none;
  transform: translateY(-110%); opacity: 0;
}
.js .post.in .scan { animation: scan 1.1s 0.1s cubic-bezier(0.5, 0, 0.3, 1) both; }
@keyframes scan {
  0% { transform: translateY(-110%); opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateY(480%); opacity: 0; }
}

/* медиа: одно фото или альбом */
.media { display: grid; gap: 2px; grid-template-columns: 1fr 1fr; background: #000; }
.media .m { position: relative; display: block; overflow: hidden; background: #120609; aspect-ratio: 1; }
.media .m img, .media .m video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media .m[data-zoom] { cursor: zoom-in; }
.media.n1 .m { grid-column: span 2; }
.media.n3 .m:first-child, .media.odd .m:first-child { grid-column: span 2; aspect-ratio: 16 / 10; }
.media .tag {
  position: absolute; left: 8px; top: 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em;
  background: rgba(0, 0, 0, 0.6); padding: 3px 6px 2px; border-radius: 5px;
}
.media .out .watch {
  position: absolute; inset: auto 0 0 0; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px; background: linear-gradient(0deg, rgba(5, 0, 2, 0.9), transparent);
  font-weight: 700; font-size: 15px;
}
.media .out .play {
  width: 34px; height: 34px; padding: 7px 6px 7px 8px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 20px rgba(255, 0, 53, 0.5);
}

/* текст поста */
.text { padding: 12px 16px 2px; font-size: 16px; line-height: 1.45; overflow-wrap: anywhere; }
.text b { font-weight: 700; }
.text a { color: var(--red-soft); }
.text a:hover { text-decoration: underline; }
.text img.e { height: 1.25em; width: auto; vertical-align: -0.28em; margin: 0; }
.text blockquote {
  margin: 0.35em 0; padding: 0.35em 0.7em 0.35em 0.75em;
  background: rgba(255, 0, 53, 0.09); border-left: 3px solid var(--red);
  border-radius: 0.25em 0.5em 0.5em 0.25em;
}
.text code, .text pre {
  font-family: var(--mono); font-size: 0.88em;
  background: rgba(255, 255, 255, 0.06); border-radius: 0.3em; padding: 0 0.25em;
}
.text pre { display: block; padding: 0.5em 0.7em; white-space: pre-wrap; margin: 0.3em 0; }
.text .spoiler { filter: blur(0.35em); cursor: pointer; transition: filter 0.3s ease; }
.text .spoiler.shown { filter: none; }

.foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 14px 10px 16px;
}
.open {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--red); padding: 4px 0; white-space: nowrap;
}
.open::after { content: " ›"; }
.open:hover { text-shadow: 0 0 12px rgba(255, 0, 53, 0.6); }
.meta {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--muted);
}
.views { display: inline-flex; align-items: center; gap: 4px; }
.eye { width: 14px; height: 14px; }
.time:hover { color: var(--ink); }

.note { text-align: center; font-size: 12px; color: var(--muted); padding: 28px 8px 0; }
.note a { color: var(--red-soft); }

/* ---------- нижняя плашка ---------- */
.cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  min-height: calc(var(--cta-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(0deg, rgba(5, 0, 2, 0.97), rgba(5, 0, 2, 0.86));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 0, 53, 0.35);
  font-family: var(--mono); font-size: 15px; letter-spacing: 0.08em; color: var(--red);
  text-shadow: 0 0 16px rgba(255, 0, 53, 0.45);
}
.cta svg { width: 18px; height: 18px; flex: none; }
.caret {
  display: inline-block; width: 0.6em; height: 0.95em; margin-left: 0.1em;
  vertical-align: -0.1em; background: var(--red);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* кнопка «вниз, к последней новости» */
.down {
  position: fixed; right: max(16px, env(safe-area-inset-right)); z-index: 9;
  bottom: calc(var(--cta-h) + 16px + env(safe-area-inset-bottom));
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(255, 0, 53, 0.5); background: rgba(14, 8, 11, 0.95); color: var(--ink);
  display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.down svg { width: 26px; height: 26px; }
.down.on { opacity: 1; transform: none; pointer-events: auto; }
.down:hover { border-color: var(--red); }

/* просмотр фото */
.zoom {
  position: fixed; inset: 0; z-index: 20;
  display: grid; place-items: center;
  background: rgba(5, 0, 2, 0.94);
}
.zoom[hidden] { display: none; }
.zoom img { max-width: 100vw; max-height: 100vh; object-fit: contain; }
.zoom button {
  position: absolute; border: 0; background: rgba(255, 0, 53, 0.16); color: #fff;
  width: 48px; height: 48px; border-radius: 50%; font-size: 30px; line-height: 1; cursor: pointer;
}
.zoom button:hover { background: var(--red); }
.zoom .close { top: 16px; right: 16px; }
.zoom .prev { left: 16px; top: 50%; margin-top: -24px; }
.zoom .next { right: 16px; top: 50%; margin-top: -24px; }
.zoom.single .prev, .zoom.single .next { display: none; }

@media (max-width: 480px) {
  :root { --bar-h: 58px; }
  .avatar { width: 38px; height: 38px; }
  .name { font-size: 16px; }
  .join { height: 36px; padding: 0 12px; font-size: 14px; }
  .join svg { display: none; }
  .text { font-size: 15.5px; }
  .foot { padding-left: 14px; padding-right: 12px; }
  .meta { gap: 8px; }
  .time .y { display: none; }
}
@media (max-width: 360px) { .sub { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .js .post { transition: none; opacity: 1; transform: none; }
  .js .post.in .scan, .bar::after, .caret { animation: none; }
}
