/* Instant Reels Downloader — site chrome + downloader UI */

:root {
  --primary: #dd2a7b;
  --primary-hover: #c2256c;
  --primary-2: #f58529;
  --primary-3: #f58529;
  --primary-glow: rgba(221, 42, 123, 0.22);
  --gradient: linear-gradient(135deg, #f58529, #dd2a7b);
  --bg: #f6f4f8;
  --bg-card: #ffffff;
  --bg-input: #f0ecf4;
  --bg-elevated: #ffffff;
  --text-main: #1a1520;
  --text-muted: #6b6475;
  --border-color: rgba(26, 21, 32, 0.1);
  --success: #1a9f6a;
  --danger: #d64545;
  --shadow: 0 12px 40px rgba(26, 21, 32, 0.08);
  --radius: 14px;
  --font-family-title: 'Outfit', system-ui, sans-serif;
  --font-family-body: 'Figtree', system-ui, sans-serif;
  --transition-fast: 0.18s ease;
}

html.dark-theme {
  --bg: #0b0b10;
  --bg-card: #14141c;
  --bg-input: #1c1c28;
  --bg-elevated: #1a1a24;
  --text-main: #f4f1f7;
  --text-muted: #a39aab;
  --border-color: rgba(255, 255, 255, 0.08);
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  --primary-glow: rgba(221, 42, 123, 0.28);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-family-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(245, 133, 41, 0.14), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(221, 42, 123, 0.12), transparent 50%),
    var(--bg);
}

body.site-body {
  display: block;
  padding: 0;
}

img,
video {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-family-title);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 2000;
  background: var(--primary);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.site-wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-wrap-narrow {
  max-width: 760px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: color-mix(in srgb, var(--bg-card) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

.site-header-inner {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  line-height: 0;
}

.site-logo picture {
  display: block;
  line-height: 0;
}

.site-logo img {
  display: block;
  width: auto;
  height: 52px;
  max-width: min(168px, 40vw);
  object-fit: contain;
}

.site-logo-full {
  display: block;
}

.footer-logo {
  display: inline-flex;
  padding: 10px 14px 8px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(26, 21, 32, 0.06);
}

.footer-logo .site-logo-full img {
  height: 96px;
  max-width: 280px;
}

@media (max-width: 760px) {
  .site-header .site-logo img {
    height: 44px;
    max-width: min(140px, 48vw);
  }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.site-nav-link {
  font-family: var(--font-family-title);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.site-nav-link:hover,
.site-nav-link.is-active {
  color: var(--text-main);
  background: var(--bg-input);
}

.site-nav-link.is-active {
  color: var(--primary);
}

.nav-dropdown {
  position: relative;
}

/* Invisible hover bridge so the menu does not close when moving the pointer slowly into it. */
.nav-dropdown::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 14px;
  z-index: 229;
}

.nav-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-dropdown-chevron {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.65;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  padding: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 230;
  flex-direction: column;
  gap: 2px;
}

.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 14px;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  display: flex;
}

.nav-dropdown-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-family-title);
  white-space: nowrap;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.is-active {
  background: var(--bg-input);
  color: var(--primary);
}

.site-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-header-cta {
  padding: 10px 16px;
  font-size: 13px;
  text-decoration: none;
}

.theme-toggle,
.nav-toggle {
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  border-radius: 10px;
  cursor: pointer;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}

html:not(.dark-theme) .theme-icon-dark {
  display: none;
}

html.dark-theme .theme-icon-light {
  display: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 18px;
  background: var(--text-main);
  border-radius: 2px;
}

body.nav-open {
  overflow: hidden;
}

/* Buttons / forms */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-family: var(--font-family-title);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 8px 24px var(--primary-glow);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-ghost {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

/* Hero / downloader */
.hero {
  padding: 48px 0 24px;
  text-align: center;
}

.hero-brand {
  font-family: var(--font-family-title);
  font-size: clamp(1.55rem, 4.5vw, 2.75rem);
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.hero-brand span {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-hero .hero-brand {
  font-size: clamp(1.35rem, 3.8vw, 2.35rem);
}

.hero-lead {
  max-width: 560px;
  margin: 0 auto 28px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

#downloader {
  scroll-margin-top: 100px;
}

.tool-panel {
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.tool-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
}

.tool-tab {
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-family-title);
}

.tool-tab.is-active {
  color: #fff;
  border-color: transparent;
  background: var(--gradient);
}

.search-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: stretch;
}

.input-wrapper {
  position: relative;
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 1;
}

.input-wrapper input#dl-input,
.input-wrapper input {
  width: 100%;
  height: 52px;
  border-radius: 12px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-main);
  padding: 0 92px 0 48px !important;
  font-size: 15px;
  outline: none;
  font-family: var(--font-family-body);
}

.input-wrapper input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.input-wrapper input:focus ~ .input-icon,
.input-wrapper:focus-within .input-icon {
  color: var(--primary);
}

.paste-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-family: var(--font-family-title);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.paste-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.search-row > .btn-primary {
  height: 52px;
  padding: 0 22px;
  flex-shrink: 0;
}

.status-msg {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-muted);
  min-height: 1.4em;
}

