/* ==========================================================================
   SUPER ULTRA-FAST LIGHTWEIGHT STYLESHEET (NO EXTERNAL FRAMEWORK OVERHEAD)
   Target: < 15KB uncompressed, instant render, 100/100 Core Web Vitals
   ========================================================================== */

:root {
  --primary: #1877f2;
  --primary-hover: #166fe5;
  --primary-dark: #0d5cb6;
  --secondary: #059669;
  --secondary-hover: #047857;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-border: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 30px -4px rgba(15, 23, 42, 0.12);
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  -webkit-text-size-adjust: 100%;
}

html {
  font-family: var(--font-stack);
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

img, video, canvas, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

p, h1, h2, h3, h4, h5, h6, span, a, li, button, input {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

code {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.88em;
  background: #f1f5f9;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  word-break: break-all;
  overflow-wrap: break-word;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-hover);
}

/* ----------------- Header & Navigation ----------------- */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--surface-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 0.85rem clamp(1.25rem, 3.5vw, 3.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-main);
  text-decoration: none;
}

.logo-badge {
  background: linear-gradient(135deg, #1877f2, #059669);
  color: #fff;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 900;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

/* ----------------- Hero / Downloader Card ----------------- */
.hero-section {
  background: linear-gradient(180deg, #edf4ff 0%, #f8fafc 100%);
  padding: 1.75rem 1.25rem 2.5rem; /* Compact padding to keep tool front and center */
  text-align: center;
  border-bottom: 1px solid var(--surface-border);
}

.hero-wrap {
  max-width: 860px;
  margin: 0 auto;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #e0edff;
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.65rem;
}

.hero-title {
  font-size: clamp(1.8rem, 3.8vw, 2.5rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.45rem;
  color: #0b1e38;
}

.hero-title span {
  color: var(--primary);
}

.hero-subtitle {
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 1.35rem;
  font-weight: 400;
}

/* ----------------- Tool Form Box ----------------- */
.tool-box {
  background: var(--surface);
  padding: 0.65rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(24, 119, 242, 0.18);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  position: relative;
}

.input-group {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: var(--radius-md);
  padding: 0.35rem 0.5rem;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.input-group:focus-within {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.2);
}

.input-icon {
  color: var(--text-light);
  padding: 0 0.5rem;
  display: flex;
  align-items: center;
}

.tool-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.75rem 0.5rem;
  font-size: 1.02rem;
  font-family: inherit;
  color: var(--text-main);
  outline: none;
  min-width: 0;
}

.tool-input::placeholder {
  color: var(--text-light);
}

.paste-btn, .clear-btn {
  background: #e2e8f0;
  border: none;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.paste-btn:hover, .clear-btn:hover {
  background: #cbd5e1;
}

.clear-btn {
  display: none;
  padding: 0.4rem 0.6rem;
}

.action-row {
  display: flex;
  gap: 0.75rem;
}

.submit-btn {
  flex: 1;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #ffffff;
  border: none;
  padding: 0.85rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  box-shadow: 0 4px 14px rgba(24, 119, 242, 0.35);
  transition: all 0.2s ease;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(24, 119, 242, 0.45);
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Trust Indicators Under Hero */
.trust-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Alert / Error Box */
.alert-box {
  display: none;
  max-width: 860px;
  margin: 1.25rem auto 0;
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  text-align: left;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

/* ----------------- RESULT CARD (MATCHING USER SCREENSHOT 4 EXACTLY) ----------------- */
.result-container {
  display: none;
  max-width: 860px;
  margin: 1.75rem auto 0;
  text-align: left;
}

.result-card-v2 {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-md);
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* Left Column: Thumbnail + Decoded Title */
.result-left-col {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.result-thumb-box-v2 {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  width: 100%;
  aspect-ratio: 16/10;
}

.result-thumb-v2 {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.result-title-v2 {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text-main);
  word-break: break-word;
}

/* Right Column: Tabs + Data Table */
.result-right-col {
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

/* Tabs Bar (Video / Audio / Photo) */
.media-tabs-bar {
  display: flex;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  color: var(--primary);
  background: #f8fafc;
}

.tab-btn.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
  background: #ffffff;
}

/* Media Table (Resolution, File Size, Download Button) */
.media-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.media-table th {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.media-table td {
  padding: 0.85rem 1rem;
  font-size: 0.92rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.media-table tr:last-child td {
  border-bottom: none;
}

.res-label {
  font-weight: 700;
  color: #0f172a;
}

.size-label {
  color: #475569;
  font-weight: 500;
  font-size: 0.88rem;
}

/* Download Green Button (Matching Screenshot 4) */
.btn-dl-green {
  background: #059669;
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  color: #ffffff !important;
  border: none;
  padding: 0.45rem 1.15rem;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  text-decoration: none !important;
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.25);
  transition: all 0.15s ease;
}

.btn-dl-green:hover {
  background: #047857;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(5, 150, 105, 0.35);
}

.btn-dl-green svg {
  stroke-width: 3;
}

/* Tab Panels */
.tab-panel {
  display: none;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-panel.active {
  display: block;
}

/* ----------------- Clean AdSense Unit Containers ----------------- */
.ad-slot-wrapper {
  max-width: 860px;
  margin: 1.75rem auto;
  padding: 0 1rem;
  text-align: center;
}

.ad-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-light);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.ad-box {
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-sm);
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.85rem;
  overflow: hidden;
}

/* ----------------- Content & Editorial Layout ----------------- */
.main-content {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem clamp(0.75rem, 3.5vw, 1.25rem) 3.5rem;
  box-sizing: border-box;
}

.section-head {
  text-align: center;
  margin-bottom: 2rem;
  width: 100%;
}

.section-head h2 {
  font-size: clamp(1.3rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Steps Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
  width: 100%;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.25rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.step-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #eff6ff;
  color: var(--primary);
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.step-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.step-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* Guide Visual Walkthrough Images (Matching Reference Screenshot) */
.guide-visual-container {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 3.5vw, 2.25rem);
  box-shadow: var(--shadow-sm);
  margin-bottom: 3.5rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.guide-header {
  border-bottom: 1px solid var(--surface-border);
  padding-bottom: 1rem;
  margin-bottom: 1.75rem;
  width: 100%;
}

.guide-header h3 {
  font-size: clamp(1.15rem, 3.5vw, 1.45rem);
  font-weight: 800;
  color: #0b1e38;
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.guide-header p {
  color: var(--text-muted);
  font-size: clamp(0.88rem, 2.2vw, 0.95rem);
}

.guide-method-card {
  margin-bottom: 2.25rem;
  padding-bottom: 2rem;
  border-bottom: 1px dashed var(--surface-border);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.guide-method-card:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.guide-method-card h3 {
  font-size: clamp(1.05rem, 2.8vw, 1.25rem);
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.35;
  overflow-wrap: break-word;
  word-break: break-word;
}

.guide-method-badge {
  background: #eff6ff;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(24, 119, 242, 0.2);
}

.guide-method-card p {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 0.85rem;
  overflow-wrap: break-word;
}

.guide-img-wrap {
  margin: 0.85rem 0 0.5rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  background: #ffffff;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.guide-img-wrap.compact-600 {
  max-width: min(600px, 100%);
}

.guide-img-wrap.compact-750 {
  max-width: min(750px, 100%);
}

.guide-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.guide-img-caption {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 0.35rem;
  font-style: italic;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 1.25rem;
  margin-bottom: 3.5rem;
  width: 100%;
}

.feature-box {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.feature-icon {
  background: #ecfdf5;
  color: var(--secondary);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-info h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--text-main);
}

.feature-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ----------------- Editorial Article Container ----------------- */
.editorial-article {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 3rem;
}

.article-header {
  border-bottom: 1px solid var(--surface-border);
  padding-bottom: 1.25rem;
  margin-bottom: 1.75rem;
}

.article-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 0.65rem;
}

.author-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.author-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e2e8f0;
}

.article-body {
  font-size: 1.02rem;
  line-height: 1.75;
  color: #334155;
}

.article-body p {
  margin-bottom: 1.35rem;
}

.article-body h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 2rem 0 0.75rem;
  line-height: 1.35;
}

.article-body h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 1.35rem 0 0.45rem;
}

.article-body ul, .article-body ol {
  margin: 0.85rem 0 1.35rem 1.35rem;
}

.article-body li {
  margin-bottom: 0.45rem;
}

.callout-box {
  background: #eff6ff;
  border-left: 4px solid var(--primary);
  padding: 1.15rem 1.35rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  color: #1e3a8a;
}

.comparison-table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.75rem 0;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
}

.comparison-table {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.comparison-table th, .comparison-table td {
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--surface-border);
}

.comparison-table th {
  background: #f8fafc;
  font-weight: 700;
  color: var(--text-main);
}

/* ----------------- FAQ Accordion ----------------- */
.faq-section {
  margin-bottom: 3.5rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 1.15rem 1.35rem;
  text-align: left;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
}

.faq-arrow {
  transition: transform 0.2s ease;
  color: var(--text-muted);
}

.faq-item.open .faq-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 1.35rem 1.15rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.faq-item.open .faq-answer {
  display: block;
}

/* ----------------- Footer & Interactive Links ----------------- */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3rem 1.25rem 2rem;
  margin-top: auto;
  font-size: 0.92rem;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand h3 {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.65rem;
}

.footer-brand p {
  color: #94a3b8;
  max-width: 320px;
  line-height: 1.6;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 0.85rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-col a {
  color: #94a3b8;
  transition: all 0.2s ease;
  display: inline-block;
  cursor: pointer;
}

.footer-col a:hover {
  color: #38bdf8 !important;
  text-decoration: underline;
  transform: translateX(4px);
}

/* Interactive format links */
.format-link {
  color: #94a3b8;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-block;
}

.format-link:hover {
  color: #38bdf8 !important;
  text-decoration: underline;
  transform: translateX(4px);
}

.footer-disclaimer-box {
  background: #1e293b;
  border-radius: var(--radius-sm);
  padding: 1.15rem;
  margin-bottom: 1.75rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #94a3b8;
}

.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
}

/* ----------------- Floating Scroll-to-Top Button (Centered Middle) ----------------- */
.scroll-to-top-btn {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: linear-gradient(135deg, #1877f2 0%, #0d5cb6 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  box-shadow: 0 10px 25px -4px rgba(24, 119, 242, 0.45);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
}

.scroll-to-top-btn.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

.scroll-to-top-btn:hover {
  transform: translateX(-50%) translateY(-3px);
  box-shadow: 0 14px 30px -4px rgba(24, 119, 242, 0.6);
  background: linear-gradient(135deg, #166fe5 0%, #0c52a3 100%);
}

.scroll-to-top-btn:active {
  transform: translateX(-50%) translateY(0);
}

.scroll-to-top-arrow {
  animation: floatArrow 1.5s ease-in-out infinite;
}

@keyframes floatArrow {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

/* ----------------- Comprehensive Responsive Mobile-First Breakpoints ----------------- */
@media (max-width: 768px) {
  .nav-container {
    padding: 0.65rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .brand-logo {
    font-size: 1.15rem;
    gap: 0.4rem;
  }
  .nav-links {
    gap: 0.85rem;
  }
  .nav-links a {
    font-size: 0.88rem;
  }
  .hero-section {
    padding: 1.5rem 0.85rem 2rem;
  }
  .hero-title {
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    line-height: 1.25;
  }
  .hero-subtitle {
    font-size: 0.92rem;
    margin-bottom: 1.25rem;
  }
  .tool-box {
    padding: 0.55rem;
    border-radius: 14px;
  }
  .tool-input {
    font-size: 16px; /* Prevents auto-zoom in iOS Safari */
  }
  .paste-btn, .clear-btn {
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
    min-height: 40px;
    border-radius: 8px;
  }
  .submit-btn {
    padding: 0.85rem 1.25rem;
    font-size: 1.05rem;
    border-radius: 10px;
    min-height: 48px;
  }
  .trust-bar {
    gap: 0.85rem;
    font-size: 0.82rem;
  }
  .main-content {
    padding: 1.5rem 0.85rem 2.5rem;
  }
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
  }
  .step-card {
    padding: 1.25rem 1rem;
  }
  .guide-visual-container {
    padding: 1.25rem 0.85rem;
    margin-bottom: 2rem;
    border-radius: 12px;
  }
  .guide-method-card {
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
  }
  .guide-method-card h3 {
    font-size: 1.05rem;
  }
  .guide-method-card p {
    font-size: 0.92rem;
  }
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
  }
  .feature-box {
    padding: 1.15rem 1rem;
  }
  .result-card-v2 {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
  }
  .result-thumb-box-v2 {
    max-height: 240px;
    aspect-ratio: 16/9;
    border-radius: 10px;
  }
  .result-title-v2 {
    font-size: 0.95rem;
    line-height: 1.45;
  }
  .tab-btn {
    padding: 0.75rem 0.5rem;
    font-size: 0.88rem;
  }
  .media-table th, .media-table td {
    padding: 0.75rem 0.65rem;
  }
  .btn-dl-green {
    padding: 0.45rem 0.85rem;
    font-size: 0.84rem;
    border-radius: 6px;
    white-space: nowrap;
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .editorial-article {
    padding: 1.25rem 0.85rem;
    border-radius: 12px;
  }
  .scroll-to-top-btn {
    bottom: 18px;
    padding: 0.55rem 1.15rem;
    font-size: 0.85rem;
  }
}

/* Extra Compact Optimization for Small Smartphones (iPhone SE, 360px-420px Android) */
@media (max-width: 480px) {
  .nav-container {
    padding: 0.6rem 0.75rem;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .brand-logo {
    font-size: 1.05rem;
    gap: 0.35rem;
  }
  .logo-badge {
    padding: 0.2rem 0.45rem;
    font-size: 0.75rem;
    border-radius: 6px;
  }
  .nav-links {
    gap: 0.5rem;
  }
  .nav-links li:first-child {
    display: none; /* Hide redundant 'Downloader' link on phones */
  }
  .nav-links a {
    font-size: 0.8rem;
    padding: 0.2rem 0.35rem;
  }
  .hero-section {
    padding: 1.25rem 0.65rem 1.75rem;
  }
  .hero-title {
    font-size: 1.5rem;
  }
  .hero-subtitle {
    font-size: 0.88rem;
  }
  .badge-pill {
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
  }
  .tool-box {
    padding: 0.45rem;
    border-radius: 12px;
  }
  .input-group {
    padding: 0.25rem 0.35rem;
    border-radius: 8px;
  }
  .tool-input {
    font-size: 16px;
    padding: 0.65rem 0.3rem;
  }
  .input-icon {
    padding: 0 0.3rem;
  }
  .paste-btn, .clear-btn {
    padding: 0.45rem 0.6rem;
    font-size: 0.78rem;
  }
  .submit-btn {
    padding: 0.8rem 1rem;
    font-size: 0.98rem;
    min-height: 46px;
    border-radius: 8px;
  }
  .trust-bar {
    gap: 0.5rem;
    font-size: 0.75rem;
  }
  .main-content {
    padding: 1.25rem 0.65rem 2rem;
  }
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .step-card {
    padding: 1rem 0.85rem;
  }
  .guide-visual-container {
    padding: 1rem 0.65rem;
    border-radius: 10px;
  }
  .guide-method-card {
    margin-bottom: 1.25rem;
    padding-bottom: 1.15rem;
  }
  .guide-method-card h3 {
    font-size: 0.98rem;
  }
  .guide-method-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
  }
  .features-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .feature-box {
    padding: 1rem 0.85rem;
  }
  .result-card-v2 {
    padding: 0.65rem;
    border-radius: 10px;
    margin-top: 1rem;
  }
  .result-thumb-box-v2 {
    max-height: 190px;
  }
  .result-title-v2 {
    font-size: 0.86rem;
    line-height: 1.35;
  }
  .tab-btn {
    padding: 0.6rem 0.3rem;
    font-size: 0.8rem;
    gap: 0.25rem;
  }
  .tab-btn svg {
    width: 13px;
    height: 13px;
  }
  .media-table th {
    padding: 0.55rem 0.4rem;
    font-size: 0.76rem;
  }
  .media-table td {
    padding: 0.6rem 0.4rem;
    font-size: 0.8rem;
  }
  .res-label {
    font-size: 0.8rem;
  }
  .size-label {
    font-size: 0.75rem;
  }
  .btn-dl-green {
    padding: 0.4rem 0.65rem;
    font-size: 0.78rem;
    gap: 0.25rem;
  }
  .btn-dl-green svg {
    width: 13px;
    height: 13px;
  }
  .editorial-article {
    padding: 1rem 0.65rem;
  }
  .scroll-to-top-btn {
    bottom: 16px;
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
  }
}
