:root {
  --bg: #000000;
  --text: #fff;
  --muted: #b9bdd2;
  --border: #252525;
  --accent: #38e199;
  --tab-underline: #281e56;
}

/* Base */
* {
  box-sizing: border-box
}

html,
body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Montserrat', 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif
}

.content {
  flex: 1;
}

h1 {
  font-size: 35px;
  font-weight: 700;
  margin: 2rem;
  margin-top: 7rem;
}

h2 {
  font-size: 20px;
  font-weight: 500;
  margin: 1rem 0 .5rem
}

.info-box {
  background: #281e56;
  border: 0px solid #210761;
  border-radius: 16px;
  padding: 1.5rem;
  margin: 0rem;
  padding-top: 2rem;
  border-top-left-radius: 3rem;
  border-top-right-radius: 3rem;
  box-shadow: #9f89f6 0px 0px 130px 10px;
}

.section {
  display: none
}

.section.active {
  display: block
}

.divider {
  height: 2px;
  background: transparent;
  margin: 1.5rem;
}

.card {
  background: #101013;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .15)
}

/* Buttons */
.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 4px
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #0a0c18;
  border: none;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer
}





/* ====== Карточка поста (с крупной фотографией сверху) ====== */
.post-card {
  background: #3a3272;
  border: 1px solid #22223a;
  border-radius: 1.5rem;
  padding: 1rem;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-auto-rows: auto;
  gap: 10px;
  border: 1px solid #5f4a94;
}

.post-card .media {
  grid-column: 1 / -1;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 1.1rem;
  background: #3a3272 center/cover no-repeat;
  border: 1px solid rgba(255, 255, 255, .08);
}

.post-card .info {
  grid-column: 1 / 2;
  min-width: 0;
}

.post-card .title {
  font-size: 16px;
  font-weight: 500;
  margin: 2px 0 6px;
  color: #fff;
}

.post-card .date {
  font-size: 13px;
  color: var(--muted);
}

.post-card .platforms {
  grid-column: 2 / 3;
  align-self: start;
  display: flex;
  gap: 8px;
}

/* Иконки площадок справа (показываем где опубликовано) */
.plat {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 500;
  letter-spacing: .5px;
  font-size: 10px;
  user-select: none;
}

.plat.vk {
  background: #4a6cf7;
}

.plat.tg {
  background: #24a1de;
}

/* Плейсхолдеры других вкладок */
.placeholder-title {
  font-weight: 700;
  font-size: 16px
}

.placeholder-sub {
  color: #9aa0b4;
  margin-top: 6px;
  font-size: 13px
}






/* ================== LOADING / SKELETON ================== */
.skel {
  position: relative;
  overflow: hidden;
  background: #2f2a59;
  border-radius: 1.1rem;
  height: 180px;
  margin-bottom: 12px;
}

.skel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .08) 50%, rgba(255, 255, 255, 0) 100%);
  transform: translateX(-100%);
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* ================== MODAL FULLSCREEN ================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  background: rgba(0,0,0,0.6);       /* 1) затемнение фона */
  backdrop-filter: blur(5px);
  overscroll-behavior: contain;      /* не «пробивает» скролл наружу */
}

.modal.open { display: flex; align-items: flex-start; justify-content: center; }


.modal .wrap {
  position: absolute;
  bottom: 0;
  border-top-left-radius: 2rem;
  border-top-right-radius: 2rem;
  width: 100vw;
  height: 90vh;
  padding: 0rem 1.5rem 1.5rem 1.5rem;
  background: #281e56;
  overflow: auto;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
  overscroll-behavior: contain;
  border: 1px solid #5f4a94;
}

/* Контентные отступы уже внутри секций */
.modal .hero {
  aspect-ratio: 1/1;
  background: #3a3272 center/cover no-repeat;
  border-radius: 1rem;
  box-shadow: #9f89f6 0px 0px 130px 10px;
  margin-top: 1rem;
}

.modal .inner {
  padding-top: 1rem;
  margin-bottom: 1rem;
}

/* Титул и текст */
.modal .title {
  font-size: 18px;
  font-weight: 600;
  margin: 12px 0 8px;
  color: #fff;
}

.modal .text {
  white-space: pre-wrap;
  line-height: 1.5;
  color: #eaeaf4;
}