.status-msg.is-error {
  color: var(--danger);
}

.results {
  margin-top: 20px;
  text-align: left;
}

.profile-card {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
}

.profile-card img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-card);
}

.profile-meta h2 {
  margin: 0 0 4px;
  font-size: 1.15rem;
}

.profile-meta p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.stats-row {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.media-grid.media-grid-tall {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.media-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  display: flex;
  flex-direction: column;
  min-height: 0;
  aspect-ratio: auto;
}

.media-card-preview {
  position: relative;
  aspect-ratio: 3 / 4;
  min-height: 260px;
  background: #000;
  overflow: hidden;
}

.media-card.media-card-audio {
  max-width: 360px;
  margin: 0 auto;
}

.media-card.media-card-audio .media-card-preview {
  aspect-ratio: 9 / 14;
  min-height: 320px;
}

.media-card img,
.media-card video,
.media-card .media-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-card .media-thumb {
  position: absolute;
  inset: 0;
}

.media-play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 52px;
  height: 52px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.15s ease, transform 0.15s ease;
}

.media-play-badge:hover {
  background: rgba(0, 0, 0, 0.75);
  transform: translate(-50%, -50%) scale(1.06);
}

.media-play-badge svg {
  width: 22px;
  height: 22px;
  margin-left: 2px;
}

.media-view-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(6px);
  transition: background 0.15s ease, transform 0.15s ease;
}

.media-view-btn:hover {
  background: rgba(0, 0, 0, 0.75);
  transform: scale(1.05);
}

.media-view-btn svg {
  width: 18px;
  height: 18px;
}

.media-card .media-actions {
  position: static;
  inset: auto;
  display: flex;
  gap: 4px;
  padding: 10px;
  background: var(--bg-input);
  border-top: 1px solid var(--border-color);
  z-index: 4;
}

.media-card .media-actions .btn {
  flex: 1;
  padding: 10px;
  font-size: 13px;
}

.media-card .media-actions .btn:disabled,
.media-card .media-actions .btn.is-busy {
  opacity: 0.55;
  cursor: wait;
  pointer-events: none;
  filter: grayscale(0.2);
}

.audio-result {
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
}

.audio-result-note {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

.audio-result-note strong {
  color: var(--text-main);
}

.dp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.highlight-list,
.story-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.story-item,
.highlight-item {
  text-align: center;
  cursor: pointer;
  border: none;
  background: transparent;
  color: inherit;
  padding: 4px;
  border-radius: 14px;
  transition: background 0.15s ease;
}

.highlight-item:hover {
  background: var(--bg-input);
}

.story-item img,
.highlight-item img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.12);
  background: var(--bg-card);
  padding: 2px;
  box-sizing: border-box;
  display: block;
  margin: 0 auto;
}

.highlight-item.is-selected img {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.highlight-item.is-selected span {
  color: var(--primary);
  font-weight: 700;
}

.story-item span,
.highlight-item span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 88px;
  margin-left: auto;
  margin-right: auto;
}

