/* Snapchat downloader — premium tool UI + mobile-first animations */
:root {
  --yt-red-deep: #0b0b0f;
  --yt-red-soft: #fff9c4;
  --yt-shadow: 0 16px 48px rgba(15, 15, 15, 0.08);
}

.yt-hero {
  text-align: center;
  padding: clamp(1.5rem, 5vw, 3.5rem) 0 clamp(1.25rem, 3vw, 2rem);
}
.yt-hero-premium .yt-hero-panel {
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(1.15rem, 3.5vw, 2rem) clamp(0.85rem, 3vw, 1.75rem) 1.35rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid color-mix(in srgb, var(--yt-line) 88%, #fff);
  border-radius: 22px;
  box-shadow: var(--yt-shadow);
  animation: scPanelIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes scPanelIn {
  from { opacity: 0; transform: translateY(14px) scale(0.99); }
  to { opacity: 1; transform: none; }
}
.yt-tool-ad-slot { margin: 1.1rem auto 0; max-width: 720px; }
.yt-tool-ad-slot:empty { display: none; }

.yt-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--yt-red);
  color: #111;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  margin: 0 0 1.1rem;
  box-shadow: 0 8px 24px rgba(255, 252, 0, 0.45);
  animation: scFadeUp 0.5s ease 0.05s both;
}
.yt-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 5.8vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0 0 0.65rem;
  color: var(--yt-ink);
  animation: scFadeUp 0.55s ease 0.1s both;
}
.yt-hero-lead {
  color: var(--yt-muted);
  font-size: clamp(0.95rem, 2.5vw, 1.06rem);
  margin: 0 auto 1.35rem;
  max-width: 36rem;
  line-height: 1.55;
  animation: scFadeUp 0.55s ease 0.16s both;
}
@keyframes scFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.yt-tabs {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0.25rem 1.25rem;
  margin: 0 auto 1.35rem;
  border-bottom: 1px solid var(--yt-line);
  max-width: 100%;
  padding: 0 0.15rem 0.05rem;
  animation: scFadeUp 0.55s ease 0.22s both;
  -webkit-overflow-scrolling: touch;
}
.yt-tab,
a.yt-tab {
  appearance: none;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--yt-muted);
  padding: 0.7rem 0.4rem 0.85rem;
  position: relative;
  transition: color 0.2s ease;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
  flex: 0 0 auto;
  min-height: 44px;
}
.yt-tab:hover { color: var(--yt-ink); }
.yt-tab.is-on { color: var(--yt-ink); font-weight: 800; }
.yt-tab.is-on::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: var(--yt-red);
  border-radius: 3px 3px 0 0;
  animation: scTabLine 0.35s ease both;
}
@keyframes scTabLine {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.yt-bar {
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--yt-line) 85%, #fff);
  border-radius: 18px;
  box-shadow: var(--yt-shadow);
  overflow: hidden;
  max-width: 720px;
  margin: 0 auto;
  animation: scFadeUp 0.55s ease 0.28s both;
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.2s;
}
.yt-bar:focus-within {
  border-color: #111;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--yt-red) 55%, transparent), var(--yt-shadow);
}
.yt-bar-icon {
  display: grid;
  place-items: center;
  width: 50px;
  flex-shrink: 0;
  color: #999;
}
.yt-bar-icon svg { width: 22px; height: 22px; }
.yt-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 1rem;
  padding: 1rem 0.25rem;
  background: transparent;
  color: var(--yt-ink);
}
.yt-bar-paste {
  display: grid;
  place-items: center;
  width: 48px;
  min-width: 48px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #888;
  flex-shrink: 0;
  transition: color 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.yt-bar-paste:active { transform: scale(0.92); }
.yt-bar-paste:hover { color: var(--yt-ink); }
.yt-bar-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  cursor: pointer;
  background: var(--yt-red-deep);
  color: var(--yt-red);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  padding: 0 1.35rem;
  min-width: 132px;
  min-height: 52px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: inset 0 0 0 1px rgba(255, 252, 0, 0.25);
  -webkit-tap-highlight-color: transparent;
}
.yt-bar-go:hover {
  background: #111;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}
.yt-bar-go:active { transform: scale(0.98); }
.yt-hint {
  text-align: center;
  color: var(--yt-muted);
  font-size: 0.86rem;
  margin: 0.75rem auto 0;
  max-width: 32rem;
  line-height: 1.45;
}
#tbForm .tb-status {
  text-align: center;
  min-height: 1.35em;
  margin: 0.65rem 0 0;
  font-weight: 700;
  font-size: 0.92rem;
  transition: color 0.2s;
}

