:root {
  color-scheme: dark;
  --bg: #0b1020;
  --bg-soft: #111936;
  --card: rgba(255, 255, 255, 0.08);
  --card-strong: rgba(255, 255, 255, 0.13);
  --text: #f5f7fb;
  --muted: #a9b2c7;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #74f0c2;
  --accent-2: #8aa4ff;
  --danger: #ff8c8c;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(116, 240, 194, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(138, 164, 255, 0.2), transparent 32rem),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  color: #07130f;
  background: var(--accent);
  box-shadow: 0 0 30px rgba(116, 240, 194, 0.4);
}

.privacy-badge {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(116, 240, 194, 0.08);
  font-size: 0.9rem;
}

.hero-content {
  width: min(820px, 100%);
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 5.25rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.hero-copy {
  width: min(720px, 100%);
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.tool-card {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(18px);
}

.tabs {
  display: flex;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.tab-button {
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-weight: 750;
}

.tab-button.active {
  color: #06120f;
  background: var(--accent);
}

.panel {
  padding: 26px;
}

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 26px;
}

h2,
h3 {
  margin: 0;
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

h3 {
  font-size: 1.1rem;
}

.muted {
  color: var(--muted);
  line-height: 1.65;
}

.dropzone {
  position: relative;
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 190px;
  margin: 24px 0;
  padding: 22px;
  text-align: center;
  border: 2px dashed rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.055);
  transition: 180ms ease;
}

.dropzone:hover,
.dropzone.dragging,
.dropzone:focus-visible {
  border-color: var(--accent);
  background: rgba(116, 240, 194, 0.08);
  outline: none;
}

.dropzone strong {
  font-size: 1.15rem;
}

.dropzone span,
.dropzone small {
  color: var(--muted);
}

.file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
}

.controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 650;
}

select,
input[type="range"] {
  width: 100%;
}

select {
  min-height: 48px;
  padding: 0 14px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-soft);
}

input[type="range"] {
  accent-color: var(--accent);
}

.primary-button {
  width: 100%;
  min-height: 54px;
  border: none;
  border-radius: 16px;
  color: #07130f;
  background: var(--accent);
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(116, 240, 194, 0.22);
}

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

.preview-box {
  min-height: 440px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.18);
}

.preview-box img,
.preview-box video {
  display: block;
  width: 100%;
  max-height: 310px;
  margin-top: 16px;
  object-fit: contain;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.22);
}

.preview-box audio {
  width: 100%;
  margin-top: 18px;
}

.empty-preview {
  display: grid;
  min-height: 260px;
  margin-top: 16px;
  place-items: center;
  text-align: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.result-box {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.result-box a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  margin-top: 10px;
  border-radius: 14px;
  color: #07130f;
  background: var(--accent-2);
  text-decoration: none;
  font-weight: 900;
}

.status-text {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

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

.progress-wrap {
  height: 12px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 180ms ease;
}

.footer {
  padding: 28px 0 0;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 860px) {
  .topbar {
    margin-bottom: 42px;
  }

  .panel-grid,
  .controls {
    grid-template-columns: 1fr;
  }

  .preview-box {
    min-height: unset;
  }
}

/* Página inicial */
.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 750;
  padding: 8px 12px;
  border-radius: 999px;
  transition: 160ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.home-hero .topbar {
  margin-bottom: 52px;
}

.compact-hero .topbar {
  margin-bottom: 42px;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: end;
  margin-bottom: 42px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 900;
}

.primary-link {
  color: #07130f;
  background: var(--accent);
  box-shadow: 0 12px 30px rgba(116, 240, 194, 0.22);
}

.secondary-link {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.07);
}

.hero-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.055));
  box-shadow: var(--shadow);
}

.hero-panel .panel-kicker {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-panel strong {
  display: block;
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: -0.06em;
}

.hero-panel p {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: end;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1;
}

.search-box {
  display: grid;
  gap: 8px;
}

.search-box span {
  color: var(--muted);
  font-weight: 750;
}

.search-box input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-soft);
  outline: none;
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(116, 240, 194, 0.1);
}

.category-filter {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 22px 0 24px;
}

