:root {
  --bg: #eef4ff; --surface: #ffffff; --surface-soft: #f7faff; --surface-blue: #eaf1ff; 
  --border: #dbe5f3; --line: #e9edf6; --text: #1f2a3d; --muted: #70809b; --faint: #9aa8bd; 
  --primary: #4a82ea; --primary-dark: #356fe0; --primary-soft: #e6efff; --danger: #e74c3c; 
  --success: #22a06b; --shadow: 0 12px 34px rgba(91,125,184,.12); --shadow-soft: 0 6px 18px rgba(91,125,184,.10);
  --radius-sm: 12px; --radius-md: 18px; --radius-lg: 24px; --max: 1140px; --nav-h: 78px; --trans: 260ms ease;
}
[data-theme="dark"] {
  --bg: #0f1725; --surface: #151f31; --surface-soft: #192538; --surface-blue: #1d2d47; 
  --border: #26354f; --line: #22314a; --text: #edf4ff; --muted: #a5b7d2; --faint: #7f92ae; 
  --primary: #6b9cff; --primary-dark: #4d84ff; --primary-soft: #1f3152; --danger: #ff786f; 
  --success: #37c98f; --shadow: 0 18px 44px rgba(0,0,0,.28); --shadow-soft: 0 10px 22px rgba(0,0,0,.22);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button, input { font: inherit; }
main { flex: 1; }
.container { width: min(var(--max), calc(100% - 32px)); margin: auto; }

/* HEADER */
.site-header { position: sticky; top: 0; z-index: 40; backdrop-filter: blur(14px); background: color-mix(in srgb, var(--bg) 85%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--border) 85%, transparent); }
.nav-wrap { min-height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.35rem; color: var(--text); }
.brand .logo {
  width: 160px;
  height: auto;
  display: block;
  flex-shrink: 0;
}
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a { color: var(--muted); font-weight: 600; padding: 12px 16px; border-radius: 14px; transition: var(--trans); }
.nav-links a:hover { background: var(--surface); color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.theme-btn, .menu-btn { width: 46px; height: 46px; border: none; border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-soft); cursor: pointer; display: grid; place-items: center; transition: var(--trans); font-size: 1.35rem; }
.theme-btn:hover, .menu-btn:hover { transform: translateY(-1px); background: var(--surface-blue); }
.menu-btn { display: none; }

/* MOBILE MENU */
.mobile-panel { display: none; overflow: hidden; max-height: 0; opacity: 0; transition: all 0.3s ease; }
.mobile-panel.open { display: block; max-height: 320px; opacity: 1; padding-bottom: 18px; }
.mobile-links { display: grid; gap: 10px; }
.mobile-links a { background: var(--surface); padding: 14px 16px; border: 1px solid var(--border); border-radius: 16px; color: var(--text); font-weight: 600; }

/* HERO & FORM */
.hero { padding: 56px 0 32px; }
.hero-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 64px 24px; text-align: center; }
.hero-card h1 { font-size: clamp(2rem, 5vw, 3.8rem); line-height: 1.15; letter-spacing: -.04em; margin-bottom: 18px; }
.hero-card h1 span { color: var(--primary); }
.hero-card p { font-size: 1.15rem; color: var(--muted); max-width: 680px; margin: 0 auto; line-height: 1.6; }
.tool-form { margin: 40px auto 0; max-width: 820px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; }
.input-wrap { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface-soft); border: 2px solid var(--border); border-radius: 24px; transition: var(--trans); width: 100%; box-sizing: border-box; }
.input-wrap:focus-within { border-color: var(--primary); background: var(--surface); }
.input-wrap i { font-size: 1.3rem; color: var(--muted); flex-shrink: 0; }
.input-wrap input { flex: 1; border: none; outline: none; background: transparent; color: var(--text); font-size: 1.05rem; min-width: 0; }
.paste-btn { border: none; background: var(--surface-blue); color: var(--primary-dark); font-weight: 700; border-radius: 16px; padding: 10px 16px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* SUBMIT BUTTON FIXED ALIGNMENT */
.submit-btn { 
  border: none; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); 
  color: #fff; font-weight: 800; border-radius: 24px; padding: 0 36px; min-height: 68px; 
  font-size: 1.1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; 
  gap: 10px; width: 100%; box-shadow: 0 12px 24px rgba(74,130,234,.25); transition: var(--trans); 
}
.submit-btn:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(74,130,234,.35); }
.submit-btn.loading { opacity: .85; pointer-events: none; }

