/* Copy Animation */
.base-color {
  color: hsl(var(--main)) !important;
}

.copyInput {
  display: inline-block;
  line-height: 50px;
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  text-align: center;
  font-size: 14px;
  cursor: pointer;
  -webkit-transition: all .3s;
  -o-transition: all .3s;
  transition: all .3s;
}

.copy-btn {
  display: inline-block;
  top: 0;
  right: 0;
  text-align: center;
  font-size: 14px;
  cursor: pointer;
  -webkit-transition: all .3s;
  -o-transition: all .3s;
  transition: all .3s;
}

.copied::after {
  position: absolute;
  right: 12%;
  width: 100px;
  display: block;
  content: "COPIED";
  font-size: 1em;
  padding: 5px 5px;
  color: #fff;
  background-color: hsl(var(--base));
  border-radius: 3px;
  opacity: 0;
  will-change: opacity, transform;
  animation: showcopied 1.5s ease;
  top: 50%;
  transform: translateY(-50%);
}

@keyframes showcopied {
  0% {
    opacity: 0;
    transform: translate(100%, -50%);
  }

  50% {
    opacity: 0.7;
    transform: translate(40%, -50%);
  }

  70% {
    opacity: 1;
    transform: translate(0, -50%);
  }

  100% {
    opacity: 0;
  }
}




.cookies-card {
  width: 520px;
  padding: 30px;
  color: #1E2337;
  position: fixed;
  bottom: 15px;
  left: 15px;
  z-index: 999999;
  transition: all .5s;
  background: #d1d1d1;
  border-radius: 5px;
}

.cookies-card.hide {
  bottom: -500px !important;
}

.radius--10px {
  border-radius: 10px;
}

.cookies-card__icon {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background-color: #6e6f70;
  color: #fff;
  font-size: 32px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.cookies-card__content {
  margin-bottom: 0;
}

.cookies-btn {
  color: #363636;
  text-decoration: none;
  padding: 10px 35px;
  margin: 3px 5px;
  display: inline-block;
  border-radius: 999px;
}

.cookies-btn:hover {
  color: #363636;
}


@media (max-width: 767px) {
  .cookies-card {
    width: 100%;
    left: 0;
    bottom: 0;
    font-size: 14px;
    padding: 15px;
  }
}




.hover-input-popup {
  position: relative;
}

.input-popup {
  display: none;
}

.hover-input-popup .input-popup {
  display: block;
  position: absolute;
  bottom: 130%;
  left: 50%;
  width: 280px;
  background-color: #1a1a1a;
  color: #fff;
  padding: 20px;
  border-radius: 5px;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -ms-border-radius: 5px;
  -o-border-radius: 5px;
  -webkit-transform: translateX(-50%);
  -ms-transform: translateX(-50%);
  transform: translateX(-50%);
  -webkit-transition: all 0.3s;
  -o-transition: all 0.3s;
  transition: all 0.3s;
}

.input-popup::after {
  position: absolute;
  content: '';
  bottom: -19px;
  left: 50%;
  margin-left: -5px;
  border-width: 10px 10px 10px 10px;
  border-style: solid;
  border-color: transparent transparent #1a1a1a transparent;
  -webkit-transform: rotate(180deg);
  -ms-transform: rotate(180deg);
  transform: rotate(180deg);
}

.input-popup p {
  padding-left: 20px;
  position: relative;
}

.input-popup p::before {
  position: absolute;
  content: '';
  font-family: 'Line Awesome Free';
  font-weight: 900;
  left: 0;
  top: 4px;
  line-height: 1;
  font-size: 18px;
}

.input-popup p.error {
  text-decoration: line-through;
}

.input-popup p.error::before {
  content: "\f057";
  color: #ea5455;
}

.input-popup p.success::before {
  content: "\f058";
  color: #28c76f;
}



.show-filter {
  display: none;
}

@media(max-width:767px) {
  .responsive-filter-card {
    display: none;
    transition: none;
  }

  .show-filter {
    display: block;
  }
}



/* ////////////////// select 2 css //////////////// */
.select2-dropdown {
  border: 0 !important;
  margin-top: 8px !important;
  border-radius: 5px !important;
  box-shadow: 0 3px 9px rgba(50, 50, 9, 0.05), 6px 4px 19px rgb(115 103 240 / 20%)
}

.select2-search--dropdown {
  padding: 10px 10px !important;
  border-color: #ced4da !important;
}
.selection {
  width: 100%;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
  border-color: #ced4da !important;
  padding: 10px 20px;
}

.select2-results__option.select2-results__option--selected,
.select2-results__option--selectable,
.select2-container--default .select2-results__option--disabled {
  padding: 12px 14px !important;
  border-bottom: 1px solid #eee;
}

.select2-results__option.select2-results__message {
  text-align: center !important;
  padding: 12px 14px !important;
}

.select2-container--default .select2-results>.select2-results__options::-webkit-scrollbar {
  width: 8px;
  border-radius: 5px;
}

.select2-container--default .select2-results>.select2-results__options::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 5px;
}

