.announcement-banner {
  margin-top: 20px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--bg-surface);
  overflow: hidden;
}
.announcement-inner {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}
.announcement-inner i {
  color: var(--accent);
  font-size: 18px;
  flex-shrink: 0;
  background: var(--bg-surface);
  position: relative;
  z-index: 2;
  padding-right: 8px;
}
.announcement-text-wrap {
  flex-grow: 1;
  overflow: hidden;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
}
.announcement-text {
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
  display: inline-block;
  width: max-content;
  padding-left: 100%;
  animation: announcement-scroll 20s linear infinite;
}
@keyframes announcement-scroll {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-100%, 0, 0);
  }
}
.announcement-inner:hover .announcement-text {
  animation-play-state: paused;
}
.announcement-text-light {
  display: inline-block;
}
.announcement-text-dark {
  display: none;
}
html[data-theme="dark"] .announcement-text-light {
  display: none;
}
html[data-theme="dark"] .announcement-text-dark {
  display: inline-block;
}
.announcement-modal-content {
  color: var(--text-primary);
}
.announcement-modal-light {
  display: block;
}
.announcement-modal-dark {
  display: none;
}
html[data-theme="dark"] .announcement-modal-light {
  display: none;
}
html[data-theme="dark"] .announcement-modal-dark {
  display: block;
}
.announcement-modal-content a {
  color: var(--accent);
  text-decoration: underline;
}
.announcement-modal-content p {
  margin-bottom: .75rem;
}

#announcementModal .modal-content.custom-modal-dark {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 14px !important;
  color: var(--text-primary) !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.10) !important;
  overflow: hidden !important;
}

#announcementModal .modal-header {
  background: var(--bg-surface) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
}

#announcementModal .modal-body {
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
}

#announcementModal .modal-footer {
  background: var(--bg-surface) !important;
  border-top: 1px solid var(--border-subtle) !important;
}

html[data-theme="dark"] #announcementModal .modal-content.custom-modal-dark {
  background: var(--bg-surface) !important;
  border-color: var(--border-subtle) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22) !important;
}

html[data-theme="dark"] #announcementModal .modal-header,
html[data-theme="dark"] #announcementModal .modal-footer {
  background: var(--bg-surface) !important;
  border-color: var(--border-subtle) !important;
}

.announcement-modal-backdrop.modal-backdrop.show {
  opacity: .62 !important;
  background: #0f172a !important;
  backdrop-filter: none !important;
}