/* HERO NOTE FIXED ALIGNMENT */
.hero-note { 
  margin: 24px auto 0; font-size: .93rem; padding: 12px 16px; border: 1px solid var(--border); 
  border-radius: 16px; background: var(--surface-soft); color: var(--muted); 
  display: flex; align-items: flex-start; justify-content: flex-start; gap: 12px; 
  width: 100%; max-width: 820px; box-sizing: border-box; 
}
.hero-note i { font-size: 1.3rem; margin-top: 2px; flex-shrink: 0; color: var(--primary); }
.hero-note span { text-align: left; line-height: 1.5; }

/* RESULTS */
.result-area { padding: 0 0 32px; }
.alert { background: #ffebeb; border: 1px solid #ffcaca; color: var(--danger); padding: 16px 18px; border-radius: 18px; display: flex; align-items: center; gap: 10px; }
[data-theme="dark"] .alert { background: rgba(231,76,60,0.15); border-color: rgba(231,76,60,0.3); }
.result-card { background: var(--surface); border: 1px solid var(--border); border-radius: 28px; box-shadow: var(--shadow); overflow: hidden; }
.result-top { padding: 26px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 180px 1fr; gap: 24px; align-items: center; }
.thumb { aspect-ratio: 16/9; border-radius: 18px; overflow: hidden; background: var(--surface-blue); position: relative; }
.thumb .play { position: absolute; left: 16px; bottom: 16px; width: 48px; height: 48px; border-radius: 999px; background: rgba(255,255,255,.92); display: grid; place-items: center; color: var(--primary-dark); font-size: 1.55rem; }
.result-top h2 { font-size: 1.3rem; line-height: 1.4; margin-bottom: 8px; }
.meta { color: var(--muted); font-weight: 600; font-size: .95rem; display: flex; align-items: center; gap: 8px; }
.download-grid { padding: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.quality { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px; border-radius: 22px; border: 1px solid var(--border); background: var(--surface-soft); transition: var(--trans); }
.quality:hover { border-color: var(--primary); transform: translateY(-3px); }
.quality .left { display: flex; gap: 16px; align-items: center; }
.badge { min-width: 56px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 1.05rem; }
.badge.hd { background: var(--primary); color: #fff; }
.badge.sd { background: var(--surface-blue); color: var(--primary-dark); }
.q-title { font-weight: 800; font-size: 1.05rem; }
.q-sub { font-size: .92rem; color: var(--muted); }
.q-btn { background: var(--primary-soft); color: var(--primary-dark); padding: 14px 20px; border-radius: 16px; font-weight: 800; display: inline-flex; align-items: center; gap: 8px; }

/* PANELS & LAYOUT */
.content-section { padding: 16px 0 32px; }
.two-col2 { display: grid; grid-template-columns: 1.1fr .9fr; gap: 26px; align-items: start; }
.two-col {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: stretch;
}

.mt-24 { margin-top: 26px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-soft); overflow: hidden; }
.panel-head { padding: 24px 28px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; font-size: 1.18rem; font-weight: 800; }
.panel-head i { font-size: 1.4rem; color: var(--primary); }
.panel-body { padding: 28px; }
.panel-body p {
    line-height: 1.6;
    margin-bottom: 16px;
}

.panel-body p:last-child {
    margin-bottom: 0;
}

.panel-body strong {
    font-weight: 700;
}

.panel-body h1, 
.panel-body h3, 
.panel-body h4 {
    line-height: 1.3;
    font-weight: 700;
    margin-top: 24px;
    margin-bottom: 12px;
}

.panel-body h1:first-child, 
.panel-body h3:first-child, 
.panel-body h4:first-child {
    margin-top: 0;
}

.panel-body h1 { font-size: 1.8rem; }
.panel-body h3 { font-size: 1.3rem; }
.panel-body h4 { font-size: 1.1rem; }

.panel-body ul, 
.panel-body ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.panel-body ul:last-child, 
.panel-body ol:last-child {
    margin-bottom: 0;
}

.panel-body li {
    line-height: 1.6;
    margin-bottom: 8px;
}

.panel-body li:last-child {
    margin-bottom: 0;
}

.panel-body ul li::marker,
.panel-body ol li::marker {
    color: var(--primary);
    font-weight: 700;
}

/* ARTICLE PAGE CSS */
.article-wrap { max-width: 860px; margin: 40px auto 80px; padding: 0 16px; }
.article-header { text-align: center; margin-bottom: 40px; }
.article-header h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.2; letter-spacing: -.03em; margin-bottom: 16px; color: var(--text); }
.article-meta { color: var(--muted); font-size: 0.95rem; font-weight: 500; display: flex; justify-content: center; gap: 16px; align-items: center; flex-wrap: wrap; }
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-cover { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 28px; margin-bottom: 40px; box-shadow: var(--shadow-soft); border: 1px solid var(--border); }
.article-body h2 { font-size: 1.8rem; margin: 48px 0 16px; letter-spacing: -.02em; color: var(--text); }
.article-body h3 { font-size: 1.4rem; margin: 32px 0 12px; color: var(--text); }
.article-body p { margin-bottom: 20px; font-size: 1.1rem; line-height: 1.8; color: var(--muted); }
.article-body ul, .article-body ol { margin: 0 0 24px 20px; color: var(--muted); font-size: 1.1rem; line-height: 1.8; }
.article-body li { margin-bottom: 10px; padding-left: 8px; }
.article-body blockquote { border-left: 4px solid var(--primary); padding: 20px 24px; background: var(--surface-soft); border-radius: 0 16px 16px 0; margin: 32px 0; font-style: italic; color: var(--text); font-size: 1.15rem; line-height: 1.7; }
.article-body img { border-radius: 20px; margin: 32px 0; border: 1px solid var(--border); }
.article-body a { color: var(--primary); font-weight: 600; text-decoration: underline; text-decoration-color: transparent; transition: var(--trans); }
.article-body a:hover { text-decoration-color: var(--primary); }

/* SLIDER */
.slider-wrap { position: relative; overflow: hidden; border-radius: 18px; }
.slide-item { display: none; }
.slide-item.active { display: block; }
.step-card { width: 100%; aspect-ratio: 16/9; border-radius: 18px; margin-bottom: 18px; background: var(--surface-blue); }
.step-text { text-align: center; color: var(--muted); font-size: 1.02rem; padding: 0 10px; }
.step-text strong { display: block; color: var(--text); font-size: 1.15rem; margin-bottom: 6px; }
.slider-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; }
.nav-btn { width: 48px; height: 48px; border: none; background: var(--surface-blue); color: var(--primary-dark); border-radius: 50%; cursor: pointer; font-size: 1.6rem; }
.dots { display: flex; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); cursor: pointer; }
.dot.active { background: var(--primary); width: 28px; border-radius: 8px; }

