/* tikgrabs — shared hero downloader (all tool pages) */
@keyframes hero-fade-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-dl {
  --hero-bg-1: #faf7f3;
  --hero-bg-2: #f3ebe2;
  --hero-bg-3: #efe4d8;
  --hero-card: rgba(255, 255, 255, 0.72);
  --hero-card-border: rgba(233, 225, 215, 0.95);
  --hero-pill: rgba(226, 87, 44, 0.08);
  --hero-pill-text: #3a342e;
  --hero-pill-border: rgba(226, 87, 44, 0.14);
  --hero-pill-hover: rgba(226, 87, 44, 0.14);
  --hero-active-1: #f07548;
  --hero-active-2: #e2572c;
  --hero-active-text: #ffffff;
  --hero-dl-btn: #e2572c;
  --hero-dl-btn-hover: #c2451e;
  --hero-input-bg: #ffffff;
  --hero-input-text: #241f1c;
  --hero-title: #241f1c;
  --hero-muted: #79726a;
  --hero-field-border: #e9e1d7;
  --hero-field-shine: rgba(255, 255, 255, 0.8);
  --hero-paste-bg: #faf7f3;
  --hero-paste-text: #3a342e;
  --hero-paste-hover: #ffffff;
  --hero-placeholder: #9a9188;
  --hero-stats-border: #e9e1d7;
  --hero-clear-bg: #faf7f3;
  --hero-clear-text: #79726a;
  --hero-clear-hover-bg: #ffffff;
  --hero-clear-hover-text: #241f1c;
  --hero-chip-bg: #ffffff;
  --hero-progress-track: #e9e1d7;
  --hero-glow: rgba(226, 87, 44, 0.16);
  --hero-shadow: 0 28px 60px -28px rgba(80, 52, 28, 0.35);
  --hero-card-hover-shadow: 0 32px 70px -26px rgba(80, 52, 28, 0.42);
  position: relative;
  padding: 88px 24px 72px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(165deg, var(--hero-bg-1) 0%, var(--hero-bg-2) 48%, var(--hero-bg-3) 100%);
  color: var(--hero-title);
  transition: background 0.25s ease, color 0.25s ease;
}
.hero-dl.is-dark {
  --hero-bg-1: #191512;
  --hero-bg-2: #1e1815;
  --hero-bg-3: #241c18;
  --hero-card: rgba(35, 29, 25, 0.88);
  --hero-card-border: rgba(58, 50, 44, 0.95);
  --hero-pill: rgba(226, 87, 44, 0.16);
  --hero-pill-text: #f5efe9;
  --hero-pill-border: rgba(226, 87, 44, 0.28);
  --hero-pill-hover: rgba(226, 87, 44, 0.24);
  --hero-dl-btn-hover: #f16c3f;
  --hero-input-bg: #231d19;
  --hero-input-text: #f5efe9;
  --hero-title: #f5efe9;
  --hero-muted: #a89d92;
  --hero-field-border: #3a322c;
  --hero-field-shine: rgba(255, 255, 255, 0.04);
  --hero-paste-bg: #2a2320;
  --hero-paste-text: #f5efe9;
  --hero-paste-hover: #332b26;
  --hero-placeholder: #7a7068;
  --hero-stats-border: #3a322c;
  --hero-clear-bg: #2a2320;
  --hero-clear-text: #a89d92;
  --hero-clear-hover-bg: #332b26;
  --hero-clear-hover-text: #f5efe9;
  --hero-chip-bg: #231d19;
  --hero-progress-track: #3a322c;
  --hero-glow: rgba(226, 87, 44, 0.22);
  --hero-shadow: 0 28px 60px -28px rgba(0, 0, 0, 0.7);
  --hero-card-hover-shadow: 0 32px 70px -26px rgba(0, 0, 0, 0.75);
}
.hero-dl::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 70%;
  background: radial-gradient(ellipse at 50% 0%, var(--hero-glow), transparent 62%);
  pointer-events: none;
}
.hero-dl__inner {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  animation: hero-fade-in 0.7s ease both;
}
.hero-dl__title {
  font-family: 'Baloo 2', sans-serif;
  font-size: 56px;
  font-weight: 800;
  line-height: 1.08;
  margin: 0 0 14px;
  color: var(--hero-title);
  letter-spacing: -0.02em;
}
.hero-dl__sub {
  font-size: 20px;
  font-weight: 500;
  color: var(--hero-muted);
  margin: 0 0 36px;
  line-height: 1.45;
}
.hero-dl__card {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px;
  border-radius: 22px;
  background: var(--hero-card);
  border: 1px solid var(--hero-card-border);
  box-shadow: var(--hero-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.hero-dl__card:hover {
  box-shadow: var(--hero-card-hover-shadow);
}
.hero-dl__tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}
.hero-dl__tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  color: var(--hero-pill-text);
  background: var(--hero-pill);
  border: 1px solid var(--hero-pill-border);
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
  text-decoration: none;
  line-height: 1;
}
.hero-dl__tab:hover {
  transform: scale(1.04);
  background: var(--hero-pill-hover);
}
.hero-dl__tab.is-active {
  background: linear-gradient(135deg, var(--hero-active-1), var(--hero-active-2));
  color: var(--hero-active-text);
  border-color: transparent;
  box-shadow: 0 10px 24px -12px rgba(226, 87, 44, 0.75);
}
.hero-dl__tab.is-active:hover {
  transform: scale(1.04);
}
.hero-dl__tab-ico {
  font-size: 14px;
  line-height: 1;
  opacity: 0.95;
}
.hero-dl__row {
  display: flex;
  align-items: stretch;
  gap: 12px;
}
.hero-dl__field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--hero-input-bg);
  border-radius: 16px;
  padding: 8px 8px 8px 18px;
  border: 1px solid var(--hero-field-border);
  box-shadow: 0 1px 0 var(--hero-field-shine);
}
.hero-dl__input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--hero-input-text);
  font-size: 16px;
  font-weight: 500;
  padding: 12px 4px;
  caret-color: #e2572c;
}
.hero-dl__input::placeholder {
  color: var(--hero-placeholder);
  font-weight: 500;
}
.hero-dl__paste {
  border: 1px solid var(--hero-field-border);
  background: var(--hero-paste-bg);
  color: var(--hero-paste-text);
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}
.hero-dl__paste:hover {
  transform: scale(1.03);
  background: var(--hero-paste-hover);
  box-shadow: 0 8px 18px -14px rgba(0, 0, 0, 0.28);
}
.hero-dl__clear {
  border: 1px solid var(--hero-field-border);
  background: var(--hero-clear-bg);
  color: var(--hero-clear-text);
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}
.hero-dl__clear:hover {
  transform: scale(1.03);
  background: var(--hero-clear-hover-bg);
  color: var(--hero-clear-hover-text);
}
.hero-dl__progress {
  max-width: 220px;
  height: 4px;
  margin: 16px auto 0;
  border-radius: 999px;
  background: var(--hero-progress-track);
  overflow: hidden;
}
.hero-dl__progress > i {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 999px;
  background: #e2572c;
  animation: hero-progress 1.1s ease-in-out infinite;
}
@keyframes hero-progress {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
.hero-dl__history {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.hero-dl__history-chip {
  border: 1px solid var(--hero-field-border);
  background: var(--hero-chip-bg);
  color: var(--hero-muted);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hero-dl__history-chip:hover {
  border-color: #e2572c;
  color: #e2572c;
}
.hero-dl__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  background: var(--hero-dl-btn);
  color: #fff;
  border-radius: 16px;
  padding: 0 28px;
  min-height: 56px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 14px 28px -12px rgba(226, 87, 44, 0.7);
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}
.hero-dl__submit:hover {
  transform: translateY(-2px) scale(1.02);
  background: var(--hero-dl-btn-hover);
  box-shadow: 0 18px 34px -10px rgba(226, 87, 44, 0.85);
}
.hero-dl__submit:active {
  transform: translateY(0) scale(1);
}
.hero-dl__error {
  color: #d64545;
  font-size: 13px;
  margin-top: 14px;
  font-weight: 600;
}
.hero-dl__error--api {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e0b4a6;
  background: rgba(226, 87, 44, 0.06);
  text-align: center;
  line-height: 1.45;
}
.hero-dl.is-dark .hero-dl__error--api {
  background: rgba(226, 87, 44, 0.12);
  border-color: rgba(224, 180, 166, 0.45);
}
.hero-dl__retry {
  margin-top: 10px;
  border: none;
  background: #e2572c;
  color: #fff;
  border-radius: 10px;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.hero-dl__retry:hover {
  background: #c2451e;
}
.hero-dl__loading {
  max-width: 100%;
  margin: 18px auto 0;
  text-align: center;
  padding: 8px 4px 0;
}
.hero-dl__spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 3px solid var(--hero-border, #e9e1d7);
  border-top-color: #e2572c;
  animation: sg-spin 0.8s linear infinite;
}
.hero-dl__loading-label {
  color: var(--hero-muted);
  font-weight: 600;
  font-size: 14px;
}
.hero-dl__hint {
  font-size: 13px;
  color: var(--hero-muted);
  margin: 18px 0 0;
}
.hero-dl__stats {
  display: flex;
  justify-content: center;
  gap: 36px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--hero-stats-border);
}
.hero-dl__stat-n {
  font-weight: 800;
  font-size: 20px;
  color: #e2572c;
}
.hero-dl__stat-l {
  font-size: 13px;
  color: var(--hero-muted);
  margin-top: 2px;
}

@media (max-width: 900px) {
  .hero-dl__title { font-size: 42px; }
  .hero-dl__sub { font-size: 18px; }
  .hero-dl__tabs { gap: 8px; }
}
@media (max-width: 640px) {
  .hero-dl { padding: 56px 16px 48px; }
  .hero-dl__title { font-size: 32px !important; line-height: 1.08 !important; }
  .hero-dl__sub { font-size: 16px; margin-bottom: 28px; }
  .hero-dl__card { padding: 18px; border-radius: 18px; }
  .hero-dl__tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .hero-dl__tab { justify-content: center; padding: 12px 10px; font-size: 14px; }
  .hero-dl__row { flex-direction: column; }
  .hero-dl__field { width: 100%; padding: 8px; }
  .hero-dl__submit { width: 100%; min-height: 52px; }
  .hero-dl__stats { gap: 18px; flex-wrap: wrap; }
}