.yt-how {
  padding: clamp(2rem, 5vw, 3rem) 0 2rem;
  text-align: center;
}
.yt-how h2 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3.2vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 1.75rem;
  color: var(--yt-ink);
}
.yt-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.85rem, 2vw, 1.5rem);
  max-width: 820px;
  margin: 0 auto;
}
.yt-step {
  padding: 0.5rem;
  animation: scFadeUp 0.6s ease both;
  animation-delay: calc(var(--step, 0) * 0.08s);
}
.yt-step:nth-child(1) { --step: 1; }
.yt-step:nth-child(2) { --step: 2; }
.yt-step:nth-child(3) { --step: 3; }
.yt-step-num {
  width: clamp(52px, 14vw, 64px);
  height: clamp(52px, 14vw, 64px);
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: var(--yt-red-soft);
  color: #111;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  display: grid;
  place-items: center;
  transition: transform 0.3s ease, background 0.3s, box-shadow 0.3s;
  box-shadow: 0 8px 22px rgba(255, 252, 0, 0.35);
}
.yt-step:hover .yt-step-num {
  transform: scale(1.06);
  background: var(--yt-red);
}
.yt-step h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--yt-ink);
}
.yt-step p {
  margin: 0.35rem 0 0;
  color: var(--yt-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* Results — premium cards (tool pages) */
.tb-results .tb-results-box {
  text-align: left;
  max-width: 720px;
  margin: 1rem auto 0;
  border-radius: 20px;
}
.tb-results .tb-results-box.is-on {
  animation: scResultsIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes scResultsIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.tb-results .tb-file {
  padding: 1rem 1.05rem;
  margin: 0 0 0.65rem;
  border: 1px solid var(--yt-line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #fffef8 100%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.tb-results .tb-file:hover {
  border-color: color-mix(in srgb, var(--yt-red) 45%, var(--yt-line));
  box-shadow: 0 12px 28px rgba(255, 252, 0, 0.15);
}
.tb-results .tb-file .tb-btn-primary {
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  border-radius: 14px;
}

/* Premium full-screen loader */
.tb-click-overlay {
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  animation: scOverlayIn 0.25s ease both;
}
@keyframes scOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.tb-click-modal.tb-premium-loader {
  width: min(400px, 100%);
  background: #fff;
  border: 1px solid var(--yt-line);
  border-radius: 24px;
  padding: 1.75rem 1.35rem 1.5rem;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12);
  animation: scModalPop 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes scModalPop {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to { opacity: 1; transform: none; }
}
.tb-premium-loader h3 {
  font-family: var(--font-display);
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  color: var(--yt-ink);
}
.tb-loader-orbit {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.1rem;
  position: relative;
}
.tb-loader-orbit span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--yt-red);
  animation: scOrbit 1.1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}
.tb-loader-orbit span:nth-child(2) {
  inset: 6px;
  border-top-color: #111;
  animation-duration: 0.85s;
  animation-direction: reverse;
}
.tb-loader-orbit span:nth-child(3) {
  inset: 12px;
  border-top-color: color-mix(in srgb, var(--yt-red) 60%, #fff);
  animation-duration: 1.4s;
}
@keyframes scOrbit {
  to { transform: rotate(360deg); }
}
.tb-loader-bar {
  height: 4px;
  border-radius: 99px;
  background: #eee;
  margin: 1.1rem 0 0;
  overflow: hidden;
}
.tb-loader-bar i {
  display: block;
  height: 100%;
  width: 38%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--yt-red), #111);
  animation: scLoaderBar 1.2s ease-in-out infinite;
}
@keyframes scLoaderBar {
  0% { transform: translateX(-120%); }
  50% { transform: translateX(80%); }
  100% { transform: translateX(220%); }
}
.tb-loader-ads:not([hidden]) { margin-top: 1rem; }

body.sc-scroll-lock {
  overflow: hidden;
  touch-action: none;
}

/* SEO article blocks — home + per-tool */
.tb-seo-article {
  padding: 0.5rem 0 2.25rem;
}
.tb-seo-article-card {
  position: relative;
  border: 1px solid color-mix(in srgb, var(--yt-line) 70%, var(--yt-red) 8%);
  box-shadow:
    0 20px 50px rgba(11, 11, 15, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  background: linear-gradient(165deg, #fff 0%, #fffef8 42%, #fff 100%);
}
.tb-seo-article-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.25rem;
  right: 1.25rem;
  height: 3px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, var(--yt-red), var(--sc-yellow, #fffc00), #111);
  opacity: 0.85;
}
.tb-seo-article-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--yt-muted, #666);
}
.tb-seo-article-title,
.tb-home-article-h.tb-seo-article-title {
  margin: 0 0 1.1rem;
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  line-height: 1.2;
  color: #0b0b0f;
}
.tb-tool-article .tb-seo-article-card {
  margin-top: 0.25rem;
}

@media (max-width: 900px) {
  .yt-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    max-width: calc(100% + 0.5rem);
    margin-left: -0.25rem;
    margin-right: -0.25rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }
  .yt-tabs::-webkit-scrollbar { display: none; }
  .yt-hero-premium .yt-hero-panel {
    border-radius: 20px;
    padding: 1.1rem 0.85rem 1.2rem;
  }
  .yt-bar {
    flex-wrap: wrap;
    position: relative;
    border-radius: 18px;
  }
  .yt-bar-icon { display: none; }
  .yt-bar input {
    width: 100%;
    flex: 1 1 100%;
    padding: 1.05rem 3.25rem 0.55rem 1rem;
    font-size: 16px;
    min-height: 52px;
  }
  .yt-bar-paste {
    position: absolute;
    right: 6px;
    top: 6px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--yt-red-soft);
  }
  .yt-bar-go {
    width: 100%;
    flex: 1 1 100%;
    min-height: 54px;
    border-radius: 0 0 16px 16px;
    font-size: 1.02rem;
  }
  .yt-steps { grid-template-columns: 1fr; gap: 1.25rem; }
  .yt-step { display: grid; grid-template-columns: auto 1fr; gap: 0 1rem; text-align: left; align-items: start; }
  .yt-step-num { margin: 0; width: 48px; height: 48px; font-size: 1.15rem; }
  .tb-results .tb-file {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .tb-results .tb-file .tb-btn,
  .tb-results .tb-file .tb-btn-primary {
    width: 100%;
    min-height: 52px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .yt-hero h1 { font-size: 1.72rem; }
  .yt-tab { font-size: 0.85rem; padding: 0.65rem 0.55rem 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .yt-hero-premium .yt-hero-panel,
  .yt-pill,
  .yt-hero h1,
  .yt-hero-lead,
  .yt-tabs,
  .yt-bar,
  .yt-step,
  .tb-results .tb-results-box.is-on,
  .tb-click-overlay,
  .tb-click-modal.tb-premium-loader {
    animation: none !important;
  }
  .tb-loader-orbit span,
  .tb-loader-bar i {
    animation-duration: 1.8s;
  }
  .tb-brand-mark { animation: none; }
}

@media (hover: none) {
  .yt-step:hover .yt-step-num { transform: none; }
  .tb-results .tb-file:hover { transform: none; }
}
