/* ============================================
   SPEEDDL - COMPLETE STYLESHEET
   ============================================ */

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

:root {
  --p: #7E17FF;
  --s: #F5054F;
  --blue: #3b82f6;
  --blue-dark: #2563eb;
  --grad: linear-gradient(135deg, #7E17FF 0%, #F5054F 100%);
  --text: #1a1a1a;
  --bg: #fff;
  --bg2: #f7f7f9;
  --gray: #666;
  --border: #e5e5e5;
  --pink-heading: #C2185B;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

[data-theme="dark"] {
  --text: #fff;
  --bg: #0f0f17;
  --bg2: #1a1a24;
  --gray: #a0a0b0;
  --border: #2a2a3a;
  --pink-heading: #f472b6;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background .3s, color .3s;
  -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
.hidden { display: none !important; }

/* ============================================
   HEADER
   ============================================ */
header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.hi {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.logo-text {
  font-size: 24px;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  transition: color .2s;
}

nav a:hover { color: var(--blue); }

.theme-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background .2s;
}

.theme-btn:hover { background: var(--bg2); }
.theme-btn img { width: 22px; height: 22px; }
.icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: block; filter: invert(1); }

.lang-selector {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  background: var(--grad);
  padding: 30px 0 50px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 40%, rgba(255,255,255,.18) 0%, transparent 60%);
  pointer-events: none;
}

.hero > .container { position: relative; z-index: 1; }

/* Category Pills */
.cat-nav {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.cat-btn {
  background: rgba(255,255,255,.2);
  color: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,.3);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all .2s;
}

.cat-btn img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.cat-btn:hover {
  background: rgba(255,255,255,.35);
  transform: translateY(-1px);
}

/* Hero Text */
.hero h1 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 10px;
  color: #fff;
  line-height: 1.2;
}

.subtitle {
  font-size: 17px;
  margin-bottom: 26px;
  opacity: .95;
  color: #fff;
}

/* Input Box */
.input-box {
  display: flex;
  max-width: 700px;
  margin: 0 auto;
  background: #fff;
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
  align-items: center;
  gap: 4px;
}

.input-box input {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 18px;
  font-size: 15px;
  border-radius: 8px;
  color: #1a1a1a;
  background: transparent;
  min-width: 0;
  font-family: inherit;
}

.input-box input::placeholder { color: #999; }

.paste-btn,
.clear-btn {
  background: #f0f0f0;
  color: #333;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background .2s;
  white-space: nowrap;
}

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

.paste-btn img,
.clear-btn img { width: 16px; height: 16px; }

#downloadBtn {
  background: var(--blue);
  color: #fff;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  transition: background .2s;
  white-space: nowrap;
}

#downloadBtn:hover { background: var(--blue-dark); }
#downloadBtn:disabled { opacity: .6; cursor: not-allowed; }

.status {
  margin-top: 16px;
  font-size: 14px;
  min-height: 20px;
  color: #fff;
}

/* Hero Logo */
.hero-logo {
  margin: 40px auto 0;
  width: auto;
  max-width: 340px;
  height: 90px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.2));
}

/* ============================================
   LOADING STATE
   ============================================ */
.loading-section {
  padding: 80px 0;
  background: var(--bg);
  text-align: center;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.loading-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--p);
  opacity: 0.4;
  animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.loading-text {
  font-size: 15px;
  color: var(--gray);
  font-weight: 500;
}

/* ============================================
   RESULT STATE
   ============================================ */
.results-section {
  padding: 50px 0;
  background: var(--bg2);
}

.result-heading {
  text-align: center;
  font-size: 18px;
  color: var(--gray);
  font-weight: 500;
  margin-bottom: 24px;
}