/* TIMELINE */
.timeline { padding: 8px 0 8px 8px; }
.timeline-item { position: relative; padding-left: 32px; padding-bottom: 28px; }
.timeline-item::before { content: ''; position: absolute; left: 0; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); z-index: 2; }
.timeline-item::after { content: ''; position: absolute; left: 6px; top: 20px; bottom: -6px; width: 2px; background: var(--line); z-index: 1; }
.timeline-item:last-child::after { display: none; }
.u-date { font-size: .85rem; font-weight: 800; color: var(--primary); text-transform: uppercase; margin-bottom: 4px; }
.u-title { font-weight: 800; font-size: 1.1rem; margin-bottom: 8px; }
.timeline-item p { color: var(--muted); font-size: .98rem; }

/* PROSE & FAQ */
.prose p { color: var(--muted); margin-bottom: 16px; font-size: 1.05rem; margin-top: 10px; }
.faq-list { display: grid; }
.faq-item { border: 1px solid var(--border); border-top: none; background: var(--surface); }
.faq-item:first-child { border-top: 1px solid var(--border); border-radius: 18px 18px 0 0; }
.faq-item:last-child { border-radius: 0 0 18px 18px; }
.faq-btn { width: 100%; background: none; border: none; padding: 24px 28px; display: flex; align-items: center; justify-content: space-between; color: var(--text); font-size: 1.05rem; font-weight: 600; cursor: pointer; text-align: left; }
.faq-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(74, 130, 234, 0.08);
  color: var(--primary);
  flex-shrink: 0;
  transition: background 0.3s ease, color 0.3s ease;
}

.faq-icon i {
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 0.3s ease;
}
.faq-iconz i { font-size: 1.6rem; color: var(--muted); transition: transform 0.3s; }
.faq-item.open .faq-icon i { transform: rotate(180deg); color: var(--primary); }
.faq-content { max-height: 0; overflow: hidden; transition: all 0.3s ease; opacity: 0; padding: 0 28px; }
.faq-item.open .faq-content { opacity: 1; padding: 0 28px 22px; max-height: 500px; }
.faq-content p { color: var(--muted); font-size: .98rem; line-height: 1.6; }

/* FOOTER */
.disclaimer-section {
  padding: 24px 0 22px;
}

.disclaimer-text {
  text-align: center;
  font-size: .92rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: 720px;
  margin: 0 auto;
  margin-bottom: 18px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 32px;
  background: var(--surface);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
}