.load-more-wrap {
  text-align: center;
  margin-top: 20px;
}

.load-more-wrap .btn:disabled,
.load-more-wrap .btn.is-busy {
  opacity: 0.55;
  cursor: wait;
}

.load-more-spinner {
  margin: 16px auto;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 12px auto;
}

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

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.9);
  display: grid;
  place-items: center;
  padding: 24px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-stage {
  position: relative;
  max-width: min(960px, 96vw);
  max-height: 90vh;
  display: grid;
  place-items: center;
}

.lightbox-stage img,
.lightbox-stage video {
  max-height: 90vh;
  max-width: 96vw;
  border-radius: 10px;
  object-fit: contain;
  background: #000;
}

.lightbox-toolbar {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 1100;
  display: flex;
  gap: 10px;
}

.lightbox-icon-btn {
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  background: #fff;
  color: #111;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}

.lightbox-icon-btn:hover {
  background: #f3f3f3;
  transform: scale(1.04);
}

.lightbox-icon-btn:disabled,
.lightbox-icon-btn.is-busy {
  opacity: 0.55;
  cursor: wait;
}

.lightbox-icon-btn svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.4;
}

.lightbox-icon-btn.lightbox-close-btn {
  background: #ff2d55;
  border-color: #fff;
  color: #fff;
}

.lightbox-icon-btn.lightbox-close-btn:hover {
  background: #e0264b;
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1100;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  background: #fff;
  color: #111;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.lightbox-nav:hover {
  background: #f3f3f3;
  transform: translateY(-50%) scale(1.05);
}

.lightbox-nav svg {
  width: 22px;
  height: 22px;
}

.lightbox-nav-prev {
  left: max(12px, env(safe-area-inset-left));
}

.lightbox-nav-next {
  right: max(12px, env(safe-area-inset-right));
}

.lightbox-counter {
  position: fixed;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(6px);
}

.lightbox-media {
  display: grid;
  place-items: center;
  max-width: 96vw;
  max-height: 90vh;
}

.empty-tab-hint a {
  font-weight: 700;
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Sections */
.section {
  padding: 56px 0;
}

.section-title {
  text-align: center;
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3vw, 2rem);
}

.section-lead {
  text-align: center;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 28px;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.how-device-card {
  margin-top: 24px;
  padding: 24px 22px 22px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.how-device-card:first-of-type {
  margin-top: 8px;
}

.how-device-title {
  margin: 0 0 18px;
  text-align: left;
  font-family: var(--font-family-title);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.how-step {
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.how-step:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.how-step-media {
  position: relative;
  aspect-ratio: 360 / 190;
  background: #f3f0ff;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--border-color);
}

.how-step-media picture {
  width: 100%;
  height: 100%;
  display: block;
}

.how-step-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.how-step-media .step-placeholder {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  padding: 12px;
}

.how-step-body {
  padding: 18px 18px 20px;
}

.how-step .step-num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: var(--gradient);
  margin-bottom: 12px;
  font-family: var(--font-family-title);
}

.how-step h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.how-step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border-color));
  box-shadow: var(--shadow);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(245, 133, 41, 0.18), rgba(221, 42, 123, 0.2));
  color: var(--primary);
  flex-shrink: 0;
}

.tool-card-icon svg {
  width: 24px;
  height: 24px;
}

.tool-card h3 {
  margin: 0;
  font-size: 1.02rem;
}

.tool-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.45;
}

.tool-card-link {
  margin-top: auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-family-title);
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 12px;
  margin: -4px auto 28px;
  max-width: 720px;
}