.result-card {
  max-width: 500px;
  margin: 0 auto;
  background: var(--bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  border: 1px solid var(--border);
}

.result-preview {
  width: 100%;
  max-height: 500px;
  background: #000;
  display: block;
  object-fit: contain;
}

.result-actions {
  padding: 16px;
}

.result-download-btn {
  width: 100%;
  background: var(--blue);
  color: #fff;
  padding: 14px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  transition: background .2s;
  display: block;
}

.result-download-btn:hover { background: var(--blue-dark); }

.result-caption {
  padding: 16px 20px 0;
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
}

.result-caption a { color: var(--blue); }

.result-info {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--gray);
}

.result-info-item img {
  width: 18px;
  height: 18px;
  opacity: 0.6;
}

/* ============================================
   SECTIONS (General)
   ============================================ */
.section { padding: 60px 0; }
.section.alt { background: var(--bg2); }

.section h2 {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  color: var(--blue);
  margin-bottom: 14px;
  line-height: 1.3;
}

.section-desc {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 40px;
  color: var(--gray);
  font-size: 15px;
  line-height: 1.7;
}

/* ============================================
   FEATURE SHOWCASE (2-column)
   ============================================ */
.feature-showcase {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 1000px;
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.feature-showcase-image {
  flex: 0 0 42%;
  align-self: stretch;
}

.feature-showcase-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 220px;
}

.feature-showcase-text {
  flex: 1;
  padding: 32px 32px 32px 0;
}

.feature-showcase-text h2 {
  color: var(--blue);
  font-size: 24px;
  margin-bottom: 12px;
  text-align: left;
}

.feature-showcase-text p {
  color: var(--gray);
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
}

/* ============================================
   STEPS (3 cards)
   ============================================ */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.step {
  background: var(--bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  text-align: center;
  transition: transform .2s, box-shadow .2s;
}

.step:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

.step-image {
  width: 100%;
  height: auto;
  display: block;
}

.step h3 {
  padding: 0 18px;
  margin: 20px 0 8px;
  color: var(--pink-heading);
  font-size: 17px;
  font-weight: 700;
}

.step p {
  padding: 0 18px 24px;
  color: var(--gray);
  font-size: 14px;
  line-height: 1.6;
}

/* ============================================
   ADDRESS BAR BOX
   ============================================ */
.address-bar-box {
  display: flex;
  align-items: center;
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
}

.ab-visual {
  flex: 0 0 280px;
  background: linear-gradient(135deg, #e0e7ff 0%, #fce7f3 100%);
  border-radius: 10px;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 110px;
}

.ab-url {
  background: #fff;
  border: 2px solid #3b82f6;
  border-radius: 6px;
  padding: 8px 12px;
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 12px;
  color: #1a1a1a;
  word-break: break-all;
}

.ab-url strong { color: #dc2626; }

.ab-text { flex: 1; }

.ab-text p {
  color: var(--gray);
  font-size: 14px;
  margin-bottom: 10px;
  line-height: 1.7;
}

.ab-text code {
  background: var(--bg2);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--blue);
  border: 1px solid var(--border);
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  word-break: break-all;
  }
/* ============================================
   FEATURES GRID (4 cards)
   ============================================ */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.feature {
  text-align: center;
  padding: 28px 22px;
  background: var(--bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: transform .2s, box-shadow .2s;
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

.feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  display: block;
  object-fit: contain;
}

.feature h3 {
  margin-bottom: 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--pink-heading);
}

.feature p {
  color: var(--gray);
  font-size: 14px;
  line-height: 1.6;
}

/* ============================================
   FEATURE ROWS (7 alternating rows)
   ============================================ */
.feature-row {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 24px auto;
  max-width: 1000px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}

.feature-row:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

.feature-row.reverse {
  flex-direction: row-reverse;
}

.feature-row-image {
  flex: 0 0 45%;
  align-self: stretch;
}

.feature-row-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 240px;
}

.feature-row-text {
  flex: 1;
  padding: 32px 32px 32px 0;
}

.feature-row.reverse .feature-row-text {
  padding: 32px 0 32px 32px;
}

.feature-row-text h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 12px;
  line-height: 1.3;
}

