/* ================= کدهای اصلی شما (مربوط به چت و پنل) ================= */
* {
  box-sizing: border-box;
}
:root {
  --navy: #0f2040;
  --navy-light: #1a335c;
  --accent: #14b8a6;
  --bg: #f4f5f7;
  --card: #ffffff;
  --border: #e3e6ec;
  --text: #1a1a2e;
  --muted: #6b7280;
}
body {
  margin: 0;
  font-family: Vazirmatn, Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}
a {
  color: var(--navy);
}
.center {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}
.card {
  background: var(--card);
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(15, 32, 64, 0.08);
  border: 1px solid var(--border);
}
.auth-card {
  width: min(420px, 92vw);
}
.auth-brand {
  text-align: center;
  margin-bottom: 20px;
}
/* برند لینک‌شده به صفحه اصلی (ورود) */
.auth-brand-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.auth-brand h1 {
  margin: 8px 0 4px;
  font-size: 28px;
  color: var(--navy);
}
.auth-brand .subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
.logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
}
.auth-card h2 {
  font-size: 18px;
  margin: 0 0 12px;
  color: var(--text);
}
input,
textarea {
  width: 100%;
  padding: 12px 14px;
  margin: 7px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  transition: border 0.2s;
}
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(15, 32, 64, 0.08);
}
button {
  border: 0;
  border-radius: 10px;
  padding: 11px 16px;
  cursor: pointer;
  background: var(--navy);
  color: white;
  font-weight: 600;
  font-family: inherit;
  transition: opacity 0.2s;
}
button:hover {
  opacity: 0.9;
}
.auth-card button {
  width: 100%;
  margin-top: 8px;
}
.error {
  color: #b00020;
  min-height: 20px;
  font-size: 13px;
}
.auth-link {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.auth-link a {
  font-weight: 600;
}
.app {
  display: flex;
  height: 100vh;
}
aside {
  width: 300px;
  background: var(--navy);
  color: #fff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
  text-decoration: none;
  color: #fff;
}
.brand span {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
}
.brand small {
  font-size: 11px;
  opacity: 0.7;
  letter-spacing: 1px;
}
/* لوگوی سایدبار چت */
.brand-logo2 {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 14px;
  flex-shrink: 0;
}
.primary {
  background: var(--accent);
  color: var(--navy);
  font-weight: 700;
}
/* دکمه گفتگوی جدید: جمع‌وجورتر برای فضای بیشتر تاریخچه */
#newChat {
  padding: 9px 14px;
  font-size: 14px;
}
/* جستجو در گفتگوها (span ویرایش‌شونده — input نیست) */
.history-search {
  display: block;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  padding: 8px 12px;
  margin: 0 0 8px;
  width: 100%;
  outline: none;
  cursor: text;
  white-space: nowrap;
  overflow: hidden;
}
.history-search:empty::before {
  content: attr(data-placeholder);
  color: rgba(255, 255, 255, 0.5);
}
.history-search:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.14);
}
.secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
aside h3 {
  margin: 8px 0 0;
  font-size: 12px;
  opacity: 0.6;
  letter-spacing: 1px;
}
#history {
  overflow: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}
