/* style.css */
/* базовые переменные */
:root{
  --brand: #ba2865;
  --ink: #ffffff;
  --glass-bg: rgba(255,255,255,0.12);
  --glass-br: rgba(255,255,255,0.35);
  --glass-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans";
  color: var(--ink);
  background: var(--brand);
  text-align: center;
}

/* layout */
.section{ padding: 24px 16px 48px; max-width: 1000px; margin: 0 auto; }
.section-title{ font-size: clamp(24px, 4vw, 36px); margin: 8px 0 12px; }
.section-text{ opacity: .95; margin: 0 auto 18px; max-width: 680px; line-height: 1.6; }

/* стеклянные карточки */
.glass-card{
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 18px;
  box-shadow: var(--glass-shadow);
  padding: 16px;
  margin: 16px auto;
  text-align: left;
}

/* сетки */
.auth-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.auth-col h3{ margin: 0 0 8px; }

.posts-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.post{
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
}
.post h3{ margin: 0 0 6px; font-size: 18px; }
.post .meta{ opacity: .75; font-size: 12px; margin-bottom: 8px; }

/* кнопки стеклянные */
.btn-glass{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 14px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .2px;
  background: linear-gradient( to bottom right, rgba(255,255,255,.16), rgba(255,255,255,.08) );
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 8px 24px rgba(0,0,0,.27);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, opacity .3s ease;
  cursor: pointer;
  user-select: none;
}
.btn-glass:hover{ transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.33); }
.btn-glass.wide{ width: 100%; }
.row{ display: flex; gap: 10px; }
.flex-1{ flex: 1; }

input, textarea{
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  border: none;
  border-radius: 14px;
  background: rgba(255,255,255,.18);
  color: #fff;
  outline: none;
}
textarea{ resize: vertical; }

.muted{ opacity: .8; }
.small{ font-size: 12px; }
.hidden{ display: none !important; }

/* адаптив: ПК */
@media (min-width: 768px){
  .auth-grid{ grid-template-columns: 1fr 1fr; }
  .posts-grid{ grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px){
  .posts-grid{ grid-template-columns: 1fr 1fr 1fr; }
}

/* ====== spinner в кнопке (анимация загрузки) ====== */
.btn-glass.loading{
  pointer-events: none;
  opacity: .85;
}
.btn-glass.loading .btn-label{
  visibility: hidden; /* прячем текст, оставляя размеры */
}
.btn-glass.loading::after{
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.7);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin{
  to{ transform: rotate(360deg); }
}

/* шапка ленты */
.posts-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}