/* Кнопки — столбцом, на всю ширину */
.modal .actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.modal .btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #9f89f6;
  color: #0a0c18;
  border: none;
  padding: 20px 14px;
  border-radius: 12px;
  font-weight: 500;
  cursor: pointer;
  font-size: 14px;
}

.modal .btn.ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .25);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 1.5rem 0.5rem;
}

/* Кнопка закрыть (внутри контента) */
.modal-header .close {
  background: rgba(0, 0, 0, .15);
  border: 0px solid rgba(255,255,255,.25);
  color: #fff;
  padding: 8px 22px;
  border-radius: 10px;
  font-weight: 500;
  cursor: pointer;
  font-size: 14px;
}


.modal-header .status {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .6px;
  display: inline-block;
  padding: 6px 0px;
  border-radius: 999px;
  margin-top: 0rem;
  color: #b08fff;
  /*background: rgba(0, 0, 0, .15);
  border: 1px solid rgba(255, 255, 255, .18);*/
  /* небольшой отступ над фото */
}

/* Прогресс-бар загрузки */
.modal .loading {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: rgba(255, 255, 255, .12);
  overflow: hidden;
  display: none;
  margin-top: 16px;
}

.modal.loading .loading {
  display: block;
}

.modal.loading .loading::after {
  content: "";
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #38e199 0%, #b5e550 100%);
  width: 40%;
  animation: loadbar 1.2s infinite;
}

@keyframes loadbar {
  0% {
    margin-left: -40%
  }

  100% {
    margin-left: 100%
  }
}

/* ====== Анимация раскрытия карточки ====== */
.post-card {
  position: relative;
  will-change: transform;
  transition: transform 0.2s ease;
}
.post-card:active {
  transform: scale(0.97);
}

.card-clone{
  position:absolute;
  top:0; left:0;
  z-index:9998;
  border-radius:1.5rem;
  overflow:hidden;
  transition:all .35s cubic-bezier(0.4,0,0.2,1);
  box-shadow:0 10px 30px rgba(0,0,0,.35);
  transform-origin: top center;
  pointer-events: none; /* ← важно */
}
.card-clone img,
.card-clone .media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}



/* ================== PROMPT MINI-MODAL ================== */
.prompt {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 10000; /* выше модалки */
}

.prompt.open {
  display: flex;
}

.prompt .backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
}

.prompt .card {
  position: relative;
  background: #2f2770;
  border-radius: 1.5rem;
  padding: 1.5rem;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, .6);
  color: #fff;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.prompt h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.prompt textarea {
  width: 100%;
  min-height: 100px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.05);
  color: #fff;
  padding: 10px;
  font-family: inherit;
  resize: vertical;
  font-size: 16px;
}

.prompt .row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.prompt .btn {
  flex: 1;
  padding: 10px 0;
  border-radius: 10px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.prompt .btn.cancel {
  background: rgba(255,255,255,.15);
  color: #fff;
  height: 3rem;
}

.prompt .btn.primary {
  background: #9f89f6;
  color: #0a0c18;
  height: 3rem;
}



/* ================== TOAST ================== */
.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 100px;
  z-index: 11000;
  background:#1f1b3e;
  color:#fff;
  border:1px solid #3b2e7f;
  border-radius:12px;
  padding:10px 14px;
  box-shadow:0 10px 30px rgba(0,0,0,.5);
  display:none;
  max-width: 90vw;
  text-align: center;
  font-weight: 600;
  pointer-events: none;
}
.toast.show { display:block; animation: fadeout 3s forwards; }
@keyframes fadeout { 0%{opacity:1} 80%{opacity:1} 100%{opacity:0} }






/* ====== STRATEGY FORM ====== */
.strategy-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 14px;
  font-weight: 500;
  color: #e9ecf6;
}

.field input,
.field textarea {
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.15);
  color: #fff;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 16px;
  outline: none;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(255,255,255,0.4);
}

/* Радио-карточки категорий постов */
.strategy-radios {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.12);
  cursor: pointer;
}

.radio-card input[type="radio"] {
  margin-top: 4px;
}

.radio-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.radio-title {
  font-size: 14px;
  font-weight: 500;
}

.radio-sub {
  font-size: 12px;
  color: var(--muted);
}

/* Кнопка сохранить + подпись */
.strategy-actions {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 6rem;
  height: 5rem;
}

