:root {
  --primary: #40c1c7;
  --secondary: #2aa8ae;
  --primary-deep: #1a7a7f;
  --primary-light: #e6f8f9;
  --primary-soft: #d0f0f2;
  --primary-glow: rgba(64, 193, 199, 0.25);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text: #0f2a2b;
  --text-light: #3d5c5e;
  --border: #c8e8ea;
  --bg: #f5fbfb;
  --white: #ffffff;
  --radius: 16px;
  --shadow-lg: 0 25px 70px rgba(64, 193, 199, 0.15);
  --primary-color: #40c1c7;
  --border-color: #c8e8ea;
  --text-color: #0f2a2b;
  --card-radius: 24px;
  --active: #e6f8f9;
}

/*==========================================
    Fonts
==========================================*/



/*==========================================
    Animation
==========================================*/

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes blob {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(40px);
  }

  100% {
    transform: translateY(0px);
  }
}

@keyframes blob2 {
  0% {
    transform: translateX(0px);
  }

  50% {
    transform: translateX(-50px);
  }

  100% {
    transform: translateX(0px);
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Vazirmatn;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Vazirmatn, Inter, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

h1 {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.2;
}

h2 {
  font-size: 28px;
  font-weight: 700;
}

h3 {
  font-size: 22px;
  font-weight: 600;
}

p {
  color: var(--text-light);
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  border: none;
  cursor: pointer;
  font-family: inherit;
}

input {
  font-family: inherit;
}

body.auth-body {
  background: #edf7f8;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 55% 45% at 8% 12%, rgba(64, 193, 199, 0.22), transparent 70%),
    radial-gradient(ellipse 50% 40% at 92% 88%, rgba(26, 122, 127, 0.14), transparent 65%),
    linear-gradient(160deg, #f0fafb 0%, #e8f5f6 45%, #f5fbfb 100%);
}

.auth-page::before {
  content: "";
  width: 480px;
  height: 480px;
  position: absolute;
  left: -140px;
  top: -160px;
  background: #40c1c722;
  border-radius: 50%;
  filter: blur(80px);
  animation: blob 8s infinite ease-in-out;
  pointer-events: none;
}

.auth-page::after {
  content: "";
  width: 380px;
  height: 380px;
  right: -120px;
  bottom: -120px;
  position: absolute;
  background: #2aa8ae20;
  border-radius: 50%;
  filter: blur(70px);
  animation: blob2 9s infinite ease-in-out;
  pointer-events: none;
}

.auth-container {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background: var(--white);
  border-radius: 28px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 28px 80px rgba(15, 42, 43, 0.1),
    0 8px 24px rgba(64, 193, 199, 0.08);
  border: 1px solid rgba(200, 232, 234, 0.7);
  animation: fadeUp 0.7s ease;
  position: relative;
  z-index: 5;
}

.auth-left {
  padding: 56px 52px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.1) 0%, transparent 42%),
    linear-gradient(165deg, #2aa8ae 0%, #1a7a7f 55%, #146266 100%);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.auth-left::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 85%);
  pointer-events: none;
}

.auth-left > * {
  position: relative;
  z-index: 1;
}

.auth-left__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 36px;
  width: fit-content;
}

.logo,
.auth-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: block;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.auth-brand {
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.01em;
  line-height: 1.4;
  max-width: 140px;
}

.logo {
  background: var(--white);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 35px;
}

.auth-left__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 0 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 12px;
  font-weight: 600;
}

.auth-left h1 {
  color: var(--white);
  margin-bottom: 16px;
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.35;
  max-width: 16ch;
}

.auth-left__lead,
.auth-left p {
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 36px;
  font-size: 15.5px;
  line-height: 1.85;
  max-width: 36ch;
}

.auth-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-feature,
.feature {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  transition: background 0.25s ease, transform 0.25s ease;
}

.auth-feature:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateX(-3px);
}

.auth-feature__icon,
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.auth-feature__icon svg {
  width: 20px;
  height: 20px;
}