.footer-brand {
  font-weight: 800;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.3;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  max-width: 820px;
}

.footer-links a {
  color: var(--muted);
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.35;
  text-decoration: none;
  padding: 6px 4px;
  color: #667085;
}

.footer-links a:hover,
.footer-links a:focus {
  color: var(--primary);
}


@media (max-width: 640px) {
  .disclaimer-section {
    padding: 20px 0 18px;
  }

  .disclaimer-text {
    font-size: .9rem;
    line-height: 1.7;
    max-width: 420px;
  }

  .site-footer {
    padding: 24px 0 28px;
  }

  .footer-inner {
    gap: 14px;
  }

  .footer-brand {
    font-size: 1rem;
  }

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

.footer-links a {
  font-size: .9rem;
  padding: 10px 8px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
  line-height: 1.35;
  text-decoration: none;
}
}


/* TABLET RESPONSIVE */
@media (max-width: 1024px) { 
  .two-col { grid-template-columns: 1fr; } 
}
@media (max-width: 768px) {
  .nav-links { display: none; } .menu-btn { display: grid; }
  .tool-form, .download-grid { grid-template-columns: 1fr; }
  .hero-card { padding: 42px 20px; }
  .result-top { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .article-header h1 { font-size: 2.2rem; }
}

/* MOBILE RESPONSIVE (FIXED FORMS OVERFLOW) */
@media (max-width: 560px) {
  .container { width: 100%; padding: 0 16px; margin: auto; }
  .hero { padding: 24px 0; }
  .panel, .result-card { border-radius: 12px; }
  .hero-card { padding: 32px 18px; border-radius: 12px; }
  .hero-card h1 { font-size: 1.8rem; margin-bottom: 12px; }
  
  /* Fix for the form overflow */
  .tool-form { display: flex; flex-direction: column; margin: 24px 0 0 0; gap: 12px; width: 100%; }
  .input-wrap { width: 100%; padding: 6px 6px 6px 16px; border-radius: 20px; gap: 8px; box-sizing: border-box; display: flex; align-items: center; }
  .input-wrap input { font-size: 0.95rem; min-width: 0; flex: 1; }
  .paste-btn { padding: 10px 14px; font-size: 0.9rem; border-radius: 14px; flex-shrink: 0; }
  .submit-btn { width: 100%; min-height: 58px; border-radius: 20px; font-size: 1.05rem; }
  
  .q-btn { padding: 12px; width: 100%; justify-content: center; }
  .quality { align-items: flex-start; flex-direction: column; gap: 16px; }
  .quality .left { width: 100%; }
  
  /* Article mobile scaling */
  .article-wrap { padding: 0 16px; margin-top: 24px; }
  .article-header h1 { font-size: 1.9rem; }
  .article-body h2 { font-size: 1.5rem; }
  .article-body p { font-size: 1.05rem; }
}


.feature-section {
  padding: 28px 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(74, 130, 234, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(74, 130, 234, 0.08);
  border-color: rgba(74, 130, 234, 0.18);
}

.feature-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin-bottom: 14px;
  background: rgba(74, 130, 234, 0.10);
  color: var(--primary);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text);
}

.feature-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--muted);
}

@media (max-width: 991px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 575px) {
  .feature-section {
    padding: 24px 0;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .feature-card {
    padding: 15px;
    border-radius: 14px;
  }

  .feature-icon {
    width: 38px;
    height: 38px;
    font-size: 1rem;
    border-radius: 10px;
    margin-bottom: 12px;
  }

  .feature-card h3 {
    font-size: 0.96rem;
  }

  .feature-card p {
    font-size: 0.9rem;
    line-height: 1.6;
  }
}



.two-col > .panel {
  height: 100%;
}

.updates-panel .panel-body {
  height: 540px;
  overflow-y: auto;
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: #c8d7ff #eef3ff;
  -webkit-overflow-scrolling: touch;
}

.updates-panel .panel-body::-webkit-scrollbar {
  width: 8px;
}

.updates-panel .panel-body::-webkit-scrollbar-track {
  background: #eef3ff;
  border-radius: 20px;
}

.updates-panel .panel-body::-webkit-scrollbar-thumb {
  background: #c8d7ff;
  border-radius: 20px;
}

.updates-panel .panel-body::-webkit-scrollbar-thumb:hover {
  background: #a9c1ff;
}

@media (max-width: 991px) {
  .two-col {
    grid-template-columns: 1fr;
  }

  .updates-panel .panel-body {
    height: auto;
    max-height: 420px;
  }
}