.strategy-actions .btn {
  width: 100%;
  background: #9f89f6;
  color: #0a0c18;
  flex: 1;
  padding: 10px 0;
  border-radius: 10px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.strategy-meta {
  font-size: 12px;
  color: var(--muted);
}







/* ====== VISUAL STYLES (Вкладка "Визуал") ====== */

.visual-actions {
  margin-top: 1.5rem;
  margin-bottom: 6rem; /* чтобы кнопку не перекрывал таббар */
}

.visual-actions .btn {
  width: 100%;
  background: #9f89f6;
  color: #0a0c18;
  border-radius: 12px;
  font-weight: 600;
  height: 4rem;
}

/* список и карточки */

#visualList {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* карточка стиля визуала */
.visual-item {
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: #3a3272;
  border: 1px solid #5f4a94;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .3);
}

.visual-item.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(56, 225, 153, 0.4), 0 12px 30px rgba(0, 0, 0, .45);
}

/* превью картинки */
.visual-thumb {
  width: 150px;
  height: 150px;
  border-radius: 14px;
  background: #221b4a;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, .15);
}

/* текстовая часть */
.visual-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.visual-desc {
  font-size: 13px;
  line-height: 1.4;
  color: #f4f3ff;
  display: -webkit-box;
  -webkit-line-clamp: 30;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
}

/* нижняя строка: дата + бейдж */
.visual-meta {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.visual-date {
  color: var(--muted);
}

.visual-badge {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .25);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  color: #f5f5ff;
  background: rgba(0, 0, 0, .15);
}

.visual-badge.active {
  border-color: var(--accent);
  background: rgba(149, 56, 225, 0.16);
  color: var(--accent);
}

/* скелетоны внутри визуала (можно реиспользовать .skel, просто чуть ниже отступ) */
.visual-skel {
  height: 70px;
  border-radius: 16px;
  background: #2f2a59;
  position: relative;
  overflow: hidden;
}

.visual-skel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, .08) 50%,
    rgba(255, 255, 255, 0) 100%);
  transform: translateX(-100%);
  animation: shimmer 1.2s infinite;
}

.visual-item.loading {
  opacity: 0.8;
}

.visual-loading-bar {
  margin-top: 6px;
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.visual-loading-bar::after {
  content: "";
  position: absolute;
  left: -30%;
  top: 0;
  bottom: 0;
  width: 30%;
  background: linear-gradient(90deg, #a778dd 0%, #5b21b7 100%);
  animation: visual-bar 1.1s infinite;
}

@keyframes visual-bar {
  0%   { transform: translateX(0); }
  100% { transform: translateX(400%); }
}


/* ===================== TEXT STYLE IMPROVEMENTS ===================== */

/* Заголовок блока (label) — чуть крупнее и жирнее */
.field label {
  font-size: 18px;       /* было 14px */
  font-weight: 600;      /* усиление */
  color: #fff;           /* можно чуть ярче для акцента */
}

/* Описание блока — ближе к заголовку, дальше от вариантов */
.field-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  margin-top: -4px;      /* приближаем к заголовку */
  margin-bottom: 10px;   /* отодвигаем от радиокнопок */
}

/* Названия надстроек (вариантов) внутри радио-карточек — крупнее */
.radio-title {
  font-size: 16px !important;  /* было 14px */
  font-weight: 500;
}

/* Описание варианта остаётся как есть — менять не нужно */
.radio-sub {
  font-size: 12px;
  color: var(--muted);
}

.field-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

















/* ======================= Tabbar =======================*/
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5rem;
  display: flex;
  gap: 0;
  background: #5849e2;
  /*border-top-left-radius: 3rem;
  border-top-right-radius: 3rem;*/
  border-radius: 5rem;
  box-shadow: 0 -18px 40px 10px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06);
  padding-bottom: env(safe-area-inset-bottom, 0);
  transition: transform 0.25s ease;
}

.tabbar.hidden-by-keyboard {
  transform: translateY(100%);
}

.tabbar button {
  flex: 1;
  background: transparent;
  border: none;
  color: #e9ecf6;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  /* для подчёркивания */
}

.tabbar button.active {
  color: #fff
}

.tabbar button.active::after {
  content: "";
  position: absolute;
  bottom: 10px;
  height: 5px;
  width: 10px;
  background: var(--tab-underline);
  /*border-top-left-radius: 6px;
  border-top-right-radius: 6px;*/
  border-radius: 100px;
}




/* Desktop width */
@media (min-width: 960px) {
  .content {
    max-width: 920px;
    margin: 0 auto 92px
  }
}