.select2-container--default .select2-results>.select2-results__options::-webkit-scrollbar-thumb {
  background: #ddd;
}

.select2-container--default .select2-results>.select2-results__options::-webkit-scrollbar-thumb:hover {
  background: #ddd;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
  display: none;
}
.selec2-container:has(.select2-selection--single) {
  width: 100% !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow:after {
  position: absolute;
  right: 10px;
  top: 3px;
  content: "\f107";
  font-family: "Line Awesome Free";
  font-weight: 900;
  transition: .3s;
}
.select2-container .select2-selection--single .select2-selection__rendered {
  line-height: 32px !important;
}
.select2-container--default .select2-selection--single {
  border-color: hsl(var(--border-color)) !important;
  border-width: 1px !important;
  border-radius: .375rem !important;
  padding: .375rem .75rem !important;
  height: 48px !important;
  background-color: hsl(var(--body-bg)/.5) !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  top: 8px !important;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow:after {
  transform: rotate(-180deg);
}

.select2-results__option:last-child {
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
}

.select2-results__option:first-child {
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}

.select2-results__option.select2-results__option--selected,
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background-color: #f1f1f1 !important;
  color: #000 !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
  border-color: hsl(var(--base)) !important;
  box-shadow: 0 0 25px rgba(115, 103, 240 0.071) !important;
  outline: 0 !important;
  border-radius: 4px;
}

.select2-dropdown .country-flag {
  width: 25px;
  height: 25px;
  border-radius: 8px;
}

.select2-dropdown .gateway-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 0px !important;
}

.select2-dropdown .gateway-subtitle {
  font-size: 12px;
  margin-bottom: 0px !important;
}
.select2-container--open .select2-selection.select2-selection--single, .select2-container--open .select2-selection.select2-selection--multiple {
  border-color: hsl(var(--base)) !important;
  border-radius: .375rem !important;
}


.gateway-card {
  padding: 15px;
}

.payment-card-title {
  padding: 13px 25px;
  text-align: center;
  background-color: rgb(var(--main));
  border-radius: 5px;
  border: 0;
  margin-bottom: 0px;
  color: #fff;
}

.payment-system-list {
  --thumb-width: 100px;
  --thumb-height: 40px;
  --radio-size: 12px;
  --border-color: #cccccf59;
  --hover-border-color: rgb(var(--main));
  background-color: #fff;
  border-radius: 5px;
  height: 100%;

}


.payment-system-list.is-scrollable {
  max-height: min(388px, 70vh);
  overflow-x: auto;
  padding-block: 4px;
}

.payment-system-list.is-scrollable::-webkit-scrollbar {
  width: 5px;
}

.payment-system-list.is-scrollable::-webkit-scrollbar {
  width: 5px;

}

.payment-system-list.is-scrollable::-webkit-scrollbar-thumb {
  background-color: rgb(var(--main));
  border-radius: 10px;
}

.payment-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 18px;
  border: 1px solid #fff;
  border-top-color: var(--border-color);
  transition: all 0.3s;
  border-left: 3px solid transparent;
}

.payment-item:first-child {
  border-top-color: #fff;
  border-radius: 5px 5px 0 0;
}

.payment-item:has(.payment-item__radio:checked) {
  border-left: 3px solid var(--hover-border-color);
  border-radius: 0px;
}

.payment-item__check {
  border: 3px solid transparent;
}

.payment-item:has(.payment-item__radio:checked) .payment-item__check {
  border: 3px solid rgb(var(--main));
}

.payment-item__info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  max-width: calc(100% - var(--thumb-width))
}