.section-head {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.section-head__title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.tool-search-bar {
  flex: 1 1 340px;
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  min-height: 52px;
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  background: var(--bg-surface);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}
.tool-search-bar i {
  color: var(--accent);
  font-size: 18px;
  flex: 0 0 auto;
}
.tool-search-input {
  flex: 1 1 auto;
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  padding: 0;
  min-width: 0;
}
.tool-search-input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}
.tool-search-clear {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 12px;
  background: var(--bg-surface2);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.tool-search-clear:hover {
  color: var(--text-primary);
  background: var(--border-subtle);
  transform: translateY(-1px);
}
.tool-search-hint {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}
.tool-search-hint span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tool-search-hint i {
  color: var(--accent);
}
.tool-search-hint strong {
  color: var(--text-primary);
  font-weight: 800;
}
.tool-empty-state .card {
  border: 1px dashed var(--border-subtle);
  background: var(--bg-surface);
}
.tool-empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border-radius: 20px;
  background: var(--accent-dim);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

/* Keep legacy visual for content__Captcha as requested */
.content__Captcha {
    width: 100%;
    min-height: 420px;
    height: auto;
    margin: 24px 0;
    display: flex;
    background: #fff !important;
    color: #474747;
    border-radius: 8px;
    position: relative;
    z-index: 1;
    overflow: hidden;
    -webkit-filter: drop-shadow(0 5px 15px rgba(0, 0, 0, .24));
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, .24))
}
.Captcha__thumbnail__wrap {
    width: 38%;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    overflow: hidden;
}
.Captcha__thumbnail__wrap:before {
    display: none;
}
.Captcha__thumbnail__wrap:after {
    display: none;
}
.Captcha__thumbnail__wrap .fade-right {
    display: none;
}
.Captcha__bg {
    max-width: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: none;
}
.Captcha__body {
    flex: 1 1;
    position: relative;
    z-index: 5;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    background: #fff !important;
    color: #474747 !important;
}
.Captcha__card__content i { color: #e23a3a }
.Captcha__card__content h2,
.Captcha__card__content h3 { color: #0008ff !important; }
.Captcha__card__content .tools_all_divide .Captcha__description {
    font-size: 1rem;
    font-weight: 600;
    color: #000 !important;
}
.Captcha__free {
    display: inline-block;
    color: red;
    font-size: .8rem;
    text-transform: capitalize;
    border: 1px solid #ccc;
    margin-left: 8px;
    padding: 2px 3px
}
.tools_all_divide {
    display: flex;
    justify-content: flex-start;
    column-gap: 8px;
    margin: 0 auto;
    width: 100%;
    padding: 0
}
.tools_all_divide p:not(:first-child) { padding: 0 0 0 20px }
.tools_all_link { text-decoration: none; color: #121410 !important; }
.tools_all_link:hover { text-decoration: underline; color: red; }
.Captcha__body h1 {
    font-family: var(--font-body);
    font-size: clamp(1.5rem, calc(1.2rem + 1vw), 2rem);
    font-weight: 700;
    color: #0008ff !important;
    margin: 0 0 .5rem;
}
.captcha-hero-plans {
  margin-top: 14px;
}
.captcha-hero-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.captcha-hero-plan-card {
  display: block;
  padding: 12px 14px;
  border: 1px solid #c9d9f4;
  border-radius: 12px;
  background: #eef5ff;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.captcha-hero-plan-card:hover {
  transform: translateY(-1px);
  border-color: #9ec0ff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}
.captcha-hero-plan-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.captcha-hero-plan-name {
  color: #123d6b;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.35;
}
.captcha-hero-plan-price {
  color: #0b63ce;
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
}
.captcha-hero-plan-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  color: #4f6780;
  font-size: 12px;
}
.captcha-hero-plan-meta strong {
  color: #123d6b;
  font-weight: 700;
}
.captcha-hero-sales {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(21, 67, 110, 0.10);
}
.captcha-hero-sales h3 {
  margin: 0 0 8px;
  color: #123d6b;
  font-size: 13px;
  font-weight: 800;
}
.captcha-hero-sales-link {
  text-decoration: none !important;
}
.captcha-hero-sales-link .Captcha__description {
  display: inline-flex;
  align-items: center;
}
.captcha-hero-sales-link:hover .Captcha__description {
  text-decoration: underline;
}

.home-ranking { margin-top: 22px; }
.rank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.rank-card .card-body { padding: 14px; }
.rank-title { margin: 0 0 10px; color: var(--text-primary); font-weight: 700; font-size: 20px; }
.rank-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px 20px 8px 20px;
  margin-bottom: 8px;
  background: var(--bg-surface);
}
.rank-badge {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.rank-blue { background: #dbeafe; color: #1d4ed8; }
.rank-green { background: #dcfce7; color: #15803d; }
.rank-name { font-weight: 600; color: var(--text-primary); }
.rank-sub { font-size: 12px; color: var(--text-secondary); }
.rank-value { font-weight: 700; color: var(--text-primary); white-space: nowrap; font-size: 17px; }

.clickable-rank-row {
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.clickable-rank-row:hover {
  background: var(--border-subtle) !important;
  transform: translateY(-1px);
}

.badge-duration {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  margin-left: 4px;
}
.badge-duration-tuan {
  background: #2563eb;
  color: #fff;
}
.badge-duration-thang {
  background: #f59e0b;
  color: #fff;
}
.badge-duration-vinhvien {
  background: #dc2626;
  color: #fff;
}
[data-theme="dark"] .badge-duration-tuan {
  background: #60a5fa;
  color: #111827;
}
[data-theme="dark"] .badge-duration-thang {
  background: #fbbf24;
  color: #111827;
}
[data-theme="dark"] .badge-duration-vinhvien {
  background: #f87171;
  color: #111827;
}

.section-head {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.section-head .badge {
  font-size: 15px;
  padding: 0.6em 1.2em;
  border-radius: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.section-head .badge:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 10px -1px rgba(0, 0, 0, 0.15), 0 3px 6px -1px rgba(0, 0, 0, 0.08);
}
.tool-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 1399px) {
  .tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 1023px) {
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 767px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }
}
.tool-item {
  position: relative;
  border: 1px solid #cbb56b;
  border-radius: 0 12px 12px 12px;
  background: linear-gradient(to bottom, #fcf5d9 0%, #fffdf5 40px, #fffdf5 100%);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  overflow: visible;
  margin-top: 20px;
}
.tool-discount-ribbon {
  position: absolute;
  top: 12px;
  left: -34px;
  z-index: 4;
  pointer-events: none;
  transform: rotate(-45deg);
  transform-origin: center;
}
.tool-discount-ribbon span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  height: 28px;
  padding: 0 18px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2px;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}
.tool-card__views {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(18, 47, 77, 0.92);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(4px);
}
.tool-card__views i {
  font-size: 12px;
}
.tool-item::before {
  content: "";
  position: absolute;
  top: -20px;
  left: -1px; /* Align perfectly with the flat left border */
  width: 145px;
  height: 21px;
  border: 1px solid #cbb56b;
  border-bottom: none;
  border-radius: 12px 28px 0 0;
  background: #fcf5d9;
  box-shadow: -2px -2px 4px rgba(0,0,0,0.02);
  z-index: 2;
}
.tool-item::after {
  content: "\f07b";
  font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free", sans-serif;
  font-weight: 900;
  position: absolute;
  top: -15px;
  left: 16px;
  font-size: 12px;
  color: #8d6b00;
  z-index: 4;
}
.tool-folder-label {
  position: absolute;
  top: -15px;
  left: 36px;
  z-index: 4;
  font-size: 10px;
  letter-spacing: .5px;
  font-weight: 800;
  color: #8d6b00;
}
.tool-item img {
  width: calc(100% - 16px);
  margin: 10px 8px 0;
  aspect-ratio: 16/9;
  object-fit: cover;
  object-position: center;
  border: 1px solid #d7deeb;
  border-radius: 10px;
  background: var(--bg-surface2);
}
.tool-thumb {
  position: relative;
  margin: 10px 8px 0;
  border-radius: 10px;
  overflow: hidden;
}
.tool-thumb img {
  width: 100%;
  margin: 0;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
  object-position: center;
  border: 1px solid #d7deeb;
  border-radius: 10px;
  background: var(--bg-surface2);
}
.tool-item .body {
  padding: 13px 14px 14px;
  position: relative;
}
.tool-item .body h3 {
  color: #1a2f4d;
  font-weight: 700;
  font-size: 20px;
  text-align: center;
}
.tool-item .body p.text-secondary {
  color: #556b83 !important;
  font-size: 15px;
  min-height: 36px;
  text-align: center;
}
.detail-btn {
  font-size: 15px !important;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.detail-btn-text {
  text-transform: none;
  letter-spacing: 0.2px;
  font-size: 14px;
  font-weight: 700;
}
.detail-btn-icon {
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-image: url('/public/icons/svg/double-chevron-right.svg');
  mask-image: url('/public/icons/svg/double-chevron-right.svg');
}
.price-table {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0 12px;
}
.price-col {
  border: 1px solid #c9d9f4;
  background: #eef5ff;
  border-radius: 8px;
  padding: 6px;
  text-align: center;
}
.price-label {
  display: block;
  font-size: 13px;
  color: #4f6780;
  font-weight: 600;
}
.price-value {
  display: block;
  font-size: 16px;
  color: #123d6b;
  font-weight: 700;
}
.code-line {
  font-family: var(--font-mono);
  color: #6b8199;
  font-size: 12px;
}

@media (max-width: 1023px) {
  .rank-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .section-head {
    align-items: stretch;
  }
  .section-head__title {
    width: 100%;
    justify-content: space-between;
  }
  .tool-search-bar {
    max-width: none;
    width: 100%;
  }
  .tool-search-hint {
    flex-direction: column;
    align-items: flex-start;
  }
  .price-table { grid-template-columns: 1fr 1fr 1fr; }
  .content__Captcha {
    display: grid;
    grid-template-columns: 1fr;
    flex-direction: column;
    height: auto;
  }
  .Captcha__thumbnail__wrap {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 200px;
    max-height: 200px
  }
  .Captcha__thumbnail__wrap:before {
    opacity: .6;
    min-height: 200px;
    box-sizing: border-box
  }
  .Captcha__thumbnail__wrap:after { display: none }
  .tools_all_divide { flex-direction: column; }
  .tools_all_divide p:not(:first-child) {
    padding: 0;
    margin-top: 10px;
  }
  .tool-discount-ribbon {
    top: 10px;
    left: -30px;
  }
  .tool-discount-ribbon span {
    min-width: 104px;
    height: 26px;
    font-size: 11px;
  }
  .tool-card__views {
    top: 10px;
    right: 10px;
    font-size: 11px;
  }
}



[data-theme="dark"] .rank-row {
  background: var(--bg-surface) !important;
  border-color: var(--border-subtle) !important;
}
[data-theme="dark"] .rank-card {
  background: var(--bg-surface) !important;
  border-color: var(--border-subtle) !important;
}
[data-theme="dark"] .tool-search-bar,
[data-theme="dark"] .tool-empty-state .card {
  background: var(--bg-surface) !important;
  border-color: var(--border-subtle) !important;
}
[data-theme="dark"] .tool-search-clear {
  background: var(--bg-surface2);
}
[data-theme="dark"] .tool-search-clear:hover {
  background: var(--border-subtle);
}
[data-theme="dark"] .rank-title {
  color: var(--text-primary) !important;
}
[data-theme="dark"] .rank-blue {
  background: rgba(96, 165, 250, 0.2);
  color: #93c5fd;
}
[data-theme="dark"] .rank-green {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}
[data-theme="dark"] .rank-blue {
  background: rgba(96, 165, 250, 0.2);
  color: #93c5fd;
}
[data-theme="dark"] .rank-green {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

[data-theme="dark"] .tool-item {
  border-color: #3a4a66;
  border-radius: 0 12px 12px 12px;
  background: linear-gradient(to bottom, #1c2e4c 0%, #121f35 40px, #121f35 100%);
}
[data-theme="dark"] .tool-discount-ribbon span {
  background: #ef4444;
  color: #fff;
}
[data-theme="dark"] .tool-card__views {
  background: rgba(13, 21, 39, 0.94);
  color: #fff;
}
[data-theme="dark"] .tool-item::before {
  border-color: #3a4a66;
  background: #1c2e4c;
}
[data-theme="dark"] .tool-item::after,
[data-theme="dark"] .tool-folder-label {
  color: #c6d9ff;
}
[data-theme="dark"] .tool-item img {
  border-color: #415372;
}
[data-theme="dark"] .tool-thumb img {
  border-color: #415372;
}
[data-theme="dark"] .tool-item .body h3 {
  color: #e6eefc;
}
[data-theme="dark"] .tool-item .body p.text-secondary {
  color: #b9c9df !important;
}
[data-theme="dark"] .captcha-hero-plan-card {
  border-color: #3f5679;
  background: #1b2d49;
}
[data-theme="dark"] .captcha-hero-plan-card:hover {
  border-color: #5d7eb0;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}
[data-theme="dark"] .captcha-hero-plan-name {
  color: #e6eefc;
}
[data-theme="dark"] .captcha-hero-plan-price {
  color: #93c5fd;
}
[data-theme="dark"] .captcha-hero-plan-meta {
  color: #b7c7dc;
}
[data-theme="dark"] .captcha-hero-plan-meta strong {
  color: #dce9ff;
}
[data-theme="dark"] .captcha-hero-sales {
  border-top-color: rgba(159, 182, 221, 0.15);
}
[data-theme="dark"] .price-col {
  border-color: #3f5679;
  background: #1b2d49;
}
[data-theme="dark"] .price-label {
  color: #b7c7dc;
}
[data-theme="dark"] .price-value {
  color: #dce9ff;
}
[data-theme="dark"] .code-line {
  color: #a6b9d3;
}

/* Tool Category Styles */
.category-section-title {
  font-size: 21px;
  font-weight: 800;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-subtle);
  padding-bottom: 10px;
  display: flex;
  align-items: center;
}
.badge-category-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  margin-right: 6px;
  text-transform: uppercase;
  color: #fff;
  vertical-align: middle;
  letter-spacing: .2px;
}
.cat-color-1 { background: #2563eb; } /* Hỗ trợ */
.cat-color-2 { background: #7c3aed; } /* Tự động */
.cat-color-3 { background: #059669; } /* Miễn phí */
.cat-color-fallback { background: #4b5563; }

[data-theme="dark"] .cat-color-1 { background: #3b82f6; }
[data-theme="dark"] .cat-color-2 { background: #8b5cf6; }
[data-theme="dark"] .cat-color-3 { background: #10b981; }


