/* ==========================================================================
   استایل‌های اختصاصی ابزار متن‌نگار و لوگوساز ۳D آنلاین (Text Maker)
   ========================================================================== */

.tool-page-container {
  max-width: 1180px;
  margin: 0 auto;
  padding-bottom: 50px;
}

.tool-hero-section {
  padding: 36px 16px 24px;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eef3ff;
  color: #194bfb;
  border: 1px solid #bfdbfe;
  padding: 5px 14px;
  border-radius: 24px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.tool-main-heading {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 12px;
  line-height: 1.3;
}

.tool-sub-heading {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   پنل کنترل و فرم ورودی متن
   -------------------------------------------------------------------------- */
.textmaker-control-panel {
  margin: 20px 0 30px;
}

.control-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.input-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 860px) {
  .input-form-grid {
    grid-template-columns: 1.5fr 1fr;
    align-items: center;
  }
}

.field-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.char-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.input-with-action {
  position: relative;
  display: flex;
  align-items: center;
}

.modern-text-input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  background: var(--bg-subtle);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: var(--transition);
  box-sizing: border-box;
}

.modern-text-input:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.btn-clear-text {
  position: absolute;
  left: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
}

.btn-clear-text:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

.preset-words-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.preset-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.preset-chip {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 2px 10px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}

.preset-chip:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.action-btn-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-generate-style {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 24px;
  background: linear-gradient(135deg, #194bfb 0%, #3b82f6 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(25, 75, 251, 0.28);
  transition: var(--transition);
}

.btn-generate-style:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(25, 75, 251, 0.35);
  filter: brightness(1.05);
}

.btn-generate-style:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.selected-style-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.selected-style-indicator strong {
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   بخش نتیجه و پیش‌نمایش خروجی
   -------------------------------------------------------------------------- */
.result-display-section {
  margin: 10px 0 35px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-card {
  background: var(--bg-card);
  border: 2px solid #93c5fd;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 12px 36px rgba(25, 75, 251, 0.12);
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.result-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-badge-success {
  background: #ecfdf5;
  color: #10b981;
  border: 1px solid #a7f3d0;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}

.result-heading {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.btn-close-result {
  background: var(--bg-subtle);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
}

.btn-close-result:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

.result-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.result-image-box {
  position: relative;
  max-width: 640px;
  width: 100%;
  min-height: 240px;
  background: #0f172a;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.result-img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.result-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #ffffff;
  z-index: 10;
}

.spinner-dot-circle {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.result-actions-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.btn-action-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #10b981;
  color: #ffffff;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
  transition: var(--transition);
  text-decoration: none;
}

.btn-action-primary:hover {
  background: #059669;
  transform: translateY(-1px);
}

.btn-action-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}

.btn-action-secondary:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

/* --------------------------------------------------------------------------
   کاتالوگ استایل‌ها و فیلترها
   -------------------------------------------------------------------------- */
.styles-catalog-section {
  margin: 30px 0 40px;
}

.catalog-header-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.catalog-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.catalog-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.catalog-search-box {
  position: relative;
  min-width: 240px;
}

.catalog-search-box input {
  width: 100%;
  padding: 9px 36px 9px 14px;
  font-family: inherit;
  font-size: 0.82rem;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  background: var(--bg-card);
  box-sizing: border-box;
  transition: var(--transition);
}

.catalog-search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.catalog-search-box .search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.category-pills-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-pills-row::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  flex-shrink: 0;
}

.cat-pill:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.cat-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(25, 75, 251, 0.25);
}

/* شبکه کارت‌های استایل */
.styles-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

@media (max-width: 540px) {
  .styles-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }
}

.style-item-card {
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.style-item-card:hover {
  transform: translateY(-3px);
  border-color: #93c5fd;
  box-shadow: var(--shadow-md);
}

.style-item-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow), var(--shadow-md);
  background: #f8faff;
}

.card-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #0f172a;
  overflow: hidden;
}

.style-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.style-item-card:hover .style-thumb-img {
  transform: scale(1.04);
}

.card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
}

.active-check-icon {
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.style-item-card.selected .active-check-icon {
  display: flex;
}

.card-details {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-top-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.card-cat-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
}

.card-en-tag {
  font-size: 0.65rem;
  color: var(--text-light);
  font-family: monospace;
}

.card-style-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 4px;
  line-height: 1.35;
}

.card-style-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.no-results-msg {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-muted);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-light);
}

/* --------------------------------------------------------------------------
   بخش ویژگی‌ها
   -------------------------------------------------------------------------- */
.features-highlight-section {
  margin: 40px 0;
}

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

.feat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 22px;
  text-align: center;
}

.feat-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin: 0 auto 12px;
}

.feat-icon-circle.bg-blue { background: #eef3ff; }
.feat-icon-circle.bg-purple { background: #f5f3ff; }
.feat-icon-circle.bg-green { background: #ecfdf5; }

.feat-heading {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.feat-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* --------------------------------------------------------------------------
   مقاله سئو
   -------------------------------------------------------------------------- */
.seo-article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 35px 0;
}

.article-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 16px;
}

.article-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 14px;
}

.article-content h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 18px 0 10px;
}

.article-content ul {
  padding-right: 20px;
  margin-bottom: 14px;
}

.article-content li {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 6px;
}