#history::-webkit-scrollbar {
  width: 7px;
}
#history::-webkit-scrollbar-track {
  background: transparent;
}
#history::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 8px;
}
#history::-webkit-scrollbar-thumb:hover {
  background: rgba(20, 184, 166, 0.6);
}
.messages {
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 32, 64, 0.25) transparent;
}
.messages::-webkit-scrollbar {
  width: 7px;
}
.messages::-webkit-scrollbar-track {
  background: transparent;
}
.messages::-webkit-scrollbar-thumb {
  background: rgba(15, 32, 64, 0.22);
  border-radius: 8px;
}
.messages::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 32, 64, 0.4);
}
.history-item {
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 8px;
}
.history-title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-del {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.2s;
  color: rgba(255, 255, 255, 0.7);
}
.history-item:hover .history-del {
  opacity: 1;
}
.history-del:hover {
  background: rgba(255, 80, 80, 0.35);
  color: #fff;
}
.history-rename {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.2s;
  color: rgba(255, 255, 255, 0.85);
}
.history-rename svg,
.history-del svg {
  width: 15px;
  height: 15px;
  display: block;
}
.history-item:hover .history-rename {
  opacity: 0.85;
}
.history-rename:hover {
  background: rgba(255, 255, 255, 0.15);
  opacity: 1;
}
.history-rename-input {
  flex: 1;
  min-width: 0;
  display: block;
  margin: 0;
  padding: 3px 8px;
  font-size: 12.5px;
  border-radius: 6px;
  background: #fff;
  color: var(--navy);
  outline: none;
  cursor: text;
  white-space: nowrap;
  overflow: hidden;
}
.history-item:hover {
  background: rgba(255, 255, 255, 0.12);
}
.history-item.active {
  background: var(--accent);
  color: var(--navy);
}
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
header {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
}
.user-email {
  font-size: 12px;
  color: var(--muted);
  direction: ltr;
}

/* منوی کاربر */
.hidden {
  display: none !important;
}
.user-menu {
  position: relative;
}
.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid var(--border);
}
.user-avatar:hover {
  opacity: 1;
  border-color: var(--accent);
}
.user-dropdown {
  position: absolute;
  left: 0;
  top: 46px;
  min-width: 210px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 32, 64, 0.15);
  padding: 8px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 4px;
  /* همیشه رندر ولی نامرئی: فونت از اول لود می‌شود و موقع باز شدن پرش ندارد */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s;
  pointer-events: none;
}
.user-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}
.user-dropdown-email {
  font-size: 12px;
  color: var(--muted);
  direction: ltr;
  text-align: center;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-dropdown button {
  background: none;
  color: var(--text);
  text-align: right;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 12px;
  border-radius: 8px;
}
.user-dropdown button:hover {
  background: var(--bg);
  opacity: 1;
}

/* مودال‌ها */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 32, 64, 0.45);
  z-index: 3000;
}
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, 92vw);
  max-height: 84vh;
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  z-index: 3001;
  box-shadow: 0 24px 64px rgba(15, 32, 64, 0.3);
}
.modal h3 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 17px;
}
.modal p {
  font-size: 14px;
  color: var(--text);
  line-height: 1.9;
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.modal-actions button {
  flex: 1;
}
button.danger {
  background: #b00020;
  color: #fff;
  font-weight: 700;
}
/* دکمه بازیابی در سطل زباله: خوانا روی پس‌زمینه روشن */
.restore-btn {
  background: var(--navy);
  color: #fff;
  font-weight: 700;
}
button.small {
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 8px;
  flex-shrink: 0;
}
.setting-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  font-size: 14px;
  cursor: pointer;
}
.setting-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--navy);
}
.setting-row small {
  color: var(--muted);
  font-size: 12px;
}