.feature-row-text p {
  color: var(--gray);
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
}

/* ============================================
   FAQ LIST
   ============================================ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 10px;
  transition: border-color .2s;
}

.faq-item:hover {
  border-color: var(--blue);
}

.faq-item h3 {
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--blue);
  font-weight: 600;
  line-height: 1.4;
}

.faq-item p {
  color: var(--gray);
  font-size: 14px;
  line-height: 1.7;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
  background: var(--grad);
  padding: 70px 0;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 50%, rgba(255,255,255,.15) 0%, transparent 50%);
  pointer-events: none;
}

.cta-section .container {
  position: relative;
  z-index: 1;
}

.cta-section h2 {
  color: #fff !important;
  font-size: 30px;
  margin-bottom: 14px;
  line-height: 1.3;
}

.cta-section p {
  color: rgba(255,255,255,.92);
  font-size: 16px;
  margin-bottom: 30px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: var(--blue);
  padding: 16px 36px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 700;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0,0,0,.3);
}

.cta-btn img {
  width: 20px;
  height: 20px;
  filter: invert(35%) sepia(80%) saturate(2000%) hue-rotate(200deg);
}

.cta-features {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 30px;
  font-size: 14px;
  opacity: .95;
}

.cta-features span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: var(--bg2);
  padding: 50px 0 24px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer-logo {
  height: 45px;
  width: auto;
  max-width: 200px;
  margin: 0 auto 24px;
  display: block;
  object-fit: contain;
}

.footer-nav-cats,
.footer-nav-links {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  font-size: 14px;
}

.footer-nav-cats a,
.footer-nav-links a {
  color: var(--text);
  text-decoration: none;
  transition: color .2s;
}

.footer-nav-cats a:hover,
.footer-nav-links a:hover {
  color: var(--blue);
}

.footer-nav-cats span,
.footer-nav-links span {
  color: var(--gray);
}

.footer-nav-links {
  font-size: 13px;
  margin-bottom: 24px;
}

.footer-nav-links a {
  color: var(--gray);
}

.footer-social-label {
  color: var(--gray);
  font-size: 13px;
  margin: 20px 0 14px;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 28px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  transition: transform .2s;
}

.footer-social a:hover {
  transform: translateY(-3px);
}

.footer-social img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.footer-copy {
  color: var(--gray);
  font-size: 13px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {

  /* Header */
  .hi { padding: 12px 16px; }
  .logo img { width: 36px; height: 36px; }
  .logo-text { font-size: 20px; }
  nav { gap: 12px; }
  nav a { font-size: 14px; }
  .lang-selector { font-size: 13px; }

  /* Hero */
  .hero { padding: 20px 0 36px; }
  .hero h1 { font-size: 26px; padding: 0 10px; line-height: 1.25; }
  .subtitle { font-size: 14px; padding: 0 10px; margin-bottom: 20px; }

  .cat-nav {
    gap: 5px;
    margin-bottom: 20px;
    padding: 0 8px;
  }
  .cat-btn {
    padding: 5px 10px;
    font-size: 11px;
    border-radius: 5px;
  }
  .cat-btn img { width: 13px; height: 13px; }

  .input-box {
    flex-direction: column;
    margin: 0 12px;
    padding: 8px;
    gap: 6px;
    border-radius: 12px;
  }
  .input-box input {
    width: 100%;
    text-align: center;
    padding: 12px;
    font-size: 14px;
  }
  .paste-btn,
  .clear-btn {
    width: 100%;
    justify-content: center;
    padding: 11px;
    font-size: 13px;
    margin: 0;
  }
  #downloadBtn {
    width: 100%;
    padding: 13px;
    font-size: 15px;
  }

  .hero-logo {
    height: 60px;
    max-width: 220px;
    margin-top: 24px;
  }

  /* Sections */
  .section { padding: 40px 0; }
  .section h2 { font-size: 22px; padding: 0 10px; }
  .section-desc { font-size: 14px; padding: 0 10px; margin-bottom: 28px; }

  /* Feature Showcase */
  .feature-showcase {
    flex-direction: column;
    border-radius: 12px;
  }
  .feature-showcase-image {
    flex: 1 1 auto;
    width: 100%;
  }
  .feature-showcase-image img {
    min-height: auto;
    max-height: 220px;
  }
  .feature-showcase-text {
    padding: 22px;
  }
  .feature-showcase-text h2 {
    font-size: 20px;
    text-align: center;
  }
  .feature-showcase-text p {
    font-size: 14px;
    text-align: center;
  }

  /* Steps */
  .steps {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .step h3 { font-size: 16px; }
  .step p { font-size: 13px; }

  /* Address Bar */
  .address-bar-box {
    flex-direction: column;
    padding: 20px;
    gap: 20px;
  }
  .ab-visual {
    flex: 1 1 auto;
    width: 100%;
  }
  .ab-text p { font-size: 13px; }

  /* Features Grid */
  .features {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .feature {
    padding: 20px 14px;
  }
  .feature-icon { width: 44px; height: 44px; }
  .feature h3 { font-size: 15px; }
  .feature p { font-size: 12px; }

  /* Feature Rows */
  .feature-row {
    flex-direction: column;
    margin: 18px auto;
    border-radius: 12px;
  }
  .feature-row.reverse {
    flex-direction: column;
  }
  .feature-row-image {
    flex: 1 1 auto;
    width: 100%;
  }
  .feature-row-image img {
    min-height: auto;
    max-height: 200px;
  }
  .feature-row-text {
    padding: 22px !important;
  }
  .feature-row-text h3 {
    font-size: 19px;
    text-align: center;
  }
  .feature-row-text p {
    font-size: 14px;
    text-align: center;
  }

  /* FAQ */
  .faq-item {
    padding: 16px 18px;
    margin-bottom: 8px;
  }
  .faq-item h3 { font-size: 15px; }
  .faq-item p { font-size: 13px; }

  /* CTA */
  .cta-section { padding: 50px 0; }
  .cta-section h2 { font-size: 22px; padding: 0 10px; }
  .cta-section p { font-size: 14px; padding: 0 10px; }
  .cta-btn {
    padding: 14px 28px;
    font-size: 15px;
  }
  .cta-features {
    gap: 14px;
    font-size: 13px;
  }

  /* Loading */
  .loading-section {
    padding: 60px 0;
    min-height: 240px;
  }
  .loading-dots span {
    width: 10px;
    height: 10px;
  }
  .loading-text { font-size: 14px; padding: 0 20px; }

  /* Result */
  .results-section { padding: 30px 0; }
  .result-heading { font-size: 16px; }
  .result-card { border-radius: 10px; }
  .result-preview { max-height: 400px; }
  .result-download-btn { font-size: 15px; padding: 12px; }
  .result-caption { font-size: 13px; }
  .result-info-item { font-size: 13px; }

  /* Footer */
  footer { padding: 40px 0 20px; }
  .footer-logo { height: 38px; }
  .footer-nav-cats,
  .footer-nav-links {
    font-size: 12px;
    gap: 5px;
  }
  .footer-social { gap: 14px; }
  .footer-social a {
    width: 36px;
    height: 36px;
  }
  .footer-social img {
    width: 20px;
    height: 20px;
  }
}

/* ============================================
   EXTRA SMALL DEVICES
   ============================================ */
@media (max-width: 400px) {
  .features {
    grid-template-columns: 1fr;
  }
  .hero h1 { font-size: 24px; }
  .cat-btn span { display: none; }
  .cat-btn { padding: 8px 10px; }
  .cat-btn img { width: 18px; height: 18px; }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.no-scroll { overflow: hidden; }