.payment-item__check {
  width: var(--radio-size);
  height: var(--radio-size);
  border: 1px solid rgb(var(--main));
  display: inline-block;
  border-radius: 100%;

}

.payment-item__name {
  padding-left: 10px;
  width: calc(100% - var(--radio-size));
  transition: all 0.3s;
}

.payment-item__thumb {
  width: var(--thumb-width);
  height: var(--thumb-height);
  text-align: right;
  padding-left: 10px;

  &:has(.text) {
      width: fit-content;
  }
}

.payment-item__thumb img {
  max-width: var(--thumb-width);
  max-height: var(--thumb-height);
  object-fit: cover;
}


.deposit-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
}

.deposit-info__title {
  max-width: 50%;
  margin-bottom: 0px;
  text-align: left;
}

.deposit-info__input {
  max-width: 50%;
  text-align: right;
  width: 100%;
}

.deposit-info__input-select {
  border: 1px solid var(--border-color);
  width: 100%;
  border-radius: 5px;
  padding-block: 6px;
}

.deposit-info__input-group {
  border: 1px solid var(--border-color);
  border-radius: 5px;

  .deposit-info__input-group-text {
      align-self: center;
      padding-left: 5px;
  }

}

.deposit-info__input-group .form--control {
  padding: 5px;
  border: 0;
  height: 35px;
  text-align: right;
}

.deposit-info__input-group .form--control:focus {
  box-shadow: unset;
}

.info-text .text,
.deposit-info__input .text {
  font-size: 14px;

}

.deposit-info__title .text.has-icon {
  display: flex;
  align-items: center;
  gap: 5px
}

.total-amount {
  border-top: 1px solid var(--border-color);
}

.total-amount .deposit-info__title {
  font-weight: 600;
}

.payment-item__btn {
  border: 0;
  border-block: 1px solid var(--border-color);
  border-bottom: 0;
  background: #fff;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  font-weight: 500;
}

.payment-item:hover+.payment-item__btn {
  border-top-color: #fff;
}

button .spinner-border {
  --bs-spinner-width: 1.5rem;
  --bs-spinner-height: 1.5rem;
}

.domain-favicon{
  width: 24px; 
  height: 24px;
}

/* slider range css start here  */
.ui-slider .ui-slider-handle {
  position: absolute;
  z-index: 2;
  width: 16px;
  height: 16px;
  cursor: pointer;
  border-radius: 50%;
  background: hsl(var(--body-bg)) !important;
  border: 1px solid hsl(var(--border-color)) !important;
}
.ui-widget-header {
  background: hsl(var(--base)) !important;
}
.ui-widget.ui-widget-content {
  border: 0;
  background: hsl(var(--base)/.2);
  border-radius: 10px;
  height: 8px;
}
.ui-slider .ui-slider-handle:focus-visible {
  outline: none !important;
  background: hsl(var(--base)) !important;
}

.card-empty {
  margin: 0 auto;
  text-align: center;
}

.card-empty img {
  height: 70px;
}

.card-empty .empty-thumb {
  text-align: center;
  margin-bottom: 10px;
}

/* ========== AI site layout fixes ========== */
main.page-wrapper {
  position: relative;
  z-index: 5;
  overflow: visible !important;
  min-height: auto !important;
  padding-bottom: 48px;
  background: #fff;
}

.footer {
  position: relative !important;
  z-index: 1 !important;
}

/* Compact homepage tool cards (override theme .seo-tool-card) */
.ai-home-tools {
  padding: 40px 0 50px;
  position: relative;
  z-index: 5;
}

.ai-home-cat__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(90deg, hsl(var(--base) / 0.12), hsl(var(--base) / 0.03));
  border: 1px solid hsl(var(--base) / 0.18);
}

.ai-home-cat__badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--base));
  color: #fff;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px hsl(var(--base) / 0.3);
}

.ai-home-cat__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.25;
  color: #111827;
  letter-spacing: -0.01em;
}

.ai-home-cat__desc {
  margin: 3px 0 0;
  font-size: 0.9rem;
  color: #4b5563;
}

.ai-home-cat__count {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 700;
  color: hsl(var(--base));
  background: #fff;
  border: 1px solid hsl(var(--base) / 0.25);
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.ai-home-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px !important;
}