/* دکمه‌های آیکن‌دار (منو، سایدبار، سطل بایگانی) */
.menu-btn,
.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.menu-btn svg,
.btn-icon svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
#openTrash {
  justify-content: center;
}
.modal-title-icon {
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-title-icon svg {
  width: 20px;
  height: 20px;
}

/* بایگانی مکالمات */
.trash-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.trash-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
}
.trash-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.messages {
  flex: 1;
  overflow: auto;
  padding: 28px;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
}
.message {
  padding: 14px 18px;
  border-radius: 14px;
  margin: 12px 0;
  max-width: 85%;
  white-space: pre-wrap;
  line-height: 1.9;
  font-size: 14px;
}
.user {
  margin-right: auto;
  background: linear-gradient(
    135deg,
    var(--landing-primary-blue),
    var(--landing-primary-teal)
  );
  color: #fff;
  border-radius: 14px 14px 4px 14px;
  box-shadow: 0 4px 15px rgba(13, 148, 136, 0.2);
}
.assistant {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px 14px 14px 4px;
}
/* پیام خطا: اکشن ندارد و لبه‌اش قرمز ملایم است */
.message.assistant.error-msg {
  border-color: rgba(176, 0, 32, 0.4);
  background: #fff8f8;
}
/* دکمه تلاش مجدد زیر پیام خطا */
.retry-btn {
  margin-top: 10px;
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 10px;
}
.retry-btn:hover {
  opacity: 0.92;
}
.welcome {
  text-align: center;
  color: var(--muted);
  margin-top: 8vh;
}
.welcome-icon {
  font-size: 48px;
}
.welcome h2 {
  color: var(--navy);
  margin: 10px 0 8px;
}
.welcome p {
  font-size: 13px;
  max-width: 560px;
  margin: 0 auto;
}
.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 20px 0;
}
.suggestion {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--navy);
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
}
.suggestion:hover {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}
.disclaimer {
  font-size: 11px !important;
  color: #b45309 !important;
  margin-top: 16px !important;
}
/* ساختار داخلی پیام‌های مارک‌داون */
.message p {
  margin: 8px 0;
}
.message p:first-child {
  margin-top: 0;
}
.message p:last-child {
  margin-bottom: 0;
}
.message h4 {
  margin: 12px 0 6px;
  font-size: 15px;
  color: var(--navy);
}
.message h5 {
  margin: 10px 0 4px;
  font-size: 14px;
  color: var(--navy);
}
.message ol,
.message ul {
  margin: 8px 0;
  padding-right: 20px;
}
.message li {
  margin: 4px 0;
}
.message hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 12px 0;
}
.message blockquote {
  border-right: 3px solid var(--accent);
  margin: 8px 0;
  padding: 6px 12px;
  color: var(--text);
  background: var(--bg);
  border-radius: 8px;
}
.message a {
  color: var(--landing-primary-teal);
  font-weight: 600;
}
.message code {
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 12.5px;
  direction: ltr;
  unicode-bidi: embed;
}
.message pre {
  background: #0f2040;
  color: #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  overflow: auto;
  direction: ltr;
  text-align: left;
  font-size: 12.5px;
  line-height: 1.8;
}
.message pre code {
  background: none;
  border: none;
  color: inherit;
  padding: 0;
  direction: ltr;
}
.message table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 13px;
}
.message th,
.message td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: right;
}
.message th {
  background: var(--bg);
  color: var(--navy);
}
.message del {
  color: var(--muted);
}
.composer {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding: 12px 14px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(
        120deg,
        rgba(13, 148, 136, 0.45),
        rgba(30, 58, 138, 0.35),
        rgba(20, 184, 166, 0.45),
        rgba(13, 148, 136, 0.45)
      )
      border-box;
  background-size:
    auto,
    250% 250%;
  border: 1.5px solid transparent;
  border-radius: 20px;
  max-width: 860px;
  width: calc(100% - 36px);
  margin: 0 auto 10px;
  box-shadow: 0 8px 28px rgba(15, 32, 64, 0.08);
  /* فقط border خیلی ملایم جابه‌جا می‌شود */
  animation: composerBorderShift 9s ease-in-out infinite alternate;
}
@keyframes composerBorderShift {
  from {
    background-position:
      0 0,
      0% 40%;
  }
  to {
    background-position:
      0 0,
      100% 60%;
  }
}
.composer textarea {
  margin: 0;
  resize: none;
  max-height: 120px;
  border: none;
  background: transparent;
}
.composer textarea::placeholder {
  color: #9aa3b2;
}
.composer textarea:focus {
  border: none;
  box-shadow: none;
}
/* سه‌نقطه متحرک «در حال جستجو» */
.typing-text {
  display: inline-block;
  transition: opacity 0.3s ease;
}
.typing-dots {
  display: inline-flex;
  gap: 4px;
  margin-right: 6px;
  vertical-align: middle;
  transition: opacity 0.3s ease;
}
.typing-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--navy);
  opacity: 0.35;
  animation: typingBounce 1.2s ease-in-out infinite;
}
.typing-dots i:nth-child(2) {
  animation-delay: 0.15s;
}
.typing-dots i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes typingBounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
}
/* ردیف اکشن زیر پاسخ دستیار: کپی / خوب / بد / تولید دوباره */
.msg-actions {
  display: flex;
  gap: 4px;
  margin-top: 10px;
}
.action-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 400;
}
.action-btn:hover {
  opacity: 1;
  background: #f1f5f9;
  color: var(--navy);
}
.action-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.action-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}
.action-btn.vote-good.voted {
  background: rgba(13, 148, 136, 0.15);
  border-color: rgba(13, 148, 136, 0.4);
}
.action-btn.vote-bad.voted {
  background: rgba(176, 0, 32, 0.1);
  border-color: rgba(176, 0, 32, 0.35);
}
/* لوگوی صفحه خوشامد گفتگوی جدید */
.welcome-logo {
  width: 76px;
  height: 76px;
  object-fit: contain;
}
/* دکمه ارسال دایره‌ای مثل ChatGPT */
.send-btn {
  align-self: flex-end;
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--landing-primary-blue),
    var(--landing-primary-teal)
  );
  color: #fff;
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.send-btn:hover {
  opacity: 1;
  transform: scale(1.06);
  box-shadow: 0 6px 18px rgba(13, 148, 136, 0.45);
}
.composer-hint {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin: 4px 0 10px;
}
@media (max-width: 768px) {
  aside {
    display: none;
  }
  .messages {
    padding: 16px;
  }
  .message {
    max-width: 92%;
  }
}

