/* Blog layout layer on top of the provided cyber design.
   Keeps X-like columns: left nav / center feed / right widgets.
*/

:root{
  --max: 1180px;
  --radius: 18px;
  --line: rgba(0,243,255,0.18);
  --panel: rgba(20,20,30,0.55);
  --panel-strong: rgba(20,20,30,0.70);
}

/* Make sure content sits above overlays */
header, main, footer { position: relative; z-index: 20; }

/* Make room for fixed mobile bottom nav */
body{ overflow-x:hidden; }

/* Prevent accidental horizontal scroll on small screens */
.center, .panel{ min-width: 0; }

@media (max-width: 1020px){
  body{ padding-bottom: 92px; }
}

/* On blog/feed pages we do NOT want the large character image behind posts.
   Only the small post avatar should represent Nova. */
.nova-container{ display:none !important; }

/* About page hero */
.about-hero{
  display:grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  align-items: center;
}
@media (max-width: 520px){
  .about-hero{ grid-template-columns: 1fr; }
}
.about-avatar{
  width: 180px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 26px;
  padding: 2px;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  box-shadow: 0 0 28px rgba(0,243,255,0.10);
}
.about-avatar img{
  width:100%;
  height:100%;
  border-radius: 24px;
  object-fit: cover;
  display:block;
  border: 2px solid #000;
}
.about-meta h1{ margin:0 0 8px 0; }
.about-meta p{ margin:0; color: var(--text-dim); line-height:1.7; }

/* Override fixed landing header from template */
header{ position: sticky; top:0; padding: 0; background: rgba(2,0,5,0.72); }
header nav{ max-width: var(--max); margin: 0 auto; padding: 14px 16px; }

/* active link highlight in top menu */
.nav-links a.active{
  color: #fff;
  border-bottom: 2px solid rgba(0,243,255,0.55);
  padding-bottom: 2px;
}


/* X-like 3-column grid */
.layout{
  max-width: var(--max);
  margin: 18px auto 26px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 260px 1fr 320px;
  gap: 14px;
}
@media (max-width: 1020px){
  .layout{ grid-template-columns: 1fr; }
  .left,.right{ display:none; }
}

/* Extra mobile polish */
@media (max-width: 520px){
  header nav{ padding: 12px 12px; }
  .layout{ padding: 0 10px; margin-top: 12px; }
  .profile{ flex-direction: row; gap: 12px; }
  .post{ padding: 12px 12px; }
  .post-head .avatar-mini{ width: 36px; height: 36px; }
  .more-btn{ width: 100%; }
}

/* Fixed bottom nav on mobile */
.mobile-nav{
  display:none;
}
@media (max-width: 1020px){
  .mobile-nav{
    display:flex;
    position: fixed;
    left: 0; right: 0; bottom: 14px;
    z-index: 999;
    padding: 0 12px;
    justify-content: center;
    pointer-events: none; /* inner handles clicks */
  }
  .mobile-nav .inner{
    pointer-events: auto;
    width: 100%;
    max-width: 560px;
    display:grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    padding: 10px;
    border-radius: 22px;
    background: rgba(2,0,5,0.86);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(0,243,255,0.22);
    box-shadow: 0 10px 30px rgba(0,0,0,0.55), 0 0 18px rgba(0,243,255,0.08);
  }
  @media (max-width: 420px){
    .mobile-nav .inner{ grid-template-columns: repeat(3, 1fr); }
  }
  .mobile-nav a{
    display:flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 9px 8px;
    border-radius: 16px;
    border: 1px solid rgba(0,243,255,0.10);
    color: rgba(255,255,255,0.92);
    text-decoration:none;
    font-size: 12px;
    line-height: 1.1;
    background: rgba(0,243,255,0.03);
    transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
  }
  .mobile-nav a:hover{
    border-color: rgba(188,19,254,0.35);
    background: rgba(188,19,254,0.10);
    transform: translateY(-1px);
  }
  .mobile-nav a.active{
    border-color: rgba(0,243,255,0.35);
    background: rgba(0,243,255,0.10);
    color: #fff;
  }
}


.panel{
  background: rgba(0,0,0,0.82);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  box-shadow: 0 0 30px rgba(0,243,255,0.05);
}

.left .nav-col{ padding: 12px; }
.left a{
  display:flex; align-items:center; gap:10px;
  padding: 10px 12px;
  border: 1px solid transparent;
}
.left a:hover{ border-color: rgba(188,19,254,0.25); background: rgba(188,19,254,0.06); }
.left .hint{ color: var(--text-dim); font-size: 12px; padding: 10px 12px; }

/* Profile header */
.profile{
  padding: 14px 16px;
  display:flex; gap:14px; align-items:flex-start;
  background: var(--panel-strong);
}
.slogan{
  display:inline-block;
  font-family: 'Orbitron', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 12px;
  color: rgba(0,243,255,0.9);
  margin-bottom: 6px;
}