.auth-feature span,
.feature span {
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.auth-right {
  background: #fff;
  padding: 48px 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  animation: fadeIn 0.7s ease;
}

.auth-card__top {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 8px;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.auth-back:hover {
  color: var(--primary-deep);
}

.auth-card__mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
}

.auth-card__mobile-brand img {
  border-radius: 12px;
  background: var(--primary-light);
}

.auth-card__mobile-brand span {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

.auth-card__header {
  margin-bottom: 28px;
}

.auth-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  color: var(--text-light);
  margin: 0;
  line-height: 1.75;
  font-size: 14.5px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-form[hidden],
.auth-form.is-hidden {
  display: none !important;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.json-page .form-group label,
.robot-box label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-color);
}

.bot-name-cont {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, 1fr);
  justify-content: space-between;
  align-items: flex-start;
}

.form-input {
  width: 100%;
  height: 54px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: #fbfefe;
  padding: 0 16px;
  font-size: 15px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  outline: none;
}

.form-input:hover {
  border-color: #a8dfe2;
}

.form-input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(64, 193, 199, 0.14);
}

.form-label {
  position: absolute;
  right: 14px;
  top: 16px;
  background: linear-gradient(180deg, transparent 40%, #fbfefe 40%);
  color: #7a9395;
  padding: 0 7px;
  transition: 0.25s ease;
  pointer-events: none;
  font-size: 14px;
}

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
  top: -9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-deep);
  background: #fff;
}

.form-optional {
  font-weight: 500;
  color: #93a8aa;
  font-size: 0.92em;
}

.auth-fieldset {
  border: 0;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-fieldset legend {
  padding: 0;
  margin-bottom: 2px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.auth-segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 5px;
  border-radius: 14px;
  background: #edf6f7;
  border: 1px solid var(--border);
}

.auth-segment__option {
  position: relative;
  cursor: pointer;
  margin: 0;
}

.auth-segment__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-segment__option span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-light);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.auth-segment__option input:checked + span {
  background: #fff;
  color: var(--primary-deep);
  box-shadow: 0 4px 14px rgba(15, 42, 43, 0.08);
}

.auth-segment__option input:focus-visible + span {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.auth-website {
  display: grid;
  gap: 8px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  transform: translateY(-6px);
  transition: max-height 0.35s ease, opacity 0.3s ease, transform 0.3s ease, margin-top 0.3s ease;
}

.auth-website.is-open {
  max-height: 160px;
  opacity: 1;
  margin-top: 4px;
  transform: none;
}

.auth-website__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.auth-url-field {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #fbfefe;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.auth-url-field:focus-within {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(64, 193, 199, 0.14);
}

.auth-url-field__scheme {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--primary-deep);
  background: var(--primary-light);
  border-right: 1px solid var(--border);
  user-select: none;
  white-space: nowrap;
}