/* ================= استایل‌های صفحه لندینگ و صفحات فرعی ================= */
:root {
  --landing-dark-blue: #0b1b5a;
  --landing-primary-blue: #1e3a8a;
  --landing-primary-teal: #0d9488;
  --landing-light-teal: #10b981;
  --landing-bg: #f8fafc;
  --landing-text-main: #1e293b;
  --landing-text-muted: #64748b;
  --landing-white: #ffffff;
  --landing-transition: all 0.3s ease;
}

.landing-body,
.page-body {
  background: linear-gradient(
    180deg,
    #f8fafc 0%,
    #eef2f6 30%,
    #e2e8f0 70%,
    #f8fafc 100%
  );
  color: var(--landing-text-main);
  overflow-x: hidden;
  margin: 0;
  min-height: 100vh;
}

/* Navbar */
.landing-nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 15px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  transition: var(--landing-transition);
}
.landing-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.landing-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--landing-dark-blue);
}
.landing-brand img {
  height: 50px;
  object-fit: contain;
}
.landing-brand strong {
  font-size: 20px;
  font-weight: 800;
}
/* تگ‌لاین زیر لوگو: فقط لحظه اول لود، از کوچک به بزرگ */
.landing-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}
.landing-brand-tagline {
  font-size: 11px;
  font-weight: 400;
  color: var(--landing-text-muted);
  white-space: nowrap;
  transform-origin: right center;
  animation: taglineZoom 0.9s ease-out both;
}
@keyframes taglineZoom {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.landing-links {
  display: flex;
  gap: 20px;
  align-items: center;
} /* کاهش فاصله برای جا شدن ۵ لینک */
.landing-links a {
  text-decoration: none;
  color: var(--landing-text-main);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--landing-transition);
}
.landing-links a:hover {
  color: var(--landing-primary-teal);
}
.landing-btn {
  background: linear-gradient(
    135deg,
    var(--landing-primary-blue),
    var(--landing-primary-teal)
  );
  color: var(--landing-white);
  padding: 10px 25px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(13, 148, 136, 0.3);
  transition: var(--landing-transition);
  border: none;
  cursor: pointer;
}
.landing-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.4);
  color: var(--landing-white);
}