.filter-chip {
  min-height: 40px;
  padding: 0 14px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  font-weight: 800;
}

.filter-chip.active {
  color: #07130f;
  border-color: transparent;
  background: var(--accent);
}

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

.home-tool-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 16px;
  min-height: 280px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.home-tool-card.available {
  background:
    linear-gradient(145deg, rgba(116, 240, 194, 0.15), rgba(255, 255, 255, 0.06));
  border-color: rgba(116, 240, 194, 0.32);
}

.tool-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 18px;
  color: #07130f;
  background: var(--accent);
  font-weight: 950;
  box-shadow: 0 0 26px rgba(116, 240, 194, 0.24);
}

.tool-card-content {
  display: grid;
  align-content: start;
  min-width: 0;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tool-category,
.status-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.tool-category {
  color: var(--accent);
  background: rgba(116, 240, 194, 0.08);
}

.status-pill {
  color: var(--muted);
  border: 1px solid var(--line);
}

.status-pill.live {
  color: #07130f;
  border-color: transparent;
  background: var(--accent);
}

.home-tool-card h3 {
  margin: 0;
  font-size: 1.32rem;
  line-height: 1.08;
}

.home-tool-card p {
  margin: 12px 0 18px;
  color: var(--muted);
  line-height: 1.55;
}

.card-action {
  align-self: end;
  justify-self: start;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: #07130f;
  border: none;
  border-radius: 14px;
  background: var(--accent);
  text-decoration: none;
  font-weight: 900;
}

.card-action.disabled {
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  cursor: not-allowed;
}

.empty-tools {
  margin: 20px 0 0;
  padding: 20px;
  color: var(--muted);
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 980px) {
  .hero-layout,
  .section-head {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    width: min(520px, 100%);
  }

  .tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 22px, 1120px);
    padding-top: 18px;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar-actions {
    gap: 8px;
  }

  .privacy-badge,
  .nav-link {
    font-size: 0.82rem;
  }

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

  .home-tool-card {
    min-height: unset;
  }

  .hero-actions a {
    width: 100%;
  }
}

/* Baixador de vídeos */
.video-download-card {
  margin-top: 8px;
}

.downloader-grid {
  grid-template-columns: minmax(0, 1fr) 450px;
}

.platform-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 18px;
}

.platform-chip {
  min-height: 42px;
  padding: 0 14px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  font-weight: 900;
}

.platform-chip.active {
  color: #07130f;
  border-color: transparent;
  background: var(--accent);
}

.url-box {
  margin-bottom: 16px;
}

.url-box input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-soft);
  outline: none;
}

.url-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(116, 240, 194, 0.1);
}

.permission-check {
  display: flex;
  grid-template-columns: unset;
  gap: 10px;
  align-items: flex-start;
  margin: 14px 0 18px;
  padding: 14px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  line-height: 1.45;
}

.permission-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.download-actions {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 12px;
}

.download-actions .primary-button {
  grid-column: 1 / -1;
}

.secondary-button,
.disabled-link {
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 16px;
  font-weight: 900;
}

.secondary-button {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.07);
}

.secondary-button:disabled,
.disabled-link {
  opacity: 0.52;
  cursor: not-allowed;
  pointer-events: none;
}

.progress-note {
  margin-top: 18px;
  padding: 14px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(138, 164, 255, 0.08);
  line-height: 1.55;
}

.downloader-preview {
  min-height: 520px;
}

.download-preview-frame {
  display: grid;
  min-height: 330px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.28);
}

.download-preview-frame iframe,
.download-preview-frame video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 330px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #000;
}

.youtube-frame {
  aspect-ratio: 16 / 9;
  min-height: auto;
}

.youtube-frame iframe {
  min-height: 260px;
}

.vertical-frame {
  width: min(340px, 100%);
  min-height: 520px;
  margin-inline: auto;
}

.vertical-frame iframe {
  min-height: 520px;
}

.link-details strong {
  display: block;
  margin-bottom: 12px;
}

.details-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.details-list div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
}

.details-list dt {
  color: var(--muted);
  font-weight: 800;
}

.details-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.support-card {
  min-height: 160px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
}