.auth-url-field__input {
  flex: 1;
  min-width: 0;
  height: 52px;
  border: 0;
  outline: none;
  background: transparent;
  padding: 0 14px;
  font-size: 14.5px;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.auth-url-field__input::placeholder {
  color: #9bb0b2;
  font-family: Vazirmatn, sans-serif;
}

.auth-website__hint {
  margin: 0;
  font-size: 12px;
  color: #7a9395;
  line-height: 1.6;
}

.auth-btn {
  height: 54px;
  margin-top: 6px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.2s ease;
  position: relative;
  overflow: hidden;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.auth-btn__arrow {
  width: 18px;
  height: 18px;
  transition: transform 0.25s ease;
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(64, 193, 199, 0.28);
}

.auth-btn:hover .auth-btn__arrow {
  transform: translateX(-3px);
}

.auth-btn:active {
  transform: scale(0.985);
}

.auth-btn:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.auth-btn::before {
  content: "";
  position: absolute;
  width: 120px;
  height: 220px;
  background: rgba(255, 255, 255, 0.22);
  top: -60px;
  left: -140px;
  transform: rotate(25deg);
  transition: 0.65s ease;
}

.auth-btn:hover::before {
  left: 120%;
}

.auth-footer {
  text-align: center;
  margin-top: 30px;
  color: var(--text-light);
}

.auth-footer a {
  color: var(--primary);
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.auth-form--verify {
  gap: 16px;
}

.auth-verify-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f3fbfb;
  border: 1px solid rgba(64, 193, 199, 0.28);
}

.auth-verify-meta p {
  margin: 0;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.7;
}

.auth-verify-meta strong {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.auth-link-btn {
  border: 0;
  background: transparent;
  color: var(--primary-deep);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.auth-link-btn:hover {
  text-decoration: underline;
}

.form-input--otp {
  letter-spacing: 0.35em;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
}

.main {
  padding: 34px 40px;
}

.cb-form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cb-form-group label {
  font-weight: 600;
}

.cb-input {
  height: 58px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 0 18px;
  font-size: 15px;
  transition: 0.3s;
  background: var(--white);
}

.cb-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 5px rgba(64, 193, 199, 0.08);
}

.cb-radio-group {
  display: flex;
  gap: 25px;
}

.cb-radio-group label {
  display: flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
}


.json-page {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.json-card {
  background: var(--white);
  border: 1px solid #eceef5;
  border-radius: var(--card-radius);
  padding: 32px;
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.04);
  transition: 0.25s;
}

.card-header {
  margin-bottom: 28px;
}

.card-header h2 {
  font-size: 24px;
  color: var(--text-color);
  margin-bottom: 10px;
}

.card-header p {
  color: #8a94a6;
  line-height: 2;
}

.json-input-group {
  display: flex;
  gap: 14px;
}

.json-input-group input {
  flex: 1;
  height: 56px;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 0 20px;
  font-size: 15px;
  transition: 0.25s;
}

.json-input-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(64, 193, 199, 0.08);
}

.json-input-group button {
  min-width: 170px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary));
  color: var(--white);
  cursor: pointer;
  font-weight: 600;
  transition: 0.25s;
}

.json-input-group button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(64, 193, 199, 0.22);
}

.guide-box {
  margin-top: 24px;
  padding: 24px;
  border-radius: 20px;
  background: #f8fafc;
  border: 1px solid #e8ecf3;
}

.guide-box h3 {
  margin-bottom: 16px;
  font-size: 18px;
  color: var(--text-color);
}

.guide-box pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 24px;
  border-radius: 18px;
  overflow: auto;
  direction: ltr;
  text-align: left;
  font-size: 14px;
  line-height: 2;
  font-family: Consolas, monospace;
}

.guide-box ul {
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  gap: 80px;
}

.guide-box li {
  position: relative;
  padding-right: 28px;
  margin-bottom: 14px;
  color: #475569;
  line-height: 2;
}

.guide-box li:last-child {
  margin-bottom: 0;
}

.guide-box li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-color);
  position: absolute;
  right: 0;
  top: 13px;
}

.guide-box.note {
  background: var(--primary-light);
  border-color: #b8e8eb;
}

.guide-box.note strong {
  display: block;
  margin-bottom: 12px;
  color: var(--primary-deep);
  font-size: 17px;
}

.guide-box.note p {
  color: #475569;
  line-height: 2;
  margin: 0;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 9999;
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  width: 480px;
  max-width: 90%;
  background: var(--white);
  border-radius: 28px;
  padding: 40px;
  text-align: center;
  transform: translateY(20px) scale(0.95);
  transition: 0.3s;
  box-shadow: 0 35px 80px rgba(15, 23, 42, 0.18);
}

.modal.show .modal-card {
  transform: translateY(0) scale(1);
}

.modal-icon {
  width: 72px;
  height: 72px;
  margin: auto;
  margin-bottom: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: var(--white);
  font-size: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 15px 40px rgba(34, 197, 94, 0.25);
}

.modal-icon svg {
  width: 32px;
  height: 32px;
}

.modal-card h2 {
  margin-bottom: 18px;
  color: var(--text-color);
}

.modal-card p {
  color: var(--text-light);
  line-height: 2;
  margin-bottom: 34px;
}