/* Hero (Landing) */
.landing-hero {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 120px 5% 60px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.glow-effect-1 {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(16, 185, 129, 0.15) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  top: -100px;
  left: -100px;
  z-index: -1;
  border-radius: 50%;
  animation: pulse 8s infinite alternate;
}
.glow-effect-2 {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(30, 58, 138, 0.1) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  bottom: -100px;
  right: -100px;
  z-index: -1;
  border-radius: 50%;
  animation: pulse 10s infinite alternate-reverse;
}
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.1);
    opacity: 1;
  }
}

.landing-hero-content {
  flex: 1;
  max-width: 600px;
  animation: slideUp 1s ease forwards;
}
.landing-hero-badge {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(13, 148, 136, 0.1);
  color: var(--landing-primary-teal);
  border-radius: 50px;
  font-weight: bold;
  font-size: 0.9rem;
  margin-bottom: 20px;
}
.landing-hero-content h1 {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 20px;
  color: var(--landing-dark-blue);
}
.landing-hero-content h1 span {
  background: linear-gradient(
    135deg,
    var(--landing-primary-blue),
    var(--landing-primary-teal)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.landing-hero-content p {
  font-size: 1.2rem;
  color: var(--landing-text-muted);
  line-height: 1.8;
  margin-bottom: 40px;
}
.landing-hero-buttons {
  display: flex;
  gap: 20px;
}
.landing-btn-primary {
  background: linear-gradient(
    135deg,
    var(--landing-primary-blue),
    var(--landing-primary-teal)
  );
  color: var(--landing-white);
  padding: 15px 35px;
  border-radius: 50px;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: bold;
  box-shadow: 0 10px 25px rgba(13, 148, 136, 0.3);
  transition: var(--landing-transition);
  border: none;
  cursor: pointer;
}
.landing-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(13, 148, 136, 0.4);
}
.landing-btn-secondary {
  background: var(--landing-white);
  color: var(--landing-dark-blue);
  padding: 15px 35px;
  border-radius: 50px;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: bold;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: var(--landing-transition);
  border: 1px solid #e2e8f0;
}
.landing-btn-secondary:hover {
  background: #f8fafc;
  transform: translateY(-3px);
}

.landing-hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  animation: fadeIn 1.5s ease forwards;
}
.landing-hero-image img {
  width: 100%;
  max-width: 450px;
  border-radius: 30px;
  filter: drop-shadow(0 20px 40px rgba(13, 148, 136, 0.2));
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0px);
  }
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Features (چرا محق‌شو؟) */
.landing-features {
  padding: 100px 5%;
  background: transparent;
  position: relative;
  z-index: 1;
}
.landing-section-title {
  text-align: center;
  margin-bottom: 60px;
}
.landing-section-title h2 {
  font-size: 2.5rem;
  color: var(--landing-dark-blue);
  margin-bottom: 15px;
}
.landing-section-title p {
  color: var(--landing-text-muted);
  font-size: 1.1rem;
}
.landing-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}
.landing-feature-card {
  background: var(--landing-white);
  padding: 40px 30px;
  border-radius: 24px;
  text-align: center;
  transition:
    transform 1.2s ease,
    box-shadow 1.2s ease,
    border-color 1.2s ease;
  border: 1px solid transparent;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
/* لایه گرادیان زیر محتوا: با opacity آرام ظاهر می‌شود تا پرش نداشته باشد */
.landing-feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    var(--landing-primary-blue),
    var(--landing-primary-teal)
  );
  opacity: 0;
  transition: opacity 1.2s ease;
  z-index: -1;
}
.landing-feature-card:hover::before {
  opacity: 1;
}
.landing-feature-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: transparent;
  box-shadow: 0 25px 50px rgba(13, 148, 136, 0.35);
}
.landing-feature-card:hover h3 {
  color: #fff;
}
.landing-feature-card:hover p {
  color: rgba(255, 255, 255, 0.85);
}
.landing-feature-card:hover .landing-feature-icon {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.12) rotate(-8deg);
}
.landing-feature-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 25px;
  background: linear-gradient(
    135deg,
    rgba(30, 58, 138, 0.1),
    rgba(13, 148, 136, 0.1)
  );
  border-radius: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--landing-primary-teal);
  font-size: 2rem;
  transition:
    transform 1.2s ease,
    background 1.2s ease;
}
.landing-feature-card h3 {
  font-size: 1.4rem;
  color: var(--landing-dark-blue);
  margin-bottom: 15px;
  transition: color 1.2s ease;
}
.landing-feature-card p {
  color: var(--landing-text-muted);
  line-height: 1.7;
  transition: color 1.2s ease;
}