.support-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.support-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.live-support {
  border-color: rgba(116, 240, 194, 0.34);
  background: rgba(116, 240, 194, 0.1);
}

.partial-support {
  border-color: rgba(138, 164, 255, 0.22);
}

@media (max-width: 980px) {
  .downloader-grid,
  .support-grid {
    grid-template-columns: 1fr;
  }

  .downloader-preview {
    min-height: unset;
  }
}

@media (max-width: 640px) {
  .download-actions {
    grid-template-columns: 1fr;
  }

  .vertical-frame,
  .vertical-frame iframe {
    min-height: 460px;
  }
}


/* Conversor geral */
.tabs {
  flex-wrap: wrap;
}

textarea {
  font: inherit;
}

.format-note {
  margin: -4px 0 18px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.94rem;
}

.compact-dropzone {
  position: relative;
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 140px;
  padding: 18px;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
}

.full-label {
  margin-bottom: 16px;
}

.text-editor {
  width: 100%;
  min-height: 210px;
  resize: vertical;
  padding: 16px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-soft);
  outline: none;
  line-height: 1.55;
}

.text-editor:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(116, 240, 194, 0.1);
}

.text-stats {
  display: grid;
  gap: 8px;
  align-content: center;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.92rem;
  font-weight: 750;
}

.text-preview {
  width: 100%;
  max-height: 330px;
  overflow: auto;
  margin: 16px 0 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.28);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
}

@media (max-width: 540px) {
  .tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tab-button {
    width: 100%;
  }
}

/* Ferramentas de PDF */
.pdf-tool-card .panel {
  padding: 18px;
}

.pdf-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
}

.pdf-sidebar,
.pdf-workspace {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.045);
}

.pdf-sidebar {
  padding: 18px;
}

.pdf-operation-grid {
  display: grid;
  gap: 10px;
}

.pdf-operation {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 14px;
  text-align: left;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  transition: 160ms ease;
}

.pdf-operation span {
  font-weight: 950;
}

.pdf-operation small {
  color: var(--muted);
  line-height: 1.35;
}

.pdf-operation:hover,
.pdf-operation:focus-visible {
  border-color: rgba(116, 240, 194, 0.55);
  background: rgba(116, 240, 194, 0.08);
  outline: none;
}

.pdf-operation.active {
  color: #07130f;
  border-color: transparent;
  background: var(--accent);
}

.pdf-operation.active small {
  color: rgba(7, 19, 15, 0.78);
}

.pdf-workspace {
  padding: 22px;
}

.pdf-workspace-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 6px;
}

.pdf-workspace-head h2 {
  margin-bottom: 8px;
}

.selected-file-list {
  display: grid;
  gap: 8px;
  margin: -8px 0 18px;
}

.selected-file-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.selected-file-list strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-file-list span {
  white-space: nowrap;
}

.pdf-options {
  display: grid;
  gap: 12px;
}

.pdf-option-block {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.text-input,
input[type="number"].text-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-soft);
  outline: none;
}

.text-input:focus,
input[type="number"].text-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(116, 240, 194, 0.1);
}

.pdf-option-block .format-note {
  margin-bottom: 0;
}

@media (max-width: 980px) {
  .pdf-layout {
    grid-template-columns: 1fr;
  }

  .pdf-operation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .pdf-tool-card .panel,
  .pdf-workspace,
  .pdf-sidebar {
    padding: 14px;
  }

  .pdf-operation-grid {
    grid-template-columns: 1fr;
  }

  .pdf-workspace-head {
    display: grid;
  }

  .selected-file-list div {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Ajustes do baixador avançado */
.warning-badge {
  color: #ffd28a;
  background: rgba(255, 210, 138, 0.1);
}

.section-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.download-preview-frame audio {
  width: calc(100% - 32px);
  align-self: center;
  justify-self: center;
}

.mini-docs {
  margin-top: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.06);
}

.mini-docs h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 12px;
}

.steps-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.6;
}

.steps-list code {
  color: var(--accent);
  background: rgba(116, 240, 194, 0.08);
  padding: 2px 6px;
  border-radius: 8px;
}