/* Larger tool cards on home */
.ai-home-grid .seo-tool-card,
.ai-home-card {
  width: auto !important;
  min-height: 92px !important;
  height: auto !important;
  max-height: none !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 14px !important;
  padding: 18px 18px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  background: #fff !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04) !important;
  text-decoration: none !important;
  overflow: hidden;
  transition: 0.15s ease;
  position: relative;
  z-index: 1;
}

.ai-home-grid .seo-tool-card::before,
.ai-home-grid .seo-tool-card::after,
.ai-home-card::before,
.ai-home-card::after {
  display: none !important;
  content: none !important;
  width: 0 !important;
  height: 0 !important;
}

.ai-home-grid .seo-tool-card:hover,
.ai-home-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08) !important;
  border-color: hsl(var(--base) / 0.35) !important;
  background: #fff !important;
}

.ai-home-card__icon {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px;
  border-radius: 12px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background: hsl(var(--base) / 0.1);
  color: hsl(var(--base));
  font-size: 22px;
  margin: 0 !important;
}

.ai-home-card__icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.ai-home-card__name,
.ai-home-grid .seo-tool-card__name {
  font-size: 1.02rem !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
  color: #111827 !important;
  position: static !important;
}

/* More tools grid below content on tool pages */
.ai-more-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.ai-more-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.07);
  text-decoration: none;
  color: #1f2937;
  background: #fff;
  transition: .15s ease;
}

.ai-more-item:hover {
  border-color: hsl(var(--base) / 0.3);
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
  color: #111;
}

.ai-more-item__icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--base) / 0.1);
  color: hsl(var(--base));
  font-size: 16px;
}

.ai-more-item__name {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.25;
}

.scroll-top,
a.scroll-top {
  right: 20px !important;
  left: auto !important;
  z-index: 9990 !important;
}

/* Tool actions always visible */
.ai-actions {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative;
  z-index: 20;
  margin-top: 4px;
}

.ai-actions .btn,
.ai-generate-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  visibility: visible !important;
  opacity: 1 !important;
}

.ai-panel {
  overflow: visible !important;
}

.ai-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 520px;
  overflow-y: auto;
}

.ai-sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: #1f2937;
  border: 1px solid transparent;
  transition: 0.15s ease;
}

.ai-sidebar-item:hover {
  background: hsl(var(--base) / 0.06);
  border-color: hsl(var(--base) / 0.2);
  color: #111;
}

.ai-sidebar-item__icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--base) / 0.1);
  color: hsl(var(--base));
  font-size: 15px;
}

.ai-sidebar-item__name {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
}

.ai-output-btns {
  display: none;
  gap: 6px;
}

.ai-limit-bar {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8f9fa;
  border: 1px solid rgba(0,0,0,.06);
  margin-bottom: 12px;
}

.ai-howto {
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8f9fa;
  border: 1px solid rgba(0,0,0,.05);
}

.ai-home-card__name::before,
.ai-home-card__name::after,
.ai-home-grid .seo-tool-card__name::before,
.ai-home-grid .seo-tool-card__name::after {
  display: none !important;
  content: none !important;
}

.ai-home-after {
  margin-top: 28px;
  padding: 24px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fafbfc;
}

.ai-home-after__body {
  line-height: 1.7;
}

/* Tool page — keep form above footer */
main.page-wrapper.is-tool-page {
  z-index: 10 !important;
  padding-top: 12px;
  padding-bottom: 80px !important;
  position: relative;
  background: #fff;
}

main.page-wrapper.is-tool-page + .footer,
.footer {
  z-index: 0 !important;
}

.ai-tool-page {
  position: relative;
  z-index: 10;
  padding: 12px 0 40px !important;
  background: #fff;
  overflow: visible !important;
}

.ai-tool-page textarea.ai-input,
.ai-tool-page textarea.form-control {
  min-height: 150px !important;
  height: auto !important;
  overflow: auto !important;
  resize: vertical !important;
}

.ai-panel {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
  height: auto !important;
  min-height: 0 !important;
  position: relative;
  z-index: 11;
}

.ai-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: #fafbfc;
}

.ai-panel__body {
  padding: 16px;
}

.ai-result-box {
  min-height: 220px;
  max-height: none;
  white-space: pre-wrap;
  line-height: 1.65;
}

.ai-tool-hero {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
  background: hsl(var(--base) / 0.06);
  border: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 16px;
}

.ai-tool-hero__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  background: hsl(var(--base));
  flex-shrink: 0;
}