/* How it works (نحوه کار) */
.landing-how {
  padding: 100px 5%;
  background: transparent;
  position: relative;
  z-index: 1;
}
.landing-how-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
}
.landing-how-timeline {
  position: relative;
  padding-right: 30px;
}
.landing-how-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 25px;
  width: 3px;
  background: linear-gradient(
    to bottom,
    var(--landing-primary-blue),
    var(--landing-primary-teal),
    transparent
  );
  border-radius: 3px;
  opacity: 0.3;
}
.how-step-item {
  position: relative;
  padding-right: 70px;
  margin-bottom: 45px;
  text-align: right;
  transition: var(--landing-transition);
}
.how-step-item:last-child {
  margin-bottom: 0;
}
.how-step-item:hover {
  transform: translateX(-8px);
}
.how-step-number {
  position: absolute;
  right: 0;
  top: 0;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.4rem;
  font-weight: 900;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--landing-primary-blue),
    var(--landing-primary-teal)
  );
  color: white;
  box-shadow:
    0 0 0 6px rgba(13, 148, 136, 0.1),
    0 8px 20px rgba(13, 148, 136, 0.2);
  z-index: 1;
  transition: var(--landing-transition);
}
.how-step-item:hover .how-step-number {
  box-shadow:
    0 0 0 10px rgba(13, 148, 136, 0.15),
    0 10px 25px rgba(13, 148, 136, 0.3);
  transform: scale(1.1);
}
.how-step-content {
  padding-top: 5px;
}
.how-step-content h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.3rem;
  color: var(--landing-dark-blue);
  font-weight: 800;
}
.how-step-content p {
  margin: 0;
  font-size: 14px;
  color: var(--landing-text-muted);
  line-height: 1.8;
}

/* Live Preview */
.landing-preview-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  box-shadow:
    0 30px 60px rgba(15, 32, 64, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  overflow: hidden;
  position: relative;
}
.landing-preview-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(16, 185, 129, 0.05),
    transparent 60%
  );
  pointer-events: none;
}
.landing-preview-header {
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  background: rgba(248, 250, 252, 0.8);
  backdrop-filter: blur(10px);
}
.landing-preview-header span {
  font-size: 13px;
  color: var(--landing-text-muted);
  font-weight: 700;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}
