/* InstaHDPro — Simply HD
   A restrained, RTL-first UI layer. All extraction/auth/history/ads logic stays intact.
   This stylesheet intentionally loads after the four legacy stylesheets. */

body.simply-hd.mode-free {
  --sh-bg:#faf9f7; --sh-surface:#ffffff; --sh-ink:#24232a; --sh-muted:#777782;
  --sh-line:#e9e7e7; --sh-accent:#ed5970; --sh-accent-soft:#fff0f1;
  --sh-hover:#f6f3f3; --sh-shadow:0 8px 32px rgba(37,33,38,.035);
  --bg-canvas:var(--sh-bg); --bg-dark:var(--sh-bg); --card-bg:#fff; --card-inner:#fff;
  --border-subtle:var(--sh-line); --border-color:var(--sh-line);
  --text-main:var(--sh-ink); --text-muted:var(--sh-muted); --text-dim:#9d99a2;
  --primary:var(--sh-accent); --border-focus:var(--sh-accent);
  background:var(--sh-bg)!important; color:var(--sh-ink)!important;
}
body.simply-hd.mode-pro {
  --sh-bg:#111319; --sh-surface:#1a1c25; --sh-ink:#f7f5f4; --sh-muted:#a9a7b1;
  --sh-line:#32333c; --sh-accent:#fa7891; --sh-accent-soft:#39222d;
  --sh-hover:#262831; --sh-shadow:none;
  --bg-canvas:var(--sh-bg); --border-subtle:var(--sh-line);
  --text-main:var(--sh-ink); --text-muted:var(--sh-muted);
}
body.simply-hd, body.simply-hd button, body.simply-hd textarea, body.simply-hd input {
  font-family:"Cairo","Inter",sans-serif;
}
body.simply-hd::before {display:none!important;}
body.simply-hd .app-layout {
  width:min(calc(100% - 48px),1080px)!important; max-width:1080px!important;
  padding-bottom:36px; margin-inline:auto; position:relative;
}
body.simply-hd a,body.simply-hd button { -webkit-tap-highlight-color:transparent; }
body.simply-hd :focus-visible {outline:3px solid var(--sh-accent)!important;outline-offset:3px!important;}
body.simply-hd .app-header {
  display:flex!important; flex-flow:row wrap!important; justify-content:space-between!important;
  align-items:center!important; gap:20px!important; padding:18px 0!important;
  background:transparent!important; border:0!important; border-bottom:1px solid var(--sh-line)!important;
  border-radius:0!important; box-shadow:none!important; backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important; margin:0 0 16px!important;
  position:relative!important; top:auto!important;
}
body.simply-hd .brand-link {gap:10px!important;}
body.simply-hd .logo-icon {
  width:39px!important;height:39px!important; border-radius:12px!important;
  background:var(--sh-accent)!important; color:white!important;
  box-shadow:none!important; transform:none!important;
}
body.simply-hd .brand-text h1 {
  color:var(--sh-ink)!important; font-size:1.24rem!important; font-weight:900!important; line-height:1.2!important;
}
body.simply-hd .brand-text h1 span {
  background:var(--sh-accent-soft)!important; color:var(--sh-accent)!important;
  -webkit-text-fill-color:var(--sh-accent)!important; border:0!important; font-size:.66rem!important;
}
body.simply-hd .brand-text p {display:none!important;}
body.simply-hd .nav-tabs {
  display:flex!important; flex-wrap:wrap!important; gap:4px!important; border:0!important;
  background:transparent!important; padding:0!important; box-shadow:none!important;
}
body.simply-hd .nav-tabs > :nth-child(2),
body.simply-hd .nav-tabs > :nth-child(4),
body.simply-hd .nav-tabs > :nth-child(5),
body.simply-hd .nav-tabs > :nth-child(6) {display:none!important;}
body.simply-hd .tab-btn, body.simply-hd .mode-free .tab-btn {
  min-height:40px!important; padding:8px 12px!important; color:var(--sh-muted)!important;
  font-size:.82rem!important; border:0!important; border-radius:11px!important;
  background:transparent!important; box-shadow:none!important;
}
body.simply-hd .tab-btn:hover,body.simply-hd .tab-btn.active {
  color:var(--sh-ink)!important; background:var(--sh-hover)!important; border:0!important;
}
body.simply-hd .tab-btn-vip {color:var(--sh-accent)!important;}
body.simply-hd .nav-tabs .nav-svg {width:16px;height:16px;}
body.simply-hd .header-auth-btn {
  border:1px solid var(--sh-line)!important; border-radius:11px!important;
  background:var(--sh-surface)!important; box-shadow:none!important; color:var(--sh-ink)!important;
  min-height:41px!important; padding:9px 13px!important; font-size:.82rem!important;
  transform:none!important;
}
body.simply-hd .header-auth-btn:hover {background:var(--sh-hover)!important;}
body.simply-hd .editorial-hero {
  max-width:920px!important; text-align:right!important; margin:0 auto!important;
  padding:38px 0 25px!important;
}
body.simply-hd .hero-chip {
  background:var(--sh-accent-soft)!important; border:none!important;
  color:var(--sh-accent)!important; border-radius:8px!important; box-shadow:none!important;
  font-size:.72rem!important; font-weight:700!important; padding:6px 10px!important; margin-bottom:15px!important;
}
body.simply-hd .chip-dot {box-shadow:none!important; animation:none!important; background:var(--sh-accent)!important;}
body.simply-hd .editorial-hero h2 {
  max-width:770px; font-size:clamp(1.85rem,4.7vw,3.3rem)!important;
  color:var(--sh-ink)!important; font-weight:900!important; line-height:1.39!important;
  letter-spacing:-.045em!important; margin:0 0 12px!important;
}
body.simply-hd .editorial-hero h2 span {
  background:none!important; color:var(--sh-accent)!important;
  -webkit-text-fill-color:var(--sh-accent)!important;
}
body.simply-hd .editorial-hero-subtitle {
  max-width:750px!important; margin:0!important; text-align:right!important;
  color:var(--sh-muted)!important; font-size:.97rem!important; line-height:1.85!important;
}
body.simply-hd .hero-actions {display:none!important;}
body.simply-hd #viewExtractor {max-width:920px; margin-inline:auto; scroll-margin-top:22px;}
body.simply-hd .editorial-tool-heading {text-align:right!important; margin:0 0 13px!important; padding:0!important;}
body.simply-hd .editorial-tool-heading h2 {
  color:var(--sh-ink)!important; font-size:1.03rem!important; font-weight:800!important; margin:0!important;
}
body.simply-hd .editorial-tool-heading p {display:none!important;}
body.simply-hd .media-tabs {
  display:grid!important; grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:9px!important; padding:0!important; margin:0 0 14px!important;
  border:0!important; background:transparent!important; box-shadow:none!important;
  backdrop-filter:none!important; border-radius:0!important;
}
body.simply-hd .media-tab {
  min-width:0; min-height:60px!important; padding:11px 6px!important;
  display:flex!important; align-items:center!important; justify-content:center!important;
  border-radius:13px!important; background:var(--sh-surface)!important;
  border:1px solid var(--sh-line)!important; box-shadow:none!important;
  color:var(--sh-muted)!important; transition:background .15s,border-color .15s!important;
  transform:none!important;
}
body.simply-hd .media-tab:hover {border-color:var(--sh-accent)!important;background:var(--sh-hover)!important; transform:none!important;}
body.simply-hd .media-tab.active {
  background:var(--sh-accent-soft)!important; border-color:var(--sh-accent)!important;box-shadow:none!important;
}
body.simply-hd .media-tab .tab-label {
  display:flex!important; align-items:center!important; justify-content:center!important;
  gap:8px!important; font-size:.86rem!important; font-weight:800!important; margin:0!important;
  color:var(--sh-ink)!important; line-height:1.5!important; text-align:center!important;
}
body.simply-hd .media-tab .tab-icon-svg {color:var(--sh-muted)!important;filter:none!important;}
body.simply-hd .media-tab.active .tab-label,
body.simply-hd .media-tab.active .tab-icon-svg {color:var(--sh-accent)!important;filter:none!important;}
body.simply-hd .media-tab small {display:none!important;}
body.simply-hd .dashboard-grid {
  display:grid!important; grid-template-columns:minmax(0,1fr)!important; gap:18px!important; align-items:start!important;
}
body.simply-hd .right-pane,body.simply-hd .left-pane {order:initial!important; min-width:0!important;}
body.simply-hd .input-card {
  background:var(--sh-surface)!important; border:1px solid var(--sh-line)!important;
  border-radius:18px!important; padding:27px!important; box-shadow:var(--sh-shadow)!important;
  backdrop-filter:none!important;
}
body.simply-hd .card-header {margin-bottom:15px!important;}
body.simply-hd #inputCardTitle {
  color:var(--sh-ink)!important; font-size:1.13rem!important; font-weight:800!important;
}
body.simply-hd #inputCardSubtitle {
  color:var(--sh-muted)!important; font-size:.84rem!important; line-height:1.85!important;
  margin:5px 0 0!important;
}
body.simply-hd .auto-line-badge {
  background:var(--sh-hover)!important; border:0!important; color:var(--sh-muted)!important;
  border-radius:7px!important; font-size:.68rem!important;
}
body.simply-hd .textarea-container {
  background:var(--sh-bg)!important; border:1px solid var(--sh-line)!important;
  border-radius:13px!important; padding:12px 16px!important; margin-bottom:12px!important;
  box-shadow:none!important;
}
body.simply-hd .textarea-container:focus-within {
  border-color:var(--sh-accent)!important; box-shadow:0 0 0 3px var(--sh-accent-soft)!important;
}
body.simply-hd .textarea-top-actions {margin-bottom:0!important;}
body.simply-hd .smart-paste-btn {
  background:var(--sh-surface)!important; border:1px solid var(--sh-line)!important;
  color:var(--sh-accent)!important; border-radius:8px!important; padding:4px 11px!important;
  transform:none!important; box-shadow:none!important;
}
body.simply-hd #usernameInput {
  background:transparent!important; color:var(--sh-ink)!important; border:0!important;
  min-height:66px!important; line-height:1.7!important; padding:4px 0!important; font-size:.93rem!important;
}
body.simply-hd #usernameInput::placeholder {color:var(--sh-muted)!important;font-size:.84rem!important;opacity:.8;}
body.simply-hd .textarea-footer {border-color:var(--sh-line)!important;}
body.simply-hd .count-badge,body.simply-hd .clear-btn {color:var(--sh-muted)!important;}
body.simply-hd #submitBtn,body.simply-hd .btn-primary.btn-block {
  background:var(--sh-accent)!important; border:1px solid var(--sh-accent)!important;
  color:white!important; border-radius:12px!important; padding:13px 22px!important;
  min-height:53px!important; font-size:.96rem!important; font-weight:800!important;
  box-shadow:none!important; transform:none!important;
}
body.simply-hd #submitBtn:hover:not(:disabled) {filter:brightness(.95); box-shadow:none!important;}
body.simply-hd .trust-features-grid {
  display:flex!important; flex-wrap:wrap!important; align-items:center!important; justify-content:center!important;
  gap:12px 26px!important; margin-top:17px!important; border:0!important; padding:0!important;
}
body.simply-hd .trust-feat-item {color:var(--sh-muted)!important; font-size:.75rem!important; gap:5px!important;}
body.simply-hd .trust-feat-item svg {color:var(--sh-accent)!important;}
body.simply-hd .left-pane {
  background:var(--sh-surface)!important; border:1px solid var(--sh-line)!important;
  box-shadow:none!important; border-radius:18px!important; padding:25px!important;
}
body.simply-hd .results-top-bar {gap:14px!important; align-items:center!important;}
body.simply-hd .results-title-row h2 {font-size:1.04rem!important; color:var(--sh-ink)!important;}
body.simply-hd .naming-notice {color:var(--sh-muted)!important;font-size:.75rem!important;}
body.simply-hd .empty-state {
  background:var(--sh-bg)!important; border:1px dashed var(--sh-line)!important;
  border-radius:13px!important; box-shadow:none!important; padding:17px 18px!important;
}
body.simply-hd .empty-icon-wrap {display:none!important;}
body.simply-hd .empty-state h3 {
  color:var(--sh-ink)!important; font-size:.87rem!important; margin:0 0 4px!important;
}
body.simply-hd .empty-state p {color:var(--sh-muted)!important;font-size:.78rem!important;}
body.simply-hd .card {
  background:var(--sh-surface)!important; border:1px solid var(--sh-line)!important;
  border-radius:13px!important; box-shadow:none!important; transform:none!important;
}
body.simply-hd .card:hover {border-color:var(--sh-accent)!important;box-shadow:none!important;transform:none!important;}
body.simply-hd .avatar-wrapper {box-shadow:none!important;border-radius:10px!important;}
body.simply-hd .queue-tracker {border-radius:11px!important;}
body.simply-hd .landing-section {
  border-top:1px solid var(--sh-line)!important; padding:55px 0!important; scroll-margin-top:18px;
}
body.simply-hd .section-header {margin-bottom:28px!important;}
body.simply-hd .section-title {
  color:var(--sh-ink)!important; font-size:clamp(1.35rem,3vw,1.9rem)!important; font-weight:800!important;
}
body.simply-hd .section-subtitle {color:var(--sh-muted)!important;line-height:1.9!important;}
body.simply-hd .section-badge {
  color:var(--sh-accent)!important; border:0!important;
  background:var(--sh-accent-soft)!important; border-radius:8px!important;
}
body.simply-hd .step-card,body.simply-hd .feature-card,body.simply-hd .faq-accordion-item,
body.simply-hd .plan-card,body.simply-hd .contact-container,body.simply-hd .guide-content-box {
  background:var(--sh-surface)!important; border:1px solid var(--sh-line)!important;
  border-radius:15px!important; box-shadow:none!important; backdrop-filter:none!important;
}
body.simply-hd .step-card h3,body.simply-hd .feature-card h3,body.simply-hd .plan-card h3,
body.simply-hd .faq-accordion-header {color:var(--sh-ink)!important;}
body.simply-hd .step-card p,body.simply-hd .feature-card p,
body.simply-hd .faq-accordion-content {color:var(--sh-muted)!important;}
body.simply-hd .step-icon-wrap,body.simply-hd .faq-icon-badge {
  background:var(--sh-accent-soft)!important;color:var(--sh-accent)!important;border:0!important;box-shadow:none!important;
}
body.simply-hd .guide-lang-bar {background:var(--sh-surface)!important;border-color:var(--sh-line)!important;}
body.simply-hd .guide-lang-pill {color:var(--sh-muted)!important;}
body.simply-hd .guide-lang-pill.active {background:var(--sh-accent-soft)!important;color:var(--sh-accent)!important;}
body.simply-hd .plan-card.featured {
  background:var(--sh-accent-soft)!important;border-color:var(--sh-accent)!important;
  box-shadow:none!important; transform:none!important;
}
body.simply-hd .site-footer {border-color:var(--sh-line)!important;margin-top:32px!important;}
body.simply-hd .footer-links-row a,body.simply-hd .footer-guides-row a {color:var(--sh-muted)!important;}
body.simply-hd .footer-links-row a:hover {color:var(--sh-accent)!important;}
body.simply-hd .adsense-banner {border-radius:13px!important;box-shadow:none!important;}
/* Give the native download widgets enough contrast on light cards. */
body.simply-hd.mode-free .media-results,
body.simply-hd.mode-free .cards-list {color:var(--sh-ink);}
body.simply-hd .hidden {display:none!important;}
@media(max-width:900px){
  body.simply-hd .app-layout {width:min(calc(100% - 32px),1080px)!important;}
  body.simply-hd .app-header {gap:12px!important;}
  body.simply-hd .nav-tabs {order:3; flex:1 0 100%; justify-content:center!important;}
  body.simply-hd .editorial-hero {padding:31px 0 21px!important;}
  body.simply-hd .dashboard-grid {grid-template-columns:minmax(0,1fr)!important;}
}
@media(max-width:600px){
  body.simply-hd .app-layout {width:calc(100% - 24px)!important;}
  body.simply-hd .app-header {flex-flow:row wrap!important; margin:0 0 10px!important; padding:13px 0!important;}
  body.simply-hd .logo-icon {width:35px!important;height:35px!important;}
  body.simply-hd .brand-text h1 {font-size:1.06rem!important;}
  body.simply-hd .header-auth-btn {min-height:37px!important; padding:7px 10px!important; font-size:.72rem!important;}
  body.simply-hd .nav-tabs {justify-content:space-around!important;width:100%!important;}
  body.simply-hd .tab-btn {padding:7px 8px!important;font-size:.74rem!important;}
  body.simply-hd .nav-tabs .nav-svg {width:14px!important;}
  body.simply-hd .editorial-hero {padding:25px 3px 22px!important;}
  body.simply-hd .editorial-hero h2 {font-size:clamp(1.7rem,7vw,2.2rem)!important;letter-spacing:-.02em!important;}
  body.simply-hd .editorial-hero-subtitle {font-size:.82rem!important;}
  body.simply-hd .hero-chip {font-size:.65rem!important;}
  body.simply-hd .media-tabs {
    grid-template-columns:repeat(3,minmax(0,1fr))!important; gap:7px!important;
  }
  body.simply-hd .media-tab {
    min-height:53px!important; padding:8px 3px!important;
  }
  body.simply-hd .media-tab .tab-label {
    flex-direction:column!important; gap:3px!important; font-size:.72rem!important;
  }
  body.simply-hd .media-tab .tab-icon-svg {width:17px;height:17px;}
  body.simply-hd .input-card,body.simply-hd .left-pane {padding:16px!important;border-radius:14px!important;}
  body.simply-hd .header-title-row {align-items:flex-start!important;flex-wrap:wrap!important;}
  body.simply-hd #inputCardTitle {font-size:1rem!important;}
  body.simply-hd #inputCardSubtitle {font-size:.77rem!important;}
  body.simply-hd #usernameInput {font-size:16px!important;min-height:64px!important;}
  body.simply-hd .trust-features-grid {gap:8px 14px!important;}
  body.simply-hd .trust-feat-item {font-size:.68rem!important;}
  body.simply-hd .results-top-bar {flex-wrap:wrap!important;}
  body.simply-hd .landing-section {padding:42px 0!important;}
  body.simply-hd .card {grid-template-columns:1fr!important;}
}
@media(prefers-reduced-motion:reduce){
  body.simply-hd *,body.simply-hd *::before,body.simply-hd *::after {
    animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important;
  }
}