.ai-breadcrumb {
  font-size: 13px;
  color: #6c757d;
  margin-bottom: 12px;
}

.ai-breadcrumb a {
  color: #6c757d;
  text-decoration: none;
}

.ai-breadcrumb span {
  margin: 0 5px;
}

@media (max-width: 575px) {
  .ai-home-grid {
    grid-template-columns: 1fr;
    gap: 10px !important;
  }
  .ai-home-card__name {
    font-size: 0.95rem !important;
  }
  .ai-home-cat__count {
    display: none;
  }
  .ai-home-cat__title {
    font-size: 1.15rem;
  }
}

/* Share + loading UX */
.ai-share-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.ai-share-btn {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid rgba(0,0,0,.1);
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: #374151; text-decoration: none; cursor: pointer;
}
.ai-share-btn:hover { background: hsl(var(--base)); color: #fff; border-color: transparent; }
.ai-loading-bar__track { height: 4px; border-radius: 4px; background: rgba(0,0,0,.08); overflow: hidden; }
.ai-loading-bar__fill {
  height: 100%; width: 40%; border-radius: 4px; background: hsl(var(--base));
  animation: aiLoadSlide 1.1s ease-in-out infinite;
}
@keyframes aiLoadSlide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(280%); }
}

/* ============================================================
   TOOL FORM UI REDESIGN (site --base colors, not AI dark theme)
   ============================================================ */
.tf-page { padding: 16px 0 48px; }