.landing-preview-body {
  padding: 25px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.landing-bubble {
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.8;
  max-width: 90%;
  position: relative;
  z-index: 1;
}
.landing-bubble.user {
  align-self: flex-start;
  background: linear-gradient(
    135deg,
    var(--landing-primary-blue),
    var(--landing-primary-teal)
  );
  color: white;
  border-radius: 16px 16px 4px 16px;
  box-shadow: 0 4px 15px rgba(13, 148, 136, 0.2);
}
.landing-bubble.assistant {
  align-self: flex-end;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px 16px 16px 4px;
  color: var(--landing-text-main);
}
.landing-citation {
  margin-top: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 11px;
  color: var(--landing-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.landing-citation strong {
  color: var(--landing-dark-blue);
}

/* Chat flow preview */
.landing-preview-body.lrp-chat {
  max-height: 430px;
  overflow-y: auto;
  gap: 12px;
}
.lrp-minirow {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.lrp-minirow span {
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  border-radius: 10px;
  padding: 6px 12px;
}
.lrp-minirow .gray {
  background: #64748b;
}
.lrp-minirow .teal {
  background: #0d9488;
}
.lrp-status {
  font-size: 12.5px;
  font-weight: 800;
  color: #047857;
}
.lrp-steps-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--landing-dark-blue);
  margin: 2px 0 0;
}
.lrp-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: var(--landing-text-main);
  line-height: 1.9;
}
.lrp-steps small {
  display: block;
  color: var(--landing-text-muted);
  font-size: 11px;
}
.lrp-tip {
  font-size: 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--landing-text-main);
  line-height: 1.9;
}
.lrp-resume {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 18px 16px;
  font-size: 12.5px;
  line-height: 2;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}
