/* ClipToDown v2.7.9 — clean Pinterest-matched compact layout for youtube-downloader.
 * Extractor result classes retained; no site-wide CSS selectors.
 * Reference: Pinterest downloader card (max-width 1320, padding 34, input 64). */
.ytd-wrap {
  --ctd-accent:#FF0033; --ctd-accent-hover:#D8002A;
  max-width:1320px; width:100%; margin:20px auto; padding:0 12px;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:#161616; box-sizing:border-box;
}
.ytd-wrap *, .ytd-wrap *::before, .ytd-wrap *::after { box-sizing:border-box; }
.ytd-card {
  position:relative;overflow:hidden;background:#FFFFFF;border:1px solid #E1E7EF;
  border-radius:24px;padding:34px;box-shadow:0 16px 48px rgba(15,23,42,.06);
}
.ytd-topstrip { position:absolute;top:0;left:0;right:0;height:3px;background:var(--ctd-accent); }
.ytd-brand { display:flex;align-items:center;gap:12px;margin:0 0 26px;padding:0;min-width:0; }
.ytd-logo { width:42px;height:42px;flex:0 0 42px;display:grid;place-items:center;border-radius:12px;overflow:hidden; }
.ytd-logo svg {display:block;width:42px;height:42px;}
.ytd-brandname {font-size:16px;font-weight:800;line-height:1.2;color:#101010;white-space:normal;}
.ytd-chips {display:none!important;}
.ytd-heading {
  max-width:100%;margin:0 0 9px!important;padding:0!important;
  color:#161616!important;background:transparent!important;-webkit-text-fill-color:initial!important;
  font-size:clamp(28px,3.2vw,46px)!important;line-height:1.05!important;
  font-weight:850!important;letter-spacing:-.035em!important;text-transform:none!important;
}
.ytd-sub {margin:0 0 20px!important;color:#6B7890!important;font-size:18px!important;font-weight:400!important;line-height:1.45!important;}
.ytd-card .ctd-native-tabs {display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 18px;padding:0;}
.ytd-card .ctd-native-tab {
  display:inline-flex;align-items:center;justify-content:center;min-width:0;
  padding:10px 15px;border:1px solid #E1E7EF;border-radius:999px;
  background:#fff;color:#101010;font:700 13px/1 Inter,system-ui,sans-serif;
  text-decoration:none!important;white-space:nowrap;cursor:pointer;
}
.ytd-card .ctd-native-tab:hover {border-color:#BECAD8;}
.ytd-card .ctd-native-tab.is-active {background:var(--ctd-accent);color:#FFFFFF;border-color:var(--ctd-accent);box-shadow:0 6px 15px rgba(15,23,42,.08);}
.ytd-card .ctd-native-tab.is-disabled:not(.is-active) {background:#fff;color:#52657D;opacity:.72;cursor:default;border-style:solid;}
.ytd-form {display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:12px;align-items:stretch;margin:0;padding:0;}
.ytd-inputwrap {
  min-width:0;width:100%;height:64px;display:flex;align-items:center;gap:10px;
  padding:5px 8px 5px 18px;position:relative;
  background:#fff;border:2px solid var(--ctd-accent);border-radius:18px;
  box-shadow:0 0 0 5px rgba(15,23,42,.045);
}
.ytd-inputwrap:focus-within {box-shadow:0 0 0 5px rgba(15,23,42,.095);}
.ytd-link-icon {color:#91A5C2;font-size:18px;line-height:1;flex:0 0 auto;}
.ytd-input {
  display:block;flex:1;min-width:0;width:100%;height:100%;margin:0!important;
  padding:0!important;border:0!important;outline:none!important;box-shadow:none!important;
  background:transparent!important;color:#1F314B!important;font:400 16px/1.2 Inter,system-ui,sans-serif!important;
}
.ytd-input::placeholder {color:#7187A6;opacity:1;}
.ytd-paste {
  position:static;display:inline-flex;align-items:center;justify-content:center;
  gap:6px;flex:0 0 auto;transform:none!important;height:50px;min-height:0;margin:0;
  padding:0 18px;border:0;border-radius:13px;background:#EDF2F8;color:#06101F;
  font:800 14px/1 Inter,system-ui,sans-serif;cursor:pointer;
}
.ytd-paste svg {display:none;}
.ytd-paste:hover {background:#E4EBF4;}
.ytd-btn {
  display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;width:100%;
  min-height:64px;margin:0;padding:0 14px;border:0;border-radius:18px;
  background:var(--ctd-accent);color:#FFFFFF;
  box-shadow:0 12px 24px rgba(15,23,42,.11);
  font:850 16px/1.1 Inter,system-ui,sans-serif;white-space:nowrap;cursor:pointer;
}
.ytd-btn:hover:not(:disabled) {background:var(--ctd-accent-hover);filter:none;}
.ytd-btn:disabled {opacity:.72;cursor:wait;}
.ytd-spinner {display:none;width:18px;height:18px;border:3px solid rgba(255,255,255,.4);border-top-color:white;border-radius:50%;animation:ytdspin .7s linear infinite;}
.ytd-btn.loading .ytd-spinner {display:inline-block;}
@keyframes ytdspin {to{transform:rotate(360deg)}}
.ytd-foot {margin:22px 0 0;text-align:center;color:#7187A6;font-size:13px;line-height:1.45;}
.ytd-steps {display:none!important;}
/* Important: the old result CSS declared display:flex, overriding HTML [hidden]. */
.ytd-msg[hidden], .ytd-result[hidden] {display:none!important;}
.ytd-msg {margin:14px 0 0;}
.ytd-result {margin:18px 0 0;}
.ytd-msg { margin: 14px 26px 0; padding: 13px 16px; border-radius: 12px; font-size: 14.5px; }
.ytd-msg.err { background: #fdeeee; color: #a33; border: 1px solid #f3c6c6; }
.ytd-msg.ok { background: #eaf6fd; color: #0077b3; border: 1px solid #bfe6fb; }
.ytd-result { margin: 18px 26px 0; border: 1px solid #e5ebef; border-radius: 14px; padding: 16px; display: flex; gap: 16px; background: #fbfcfd; }
.ytd-thumb { width: 168px; height: 118px; object-fit: cover; border-radius: 10px; flex: none; background: #eef2f5; }
.ytd-rbody { flex: 1; min-width: 0; }
.ytd-rtitle { font-weight: 700; font-size: 15.5px; color: #101418; margin: 0 0 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ytd-rmeta { font-size: 13.5px; color: #6b7683; margin: 0 0 12px; }
.ytd-qlabel { font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: #8a94a0; margin: 0 0 8px; }
.ytd-qualities { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; }
.ytd-q { font-size: 13px; font-weight: 700; color: #cc0000; background: #fff; border: 1.5px solid #ffc9c9; padding: 6px 13px; border-radius: 9px; cursor: pointer; }
.ytd-q.active { background: #ff0000; border-color: #ff0000; color: #fff; }
.ytd-qnote { font-size: 12.5px; color: #8a94a0; margin: 0 0 12px; }
.ytd-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ytd-dl { display: inline-block; text-decoration: none; font-weight: 800; font-size: 15px; color: #fff; background: linear-gradient(135deg, #ff0000, #cc0000); padding: 11px 22px; border-radius: 11px; box-shadow: 0 6px 16px rgba(255,0,0,.3); }
.ytd-dl:hover { color: #fff; }
.ytd-progress { margin: 14px 0 4px; }
.ytd-progress-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; color: #5b6672; margin-bottom: 7px; }
.ytd-progress-pct { font-weight: 800; color: #cc0000; font-size: 15px; }
.ytd-progress-track { height: 12px; background: #f0e6e6; border-radius: 999px; overflow: hidden; }
.ytd-progress-fill { height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg, #ff0000, #cc0000); transition: width .25s ease; }
.ytd-progress.done .ytd-progress-fill { background: linear-gradient(90deg, #22a355, #178a45); }
.ytd-progress.done .ytd-progress-pct { color: #178a45; }

.ytd-msg {margin-left:0;margin-right:0;}
.ytd-result {margin-left:0;margin-right:0;}
.ytd-msg[hidden], .ytd-result[hidden] {display:none!important;}
@media(max-width:760px) {
 .ytd-wrap {padding:0 8px;margin:14px auto;}
 .ytd-card {padding:22px 16px;border-radius:20px;}
 .ytd-brand {margin-bottom:22px;}
 .ytd-heading {font-size:clamp(27px,6.2vw,36px)!important;}
 .ytd-sub {font-size:16px!important;}
 .ytd-form {grid-template-columns:minmax(0,1fr);}
 .ytd-inputwrap {height:60px;}
 .ytd-paste {height:46px;padding:0 13px;}
 .ytd-btn {min-height:58px;}
 .ytd-card .ctd-native-tab {padding:9px 13px;}
 .ytd-result {flex-direction:column;}
 .ytd-thumb {max-width:100%;height:auto;}
}
@media(max-width:390px) {
 .ytd-inputwrap {padding-left:11px;gap:6px;}
 .ytd-input {font-size:13px!important;}
 .ytd-paste {padding:0 11px;font-size:12px;}
}

/* Original YouTube result and quality controls. */
.ytd-thumb { width: 168px; height: 118px; object-fit: cover; border-radius: 10px; flex: none; background: #eef2f5; }
.ytd-rbody { flex: 1; min-width: 0; }
.ytd-rtitle { font-weight: 700; font-size: 15.5px; color: #101418; margin: 0 0 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ytd-rmeta { font-size: 13.5px; color: #6b7683; margin: 0 0 12px; }
.ytd-qlabel { font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: #8a94a0; margin: 0 0 8px; }
.ytd-qualities { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; }
.ytd-q { font-size: 13px; font-weight: 700; color: #cc0000; background: #fff; border: 1.5px solid #ffc9c9; padding: 6px 13px; border-radius: 9px; cursor: pointer; }
.ytd-q.active { background: #ff0000; border-color: #ff0000; color: #fff; }
.ytd-qnote { font-size: 12.5px; color: #8a94a0; margin: 0 0 12px; }
.ytd-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ytd-dl { display: inline-block; text-decoration: none; font-weight: 800; font-size: 15px; color: #fff; background: linear-gradient(135deg, #ff0000, #cc0000); padding: 11px 22px; border-radius: 11px; box-shadow: 0 6px 16px rgba(255,0,0,.3); }
.ytd-dl:hover { color: #fff; }
.ytd-progress { margin: 14px 0 4px; }
.ytd-progress-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; color: #5b6672; margin-bottom: 7px; }
.ytd-progress-pct { font-weight: 800; color: #cc0000; font-size: 15px; }
.ytd-progress-track { height: 12px; background: #f0e6e6; border-radius: 999px; overflow: hidden; }
.ytd-progress-fill { height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg, #ff0000, #cc0000); transition: width .25s ease; }
.ytd-progress.done .ytd-progress-fill { background: linear-gradient(90deg, #22a355, #178a45); }
.ytd-progress.done .ytd-progress-pct { color: #178a45; }
