/* =========================
   PALETA / BASE
   ========================= */
:root {
  --bg: #121212; /* fundo principal  */
  --card: #181818; /* cartões          */
  --text: #eaeaea; /* texto padrão     */
  --muted: #a7a7a7; /* texto fraco      */
  --brand: #1db954; /* verde Spotify    */
  --brand-600: #18a84c; /* hover            */
  --border: #232323; /* bordas suaves    */

  --r: 14px; /* raio padrão      */
  --pad: 14px; /* padding padrão   */
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --maxw: 980px; /* largura do conteúdo */
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu,
    "Helvetica Neue", Arial, "Noto Sans";
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px;
}

/* =========================
   HEADER full-bleed
   ========================= */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0)),
    color-mix(in srgb, var(--bg) 88%, black 12%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.header__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  height: 60px;
  padding: 0 clamp(12px, 4vw, 28px);
  width: 100%;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
}
.nav {
  justify-self: end;
}

/* LOGO (div + img) */
.brand__logo {
  width: 66px;
  height: 66px;
  border-radius: 999px;
  overflow: hidden;
}
.brand__logo .logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Nome da marca */
.brand__name {
  font-weight: 900;
  letter-spacing: -0.2px;
  font-size: clamp(16px, 2.2vw, 20px);
  background-image: linear-gradient(
    90deg,
    #ffffff 0%,
    #cee9d9 35%,
    #b2eec7 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* =========================
   BOTÃO CTA (shine + press)
   reutilize em links/botões
   ========================= */
.btn-cta {
  --shine-speed: 1.25s;
  --shine-passes: 2;
  --radius: 12px;

  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-weight: 800;
  letter-spacing: 0.2px;
  border: 0;
  cursor: pointer;
  overflow: hidden;

  background-image: linear-gradient(
    45deg,
    #1db954 0%,
    #1ed760 50%,
    #1db954 100%
  );
  background-size: 200% auto;
  color: #0b1d12;
  transition: background-position 0.45s ease, transform 0.12s ease,
    box-shadow 0.25s ease, filter 0.12s ease;
  box-shadow: 0 0 0 0 rgba(29, 185, 84, 0), 0 10px 30px rgba(0, 0, 0, 0.35);
}
.btn-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0.28) 47%,
    rgba(255, 255, 255, 0) 70%
  );
  opacity: 0;
  pointer-events: none;
}
.btn-cta:hover,
.btn-cta:focus-visible {
  background-position: right center;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.25),
    0 16px 36px rgba(29, 185, 84, 0.28);
}
.btn-cta:hover::after,
.btn-cta:focus-visible::after {
  animation: btn-shine var(--shine-speed) ease both;
  animation-iteration-count: var(--shine-passes);
}
.btn-cta::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  transform: translate(-50%, -50%) scale(0.2);
  border-radius: 999px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.22),
    rgba(255, 255, 255, 0) 60%
  );
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.btn-cta:active {
  transform: translateY(0) scale(0.98);
  filter: brightness(0.98) saturate(0.98);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.btn-cta:active::before {
  opacity: 0.3;
  transform: translate(-50%, -50%) scale(6);
}
.btn-cta:focus-visible {
  outline: none;
}

@keyframes btn-shine {
  0% {
    transform: translateX(-120%);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateX(120%);
    opacity: 0;
  }
}

/* Variações */
.btn-cta--block {
  width: 100%;
  justify-content: center;
  padding: 12px 16px;
  font-size: 1rem;
}
.btn-cta--download {
  background-image: linear-gradient(
    45deg,
    #1db954 0%,
    #1ed760 55%,
    #1db954 100%
  );
  box-shadow: 0 0 0 0 rgba(29, 185, 84, 0), 0 12px 34px rgba(0, 0, 0, 0.4);
}
.btn-cta:disabled,
.btn-cta[disabled] {
  opacity: 0.7;
  filter: grayscale(0.15) brightness(0.95);
  cursor: not-allowed;
  transform: none !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35) !important;
}
.btn-cta:disabled::after {
  animation: none !important;
  opacity: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
  .btn-cta,
  .btn-cta::after,
  .btn-cta::before {
    transition: none;
  }
  .btn-cta:hover::after,
  .btn-cta:focus-visible::after {
    animation: none;
  }
}

/* =========================
   HERO / CARD
   ========================= */
.hero {
  padding: 28px 0;
}
.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: clamp(14px, 3vw, 24px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}
.title {
  font-size: clamp(20px, 3.4vw, 28px);
  font-weight: 800;
  letter-spacing: -0.3px;
  text-align: center;
}
.subtitle {
  color: var(--muted);
  margin-top: 4px;
  font-size: 0.95rem;
  text-align: center;
}