.lrp-resume .lrp-rhead {
  text-align: center;
  margin-bottom: 10px;
}
.lrp-resume .lrp-rhead strong {
  display: block;
  font-size: 15px;
  color: var(--landing-dark-blue);
}
.lrp-resume .lrp-rhead span {
  display: block;
  font-size: 11px;
  color: var(--landing-text-muted);
}
.lrp-resume .lrp-rhead em {
  display: block;
  font-style: normal;
  font-size: 10.5px;
  color: #94a3b8;
}
.lrp-resume h4 {
  font-size: 12.5px;
  color: #0f172a;
  border-bottom: 2px solid #0d9488;
  padding-bottom: 3px;
  margin: 12px 0 4px;
}
.lrp-resume p,
.lrp-resume li {
  margin: 0;
  color: var(--landing-text-main);
}
.lrp-resume ul {
  margin: 0;
  padding-right: 18px;
}
.lrp-edit {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  background: #fafafa;
}
.lrp-edit h4 {
  font-size: 13px;
  color: var(--landing-dark-blue);
  margin: 0 0 6px;
}
.lrp-edit p {
  font-size: 11.5px;
  color: var(--landing-text-muted);
  margin: 0 0 8px;
  line-height: 1.9;
}
.lrp-fakeinput {
  font-size: 11.5px;
  color: #94a3b8;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  line-height: 1.9;
}
.lrp-apply {
  margin-top: 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: #7c3aed;
  border-radius: 10px;
  padding: 8px;
}
.lrp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.lrp-chips span {
  font-size: 11px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 4px 10px;
  color: var(--landing-text-main);
}
.lrp-actions {
  display: flex;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.lrp-btn {
  flex: 1;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  padding: 10px;
  border-radius: 10px;
  color: #fff;
}
.lrp-btn.word {
  background: #1d4ed8;
}
.lrp-btn.pdf {
  background: #047857;
}

/* Footer */
.landing-footer {
  background: linear-gradient(180deg, transparent 0%, #ffffff 100%);
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  padding: 40px 5% 20px;
  position: relative;
  z-index: 1;
}
.landing-footer-top {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 15px;
  text-align: right;
}
.footer-brand img {
  height: 70px;
  object-fit: contain;
}
.footer-brand-text strong {
  font-size: 1.6rem;
  color: var(--landing-dark-blue);
  display: block;
  margin-bottom: 5px;
}
.footer-brand-text p {
  font-size: 13px;
  color: var(--landing-text-muted);
  margin: 0;
  max-width: 350px;
  line-height: 1.6;
}
.footer-links {
  display: flex;
  gap: 25px;
}
.footer-links a {
  color: var(--landing-text-main);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: var(--landing-transition);
}
.footer-links a:hover {
  color: var(--landing-primary-teal);
}
.footer-enamad img {
  height: 90px;
  object-fit: contain;
}
.landing-footer-bottom {
  max-width: 1200px;
  margin: 30px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  text-align: center;
}
.footer-copyright-text {
  margin: 0;
  color: var(--landing-text-muted);
  font-size: 13px;
  white-space: nowrap;
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 1.2s ease;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ================= استایل‌های اختصاصی صفحات فرعی ================= */

/* هدر صفحات فرعی (اصلاح شده) */
.page-header {
  padding: 120px 5% 40px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.page-header h1 {
  font-size: 2.2rem; /* کاهش سایز برای هماهنگی با هدر */
  font-weight: 800;
  color: var(--landing-dark-blue);
  margin-bottom: 10px;
}
.page-header p {
  font-size: 1rem; /* کاهش سایز متن */
  color: var(--landing-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* محتوای صفحات فرعی (اصلاح شده) */
.page-content {
  max-width: 1100px; /* افزایش عرض برای رفع فضای خالی دو طرف */
  margin: 0 auto 80px;
  padding: 0 5%;
  position: relative;
  z-index: 1;
}

/* کارت محتوا */
.content-card {
  background: var(--landing-white);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04);
  border: 1px solid #e2e8f0;
}
.content-card h2 {
  font-size: 1.6rem;
  color: var(--landing-dark-blue);
  margin-top: 0;
  margin-bottom: 20px;
}
.content-card h3 {
  font-size: 1.2rem;
  color: var(--landing-dark-blue);
  margin-top: 30px;
  margin-bottom: 15px;
}
.content-card p,
.content-card li {
  font-size: 15px;
  color: var(--landing-text-muted);
  line-height: 2;
  margin-bottom: 15px;
}
.content-card ul {
  padding-right: 20px;
  margin-bottom: 20px;
}
.content-card li::marker {
  color: var(--landing-primary-teal);
  font-weight: bold;
}

/* فرم تماس */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group label {
  font-weight: 700;
  font-size: 14px;
  color: var(--landing-dark-blue);
}
.form-group input,
.form-group textarea {
  padding: 15px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  background: #f8fafc;
  transition: var(--landing-transition);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--landing-primary-teal);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}
.contact-form button {
  background: linear-gradient(
    135deg,
    var(--landing-primary-blue),
    var(--landing-primary-teal)
  );
  color: white;
  padding: 15px 30px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  border: none;
  transition: var(--landing-transition);
  margin-top: 10px;
}
.contact-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(13, 148, 136, 0.2);
}

/* Responsive */
@media (max-width: 992px) {
  .landing-hero {
    flex-direction: column;
    text-align: center;
    padding-top: 100px;
  }
  .landing-hero-content {
    margin-bottom: 40px;
  }
  .landing-hero-buttons {
    justify-content: center;
  }
  .landing-hero-content h1 {
    font-size: 2.8rem;
  }
  .landing-nav-inner {
    flex-direction: column;
    gap: 15px;
  }
  .landing-nav {
    position: relative;
    padding: 15px;
  }
  .landing-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  .landing-how-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }
  .landing-how-timeline {
    padding-right: 10px;
  }
  .landing-how-timeline::before {
    right: 15px;
  }
  .how-step-item {
    padding-right: 50px;
  }
  .how-step-number {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    right: -5px;
  }
  .landing-preview-card {
    margin-top: 20px;
  }
  .landing-footer-top {
    flex-direction: column;
    text-align: center;
  }
  .footer-brand {
    flex-direction: column;
    text-align: center;
  }
  .footer-brand-text p {
    margin: 0 auto;
  }
  .footer-links {
    flex-direction: column;
    gap: 15px;
  }
}
@media (max-width: 768px) {
  .landing-hero-content h1 {
    font-size: 2.2rem;
  }
  .landing-hero-buttons {
    flex-direction: column;
  }
  .landing-btn-primary,
  .landing-btn-secondary {
    width: 100%;
  }
  .footer-copyright-text {
    white-space: normal;
  }
  .page-header h1 {
    font-size: 1.8rem;
  }
  .content-card {
    padding: 25px 20px;
  }
}
