/* ============================================================
   YouTube Downloader - tema escuro inspirado no YouTube
   Paleta: fundo #0f0f0f, superfícies #212121/#272727,
   texto #f1f1f1, secundário #aaa, vermelho #ff0000/#cc0000
   ============================================================ */

:root{
  --yt-bg:#0f0f0f;
  --yt-surface:#212121;
  --yt-surface-2:#272727;
  --yt-surface-3:#383838;
  --yt-border:#303030;
  --yt-text:#f1f1f1;
  --yt-text-2:#aaaaaa;
  --yt-red:#ff0000;
  --yt-red-dark:#cc0000;
  --yt-blue:#3ea6ff;
  --radius:12px;
  --maxw:900px;
}

*{box-sizing:border-box;margin:0;padding:0}
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth }
body{
  background:var(--yt-bg);
  color:var(--yt-text);
  font-family:'Roboto',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  line-height:1.6;
  font-size:16px;
}
a{color:var(--yt-blue);text-decoration:none}
a:hover{text-decoration:underline}
strong{color:#fff;font-weight:700}

/* ---------- Cabeçalho ---------- */
.yt-header{
  position:sticky;top:0;z-index:50;
  background:var(--yt-bg);
  border-bottom:1px solid var(--yt-border);
}
.yt-header-inner{
  max-width:var(--maxw);margin:0 auto;
  padding:0 16px;height:56px;
  display:flex;align-items:center;justify-content:space-between;gap:16px;
}
.yt-logo{display:flex;align-items:center;gap:4px;color:#fff}
.yt-logo:hover{text-decoration:none}
.yt-logo-mark{display:inline-flex}
.yt-logo-text{font-size:20px;font-weight:500;letter-spacing:-.5px}
.yt-nav{display:flex;gap:4px;flex-wrap:wrap}
.yt-nav a{
  color:var(--yt-text);font-size:14px;font-weight:500;
  padding:8px 12px;border-radius:18px;
}
.yt-nav a:hover{background:var(--yt-surface-2);text-decoration:none}

/* ---------- Layout principal ---------- */
.yt-main{max-width:var(--maxw);margin:0 auto;padding:24px 16px 48px}

/* ---------- Hero + busca ---------- */
.hero{text-align:center;padding:24px 0 8px}
.hero h1{font-size:34px;font-weight:700;margin-bottom:12px}
.hero .subtitle{color:var(--yt-text-2);max-width:680px;margin:0 auto 28px;font-size:16px}

.search-box{
  display:flex;max-width:720px;margin:0 auto;
  background:var(--yt-surface);
  border:1px solid var(--yt-border);
  border-radius:40px;overflow:hidden;
  transition:border-color .15s, box-shadow .15s;
}
.search-box:focus-within{border-color:var(--yt-blue);box-shadow:0 0 0 1px var(--yt-blue)}
.search-box input{
  flex:1;background:transparent;border:0;outline:0;
  color:var(--yt-text);font-size:16px;padding:14px 22px;min-width:0;
}
.search-box input::placeholder{color:#888}
.search-box button{
  background:var(--yt-red);color:#fff;border:0;cursor:pointer;
  font-size:16px;font-weight:600;padding:0 30px;
  transition:background .15s;
}
.search-box button:hover{background:var(--yt-red-dark)}
.search-box button:disabled{opacity:.6;cursor:not-allowed}
.terms-note{color:var(--yt-text-2);font-size:12px;margin-top:14px}

/* ---------- Anúncios ---------- */
/* Espaço reservado para anúncios (invisível até você colar o código do anúncio) */
.ad-slot{
  margin:28px auto;max-width:728px;min-height:90px;
  display:flex;align-items:center;justify-content:center;
}
.ad-slot:empty{min-height:90px}

/* ---------- Resultado ---------- */
.result{margin:24px 0}
.card{
  background:var(--yt-surface);border:1px solid var(--yt-border);
  border-radius:var(--radius);padding:18px;
}
.video-head{display:flex;gap:16px;align-items:flex-start;flex-wrap:wrap}
.video-thumb{
  width:200px;max-width:40%;aspect-ratio:16/9;border-radius:8px;
  object-fit:cover;background:#000;flex-shrink:0;
}
.video-meta{flex:1;min-width:220px}
.video-meta h3{font-size:18px;font-weight:500;margin-bottom:6px;line-height:1.3}
.video-meta .author{color:var(--yt-text-2);font-size:14px}
.video-meta .duration{color:var(--yt-text-2);font-size:13px;margin-top:4px}

.dl-section-title{
  margin:20px 0 10px;font-size:14px;font-weight:700;
  text-transform:uppercase;letter-spacing:.5px;color:var(--yt-text-2);
}
.dl-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.dl-btn{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  background:var(--yt-surface-2);border:1px solid var(--yt-border);
  color:var(--yt-text);border-radius:10px;padding:12px 14px;
  cursor:pointer;font-size:14px;font-weight:500;text-align:left;
  transition:background .12s,border-color .12s;
}
.dl-btn:hover{background:var(--yt-surface-3);border-color:#555;text-decoration:none}
.dl-btn .q{font-weight:700;color:#fff}
.dl-btn .s{font-size:12px;color:var(--yt-text-2)}
.dl-btn.audio{border-color:#3a2a2a}
.dl-btn .tag-noaudio{
  font-size:10px;background:#5a3b00;color:#ffce7a;
  padding:1px 6px;border-radius:6px;margin-left:4px;white-space:nowrap;
}
.badge-ff{font-size:12px;color:#7fd17f;margin-top:8px;display:block}

/* Modo simples: confirmação + botão único */
.dl-ok{color:#7fd17f;font-size:15px;margin:12px 0}
.dl-single{
  display:inline-flex;align-items:center;gap:6px;
  background:var(--yt-red);color:#fff;border:0;border-radius:20px;
  padding:10px 20px;font-size:15px;font-weight:600;cursor:pointer;
}
.dl-single:hover{background:var(--yt-red-dark);text-decoration:none}

/* Estados */
.status{display:flex;align-items:center;gap:12px;color:var(--yt-text-2);font-size:15px}
.spinner{
  width:22px;height:22px;border:3px solid var(--yt-surface-3);
  border-top-color:var(--yt-red);border-radius:50%;
  animation:spin .8s linear infinite;flex-shrink:0;
}
@keyframes spin{to{transform:rotate(360deg)}}
.error-box{color:#ff8a8a;font-size:15px}

/* ---------- Blocos SEO ---------- */
.seo-block{margin:48px 0}
.seo-block h2,.howto h2,.dual-card h2,.faq h2{
  font-size:24px;font-weight:700;margin-bottom:14px;
}
.seo-block p{color:var(--yt-text-2);margin-bottom:14px;max-width:820px}

.features{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
  gap:16px;margin-top:24px;
}
.feature{
  background:var(--yt-surface);border:1px solid var(--yt-border);
  border-radius:var(--radius);padding:20px;
}
.feature-icon{font-size:28px;margin-bottom:8px}
.feature h3{font-size:16px;font-weight:700;margin-bottom:6px}
.feature p{color:var(--yt-text-2);font-size:14px}

/* ---------- Como baixar ---------- */
.howto{margin:48px 0}
.steps{list-style:none;display:grid;gap:14px;max-width:760px}
.steps li{display:flex;gap:14px;align-items:flex-start;
  background:var(--yt-surface);border:1px solid var(--yt-border);
  border-radius:var(--radius);padding:16px;color:var(--yt-text-2)}
.step-n{
  flex-shrink:0;width:30px;height:30px;border-radius:50%;
  background:var(--yt-red);color:#fff;font-weight:700;
  display:flex;align-items:center;justify-content:center;font-size:15px;
}
.steps strong{color:#fff}

/* ---------- MP4 / MP3 ---------- */
.dual{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:48px 0}
.dual.single{grid-template-columns:1fr}
.dual-card{
  background:var(--yt-surface);border:1px solid var(--yt-border);
  border-radius:var(--radius);padding:24px;
}
.dual-card p{color:var(--yt-text-2);font-size:15px}

/* ---------- FAQ ---------- */
.faq{margin:48px 0}
.faq details{
  background:var(--yt-surface);border:1px solid var(--yt-border);
  border-radius:10px;padding:14px 18px;margin-bottom:10px;
}
.faq summary{cursor:pointer;font-weight:500;font-size:16px;list-style:none}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+";float:right;color:var(--yt-text-2);font-size:20px;line-height:1}
.faq details[open] summary::after{content:"–"}
.faq details p{color:var(--yt-text-2);margin-top:10px;font-size:15px}

/* ---------- Páginas legais (Termos / Privacidade) ---------- */
.legal{margin:32px 0 48px;max-width:820px}
.legal h1{font-size:28px;font-weight:700;margin-bottom:8px}
.legal .updated{color:var(--yt-text-2);font-size:13px;margin-bottom:24px}
.legal h2{font-size:19px;font-weight:700;margin:24px 0 8px}
.legal p,.legal li{color:var(--yt-text-2);font-size:15px;margin-bottom:10px}
.legal ul{padding-left:22px;list-style:disc}
.legal a{color:var(--yt-blue)}

/* ---------- Rodapé ---------- */
.yt-footer{
  border-top:1px solid var(--yt-border);
  text-align:center;padding:32px 16px;color:var(--yt-text-2);font-size:14px;
}
.yt-footer nav{display:flex;gap:18px;justify-content:center;flex-wrap:wrap;margin:12px 0}
.yt-footer nav a{color:var(--yt-text-2)}
.yt-footer .disclaimer{font-size:12px;color:#777;max-width:640px;margin:8px auto 0}

/* ---------- Responsivo ---------- */
@media (max-width:640px){
  .hero h1{font-size:26px}
  .yt-nav{display:none}
  .dual{grid-template-columns:1fr}
  .search-box button{padding:0 20px}
  .video-thumb{max-width:100%;width:100%}
}
