/* ---------- App layout: боковое меню как у конкурента, наши цвета ---------- */

.app-side {
  position: fixed;
  z-index: 200;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  background: #0b0b0f;
  border-right: 1px solid rgba(255, 253, 245, .08);
  display: flex;
  flex-direction: column;
  padding: 20px 16px 16px;
  transition: transform .25s ease;
}

.app-brand {
  display: inline-block;
  font-family:var(--font-display);
  font-weight: 900;
  color: var(--ink);
  background: var(--lime);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--pink);
  border-radius: 16px;
  padding: 8px 14px;
  font-size: 1rem;
  text-decoration: none;
  align-self: flex-start;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 14px;
  flex: 1;
  overflow-y: auto;
}

.side-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255, 253, 245, .38);
  margin: 16px 10px 4px;
  font-weight: 800;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: rgba(255, 253, 245, .85);
  font-weight: 600;
  font-size: .92rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background .15s, color .15s;
}

.side-nav a:hover {
  background: rgba(255, 253, 245, .07);
  color: var(--paper);
}

.side-nav a.active {
  background: var(--lime);
  color: var(--ink);
  font-weight: 800;
}

.side-nav a svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.side-user {
  margin-top: 12px;
  background: var(--ink2);
  border: 1px solid rgba(255, 253, 245, .1);
  border-radius: 14px;
  padding: 12px;
  color: var(--paper);
  font-size: .85rem;
  line-height: 1.5;
}

.side-user .btn {
  border-width: 2px;
}

body.app main.site {
  margin-left: 280px;
  margin-right: 0;
}

.app-topbar {
  display: none;
}

.app-side-overlay {
  display: none;
}

@media (max-width: 1200px) {
  .app-side {
    transform: translateX(-100%);
    width: 300px;
    box-shadow: 0 0 60px rgba(0, 0, 0, .5);
  }
  .app-side:has(nav.open) {
    transform: none;
  }
  body.app main.site {
    margin-left: 0;
    width: 100%;
  }
  .app-topbar {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 180;
    background: #0b0b0f;
    border-bottom: 1px solid rgba(255, 253, 245, .08);
    padding: 10px 16px;
    align-items: center;
    gap: 12px;
  }
  .app-topbar .brand {
    font-size: .9rem;
    padding: 6px 12px;
  }
  .app-side-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 190;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
  }
  .app-side-overlay.show {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Мобилка: меню на весь экран */
@media (max-width: 640px) {
  .app-side {
    width: 100%;
    border-right: 0;
  }
}

/* Контентные страницы приложения: чуть уже, аккуратнее */
body.app .generation-shell,
body.app .generations-section,
body.app .cabinet-panel,
body.app main.site > .panel {
  max-width: 1060px;
}

/* Компактный хиро внутри приложения — форма видна сразу */
body.app .generation-hero,
body.app .cabinet-hero {
  padding: 26px 20px;
}
body.app .generation-hero .hero-vis,
body.app .cabinet-hero .hero-vis {
  display: none;
}
body.app .generation-hero h1,
body.app .cabinet-hero h1 {
  font-size: clamp(1.7rem, 5vw, 2.4rem);
}
body.app .hero-stats {
  margin-top: 14px;
}

/* Главная (лендинг): секции лежат прямо в body — сдвигаем вправо от сайдбара */
body.app > section.hero,
body.app > section.landing,
body.app > div.marquee,
body.app > footer.landing-footer {
  margin-left: 280px;
}

@media (max-width: 1200px) {
  body.app > section.hero,
  body.app > section.landing,
  body.app > div.marquee,
  body.app > footer.landing-footer {
    margin-left: 0;
  }
}


/* ---------- Redesign 19.11: app-shell polish ---------- */

/* Ambient background: subtle lime/pink glows, tinted near-black */
body.app {
  background:
    radial-gradient(52% 38% at 88% -8%, rgba(212, 255, 63, .055), transparent 62%),
    radial-gradient(48% 34% at 4% 108%, rgba(255, 62, 165, .05), transparent 60%),
    #0b0b0f;
}

/* Sidebar: micro-interactions */
.app-side {
  padding: 20px 14px 16px;
}

.app-brand {
  transition: transform .16s ease, box-shadow .16s ease;
}

.app-brand:hover {
  transform: translateY(-1px);
  box-shadow: 5px 5px 0 var(--pink);
}

.side-nav a {
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.side-nav a:active {
  transform: scale(.985);
}

.side-nav a.active {
  box-shadow: 0 0 0 1px rgba(212, 255, 63, .35), 0 4px 18px rgba(212, 255, 63, .14);
}

.side-user {
  border-radius: 14px;
}

/* Custom scrollbar */
body.app ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

body.app ::-webkit-scrollbar-track {
  background: transparent;
}

body.app ::-webkit-scrollbar-thumb {
  background: rgba(255, 253, 245, .14);
  border-radius: 999px;
  border: 2px solid #0b0b0f;
}

body.app ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 253, 245, .28);
}

/* Focus visible: lime ring */
body.app :focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

/* Подменю типов генерации — доступно на всех app-страницах */
.side-gen-types{display:flex;flex-direction:column;gap:2px;margin:2px 0 8px 16px;padding-left:12px;border-left:2px solid rgba(255,253,245,.12)}
.side-gen-types a{display:block;padding:7px 10px;border-radius:10px;color:rgba(255,253,245,.72);font-weight:600;font-size:.85rem;text-decoration:none;transition:background .15s,color .15s}
.side-gen-types a:hover{background:rgba(255,253,245,.07);color:var(--paper)}
.side-gen-types a.active{background:var(--lime);color:var(--ink);font-weight:800}
.side-gen-types > a:first-child{color:var(--paper);font-weight:800}

.side-gen-types .side-gen-label{font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:rgba(255,253,245,.32);margin:8px 8px 2px;font-weight:800}
.side-gen-types > a:first-child{color:var(--paper);font-weight:800}

/* Фейд «ниже есть ещё» внизу скроллящегося сайдбара */
.side-fade{position:absolute;left:0;right:0;height:44px;pointer-events:none;
  background:linear-gradient(to bottom,rgba(11,11,15,0),#0b0b0f);
  opacity:0;transition:opacity .2s;z-index:4}

/* side-user заменён блоком .nav-user внизу шторки */
.side-user{display:none !important}