.modal-card button {
  width: 180px;
  height: 54px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--white);
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary));
  transition: 0.25s;
}

.modal-card button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(64, 193, 199, 0.25);
}

.json-form {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.form-group textarea {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 18px;
  font-size: 15px;
  transition: 0.25s;
  font-family: inherit;
  line-height: 2;
  background: #fff;
}

.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(64, 193, 199, 0.08);
}

.guide-box strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text-color);
}

.guide-box p {
  color: var(--text-light);
  line-height: 2;
}

.guide-box summary {
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color);
  list-style: none;
  margin-bottom: 18px;
}

.guide-box summary::-webkit-details-marker {
  display: none;
}

.guide-box summary::before {
  content: "＋";
  margin-left: 10px;
  color: var(--primary-color);
  font-size: 18px;
  transition: 0.3s;
}

details[open] summary::before {
  content: "－";
}

.guide-box h4 {
  margin-top: 22px;
  margin-bottom: 16px;
  color: var(--text-color);
}

.submit-card {
  text-align: center;
}

.submit-card p {
  color: var(--text-light);
  line-height: 2;
  margin-bottom: 28px;
}

.primary-btn {
  width: 240px;
  height: 56px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary));
  color: var(--white);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.25s;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 35px rgba(64, 193, 199, 0.22);
}

.primary-btn:active {
  transform: scale(0.98);
}

.personality-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.tone-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-color);
}

.tone-card {
  background: var(--white);
  border: 1px solid #e8ecf3;
  border-radius: 18px;
  padding: 18px;
  cursor: pointer;
  transition: 0.28s;
  position: relative;
  overflow: hidden;
}

.tone-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(64, 193, 199, 0.05),
    rgba(64, 193, 199, 0)
  );
  opacity: 0;
  transition: 0.3s;
}

.tone-card:hover {
  transform: translateY(-4px);
  border-color: #8ed4d8;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08);
}

.tone-card:hover::before {
  opacity: 1;
}

.tone-card.active {
  border: 2px solid var(--primary-color);
  box-shadow: 0 12px 35px rgba(64, 193, 199, 0.18);
}

.tone-card.active::after {
  content: "✓";
  position: absolute;
  top: 14px;
  left: 14px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-color);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.tone-icon {
  font-size: 34px;
  margin-bottom: 14px;
}

.tone-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 6px;
}

.tone-desc {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.8;
}

.personality-form input,
.personality-form textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 15px 18px;
  font-size: 15px;
  transition: 0.25s;
}

.personality-form textarea {
  resize: vertical;
  min-height: 140px;
}

.personality-form input:focus,
.personality-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(64, 193, 199, 0.08);
}

.tone-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.tone-card {
  border: 1px solid #e8ecf3;
  border-radius: 18px;
  background: #fff;
  padding: 20px;
  cursor: pointer;
  transition: 0.25s;
}

.tone-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-color);
  box-shadow: 0 12px 30px rgba(64, 193, 199, 0.12);
}

.tone-card.active {
  border: 2px solid var(--primary-color);
  background: var(--active);
}

.tone-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.tone-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.tone-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-color);
}

.tone-desc {
  margin-top: 4px;
  color: #6b7280;
  font-size: 14px;
}

.tone-example {
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  padding: 14px;
  color: #475569;
  line-height: 2;
  font-size: 14px;
  font-style: italic;
}

.tone-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.robot-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
}

.robot-option {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  cursor: pointer;
  transition: 0.2s;
}

.robot-option:hover {
  background: var(--bg);
}

.robot-option.active {
  background: var(--active);
}

.robot-name {
  font-size: 15px;
}

.robot-list {
  overflow: auto;
  max-height: 250px;
}

.dropdown-arrow {
  transition: 0.25s;
}

.robot-dropdown-menu {
  position: absolute;
  top: 56px;
  width: 100%;
  background: white;
  border-radius: 22px;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.1);
  border: 1px solid #eceef5;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: 0.25s;
  z-index: 100;
}

.robot-dropdown {
  position: relative;
  height: 100%;
}