/* Backend avançado do baixador de vídeos */
.backend-config-box {
  display: grid;
  gap: 14px;
  margin: 20px 0 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(116, 240, 194, 0.06);
}

.backend-config-box strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 1.02rem;
}

.backend-config-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.backend-url-box {
  margin: 0;
}

.backend-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.backend-actions .secondary-button {
  min-width: 160px;
}

.download-options-box {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.download-options-box strong {
  display: block;
  color: var(--text);
}

.option-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.option-buttons .secondary-button {
  width: 100%;
}

.format-list {
  display: grid;
  gap: 8px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.format-list li {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.12);
}

.format-list span {
  color: var(--text);
  font-weight: 800;
}

.format-list small,
.small-note {
  color: var(--muted);
}

.thumbnail-preview {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.24);
}

.thumbnail-preview img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
}

.thumbnail-preview p {
  margin: 0;
  padding: 0 14px 14px;
  color: var(--text);
  font-weight: 800;
}

/* Admin e status dinâmico */
.status-pill.maintenance {
  color: #fff2c4;
  border-color: rgba(255, 207, 102, 0.45);
  background: rgba(255, 207, 102, 0.14);
}

.status-pill.offline {
  color: #ffc8c8;
  border-color: rgba(255, 120, 120, 0.42);
  background: rgba(255, 120, 120, 0.12);
}

.success-badge {
  color: #07130f;
  border-color: transparent;
  background: var(--accent);
}

.home-tool-card.tool-maintenance {
  border-color: rgba(255, 207, 102, 0.36);
  background: linear-gradient(145deg, rgba(255, 207, 102, 0.12), rgba(255, 255, 255, 0.055));
}

.home-tool-card.tool-disabled {
  opacity: 0.72;
  border-color: rgba(255, 120, 120, 0.28);
  background: rgba(255, 255, 255, 0.045);
}

.admin-layout {
  display: grid;
  gap: 18px;
}

.admin-login-panel,
.admin-panel,
.admin-help-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.admin-form {
  display: grid;
  max-width: 520px;
  gap: 14px;
  margin-top: 18px;
}

.admin-form label,
.admin-tool-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.admin-form input,
.admin-tool-grid select,
.admin-tool-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
  outline: none;
}

.admin-form input:focus,
.admin-tool-grid select:focus,
.admin-tool-grid textarea:focus {
  border-color: rgba(116, 240, 194, 0.72);
  box-shadow: 0 0 0 4px rgba(116, 240, 194, 0.13);
}

.admin-actions,
.admin-footer-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.admin-tools-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.admin-tool-card {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.14);
}

.admin-tool-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.admin-tool-head strong {
  display: block;
  font-size: 1.12rem;
}

.admin-tool-head small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.admin-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.switch-line {
  display: flex !important;
  grid-template-columns: none !important;
  gap: 10px !important;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.switch-line input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.admin-message-field {
  grid-column: 1 / -1;
}

.admin-footer-actions {
  margin-top: 18px;
}

.clean-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
}

#admin-message[data-type="success"] {
  color: var(--accent);
}

#admin-message[data-type="error"] {
  color: #ffc8c8;
}

@media (max-width: 760px) {
  .admin-tool-grid {
    grid-template-columns: 1fr;
  }

  .admin-actions,
  .admin-footer-actions,
  .admin-tool-head {
    justify-content: flex-start;
  }
}

/* Interface pública mais limpa */
.clean-hero .topbar {
  margin-bottom: 64px;
}

.clean-hero-layout {
  grid-template-columns: 1fr;
  margin-bottom: 56px;
}

.clean-section-head {
  margin-bottom: 24px;
}

.clean-tools-grid .home-tool-card {
  min-height: 230px;
}

.clean-tools-grid .home-tool-card p {
  margin-bottom: 22px;
}

.clean-tools-grid .card-action {
  min-width: 92px;
}

@media (max-width: 980px) {
  .clean-hero-layout {
    grid-template-columns: 1fr;
  }
}

/* Gerador de QR Code */
.qr-tool-card .panel {
  padding: 28px;
}

.qr-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 24px;
  align-items: start;
}

.qr-form-column,
.qr-preview-card,
.qr-options-card {
  display: grid;
  gap: 18px;
}