.tf-breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: 0.82rem; color: #6b7280; margin-bottom: 18px;
}
.tf-breadcrumb a { color: #6b7280; text-decoration: none; }
.tf-breadcrumb a:hover { color: hsl(var(--base)); }

.tf-header {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px 20px; margin-bottom: 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, hsl(var(--base) / 0.1), hsl(var(--base) / 0.03));
  border: 1px solid hsl(var(--base) / 0.15);
}
.tf-header__icon {
  width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #fff; background: hsl(var(--base));
  box-shadow: 0 8px 20px hsl(var(--base) / 0.28);
}
.tf-header__top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 4px; }
.tf-header__title { font-size: 1.45rem; font-weight: 800; margin: 0; letter-spacing: -0.02em; color: #111827; }
.tf-header__sub { margin: 0 0 10px; color: #6b7280; font-size: 0.95rem; line-height: 1.55; max-width: 720px; }

.tf-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
}
.tf-badge--live { background: rgba(34,197,94,.12); color: #15803d; }
.tf-badge--demo { background: rgba(245,158,11,.14); color: #b45309; }

.tf-share { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tf-share__label { font-size: 0.78rem; color: #9ca3af; margin-right: 2px; }
.tf-share__btn {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid rgba(0,0,0,.08);
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: #374151; cursor: pointer; text-decoration: none;
  transition: .15s ease;
}
.tf-share__btn:hover { background: hsl(var(--base)); color: #fff; border-color: transparent; }

.tf-limit {
  padding: 12px 14px; border-radius: 12px; margin-bottom: 16px;
  background: #f8fafc; border: 1px solid rgba(0,0,0,.06);
}
.tf-limit.is-locked { border-color: rgba(239,68,68,.25); background: #fef2f2; }
.tf-limit__row { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 6px; }
.tf-limit__bar { height: 5px; border-radius: 99px; background: rgba(0,0,0,.06); overflow: hidden; }
.tf-limit__bar span { display: block; height: 100%; border-radius: 99px; background: hsl(var(--base)); }
.tf-limit.is-locked .tf-limit__bar span { background: #ef4444; }

.tf-info-banner {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; margin-bottom: 18px; border-radius: 12px;
  background: hsl(var(--base) / 0.07); border: 1px solid hsl(var(--base) / 0.18);
  font-size: 0.88rem; color: #374151; line-height: 1.5;
}
.tf-info-banner > i { color: hsl(var(--base)); font-size: 1.2rem; margin-top: 1px; }
.tf-info-banner--success {
  background: rgba(34,197,94,.08); border-color: rgba(34,197,94,.2); color: #166534;
}
.tf-info-banner--success > i { color: #16a34a; }

.tf-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: start;
}
.tf-main { min-width: 0; }

.tf-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.07);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.04);
  overflow: hidden;
  margin-bottom: 18px;
}
.tf-card__head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid rgba(0,0,0,.06);
  background: #fafbfc;
}
.tf-card__title {
  font-size: 0.92rem; font-weight: 700; color: #111827;
  display: inline-flex; align-items: center; gap: 8px;
}
.tf-card__title i { color: hsl(var(--base)); }
.tf-card__body { padding: 18px; }

.tf-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: hsl(var(--base)); display: inline-block;
  box-shadow: 0 0 0 3px hsl(var(--base) / 0.18);
}

.tf-form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 4px;
}
.tf-form-row--1 { grid-template-columns: 1fr; }

.tf-field { margin-bottom: 16px; }
.tf-label {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 0.86rem; font-weight: 600; color: #1f2937; margin-bottom: 7px;
}
.tf-label__req {
  font-size: 0.72rem; font-weight: 600; color: #dc2626;
  background: #fef2f2; padding: 2px 8px; border-radius: 999px;
}
.tf-label__opt {
  font-size: 0.72rem; font-weight: 500; color: #9ca3af;
}

.tf-input, .tf-textarea, .tf-select {
  width: 100%;
  padding: 12px 14px;
  font-size: 0.92rem;
  color: #111827;
  background: #fff;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 12px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tf-input:focus, .tf-textarea:focus, .tf-select:focus {
  border-color: hsl(var(--base));
  box-shadow: 0 0 0 3px hsl(var(--base) / 0.15);
}
.tf-textarea {
  min-height: 150px; resize: vertical; line-height: 1.6;
}
.tf-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
}
.tf-hint { font-size: 0.75rem; color: #9ca3af; margin-top: 6px; }
.tf-field-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px;
}
.tf-counter { font-size: 0.72rem; color: #9ca3af; font-variant-numeric: tabular-nums; white-space: nowrap; }

.tf-actions {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; align-items: stretch;
}
.tf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 11px; font-weight: 600; font-size: 0.9rem;
  border: 1px solid transparent; cursor: pointer; transition: .15s ease;
  padding: 11px 16px; background: transparent; color: #374151;
}
.tf-btn--ghost {
  border-color: rgba(0,0,0,.1); background: #fff;
}
.tf-btn--ghost:hover { border-color: hsl(var(--base) / 0.4); color: hsl(var(--base)); }
.tf-btn--primary {
  flex: 1; min-width: 180px;
  /* Solid brand button — always readable in light mode */
  background-color: #2563eb !important;
  background-image: none !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
  border: 1px solid transparent !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.tf-btn--primary:hover,
.tf-btn--primary:focus,
.tf-btn--primary:active {
  filter: brightness(1.06);
  transform: translateY(-1px);
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
.tf-btn--primary:disabled, .tf-btn--primary.is-loading {
  opacity: .75; pointer-events: none; transform: none;
}
.tf-btn--sm {
  padding: 6px 12px; font-size: 0.78rem;
  border: 1px solid rgba(0,0,0,.1); background: #fff;
}
/* Accent card CTA: force contrast in light theme */
.tf-side-card--accent .tf-btn--primary,
.tf-side-promo .tf-btn--primary {
  display: inline-flex !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background-color: #2563eb !important;
  min-width: 140px;
  font-weight: 700;
}

.tf-loading { margin-top: 14px; }
.tf-loading__track { height: 4px; border-radius: 4px; background: rgba(0,0,0,.07); overflow: hidden; }
.tf-loading__fill {
  height: 100%; width: 40%; border-radius: 4px; background: hsl(var(--base));
  animation: aiLoadSlide 1.1s ease-in-out infinite;
}
.tf-loading__text { text-align: center; font-size: 0.8rem; color: #6b7280; margin: 8px 0 0; }

.tf-result-box { min-height: 200px; }
.tf-result-empty {
  text-align: center; color: #9ca3af; padding: 36px 12px;
}
.tf-result-empty i { font-size: 2rem; display: block; margin-bottom: 8px; color: hsl(var(--base) / 0.55); }
.tf-result-empty p { margin: 0; font-size: 0.9rem; }
.tf-result-meta {
  display: flex; gap: 8px; margin-top: 12px; font-size: 0.8rem; color: #6b7280;
}
.tf-result-actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* ===== Beautified AI output (markdown prose) ===== */
.ai-result-content,
.ai-prose {
  line-height: 1.75;
  white-space: normal;
  color: #1f2937;
  font-size: 0.98rem;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.ai-prose > *:first-child { margin-top: 0; }
.ai-prose > *:last-child { margin-bottom: 0; }

.ai-prose h1, .ai-prose h2, .ai-prose h3, .ai-prose h4 {
  color: #111827;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 1.25em 0 0.5em;
}
.ai-prose h1 { font-size: 1.45rem; padding-bottom: 0.35em; border-bottom: 2px solid hsl(var(--base) / 0.2); }
.ai-prose h2 { font-size: 1.2rem; color: hsl(var(--base)); }
.ai-prose h3 { font-size: 1.05rem; }
.ai-prose h4 { font-size: 0.98rem; }

.ai-prose p { margin: 0 0 0.9em; }
.ai-prose strong, .ai-prose b { font-weight: 700; color: #111827; }
.ai-prose em { font-style: italic; }

.ai-prose ul, .ai-prose ol {
  margin: 0 0 1em;
  padding-left: 1.35em;
}
.ai-prose li { margin: 0.35em 0; padding-left: 0.15em; }
.ai-prose li::marker { color: hsl(var(--base)); }
.ai-prose ul { list-style: disc; }
.ai-prose ol { list-style: decimal; }

.ai-prose blockquote {
  margin: 1em 0;
  padding: 0.75em 1em;
  border-left: 4px solid hsl(var(--base));
  background: hsl(var(--base) / 0.06);
  border-radius: 0 10px 10px 0;
  color: #374151;
}

.ai-prose hr {
  border: 0;
  border-top: 1px solid rgba(0,0,0,.08);
  margin: 1.4em 0;
}

.ai-prose a {
  color: hsl(var(--base));
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

.ai-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.92rem;
  overflow: hidden;
  border-radius: 10px;
}
.ai-prose th, .ai-prose td {
  border: 1px solid rgba(0,0,0,.08);
  padding: 0.55em 0.75em;
  text-align: left;
}
.ai-prose th {
  background: hsl(var(--base) / 0.08);
  font-weight: 700;
}

/* Inline code */
.ai-prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: #f3f4f6;
  color: #be185d;
  padding: 0.12em 0.4em;
  border-radius: 6px;
}

/* Code blocks with copy bar */
.tf-code-wrap {
  margin: 1em 0;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}
.tf-code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: #1e293b;
  color: #cbd5e1;
  font-size: 0.78rem;
}
.tf-code-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.tf-code-copy {
  border: 0;
  background: hsl(var(--base));
  color: #fff;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tf-code-copy:hover { filter: brightness(1.08); }
.ai-prose pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.86rem;
  line-height: 1.55;
}
.ai-prose pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  white-space: pre;
}

/* Numbered tip cards look (optional spacing for paragraphs after bold) */
.ai-prose p strong:first-child { color: hsl(var(--base)); }

body.theme-dark .ai-prose { color: #e5e7eb; }
body.theme-dark .ai-prose h1,
body.theme-dark .ai-prose h2,
body.theme-dark .ai-prose h3,
body.theme-dark .ai-prose strong { color: #f3f4f6; }
body.theme-dark .ai-prose h2 { color: hsl(var(--base)); }
body.theme-dark .ai-prose code { background: #1f2937; color: #f9a8d4; }
body.theme-dark .ai-prose blockquote { background: rgba(255,255,255,.04); color: #d1d5db; }
body.theme-dark .ai-prose th { background: rgba(255,255,255,.06); }
body.theme-dark .ai-prose th,
body.theme-dark .ai-prose td { border-color: rgba(255,255,255,.1); }

.tf-sidebar { position: sticky; top: 90px; }
.tf-side-card {
  background: #fff; border: 1px solid rgba(0,0,0,.07); border-radius: 16px;
  padding: 16px; margin-bottom: 14px; box-shadow: 0 6px 16px rgba(0,0,0,.03);
}
.tf-side-card__title {
  font-size: 0.85rem; font-weight: 700; margin-bottom: 12px; color: #111827;
  display: flex; align-items: center; gap: 6px;
}
.tf-side-card__title i { color: hsl(var(--base)); }
.tf-side-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.tf-side-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px; text-decoration: none;
  color: #1f2937; font-size: 0.86rem; font-weight: 600;
  border: 1px solid transparent; transition: .15s ease;
}
.tf-side-link:hover {
  background: hsl(var(--base) / 0.06); border-color: hsl(var(--base) / 0.18); color: #111;
}
.tf-side-link__icon {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: hsl(var(--base) / 0.1); color: hsl(var(--base)); font-size: 14px;
}
.tf-side-all {
  display: inline-block !important;
  margin-top: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #2563eb !important;
  -webkit-text-fill-color: #2563eb !important;
  text-decoration: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.tf-side-all:hover {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  text-decoration: underline !important;
}
.tf-tips { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.tf-tips li {
  display: flex; gap: 8px; font-size: 0.82rem; color: #4b5563; line-height: 1.4;
}
.tf-tips li i { color: #16a34a; margin-top: 2px; }
.tf-side-card--accent {
  background: linear-gradient(160deg, rgba(37, 99, 235, 0.12), rgba(37, 99, 235, 0.04));
  border: 1px solid rgba(37, 99, 235, 0.22);
}
.tf-side-promo { text-align: center; padding: 8px 4px; color: #111827; }
.tf-side-promo > i { font-size: 1.6rem; color: #2563eb; display: block; margin-bottom: 6px; }
.tf-side-promo strong { display: block; margin-bottom: 4px; color: #111827 !important; }
.tf-side-promo p { font-size: 0.82rem; color: #4b5563 !important; margin: 0 0 12px; }

.tf-article, .tf-more { margin-top: 8px; }

@media (max-width: 991px) {
  .tf-layout { grid-template-columns: 1fr; }
  .tf-sidebar { position: static; }
}
@media (max-width: 575px) {
  .tf-form-row { grid-template-columns: 1fr; }
  .tf-header { flex-direction: column; }
  .tf-actions { flex-direction: column; }
  .tf-btn--primary { width: 100%; min-width: 0; }
}

/* Dark mode */
html.theme-dark, body.theme-dark {
  color-scheme: dark;
  background: #0f1419 !important;
  color: #e5e7eb !important;
}
body.theme-dark .header,
body.theme-dark .ai-panel,
body.theme-dark .ai-home-card,
body.theme-dark .ai-home-after,
body.theme-dark .ai-more-item,
body.theme-dark .ai-howto,
body.theme-dark .ai-limit-bar,
body.theme-dark .footer,
body.theme-dark .card {
  background: #1a2332 !important;
  color: #e5e7eb !important;
  border-color: rgba(255,255,255,.08) !important;
}
body.theme-dark .ai-panel__head { background: #121a24 !important; border-color: rgba(255,255,255,.06) !important; }
body.theme-dark .form-control,
body.theme-dark .form-select,
body.theme-dark textarea,
body.theme-dark input {
  background: #0f1419 !important;
  color: #e5e7eb !important;
  border-color: rgba(255,255,255,.12) !important;
}
body.theme-dark .text-muted { color: #9ca3af !important; }
body.theme-dark .ai-home-cat__head {
  background: linear-gradient(90deg, rgba(59,130,246,.25), rgba(59,130,246,.08)) !important;
}
body.theme-dark .ai-home-card__name,
body.theme-dark .ai-home-cat__title { color: #f3f4f6 !important; }
body.theme-dark .ai-share-btn { background: #121a24; color: #e5e7eb; border-color: rgba(255,255,255,.12); }
body.theme-dark main.page-wrapper { background: #0f1419 !important; }
body.theme-dark .nav-link { color: #e5e7eb !important; }

body.theme-dark .tf-card,
body.theme-dark .tf-side-card,
body.theme-dark .tf-header,
body.theme-dark .tf-limit,
body.theme-dark .tf-input,
body.theme-dark .tf-textarea,
body.theme-dark .tf-select,
body.theme-dark .tf-btn--ghost,
body.theme-dark .tf-btn--sm,
body.theme-dark .tf-share__btn {
  background: #1a2332 !important;
  color: #e5e7eb !important;
  border-color: rgba(255,255,255,.1) !important;
}
body.theme-dark .tf-card__head { background: #121a24 !important; border-color: rgba(255,255,255,.06) !important; }
body.theme-dark .tf-header__title,
body.theme-dark .tf-card__title,
body.theme-dark .tf-label,
body.theme-dark .tf-side-link { color: #f3f4f6 !important; }
body.theme-dark .tf-header__sub,
body.theme-dark .tf-hint,
body.theme-dark .tf-breadcrumb { color: #9ca3af !important; }
body.theme-dark .tf-btn--primary { background: hsl(var(--base)) !important; color: #fff !important; }