/* ==========================================================================
   Simply HD — Input & contrast corrections (2026-11-01)
   Single focus ring, stable RTL form footer, legible light-mode results.
   ========================================================================== */

/* The older stylesheet positions this footer absolutely, making it overlap
   the textarea. Return it to normal document flow on BOTH subscription modes. */
body.simply-hd .textarea-footer {
  position:static!important;
  inset:auto!important;
  left:auto!important; right:auto!important; bottom:auto!important;
  display:flex!important; align-items:center!important;
  justify-content:space-between!important; gap:12px!important;
  width:100%!important; margin:11px 0 0!important; padding:10px 0 0!important;
  border-top:1px solid var(--sh-line)!important; box-sizing:border-box!important;
}
body.simply-hd .textarea-container {
  overflow:visible!important; background:var(--sh-surface)!important;
  border:1px solid var(--sh-line)!important;
  box-shadow:none!important; border-radius:13px!important;
  padding:12px 16px!important;
}
body.simply-hd .textarea-container:focus-within {
  border-color:var(--sh-accent)!important;
  box-shadow:0 0 0 3px var(--sh-accent-soft)!important;
}
body.simply-hd .input-card:focus-within {
  border-color:var(--sh-line)!important; box-shadow:var(--sh-shadow)!important;
}
body.simply-hd .textarea-top-actions {
  justify-content:flex-start!important; margin:0 0 9px!important;
}
body.simply-hd .textarea-container textarea#usernameInput {
  display:block!important; width:100%!important; min-width:0!important;
  min-height:72px!important; height:auto;
  margin:0!important; padding:4px 0 5px!important;
  border:0!important; border-radius:0!important;
  outline:none!important; outline-offset:0!important;
  box-shadow:none!important; resize:vertical;
  background:transparent!important; color:var(--sh-ink)!important;
  text-align:right!important; direction:rtl!important; unicode-bidi:plaintext;
  line-height:1.8!important; font-size:16px!important;
  box-sizing:border-box!important;
}
body.simply-hd .textarea-container textarea#usernameInput:focus,
body.simply-hd .textarea-container textarea#usernameInput:focus-visible {
  border:0!important; outline:none!important; outline-offset:0!important;
  box-shadow:none!important; background:transparent!important;
}
/* Focus remains visible on the outer field only. */
body.simply-hd .textarea-container textarea#usernameInput::placeholder {
  color:var(--sh-muted)!important; opacity:1!important;
  font-size:.86rem!important; text-align:right!important;
}
body.simply-hd .smart-paste-btn {
  background:var(--sh-accent-soft)!important; color:var(--sh-accent)!important;
  border:1px solid var(--sh-line)!important;
  border-radius:9px!important; font-weight:800!important;
  padding:5px 11px!important; box-shadow:none!important;
}
body.simply-hd .smart-paste-btn:hover {
  background:var(--sh-hover)!important; color:var(--sh-accent)!important;
  transform:none!important; box-shadow:none!important;
}
body.simply-hd .results-top-bar {
  background:var(--sh-surface)!important;
  color:var(--sh-ink)!important; border:1px solid var(--sh-line)!important;
  border-radius:13px!important; box-shadow:none!important;
  backdrop-filter:none!important; -webkit-backdrop-filter:none!important;
  padding:17px 19px!important; margin-bottom:15px!important;
  align-items:center!important;
}
body.simply-hd .results-title-row h2 {
  color:var(--sh-ink)!important; font-weight:800!important;
}
body.simply-hd .results-info,
body.simply-hd .results-title-row,
body.simply-hd .results-actions {
  color:var(--sh-ink)!important;
}
body.simply-hd .naming-notice {
  color:var(--sh-muted)!important;
  line-height:1.9!important;
}
body.simply-hd .naming-notice code {
  background:var(--sh-hover)!important; color:var(--sh-accent)!important;
  border:0!important; border-radius:6px!important;
  padding:2px 7px!important;
}
body.simply-hd .count-badge {
  background:var(--sh-hover)!important; color:var(--sh-muted)!important;
  border:0!important; border-radius:8px!important; padding:4px 8px!important;
}
body.simply-hd .clear-btn {color:var(--sh-muted)!important;}
body.simply-hd .trust-feat-item {color:var(--sh-muted)!important;}
body.simply-hd .empty-state {
  color:var(--sh-ink)!important; background:var(--sh-bg)!important;
  border:1px dashed var(--sh-line)!important; box-shadow:none!important;
}
body.simply-hd .empty-state h3 {color:var(--sh-ink)!important;}
body.simply-hd .empty-state p {color:var(--sh-muted)!important;}

/* Free plan: text and CTA have sufficient contrast against light surfaces. */
body.simply-hd.mode-free {
  --sh-ink:#24232a; --sh-muted:#656a77; --sh-accent:#c93655;
  --sh-accent-soft:#fff0f3; --sh-line:#e1e1e6;
}
body.simply-hd.mode-free .auto-line-badge {
  background:#f5f4f5!important; color:#555c68!important; border:0!important;
}
body.simply-hd.mode-free #submitBtn,
body.simply-hd.mode-free .btn-primary.btn-block {
  background:var(--sh-accent)!important; border-color:var(--sh-accent)!important;
  color:#fff!important; box-shadow:none!important;
}
body.simply-hd.mode-free #submitBtn:hover:not(:disabled) {
  background:#ae2947!important; border-color:#ae2947!important;
}
body.simply-hd.mode-free .left-pane {background:#fff!important;}
@media(max-width:600px) {
  body.simply-hd .textarea-container {padding:11px 12px!important;}
  body.simply-hd .textarea-footer {gap:9px!important;flex-wrap:wrap!important;}
  body.simply-hd .results-top-bar {padding:14px!important;}
  body.simply-hd .textarea-container textarea#usernameInput {
    min-height:67px!important;font-size:16px!important;
  }
}