/* =========================
   FORM (grid)
   ========================= */
.form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
@media (min-width: 640px) {
  .form {
    grid-template-columns: 1fr 170px 160px;
  }
}

/* Inputs */
input[type="url"],
button {
  background: #0f0f0f;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  font-size: 0.98rem;
}
input[type="url"]::placeholder {
  color: #777;
}
input[type="url"]:focus,
button:focus {
  outline: 2px solid color-mix(in srgb, var(--brand) 40%, transparent);
  outline-offset: 1px;
}

/* —— superfícies vidro escuro (coerentes com Spotify) —— */
:root {
  --glass: rgba(255, 255, 255, 0.06);
  --glass-hover: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.12);
  --caret: #e8eaed;
  --focus-ring: rgba(29, 185, 84, 0.18);
  --focus-border: rgba(29, 185, 84, 0.55);
}

/* === Select clean (Spotify + iOS vibe) === */

.cselect {
  position: relative;
  min-height: 44px;
  isolation: isolate;
}
.cselect__native {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.cselect__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 40px 12px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06),
    0 10px 25px rgba(0, 0, 0, 0.25);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  transition: background-color 0.2s ease, border-color 0.2s ease,
    box-shadow 0.2s ease, transform 0.06s ease;
}
.cselect__btn:hover {
  background: rgba(255, 255, 255, 0.08);
}
.cselect__btn:focus-visible {
  outline: none;
  border-color: rgba(29, 185, 84, 0.55);
  box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.18),
    inset 0 1px rgba(255, 255, 255, 0.1);
}
.cselect__btn:active {
  transform: translateY(1px);
}

.cselect__caret {
  width: 18px;
  height: 18px;
  opacity: 0.9;
}

.cselect__list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: #151515;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  padding: 6px;
  margin: 0;
  list-style: none;
  max-height: 240px;
  overflow: auto;
  display: none;
  z-index: 20;
}
.cselect.is-open .cselect__list {
  display: block;
}

.cselect__opt {
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 700;
  color: #e6e6e6;
  cursor: pointer;
}
.cselect__opt:hover,
.cselect__opt.is-active {
  background: rgba(255, 255, 255, 0.08);
}
.cselect__opt.is-selected {
  background: rgba(29, 185, 84, 0.18);
  color: #eaffe9;
  border: 1px solid rgba(29, 185, 84, 0.35);
}

/* esconder scrollbar da lista do select custom (continua rolando) */
.cselect__list {
  overflow: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge antigo */
}
.cselect__list::-webkit-scrollbar {
  /* Chrome/Safari/Edge */
  width: 0;
  height: 0;
}

/* ===== Barra de entrada (estilo Y2meta + Spotify) ===== */
.inputbar {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: 16px;
  background: #0f0f0f;
  border: 2px solid #222; /* borda base */
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
  overflow: hidden; /* cantos perfeitos */
}
.inputbar:focus-within {
  border-color: #1db954; /* realce verde */
  box-shadow: 0 0 0 4px rgba(29, 185, 84, 0.2), 0 16px 46px rgba(0, 0, 0, 0.45);
}

.inputbar__field {
  flex: 1 1 auto;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  padding: 16px 14px;
}
.inputbar__field::placeholder {
  color: #868686;
}

/* bloco do select dentro da barra */
.inputbar__select {
  flex: 0 0 160px; /* largura do select */
  display: flex;
  align-items: stretch;
  border-left: 2px solid #222; /* divisória */
}

/* refinando o custom-select para caber “flat” dentro da barra */
.inputbar .cselect {
  width: 100%;
  min-height: 0;
  isolation: isolate;
}
.inputbar .cselect__btn {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0 38px 0 12px; /* mais compacto na barra */
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.inputbar .cselect__btn:hover {
  background: rgba(255, 255, 255, 0.05);
}
.inputbar .cselect__btn:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(29, 185, 84, 0.45);
  border-radius: 8px;
}
.inputbar .cselect__caret {
  opacity: 0.85;
}