.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  color: var(--text-main);
  background: color-mix(in srgb, var(--bg-card) 88%, transparent);
  border: 1px solid color-mix(in srgb, #dd2a7b 35%, var(--border-color));
  box-shadow:
    0 0 0 1px color-mix(in srgb, #f58529 18%, transparent),
    0 0 18px color-mix(in srgb, #dd2a7b 28%, transparent),
    0 0 36px color-mix(in srgb, #f58529 14%, transparent);
  animation: trust-glow 2.8s ease-in-out infinite;
}

.trust-chip:nth-child(2) {
  animation-delay: 0.45s;
}

.trust-chip:nth-child(3) {
  animation-delay: 0.9s;
}

@keyframes trust-glow {
  0%,
  100% {
    box-shadow:
      0 0 0 1px color-mix(in srgb, #f58529 16%, transparent),
      0 0 14px color-mix(in srgb, #dd2a7b 22%, transparent),
      0 0 28px color-mix(in srgb, #f58529 12%, transparent);
  }
  50% {
    box-shadow:
      0 0 0 1px color-mix(in srgb, #f58529 35%, transparent),
      0 0 22px color-mix(in srgb, #dd2a7b 42%, transparent),
      0 0 44px color-mix(in srgb, #f58529 22%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .trust-chip {
    animation: none;
  }
}

.trust-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gradient);
  display: inline-block;
  box-shadow: 0 0 8px color-mix(in srgb, #dd2a7b 70%, transparent);
  flex-shrink: 0;
}

.seo-copy {
  max-width: 820px;
  margin: 0 auto;
}

.seo-copy h3 {
  margin: 1.75rem 0 0.6rem;
  font-size: 1.2rem;
}

.seo-copy p,
.seo-copy li {
  color: var(--text-muted);
}

.seo-copy a {
  font-weight: 600;
}

.cta-banner {
  text-align: center;
  padding: 36px 24px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.cta-banner h2 {
  margin: 0 0 8px;
}

.cta-banner p {
  margin: 0 0 18px;
  color: var(--text-muted);
}

.section-alt {
  background: color-mix(in srgb, var(--bg-card) 55%, transparent);
  border-block: 1px solid var(--border-color);
}

.content-section {
  padding: 48px 0;
}

.content-section + .content-section {
  border-top: 1px solid var(--border-color);
}

.content-panel {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 8px 0 12px;
  box-shadow: none;
  max-width: 820px;
  margin: 0 auto;
}

.content-panel .section-title,
.content-panel h2.panel-title {
  text-align: center;
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2.5vw, 1.7rem);
}

.content-panel .panel-lead {
  margin: 0 auto 22px;
  color: var(--text-muted);
  max-width: 640px;
  text-align: center;
}

.content-panel.seo-copy {
  text-align: left;
}

.content-panel.seo-copy .panel-title,
.content-panel.seo-copy .panel-lead {
  text-align: center;
}

/* FAQ / tools panels keep a light surface without feeling like a cramped card */
.content-section.section-alt .content-panel,
.content-panel.has-surface {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: none;
  max-width: none;
}

.content-panel .faq-list {
  max-width: none;
  margin: 0;
}

.content-panel .tools-grid {
  margin-top: 8px;
}

/* Downloader mode chrome */
.dl-mode-title {
  text-align: center;
  margin: 0 0 12px;
  font-family: var(--font-family-title);
  font-weight: 700;
  font-size: 0.95rem;
}

.dl-hint {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.hint-text {
  font-size: 13px;
  color: var(--text-muted);
}

.coming-soon-note,
.end-note {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.empty-tab {
  padding: 36px 20px;
  text-align: center;
  border: 1px dashed var(--border-color);
  border-radius: 16px;
  background: var(--bg-input);
}

.empty-tab-title {
  margin: 0;
  font-family: var(--font-family-title);
  font-weight: 700;
}

.empty-tab-hint {
  margin: 8px auto 0;
  max-width: 420px;
  font-size: 14px;
  color: var(--text-muted);
}

/* Profile browser */
.profile-browser {
  text-align: left;
}

.profile-browser-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 18px;
  border-radius: 18px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--bg-card);
  box-shadow: 0 0 0 3px transparent;
  background-image: var(--gradient);
  padding: 3px;
  background-clip: padding-box;
}

.profile-avatar-dl {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  font-size: 14px;
}

.profile-browser-meta {
  flex: 1;
  min-width: 0;
}

.profile-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.profile-name-row h2 {
  margin: 0;
  font-size: 1.4rem;
}

.profile-fullname {
  margin: 4px 0 0;
  font-size: 1rem;
}

.profile-bio {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--text-muted);
  white-space: pre-wrap;
}

.stats-row-lg {
  margin-top: 12px;
  gap: 20px;
}

.stats-row-lg strong {
  color: var(--text-main);
  margin-right: 4px;
}

.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

.badge-ok {
  background: rgba(26, 159, 106, 0.15);
  color: var(--success);
}

.badge-muted {
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.profile-inner-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.profile-inner-tab {
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-family-title);
  cursor: pointer;
}

.profile-inner-tab.is-active {
  color: #fff;
  border-color: transparent;
  background: var(--gradient);
}

.profile-pane {
  min-height: 80px;
}

.post-grid {
  columns: 1;
  gap: 14px;
}

@media (min-width: 560px) {
  .post-grid {
    columns: 2;
  }
}

@media (min-width: 900px) {
  .post-grid {
    columns: 3;
  }
}

.post-card {
  break-inside: avoid;
  margin-bottom: 14px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
}

.post-card-media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #000;
}

.post-card-media .media-thumb {
  position: absolute;
  inset: 0;
}

.post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
}

.post-card-badge-right {
  left: 8px;
  right: auto;
  top: auto;
  bottom: 8px;
}

.post-card-body {
  padding: 12px;
}

.post-card-stats {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.post-card-caption {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.post-card-actions {
  display: flex;
  gap: 8px;
}

.post-card-actions .btn {
  flex: 1;
  padding: 8px;
  font-size: 12px;
}

.stories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

@media (max-width: 900px) {
  .stories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 560px) {
  .stories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.story-card {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
}

.story-card-media {
  position: relative;
  aspect-ratio: 9 / 16;
  background: #000;
}

.story-card-media .media-thumb {
  position: absolute;
  inset: 0;
}

.story-card .btn {
  width: 100%;
  border-radius: 0;
}

.dp-result {
  display: flex;
  align-items: center;
  gap: 24px;
  text-align: left;
  padding: 8px 4px;
}

.dp-preview {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 35%, transparent);
}

.dp-result-meta {
  flex: 1;
  min-width: 0;
}

.dp-result-meta p {
  margin: 0 0 6px;
}

.dp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.media-thumb {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}

.media-thumb img,
.media-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-thumb-spinner {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.25);
}

.media-thumb-spinner::after {
  content: '';
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.media-thumb.is-ready .media-thumb-spinner {
  display: none;
}

.media-card .btn:disabled,
.post-card .btn:disabled,
.story-card .btn:disabled {
  opacity: 0.65;
}

@media (max-width: 560px) {
  .dp-result {
    flex-direction: column;
    text-align: center;
  }

  .dp-actions {
    justify-content: center;
  }
}

.highlight-browser {
  display: grid;
  gap: 16px;
}

@media (min-width: 720px) {
  .profile-browser-header {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .profile-browser-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-name-row,
  .stats-row-lg {
    justify-content: center;
  }
}

.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  font-family: var(--font-family-title);
  font-weight: 700;
  list-style: none;
  user-select: none;
}

.faq-item summary::-webkit-details-marker,
.faq-item summary::marker {
  display: none;
  content: none;
}

.faq-item summary::after {
  content: "";
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background-color: var(--bg-input);
  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='%236b6475' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  transition: transform var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast);
}

html.dark-theme .faq-item summary::after {
  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='%23a39aab' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.faq-item summary:hover::after {
  border-color: var(--primary);
}

.faq-item[open] summary::after {
  transform: rotate(180deg);
  border-color: rgba(221, 42, 123, 0.4);
  background-color: rgba(221, 42, 123, 0.12);
}

.faq-item p {
  margin: 10px 0 0;
  color: var(--text-muted);
}

/* Content pages */
.page-hero {
  padding: 40px 0 12px;
  text-align: center;
}

.page-hero h1 {
  margin: 0 auto 10px;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  max-width: 920px;
}

.page-hero p {
  margin: 0 auto;
  color: var(--text-muted);
  max-width: 640px;
}

.about-brand {
  padding: 8px 0 8px;
}

.about-brand-card {
  display: grid;
  grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 28px 32px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(26, 21, 32, 0.08);
  box-shadow: var(--shadow);
}

html.dark-theme .about-brand-card {
  background: #fff;
  border-color: rgba(255, 255, 255, 0.08);
}

.about-brand-card picture,
.about-brand-card img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 240px;
  margin: 0 auto;
  object-fit: contain;
}

.about-brand-kicker {
  margin: 0 0 6px;
  font-family: var(--font-family-title);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.about-brand-copy h2 {
  margin: 0 0 10px;
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  color: #1a1520;
}

.about-brand-copy p:last-child {
  margin: 0;
  color: #6b6475;
  font-size: 15px;
  line-height: 1.55;
}

@media (max-width: 640px) {
  .about-brand-card {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 24px 20px;
  }

  .about-brand-card img {
    max-width: 200px;
  }
}

.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 auto 14px;
  text-align: center;
}

.prose {
  padding: 24px 0 56px;
}

.prose h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.35rem;
}

.prose h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.1rem;
}

.prose p,
.prose li {
  color: var(--text-muted);
}

.prose a {
  font-weight: 600;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
  padding: 24px 0 56px;
  align-items: start;
}

.article-sidebar {
  position: sticky;
  top: 96px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.article-sidebar h2 {
  margin: 0 0 12px;
  font-size: 0.95rem;
}

.article-sidebar h2 + ul + h2 {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.article-sidebar ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-sidebar a {
  display: block;
  padding: 8px 0;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  border-bottom: 1px solid var(--border-color);
}

.article-sidebar a:hover {
  color: var(--primary);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 24px 0 56px;
}

.blog-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: transform 0.15s ease;
}

.blog-card:hover {
  transform: translateY(-3px);
}

.blog-card img {
  width: 100%;
  aspect-ratio: 1024 / 535;
  object-fit: cover;
  display: block;
  background: var(--bg-input);
}

.blog-card-body {
  padding: 16px;
}

.blog-card h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.blog-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.cover-banner {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 16px 0 24px;
  aspect-ratio: 1024 / 535;
  object-fit: cover;
  background: var(--bg-input);
}

.contact-section {
  display: flex;
  justify-content: center;
}

.contact-form {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  text-align: left;
}

.contact-form .btn {
  width: 100%;
  display: flex;
}

.contact-status {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.contact-status.is-ok {
  color: var(--success);
}

.contact-status.is-err {
  color: var(--danger);
}

.contact-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-main);
  border-radius: 10px;
  padding: 12px;
  font: inherit;
}

/* Footer */
.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--border-color);
  background: color-mix(in srgb, var(--bg-card) 70%, transparent);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 12px 0 0;
}

.footer-heading {
  margin: 0 0 12px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-list a {
  display: block;
  padding: 5px 0;
  color: var(--text-main);
  text-decoration: none;
  font-size: 14px;
}

.footer-list a:hover {
  color: var(--primary);
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 13px;
}

.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 auto 14px;
  text-align: center;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--primary);
}

@media (max-width: 900px) {
  .how-grid {
    grid-template-columns: 1fr;
  }

  .how-device-card {
    padding: 20px 16px 16px;
  }

  .content-panel.seo-copy,
  .section .seo-copy {
    padding-left: 24px;
    padding-right: 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
  }

  .site-header-inner {
    justify-content: space-between;
  }

  .site-header-actions {
    margin-left: auto;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 16px;
    right: 16px;
    top: 64px;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--shadow);
    margin: 0;
    z-index: 210;
  }

  body.nav-open .site-nav {
    display: flex;
  }

  .nav-dropdown::after,
  .nav-dropdown-menu::before {
    display: none;
  }

  .nav-dropdown-menu {
    position: static;
    display: flex;
    min-width: 0;
    margin-top: 4px;
    padding: 4px 0 4px 10px;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .nav-dropdown-chevron {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-header-cta {
    display: none;
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .search-row {
    flex-direction: column;
  }

  .search-row > .btn-primary {
    width: 100%;
  }

  .input-wrapper {
    flex: 1 1 auto;
    width: 100%;
  }
}
