:root {
  --bg: #f6f3ff;
  --bg-card: #ffffff;
  --bg-soft: #efe7ff;
  --accent: #a855f7;              /* сиреневый */
  --accent-strong: #ec4899;       /* розовый */
  --accent-soft: rgba(168, 85, 247, 0.08);
  --accent-secondary: #38bdf8;    /* небесный */
  --accent-secondary-soft: rgba(56, 189, 248, 0.12);
  --text: #0f172a;
  --text-soft: #6b7280;
  --border-subtle: rgba(203, 213, 225, 0.95);
  --border-soft: rgba(203, 213, 225, 0.7);
  --danger: #ef4444;
  --radius-lg: 26px;
  --radius-md: 16px;
  --shadow-soft: 0 24px 60px rgba(148, 163, 184, 0.4);
  --shadow-chip: 0 14px 34px rgba(129, 140, 248, 0.5);
}

/* BASE */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 0 0, #ffe4f5 0, transparent 55%),
    radial-gradient(circle at 100% 0, #e0f2fe 0, transparent 55%),
    radial-gradient(circle at 15% 100%, #e9d5ff 0, transparent 60%),
    #f6f3ff;
  color: var(--text);
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.page {
  width: 100%;
  max-width: 1080px;
  padding: 20px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* HEADER */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}



.logo-icon {
  width: 50px;
  height: 50px;
  border-radius: 22px;
  background:
    conic-gradient(from 220deg,
      #fb7185,
      #f97316,
      #38bdf8,
      #a855f7,
      #fb7185);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f9fafb;
  font-weight: 900;
  font-size: 24px;
  box-shadow: var(--shadow-chip);
  position: relative;
}

.logo-icon::after {
  content: "✧";
  position: absolute;
  font-size: 11px;
  top: 4px;
  right: 6px;
  opacity: 0.95;
  text-shadow: 0 0 10px rgba(248, 250, 252, 0.9);
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-title {
  font-weight: 900;
  letter-spacing: 0.08em;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
}

.logo-title span {
  font-size: 13px;
  color: var(--accent-strong);
}

.logo-sub {
  font-size: 12px;
  color: var(--text-soft);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-soft);
}



.pill {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  background:
    linear-gradient(135deg,
      rgba(255, 255, 255, 0.92),
      rgba(240, 249, 255, 0.94));
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 18px 40px rgba(148, 163, 184, 0.45);
  backdrop-filter: blur(10px);
}

.pill-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow:
    0 0 0 5px rgba(187, 247, 208, 0.9),
    0 0 14px rgba(34, 197, 94, 0.8);
}

.pill-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10px;
  color: var(--text-soft);
}

.pill-strong {
  color: var(--accent-strong);
  font-weight: 600;
}

/* LAYOUT */

.content {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

@media (max-width: 860px) {
  .content {
    grid-template-columns: minmax(0, 1fr);
  }
}


.main-h1 {
  font-size: 1.9rem;
  line-height: 1.35;
  font-weight: 800;
  margin-bottom: 12px;
  color: #111;
  letter-spacing: -0.5px;
}

.h1-accent {
  background: linear-gradient(90deg, #ff3355, #ff7755);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
}

.hero-description {
  font-size: 1rem;
  color: #444;
  margin-bottom: 25px;
  line-height: 1.55;
}

/* CARD */

.card {
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg,
      rgba(255, 255, 255, 0.96),
      rgba(239, 246, 255, 0.98));
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid transparent;
  background:
    radial-gradient(circle at 0 0,
      rgba(236, 72, 153, 0.38),
      transparent 60%),
    radial-gradient(circle at 100% 0,
      rgba(56, 189, 248, 0.35),
      transparent 60%);
  opacity: 0.45;
  mix-blend-mode: screen;
}

.card::after {
  content: "✦";
  position: absolute;
  font-size: 70px;
  color: rgba(129, 140, 248, 0.14);
  bottom: -10px;
  right: 18px;
  pointer-events: none;
}

.card-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* HERO / INFO */

.hero-title {
  font-size: clamp(24px, 4vw, 30px);
  line-height: 1.15;
  letter-spacing: 0.02em;
  font-weight: 900;
}

.hero-title span {
  background:
    linear-gradient(120deg,
      #38bdf8,
      #a855f7,
      #ec4899);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-sub {
  color: var(--text-soft);
  font-size: 14px;
  max-width: 440px;
}

.seo-content {
  padding-top: 10px;
  padding-bottom: 20px;
}

.seo-content h2 {
  font-size: 1.35rem;
  margin-top: 25px;
  margin-bottom: 10px;
  font-weight: 700;
  color: #111;
}

.seo-accent {
  color: #ff3355;
  font-weight: 800;
}

.seo-content p {
  font-size: 1rem;
  line-height: 1.6;
  color: #444;
  margin-bottom: 16px;
}

.seo-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 20px 0;
}

.seo-list li {
  margin: 8px 0;
  background: #fafafa;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 1rem;
  line-height: 1.45;
  color: #333;
  border: 1px solid rgba(0,0,0,0.06);
}

/* STEPS */

.steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.step {
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg,
      rgba(255, 255, 255, 0.98),
      rgba(237, 233, 254, 0.98));
  border: 1px solid rgba(221, 214, 254, 0.9);
  padding: 10px 11px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: flex-start;
  box-shadow: 0 18px 36px rgba(165, 180, 252, 0.55);
}

.step-number {
  width: 26px;
  height: 26px;
  border-radius: 11px;
  border: 1px solid rgba(55, 65, 81, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  background:
    radial-gradient(circle at 0 0,
      #bfdbfe,
      #a855f7);
  color: #0b1120;
}

.step-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.step-title {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.step-text {
  font-size: 12px;
  color: var(--text-soft);
}

/* TAGS / STATS */

.tags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tag-pill {
  padding: 4px 8px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(209, 213, 219, 0.9);
  font-size: 11px;
  color: var(--text-soft);
  box-shadow: 0 10px 22px rgba(148, 163, 184, 0.4);
}

.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.stat-chip {
  background: #ffffff;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 11px;
  border: 1px solid rgba(209, 213, 219, 0.95);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 12px 26px rgba(148, 163, 184, 0.42);
}

.circle-icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  background:
    radial-gradient(circle at 0 0,
      #bae6fd,
      #6366f1);
  color: #f9fafb;
}

.stat-label {
  color: var(--text-soft);
}

.stat-value {
  color: var(--accent-strong);
  font-weight: 600;
}

/* CHAT HEADER */

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-partner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background:
    linear-gradient(135deg,
      #38bdf8,
      #a855f7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #f9fafb;
  box-shadow: 0 16px 36px rgba(129, 140, 248, 0.75);
}

.chat-partner-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.partner-name {
  font-size: 13px;
  font-weight: 600;
}

.partner-status {
  font-size: 11px;
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #eab308;
  box-shadow:
    0 0 0 4px rgba(254, 240, 138, 0.8),
    0 0 14px rgba(234, 179, 8, 0.9);
}

.status-dot.online {
  background: #22c55e;
  box-shadow:
    0 0 0 4px rgba(187, 247, 208, 0.9),
    0 0 16px rgba(34, 197, 94, 1);
}

.chat-actions-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-btn {
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 11px;
  border: 1px solid rgba(129, 140, 248, 0.9);
  background:
    linear-gradient(135deg,
      #6366f1,
      #a855f7);
  color: #f9fafb;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 14px 30px rgba(129, 140, 248, 0.8);
}

.mini-btn.danger {
  background: linear-gradient(135deg, #f97373, #ef4444);
  border-color: rgba(248, 113, 113, 0.95);
}

.mini-btn:active {
  transform: translateY(1px);
  box-shadow: 0 8px 16px rgba(129, 140, 248, 0.9);
}

/* CHAT BODY */

.chat-body {
  flex: 1;
  min-height: 260px;
  max-height: 420px;
  margin-top: 12px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 0 0,
      rgba(129, 140, 248, 0.18),
      transparent 65%),
    radial-gradient(circle at 100% 100%,
      rgba(236, 72, 153, 0.18),
      transparent 65%),
    linear-gradient(135deg, #f9fafb, #e5edff);
  border: 1px solid rgba(209, 213, 219, 0.9);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  position: relative;
}

.chat-system-banner {
  font-size: 11px;
  color: var(--text-soft);
  border-radius: 999px;
  padding: 6px 10px;
  background:
    linear-gradient(135deg, #fdf2ff, #eff6ff);
  border: 1px solid rgba(221, 214, 254, 0.9);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: center;
  box-shadow: 0 12px 30px rgba(165, 180, 252, 0.7);
  margin-bottom: 4px;
}

.chat-system-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent-strong);
}

/* MESSAGES LIST */

.messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.9) transparent;
  padding-bottom: 25px;
}

.messages::-webkit-scrollbar {
  width: 6px;
}

.messages::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.9);
  border-radius: 999px;
}

/* MESSAGES */

.msg-row {
  display: flex;
  width: 100%;
}

.msg {
  max-width: 80%;
  font-size: 13px;
  padding: 8px 11px;
  border-radius: 14px;
  line-height: 1.4;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.msg.me {
  margin-left: auto;
  border-bottom-right-radius: 4px;
  background:
    linear-gradient(135deg,
      #ec4899,
      #a855f7);
  color: #fdf2ff;
  box-shadow:
    0 14px 30px rgba(236, 72, 153, 0.9),
    0 6px 16px rgba(129, 140, 248, 0.8);
}

.msg.partner {
  margin-right: auto;
  border-bottom-left-radius: 4px;
  background: #ffffff;
  border: 1px solid rgba(209, 213, 219, 0.9);
  color: #111827;
  box-shadow: 0 10px 24px rgba(148, 163, 184, 0.48);
}

.msg.system {
  align-self: center;
  font-size: 11px;
  color: var(--text-soft);
  background: #f5f3ff;
  border-radius: 999px;
  padding: 4px 11px;
  border: 1px dashed rgba(165, 180, 252, 0.8);
  max-width: 90%;
  text-align: center;
  box-shadow: 0 10px 22px rgba(165, 180, 252, 0.8);
}

/* TYPING */

.typing-indicator {
  display: none;
  font-size: 11px;
  color: var(--text-soft);
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.typing-dots {
  display: inline-flex;
  gap: 3px;
}

.typing-dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.9);
  animation: typing-bounce 1s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
  40% { transform: translateY(-2px); opacity: 1; }
}

/* INPUT AREA */

.chat-input-area {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chat-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.input-wrap {
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  background:
    radial-gradient(circle at 0 0,
      rgba(221, 214, 254, 0.7),
      transparent 65%),
    #ffffff;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 14px 32px rgba(148, 163, 184, 0.45);
}

.input-inner {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.textarea {
  flex: 1;
  border: none;
  background: transparent;
  resize: none;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
  max-height: 72px;
  min-height: 22px;
  outline: none;
}

.textarea::placeholder {
  color: var(--text-soft);
}

.input-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.input-icon-btn {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(236, 72, 153, 0.8);
  background:
    radial-gradient(circle at 0 0,
      #fce7f3,
      #f9a8d4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #9d174d;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(236, 72, 153, 0.6);
}

/* SEND BUTTON */

.send-btn {
  border-radius: 999px;
  padding: 9px 13px;
  background:
    conic-gradient(from 210deg,
      #38bdf8,
      #a855f7,
      #ec4899,
      #38bdf8);
  border: none;
  color: #0b1120;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  box-shadow:
    0 0 18px rgba(129, 140, 248, 1),
    0 14px 32px rgba(236, 72, 153, 0.9);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.send-btn:active {
  transform: translateY(1px);
  box-shadow: 0 8px 20px rgba(129, 140, 248, 1);
}

.send-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

/* HELPER ROW */

.chat-helper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  color: var(--text-soft);
}

.badge {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  background: #f9fafb;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent-strong);
}

.helper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.helper-link {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: rgba(148, 163, 184, 0.9);
}

.helper-link:hover {
  color: var(--accent-strong);
}

/* FOOTER */

footer {
  font-size: 11px;
  color: var(--text-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}

@media (max-width: 640px) {
  .card {
    padding: 16px;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

.chat-header-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Контейнер с кнопками под уведомлениями */
.chat-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.chat-header-actions .btn {
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
}

.chat-header-actions .primary-btn {
  background: #ff4b6a;
  color: #fff;
  border: none;
}

.chat-header-actions .secondary-btn {
  background: transparent;
  border: 1px solid rgba(0,0,0,0.1);
  color: #555;
}

/* На совсем маленьких экранах делаем их в колонку */
@media (max-width: 480px) {
  .chat-header-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

