:root {
  --bg: #0c0a13;
  --text: #f4effc;
  --text-dim: #a89ecb;
  --pink: #f472b6;
  --purple: #a855f7;
  --gradient: linear-gradient(135deg, #f472b6 0%, #a855f7 100%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

.glow-pink {
  width: 480px;
  height: 480px;
  top: -140px;
  left: -120px;
  background: rgba(244, 114, 182, 0.22);
}

.glow-purple {
  width: 520px;
  height: 520px;
  bottom: -180px;
  right: -140px;
  background: rgba(168, 85, 247, 0.26);
}

.hexes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='69.3' height='60' viewBox='0 0 69.3 60'%3E%3Cg fill='none' stroke='%23c084fc' stroke-opacity='0.09' stroke-width='1'%3E%3Cpath d='M17.3 0L34.6 10v20L17.3 40 0 30V10z'/%3E%3Cpath d='M52 0L69.3 10v20L52 40 34.6 30V10z'/%3E%3Cpath d='M0 30L17.3 40v20L0 70 -17.3 60V40z'/%3E%3Cpath d='M34.6 30L52 40v20L34.6 70 17.3 60V40z'/%3E%3Cpath d='M69.3 30L86.6 40v20L69.3 70 52 60V40z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 69.3px 60px;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.logo {
  width: 76px;
  height: 84px;
  background: var(--gradient);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 34px;
  font-weight: 800;
  box-shadow: 0 0 60px rgba(168, 85, 247, 0.55);
  animation: breathe 3.2s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(0.94); }
}

.hero h1 {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  font-size: 16px;
  color: var(--text-dim);
  max-width: 420px;
  line-height: 1.5;
}

.cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
}

.btn {
  display: inline-block;
  padding: 14px 24px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 22px rgba(168, 85, 247, 0.4);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-ghost {
  border: 1px solid rgba(192, 132, 252, 0.35);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.btn-ghost:hover {
  border-color: var(--purple);
  background: rgba(168, 85, 247, 0.12);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(192, 132, 252, 0.22);
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: rgba(192, 132, 252, 0.5);
  transform: translateY(-2px);
}

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid rgba(192, 132, 252, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pink);
}

.card h2 {
  font-size: 19px;
}

.card p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.55;
  flex: 1;
}

.card-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--pink);
  text-decoration: none;
}

.card-link:hover {
  text-decoration: underline;
}

.footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  opacity: 0.7;
}

@media (max-width: 480px) {
  .page { padding-top: 48px; }
  .hero h1 { font-size: 34px; }
}

/* ---------- Шапка и подвал многостраничного сайта ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: rgba(12, 10, 19, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(192, 132, 252, 0.16);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.nav-logo {
  width: 30px;
  height: 33px;
  background: var(--gradient);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.nav-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text);
}

.footer {
  border-top: 1px solid rgba(192, 132, 252, 0.16);
  margin-top: 40px;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--text-dim);
  font-size: 13px;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--pink);
}

/* ---------- Блоки страниц ---------- */

.section {
  margin-top: 56px;
}

.section-title {
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
}

.section-lead {
  color: var(--text-dim);
  text-align: center;
  font-size: 15px;
  max-width: 560px;
  margin: 0 auto 26px;
  line-height: 1.55;
}

.promo {
  border: 1px solid rgba(192, 132, 252, 0.3);
  border-radius: 22px;
  padding: 32px 26px;
  text-align: center;
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.14), rgba(168, 85, 247, 0.16));
}

.promo h2 {
  font-size: 24px;
  margin-bottom: 10px;
}

.promo p {
  color: var(--text-dim);
  max-width: 520px;
  margin: 0 auto 20px;
  line-height: 1.55;
}

.pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.price-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.price-card.is-pro {
  border-color: rgba(244, 114, 182, 0.5);
  box-shadow: 0 0 40px rgba(244, 114, 182, 0.12);
}

.price-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text-dim);
}

.price-value {
  font-size: 34px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.price-value small {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  -webkit-text-fill-color: currentColor;
}

.price-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--text-dim);
}

.price-list li::before {
  content: '— ';
  color: var(--pink);
}

.prose {
  max-width: 760px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-dim);
}

.prose h2 {
  color: var(--text);
  font-size: 20px;
  margin: 28px 0 10px;
}

.prose a {
  color: var(--pink);
}

/* ---------- Реклама ---------- */

.ad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.ad-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ad-card .ad-price {
  font-size: 26px;
  font-weight: 800;
  color: var(--pink);
}

.ad-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--text-dim);
}

.note {
  border: 1px solid rgba(192, 132, 252, 0.28);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-dim);
  background: rgba(168, 85, 247, 0.08);
  line-height: 1.6;
}

/* ---------- Виджет помощника ---------- */

.chat-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px 14px 16px;
  border: none;
  border-radius: 999px;
  background: var(--gradient);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 34px rgba(168, 85, 247, 0.45);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.chat-fab:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.chat-fab-hex {
  width: 22px;
  height: 24px;
  background: #fff;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.chat-panel {
  position: fixed;
  right: 20px;
  bottom: 88px;
  z-index: 60;
  width: min(390px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 140px));
  display: none;
  flex-direction: column;
  background: rgba(21, 16, 32, 0.97);
  border: 1px solid rgba(192, 132, 252, 0.32);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.chat-panel.is-open {
  display: flex;
}

.chat-head {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(192, 132, 252, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-head-title {
  font-size: 15px;
  font-weight: 700;
}

.chat-head-sub {
  font-size: 12px;
  color: var(--text-dim);
}

.chat-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(192, 132, 252, 0.3);
  background: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.chat-close:hover {
  color: var(--text);
  border-color: var(--pink);
}

.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubble {
  max-width: 86%;
  padding: 11px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-bubble.user {
  align-self: flex-end;
  background: var(--gradient);
  color: #fff;
  border-bottom-right-radius: 5px;
}

.chat-bubble.bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(192, 132, 252, 0.22);
  border-bottom-left-radius: 5px;
}

.chat-bubble.error {
  align-self: flex-start;
  background: rgba(251, 113, 133, 0.14);
  border: 1px solid rgba(251, 113, 133, 0.4);
  color: #fecdd3;
}

.chat-typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  border-bottom-left-radius: 5px;
}

.chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pink);
  animation: chat-bounce 1.1s infinite ease-in-out;
}

.chat-typing span:nth-child(2) {
  animation-delay: 0.15s;
  background: #c084fc;
}

.chat-typing span:nth-child(3) {
  animation-delay: 0.3s;
  background: var(--purple);
}

@keyframes chat-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.chat-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(192, 132, 252, 0.2);
}

.chat-form textarea {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  resize: none;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgba(192, 132, 252, 0.26);
  background: rgba(12, 10, 19, 0.7);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
}

.chat-form textarea:focus {
  border-color: var(--purple);
}

.chat-send {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 14px;
  background: var(--gradient);
  color: #fff;
  cursor: pointer;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.chat-note {
  padding: 0 12px 12px;
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
}

/* ---------- Страница помощника ---------- */

.chat-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 16px 48px;
}

.chat-page .chat-panel {
  position: static;
  width: 100%;
  height: 68vh;
  min-height: 460px;
  box-shadow: none;
}

.chat-page-intro {
  text-align: center;
  margin-bottom: 20px;
}

.chat-page-intro h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.chat-page-intro p {
  color: var(--text-dim);
  font-size: 15px;
}

.chat-suggestions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}

.chat-suggestion {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.chat-suggestion:hover {
  color: var(--text);
  border-color: var(--pink);
}