.qr-panels {
  display: grid;
  gap: 14px;
}

.qr-input-panel {
  display: none;
}

.qr-input-panel.active {
  display: grid;
  gap: 14px;
}

.controls.two-cols,
.qr-options-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.qr-options-card,
.qr-preview-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.055);
}

.qr-options-card h3,
.qr-preview-card h2 {
  margin: 0;
}

.qr-logo-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.qr-logo-dropzone {
  min-height: 74px;
}

.qr-switch-line {
  align-self: end;
  min-height: 52px;
}

.qr-preview-column {
  position: sticky;
  top: 20px;
}

.qr-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.qr-preview {
  display: grid;
  width: 100%;
  min-height: 360px;
  padding: 20px;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.qr-preview > *,
.qr-preview svg,
.qr-preview canvas {
  width: min(100%, 320px) !important;
  height: min(calc(100vw - 96px), 320px) !important;
  max-width: 320px !important;
  max-height: 320px !important;
  border-radius: 18px;
}

.qr-preview svg,
.qr-preview canvas {
  display: block;
}

.qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.qr-actions button {
  flex: 1 1 150px;
}

#qr-message[data-type="success"] {
  color: var(--accent);
}

#qr-message[data-type="error"] {
  color: #ffc8c8;
}

@media (max-width: 900px) {
  .qr-layout,
  .controls.two-cols,
  .qr-options-grid {
    grid-template-columns: 1fr;
  }

  .qr-preview-column {
    position: static;
  }

  .qr-logo-row {
    grid-template-columns: 1fr;
  }
}


/* Correções do gerador de QR Code */
.qr-logo-dropzone .file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.qr-logo-dropzone:focus-within,
.qr-logo-dropzone:hover {
  border-color: var(--accent);
  background: rgba(116, 240, 194, 0.08);
}

/* Encurtador de links */
.shortener-tool-card .panel {
  padding: 28px;
}

.shortener-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
  gap: 24px;
  align-items: start;
}

.shortener-form-column,
.shortener-result-column,
.shortener-form,
.shortener-result-card,
.shortener-empty-card {
  display: grid;
  gap: 18px;
}

.shortener-form small {
  color: var(--muted);
  font-size: 0.82rem;
}

.shortener-empty-card,
.shortener-result-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.055);
}

.shortener-empty-card {
  min-height: 280px;
  place-items: center;
  text-align: center;
}

.shortener-empty-card p,
.shortener-empty-card h2 {
  margin: 0;
}

.copy-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.copy-field input {
  min-width: 0;
}

.shortener-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.shortener-stats-grid div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.13);
}

.shortener-stats-grid span {
  color: var(--muted);
  font-size: 0.82rem;
}

.shortener-stats-grid strong {
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}

.shortener-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#shortener-message[data-type="success"] {
  color: var(--accent);
}

#shortener-message[data-type="error"] {
  color: #ffc8c8;
}

.admin-short-links-section {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.admin-short-links-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.admin-short-link-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.14);
}

.admin-short-link-main {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.admin-short-link-main strong,
.admin-short-link-main a,
.admin-short-link-main small {
  display: block;
}

.admin-short-link-main a,
.admin-short-link-main small {
  overflow-wrap: anywhere;
}

.admin-short-link-main a {
  margin-top: 4px;
  color: var(--accent);
}

.admin-short-link-main small {
  margin-top: 6px;
  color: var(--muted);
}

.short-link-admin-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.88rem;
}

.short-link-admin-stats span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.danger-button {
  border: 1px solid rgba(255, 128, 128, 0.42);
  border-radius: 14px;
  padding: 12px 14px;
  color: #ffc8c8;
  background: rgba(255, 128, 128, 0.08);
  cursor: pointer;
  font-weight: 800;
}

.danger-button:hover {
  background: rgba(255, 128, 128, 0.14);
}

@media (max-width: 900px) {
  .shortener-layout,
  .shortener-stats-grid,
  .copy-field {
    grid-template-columns: 1fr;
  }

  .admin-short-link-main {
    display: grid;
  }
}

/* Filtros da página inicial */
.filter-panel {
  display: grid;
  gap: 14px;
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.045);
}