.avatar-sq{
  width: 52px; height: 52px; border-radius: 16px;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  padding: 2px;
  flex: 0 0 auto;
}
.avatar-sq img{ width:100%; height:100%; border-radius: 14px; object-fit: cover; border: 2px solid #000; }

.profile h1{ font-size: 18px; margin: 0; }
.profile p{ margin: 6px 0 0 0; color: var(--text-dim); max-width: 58ch; }
.badge-lite{
  display:inline-flex; align-items:center;
  padding: 3px 8px;
  border: 1px solid rgba(0,243,255,0.25);
  color: var(--primary-color);
  font-size: 12px;
  margin-left: 8px;
}

/* Feed posts */
.feed{ overflow:hidden; }
.post{
  padding: 14px 16px;
  border-top: 1px solid rgba(0,243,255,0.12);
}
.post:first-child{ border-top:none; }
.post-head{ display:flex; gap:10px; align-items:center; }
.post-head .avatar-mini{
  width:40px; height:40px; border-radius: 14px;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  padding: 2px;
  border:1px solid rgba(0,243,255,0.18);
  overflow:hidden;
}
.post-head .avatar-mini img{
  width:100%; height:100%; border-radius: 12px;
  object-fit: cover;
  border: 2px solid #000;
  display:block;
}
.post-meta{ display:flex; flex-direction:column; gap:2px; }
.post-meta .name{ font-weight:700; }
.post-meta .time{ color: var(--text-dim); font-size: 12px; }
.post-body{ margin-top: 10px; white-space: pre-wrap; overflow-wrap:anywhere; }
.post-body b a{ color: #fff; }

/* Covers / images should never overflow */
.post-cover{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  margin: 10px 0 10px 0;
  max-width: 100%;
}
.post-body img{ max-width:100%; height:auto; }

.dots{ color: var(--text-dim); }
.more-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,243,255,0.25);
  background: rgba(0,243,255,0.06);
  color: #fff;
  text-decoration:none;
  font-size: 13px;
  font-weight: 700;
}
.more-link:hover{
  border-color: rgba(188,19,254,0.35);
  background: rgba(188,19,254,0.10);
}

/* Responsive embeds (YouTube) */
.video-embed{
  margin-top: 12px;
  border: 1px solid rgba(0,243,255,0.18);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0,0,0,0.55);
  box-shadow: 0 0 24px rgba(0,243,255,0.06);
}
.video-embed .ratio{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}
.video-embed iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Visible "Подробнее" button */
.more-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,243,255,0.25);
  background: rgba(0,243,255,0.06);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}
.more-btn:hover{
  border-color: rgba(188,19,254,0.35);
  background: rgba(188,19,254,0.10);
}

/* News badge */
.pill{
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(0,243,255,0.22);
  color: var(--primary-color);
}
.pill.news{
  border-color: rgba(188,19,254,0.28);
  color: rgba(188,19,254,0.95);
  background: rgba(188,19,254,0.08);
}

.post-actions{ margin-top: 10px; display:flex; gap: 14px; color: var(--text-dim); font-size: 13px; }

.tag{
  display:inline-block;
  margin: 8px 6px 0 0;
  padding: 4px 10px;
  border: 1px solid rgba(0,243,255,0.16);
  color: var(--text-dim);
  font-size: 12px;
}

.pinned{ position: relative; }
.pinned:before{
  content:'Закреплено';
  position:absolute; top: 12px; right: 14px;
  font-size: 12px;
  color: var(--primary-color);
  border: 1px solid rgba(0,243,255,0.25);
  padding: 4px 10px;
  background: rgba(0,243,255,0.06);
}

.right .box{ padding: 14px 16px; }
.right h2{ margin:0 0 8px 0; font-size: 14px; }
.right p{ margin:0; color: var(--text-dim); font-size: 13px; }
.kv{ margin-top: 10px; display:grid; gap: 8px; }
.kv div{ padding: 10px 12px; border: 1px solid rgba(0,243,255,0.12); color: var(--text-dim); }

.footer-small{ text-align:center; color: var(--text-dim); padding: 18px 0 26px; }

/* --- Carousel (feed + post pages) --- */
.carousel{
  margin-top: 12px;
  position: relative;
  border: 1px solid rgba(0,243,255,0.18);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0,0,0,0.55);
  box-shadow: 0 0 24px rgba(0,243,255,0.06);
}
.carousel-track{
  display: flex;
  transition: transform 260ms ease;
  will-change: transform;
}
.carousel-slide{
  min-width: 100%;
  position: relative;
}
.carousel-slide img{
  width: 100%;
  height: auto;
  display: block;
}
.carousel-cap{
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.92);
  background: linear-gradient(to top, rgba(0,0,0,0.78), rgba(0,0,0,0));
}
.carousel-btn{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(0,243,255,0.25);
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.carousel-btn:hover{ border-color: rgba(188,19,254,0.35); background: rgba(188,19,254,0.10); }
.carousel-btn.prev{ left: 10px; }
.carousel-btn.next{ right: 10px; }
.carousel-dots{
  position: absolute;
  left: 0; right: 0; bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}
.carousel-dot{
  pointer-events: auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.15);
  cursor: pointer;
}
.carousel-dot.active{
  background: rgba(0,243,255,0.65);
  border-color: rgba(0,243,255,0.85);
}
@media (max-width: 520px){
  .carousel-btn{ width: 36px; height: 36px; }
}

/* Infinite scroll feed */
.feed-load-sentinel{
  width: 100%;
  height: 1px;
}
.feed-load-status{
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
  padding: 14px 10px 16px;
  border-top: 1px solid rgba(0,243,255,0.10);
}
.feed-load-status.done{
  opacity: 0.85;
}
.feed-load-more-btn{
  display: block;
  margin: 0 auto 16px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0,243,255,0.25);
  background: rgba(0,243,255,0.06);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.feed-load-more-btn:hover{
  border-color: rgba(188,19,254,0.35);
  background: rgba(188,19,254,0.10);
}