.robot-dropdown.open .robot-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.robot-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.robot-selected {
  height: 100%;
  background: white;
  border: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 18px;
  cursor: pointer;
  transition: 0.25s;
  border-radius: 18px;
  font-size: 15px;
}

.robot-selected:hover {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(64, 193, 199, 0.08);
}

.robot-selected-info {
  display: flex;
  gap: 14px;
  align-items: center;
}

/*==========================================
    Responsive
==========================================*/

@media (max-width: 700px) {
  .tone-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .auth-container {
    grid-template-columns: 1fr;
    width: min(520px, 100%);
  }

  .auth-left {
    display: none;
  }

  .auth-card__mobile-brand {
    display: flex;
  }

  .auth-right {
    padding: 40px 28px;
  }

  .auth-card {
    max-width: none;
  }
}

@media (max-width: 768px) {
  .json-input-group {
    flex-direction: column;
  }

  .json-input-group button {
    width: 100%;
    height: 56px;
  }
}

@media (max-width: 650px) {
  .auth-page {
    padding: 16px 12px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .auth-right {
    padding: 28px 20px;
  }

  .auth-title {
    font-size: 24px;
  }

  .auth-segment {
    grid-template-columns: 1fr;
  }

  .form-input,
  .auth-btn {
    height: 52px;
  }

  .auth-url-field__input {
    height: 50px;
  }
}

.embed-box {
  margin: 24px 0;
  text-align: right;
}

.embed-box pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 20px;
  border-radius: 16px;
  overflow: auto;
  direction: ltr;
  text-align: left;
  font-size: 13px;
  line-height: 1.8;
  font-family: Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-all;
}

.embed-instructions {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  text-align: right;
}

.embed-instructions li {
  position: relative;
  padding-right: 24px;
  margin-bottom: 12px;
  color: #475569;
  line-height: 1.9;
}

.embed-instructions li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-color);
  position: absolute;
  right: 0;
  top: 10px;
}

.copy-btn {
  width: auto;
  min-width: 160px;
  padding: 0 24px;
  margin-top: 8px;
}

.form-error {
  color: var(--danger);
  font-size: 14px;
  margin-top: 8px;
  line-height: 1.8;
}

.form-error--field {
  margin-top: 0;
  font-size: 12.5px;
}

.form-hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.6;
}

.form-input.is-invalid {
  border-color: var(--danger);
  background: #fff8f8;
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.12);
}

.form-input.is-invalid:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.16);
}

.form-group:has(.form-input.is-invalid) .form-hint {
  display: none;
}

.modal-card.modal-wide {
  width: min(640px, 94%);
  text-align: right;
}

/* ── Shared widget header ── */

.w-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.w-header__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.w-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.w-brand__logo {
  border-radius: 12px;
  display: block;
}

.w-brand__name {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
}

.w-header__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s;
  flex-shrink: 0;
  margin-right: auto;
}

.w-header__link:hover {
  color: var(--primary-dark, var(--secondary));
}

/* ── Setup page wrapper ── */

.widget-page {
  min-height: calc(100vh - 65px);
  background:
    radial-gradient(circle at top right, #d0f0f2 0%, transparent 40%),
    var(--bg);
  padding-bottom: 48px;
}

.widget-page__intro {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 40px 0;
}

.widget-page__intro h1 {
  margin: 0;
  font-size: clamp(24px, 4vw, 32px);
  color: var(--text);
}

.widget-page__intro p {
  margin: 10px 0 0;
  color: var(--text-light);
  font-size: 15px;
}

.widget-page .main {
  max-width: 1180px;
  margin: 0 auto;
}

.json-card {
  border-color: var(--border);
}

.tone-card.active .tone-icon {
  background: var(--primary-light);
}

@media (max-width: 900px) {
  .w-brand__name {
    font-size: 12px;
    max-width: 110px;
  }

  .widget-page__intro {
    padding: 24px 20px 0;
  }
}

@media (max-width: 640px) {
  .w-header__inner {
    padding: 10px 16px;
  }

  .w-header__link {
    font-size: 13px;
  }
}