/* lista do select abre sobreposta à barra */
.inputbar .cselect__list {
  left: auto;
  right: 0; /* alinha pela direita */
  min-width: 180px;
  top: calc(100% + 8px);
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* botão Baixar colado à direita */
.inputbar__btn {
  border-radius: 0 14px 14px 0 !important;
  padding: 0 22px;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
}

/* responsivo: em telas pequenas, empilha */
@media (max-width: 640px) {
  .inputbar {
    flex-direction: column;
    border-radius: 16px;
  }
  .inputbar__select {
    border-left: 0;
    border-top: 2px solid #222;
  }
  .inputbar__btn {
    border-radius: 0 0 16px 16px !important;
    padding: 14px 18px;
  }
  .inputbar__field {
    padding: 14px;
  }
}

/* ===== Status enxuto ===== */
.statusbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  margin-top: 16px;
  font-size: 0.95rem;
}
.status__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: #0f0f0f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cfcfcf;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
}

.form {
  display: block;
  margin-top: 14px;
}

/* Form simples (não-grid) */
.form {
  display: block;
  margin-top: 14px;
}

/* Campo do link, sozinho */
.inputbar--solo {
  display: flex;
  align-items: center;
  border-radius: 16px;
  background: #0f0f0f;
  border: 2px solid #222;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.inputbar--solo .inputbar__field {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  padding: 16px 14px;
}
.inputbar--solo .inputbar__field::placeholder {
  color: #868686;
}

/* Linha de ações embaixo (centralizada) */
.form-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

/* Tamanhos dos controles na linha de ações */
.form-actions .cselect {
  min-width: 160px;
}
.form-actions .btn-cta {
  padding: 12px 18px;
  font-size: 1rem;
}

/* Mobile: empilha SELECT e BOTÃO */
@media (max-width: 560px) {
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .form-actions .cselect,
  .form-actions .btn-cta {
    width: 100%;
  }
}

/* Botão “Colar” dentro do input */
.inputbar--solo {
  position: relative;
}
.inputbar--solo .inputbar__field {
  padding-right: 74px;
} /* espaço pro botão */
.ghost-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #eaeaea;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Pílulas de status com variações */
.pill--ok {
  background: rgba(29, 185, 84, 0.18);
  border-color: rgba(29, 185, 84, 0.35);
  color: #eaffe9;
}
.pill--bad {
  background: rgba(255, 69, 58, 0.18);
  border-color: rgba(255, 69, 58, 0.35);
  color: #ffdede;
}

/* Spinner no botão Baixar quando processando */
.btn-cta.is-loading {
  pointer-events: none;
  opacity: 0.9;
}
.btn-cta.is-loading::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: rgba(255, 255, 255, 1);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

/* ===== Select compacto + caret à direita ===== */
.cselect--sm {
  min-height: 40px;
} /* menor que 44px */
.cselect--sm .cselect__btn {
  position: relative; /* p/ posicionar o caret */
  padding: 10px 34px 10px 12px; /* ↓ diminui altura e direita */
  font-size: 0.95rem; /* menorzinho */
  border-radius: 10px; /* raio um pouco menor */
}
.cselect--sm .cselect__caret {
  position: absolute;
  right: 10px; /* encosta à direita */
  top: 50%;
  width: 14px;
  height: 14px; /* caret menor */
  transform: translateY(-50%);
  opacity: 0.9;
}

/* opcional: lista acompanha o raio/estilo compacto */
.cselect--sm .cselect__list {
  border-radius: 10px;
  min-width: 160px;
}

/* foco menos “grandão” (anel mais fino) */
.cselect--sm .cselect__btn:focus-visible {
  outline: none;
  border-color: rgba(29, 185, 84, 0.45);
  box-shadow: 0 0 0 2px rgba(29, 185, 84, 0.22),
    inset 0 1px rgba(255, 255, 255, 0.1);
}

/* ===== Seção de vantagens ===== */
.features {
  padding: 28px 0 42px;
}
.sec-title {
  text-align: center;
  font-weight: 900;
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: -0.3px;
}
.sec-sub {
  text-align: center;
  color: var(--muted);
  margin: 6px auto 0;
  max-width: 800px;
}

.feat-grid {
  margin-top: 22px;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.feat {
  background: #151515;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 18px 18px 16px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.feat:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand) 40%, #fff 0%);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.48);
}

.feat__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--brand) 18%, #0f0f0f 82%);
  border: 1px solid color-mix(in srgb, var(--brand) 35%, #000 65%);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
  color: #bff5cf; /* cor do ícone (usa currentColor) */
  margin-bottom: 10px;
}
.feat__icon svg {
  width: 28px;
  height: 28px;
}

.feat h3 {
  margin: 4px 0 6px;
  font-size: 1.2rem;
  font-weight: 900;
  color: #eafaea;
}
.feat p {
  color: #cfcfcf;
  margin: 0;
  line-height: 1.55;
  font-size: 0.98rem;
}