.filter-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-weight: 850;
}

.filter-panel-head button {
  min-height: 34px;
  padding: 0 12px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  font-weight: 850;
  cursor: pointer;
}

.filter-panel-head button:hover,
.filter-panel-head button:focus-visible {
  border-color: rgba(116, 240, 194, 0.45);
  outline: none;
}

.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-filter .filter-chip {
  cursor: pointer;
}

.tag-filter .filter-chip:hover,
.tag-filter .filter-chip:focus-visible {
  color: var(--text);
  border-color: rgba(116, 240, 194, 0.42);
  outline: none;
}

.tag-filter .filter-chip.active:hover,
.tag-filter .filter-chip.active:focus-visible {
  color: #07130f;
}

.tool-count {
  min-height: 24px;
  margin: 0 0 14px;
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 640px) {
  .filter-panel {
    padding: 14px;
  }

  .filter-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .tag-filter .filter-chip {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.9rem;
  }
}

/* Busca e filtro discretos da home */
.search-tools-wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: end;
  width: 100%;
  max-width: 520px;
  justify-self: end;
}

.search-tools-wrap .search-box {
  min-width: 0;
}

.search-tools-wrap .search-box span {
  font-size: 0.86rem;
}

.filter-toggle {
  display: inline-grid;
  place-items: center;
  gap: 3px;
  width: 48px;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.filter-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--muted);
}

.filter-toggle span:nth-child(2) {
  width: 13px;
}

.filter-toggle span:nth-child(3) {
  width: 8px;
}

.filter-toggle:hover,
.filter-toggle:focus-visible,
.filter-toggle.active {
  border-color: rgba(116, 240, 194, 0.45);
  background: rgba(116, 240, 194, 0.09);
  outline: none;
}

.filter-toggle:hover span,
.filter-toggle:focus-visible span,
.filter-toggle.active span {
  background: var(--accent);
}

.search-suggestions,
.filter-menu {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(12, 18, 31, 0.98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(20px);
}

.search-suggestions {
  overflow: hidden;
  padding: 6px;
}

.search-suggestion-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 12px;
  color: var(--text);
  border: 0;
  border-radius: 14px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.search-suggestion-item:hover,
.search-suggestion-item:focus-visible {
  background: rgba(116, 240, 194, 0.09);
  outline: none;
}

.search-suggestion-item[aria-disabled="true"] {
  cursor: default;
  opacity: 0.72;
}

.search-suggestion-item[aria-disabled="true"]:hover,
.search-suggestion-item[aria-disabled="true"]:focus-visible {
  background: rgba(255, 255, 255, 0.035);
}

.suggestion-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.suggestion-main strong,
.suggestion-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion-main strong {
  font-size: 0.96rem;
}

.suggestion-main small {
  color: var(--muted);
  font-weight: 650;
}

.suggestion-meta {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.search-suggestion-empty {
  padding: 14px;
  color: var(--muted);
  font-weight: 750;
}

.filter-menu {
  left: auto;
  right: 0;
  width: min(320px, calc(100vw - 32px));
  padding: 14px;
}

.filter-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--muted);
  font-weight: 850;
}

.filter-menu-head button {
  min-height: 32px;
  padding: 0 10px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
  font-weight: 850;
}

.filter-menu .tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-menu .filter-chip {
  min-height: 34px;
  padding: 0 11px;
  font-size: 0.86rem;
  cursor: pointer;
}

.active-filter-label {
  display: inline-flex;
  width: fit-content;
  margin: -6px 0 14px;
  padding: 8px 11px;
  color: var(--accent);
  border: 1px solid rgba(116, 240, 194, 0.3);
  border-radius: 999px;
  background: rgba(116, 240, 194, 0.08);
  font-size: 0.86rem;
  font-weight: 850;
}

.home-tool-card.is-hidden {
  display: none !important;
}

@media (max-width: 760px) {
  .section-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .search-tools-wrap {
    max-width: none;
    justify-self: stretch;
  }

  .filter-menu {
    left: 0;
    right: 0;
    width: auto;
  }

  .search-suggestion-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .suggestion-meta {
    width: fit-content;
  }
}
