/* ═══════════════════════════════════════════════════════
   toolline-inner.css
   Shared overrides for all inner pages (text, video, image-tools)
   Bridges PixelTools variables → Toolline design system
   ═══════════════════════════════════════════════════════ */

/* ── 1. CSS Variables bridge ───────────────────────────────── */
:root {
  /* PixelTools vars used by text.css / video.css */
  --bg:           #f4f6ff;
  --card:         #ffffff;
  --surface:      #ffffff;
  --surface-soft: #f7f9ff;
  --text:         #25275c;
  --muted:        #6d7395;
  --border:       rgba(190, 201, 240, 0.55);
  --accent:       #5a84ff;
  --accent2:      #06b6d4;
  --shadow:       rgba(113, 124, 171, 0.10);
  --radius:       18px;

  /* Toolline vars */
  --primary:   #5a84ff;
  --primary-2: #4d70e3;
}

/* ── 2. Base reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'DM Sans', Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(114,146,255,0.12), transparent 28%),
    linear-gradient(180deg, #f8f9ff 0%, #f4f6ff 100%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── 3. site-shell wrapper ─────────────────────────────────── */
.site-shell { width: 100%; }

/* ── 4. Header ─────────────────────────────────────────────── */
.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: calc(100% - 24px);
  margin: 12px 12px 0;
  padding: 22px 28px;
  border-radius: 32px 32px 0 0;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.72);
}

.brand { display: inline-flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark {
  position: relative;
  width: 44px; height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f9fbff 0%, #eef3ff 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 10px 22px rgba(93,113,184,0.12);
}
.brand-dot { position: absolute; border-radius: 999px; }
.brand-dot-a {
  inset: 8px auto auto 9px;
  width: 24px; height: 24px;
  background: linear-gradient(135deg, #4fc3ff, #5568ff);
  transform: rotate(40deg);
}
.brand-dot-b {
  inset: 6px 7px auto auto;
  width: 15px; height: 15px;
  background: linear-gradient(135deg, #ffd15c, #ff9360);
}
.brand-dot-c {
  inset: auto 7px 6px auto;
  width: 17px; height: 17px;
  background: linear-gradient(135deg, #7a6cff, #b56eff);
}
.brand-text {
  font-family: 'Syne', Arial, sans-serif;
  font-size: clamp(1.8rem, 1.6rem + 0.7vw, 2.35rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  color: #2d2f63;
}
.brand-text span { color: #5769e3; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #5e648b;
  font-weight: 700;
  font-size: 0.98rem;
  transition: background-color 0.2s, color 0.2s, transform 0.2s;
}
.site-nav a:hover,
.site-nav a.active { color: var(--text); background: rgba(111,138,236,0.08); }
.site-nav .nav-cta {
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  padding-inline: 20px;
  box-shadow: 0 14px 28px rgba(87,111,223,0.22);
}
.site-nav .nav-cta:hover {
  color: #fff;
  background: linear-gradient(135deg, #688eff 0%, #5578e7 100%);
  transform: translateY(-1px);
}

/* Hamburger */
.menu-toggle {
  display: none;
  width: 48px; height: 48px;
  padding: 0; border: 0;
  border-radius: 14px;
  background: rgba(111,138,236,0.1);
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 22px; height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: #4b5bc6;
}

/* ── 5. Hero ────────────────────────────────────────────────── */
/* Covers both .hero (video/image) and .page-hero (text) */
.hero,
.page-hero {
  position: relative;
  width: calc(100% - 24px);
  margin: 0 12px;
  padding: 72px 40px 82px !important;
  min-height: 280px;
  border-radius: 0 0 38px 38px;
  background:
    radial-gradient(circle at 18% 20%, rgba(255,255,255,0.94) 0%, rgba(245,247,255,0.9) 34%, rgba(230,236,255,0.88) 100%),
    linear-gradient(135deg, #f7f8ff 0%, #edf2ff 52%, #e8eeff 100%);
  box-shadow: 0 20px 50px rgba(90,109,184,0.12);
  text-align: center;
  max-width: none !important;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(161,177,233,0.28);
  color: #6573b5;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: .02em;
  margin-bottom: 20px;
  /* reset absolute positioning from PixelTools */
  position: static !important;
  top: auto !important; right: auto !important;
  box-shadow: none !important;
}

.hero h1,
.page-hero h1 {
  font-family: 'Syne', Arial, sans-serif;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.96;
  color: #2d2f63;
  margin: 0 auto 18px;
}

.hero-online { color: #2d2f63 !important; }

.grad {
  background: linear-gradient(90deg, #5a84ff 0%, #4d70e3 55%, #7c5cf2 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}

.hero p,
.page-hero p {
  color: #6d7395;
  font-size: 1.1rem;
  line-height: 1.72;
  max-width: 560px;
  margin: 0 auto;
}

/* ── 6. Ad slot ─────────────────────────────────────────────── */
.ad-slot {
  max-width: calc(100% - 24px);
  margin: 20px 12px;
  border-radius: 18px;
  overflow: hidden;
}
.ad-label {
  font-size: 0.72rem;
  color: #98a1c8;
  text-align: center;
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ── 7. Tabs ────────────────────────────────────────────────── */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: calc(100% - 24px);
  margin: 28px 12px 0;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255,255,255,0.90);
  border: 1px solid rgba(210,220,244,0.8);
  box-shadow: 0 10px 28px rgba(113,124,171,0.08);
}

.tab-btn {
  padding: 11px 22px;
  border-radius: 999px;
  border: 1.5px solid rgba(190,201,240,0.55);
  background: #f5f7ff;
  color: #5e648b;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.tab-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(90,132,255,0.06); }
.tab-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 20px rgba(87,111,223,0.24);
}

/* ── 8. Main layout ─────────────────────────────────────────── */
.main-layout {
  max-width: calc(100% - 24px);
  margin: 24px 12px 0;
  padding-bottom: 60px;
}

/* ── 9. Container / panels ──────────────────────────────────── */
.container {
  background: rgba(255,255,255,0.97);
  border: 1px solid rgba(210,220,244,0.9);
  border-radius: 32px;
  padding: 32px;
  box-shadow: 0 18px 44px rgba(112,126,182,0.07), inset 0 1px 0 rgba(255,255,255,0.95);
  margin-bottom: 24px;
}

/* ── 10. Upload zone ────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed rgba(190,201,240,0.7);
  border-radius: 22px;
  padding: 48px 24px;
  text-align: center;
  background: linear-gradient(160deg, #f8f9ff 0%, #f0f3ff 100%);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.upload-zone:hover {
  border-color: var(--primary);
  background: linear-gradient(160deg, #f0f4ff 0%, #e8edff 100%);
}
.upload-icon { font-size: 3rem; display: block; margin-bottom: 12px; }
.upload-zone h3 { font-family: 'Syne', Arial, sans-serif; font-size: 1.3rem; font-weight: 800; color: #2d2f63; margin: 0 0 8px; }
.upload-zone p { color: #6d7395; font-size: 0.95rem; margin: 4px 0; }

.btn-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  padding: 12px 28px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(87,111,223,0.24);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-upload:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(87,111,223,0.32); }

/* ── 11. Controls panel ─────────────────────────────────────── */
.controls {
  background: linear-gradient(160deg, #f8f9ff 0%, #f2f5ff 100%);
  border: 1px solid rgba(210,220,244,0.7);
  border-radius: 22px;
  padding: 24px;
  margin-bottom: 20px;
}
.controls h3 { font-family: 'Syne', Arial, sans-serif; font-size: 1.05rem; font-weight: 800; color: #2d2f63; margin: 0 0 18px; }

.control-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.control-label { font-weight: 700; font-size: 0.92rem; color: #5e648b; min-width: 80px; }
.control-value { font-weight: 800; color: var(--primary); font-size: 0.95rem; min-width: 40px; }

input[type="range"] {
  flex: 1;
  accent-color: var(--primary);
  height: 4px;
  border-radius: 999px;
}

select {
  padding: 9px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(190,201,240,0.6);
  background: #fff;
  color: var(--text);
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
}
select:focus { border-color: var(--primary); }

/* ── 12. Buttons ────────────────────────────────────────────── */
.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px 28px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(87,111,223,0.26);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-action:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(87,111,223,0.34); }

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1fd3b0 0%, #10b89a 100%);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 10px 22px rgba(20,185,155,0.26);
  transition: transform 0.2s;
}
.btn-download:hover { transform: translateY(-2px); }

/* ── 13. Preview area ───────────────────────────────────────── */
.preview-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.preview-box {
  background: #f5f7ff;
  border: 1px solid rgba(190,201,240,0.55);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
}
.preview-box h4 { font-size: 0.88rem; font-weight: 700; color: #5e648b; margin: 0 0 10px; }
.preview-box img { border-radius: 10px; max-height: 200px; object-fit: contain; width: 100%; }
.preview-info { font-size: 0.82rem; color: #98a1c8; margin-top: 8px; }

/* ── 14. Result area ────────────────────────────────────────── */
.result-area {
  display: none;
  text-align: center;
  padding: 40px 24px;
  background: linear-gradient(160deg, #f0fff8 0%, #e8fef5 100%);
  border: 1px solid rgba(30,200,160,0.22);
  border-radius: 22px;
}
.result-icon { font-size: 3rem; margin-bottom: 12px; }
.result-area h3 { font-family: 'Syne', Arial, sans-serif; font-size: 1.4rem; font-weight: 800; color: #2d2f63; margin: 0 0 8px; }
.result-area p { color: #6d7395; margin: 0 0 20px; }

/* ── 15. Notice box ─────────────────────────────────────────── */
.notice-box {
  padding: 16px 20px;
  border-radius: 16px;
  background: rgba(90,132,255,0.07);
  border: 1px solid rgba(90,132,255,0.18);
  color: #4a5490;
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 20px;
}
.notice-box strong { color: #3d4aa0; }

/* ── 16. text.html tool hub grid (htc cards) ────────────────── */
.tools-hub-grid {
  max-width: 100%;
  margin: 28px 12px 0;
  padding: 0 0 60px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.htc {
  background: linear-gradient(160deg, #ffffff 0%, #f5f7ff 100%);
  border: 1px solid rgba(190,201,240,0.60);
  border-radius: 22px;
  padding: 22px 20px 18px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 10px 24px rgba(113,124,171,0.09), inset 0 1px 0 rgba(255,255,255,0.90);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.htc:hover {
  transform: translateY(-5px) scale(1.012);
  box-shadow: 0 20px 36px rgba(90,132,255,0.16);
  border-color: rgba(130,160,255,0.40);
}
.htc-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 8px 18px rgba(70,102,202,0.18);
}
.htc-name {
  font-family: 'Syne', Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #26315f;
  line-height: 1.2;
}
.htc-desc { font-size: 0.88rem; color: #68739a; line-height: 1.55; margin: 0; flex: 1; }
.htc-foot { display: flex; align-items: center; margin-top: 4px; }
.htc-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 3px 10px;
  border-radius: 999px;
}

/* Search + filter tabs for text page */
.search-wrap {
  max-width: calc(100% - 24px);
  margin: 24px 12px 0;
  padding: 0;
  position: relative;
}
.search-wrap input {
  width: 100%;
  padding: 16px 48px 16px 48px;
  border-radius: 18px;
  border: 1.5px solid rgba(190,201,240,0.6);
  background: rgba(255,255,255,0.98);
  color: var(--text);
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 1rem;
  outline: none;
  box-shadow: 0 10px 28px rgba(113,124,171,0.09);
  transition: border-color 0.2s;
}
.search-wrap input:focus { border-color: var(--primary); }
.search-wrap input::placeholder { color: #98a1c8; }
.s-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); font-size: 16px; pointer-events: none; }
.s-clear { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); border: none; background: none; cursor: pointer; font-size: 16px; color: #98a1c8; padding: 4px; }

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 12px 0;
  padding: 0;
}
.ftab {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid rgba(190,201,240,0.55);
  background: rgba(255,255,255,0.90);
  color: #5e648b;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
}
.ftab:hover { border-color: var(--primary); color: var(--primary); }
.ftab.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(87,111,223,0.22);
}

#no-results { display: none; text-align: center; padding: 48px 20px; color: #6d7395; font-size: 1rem; grid-column: 1/-1; }

/* ── 17. Info sections (features, steps, FAQ, trust) ────────── */
.info-section { max-width: calc(100% - 24px); margin: 32px 12px 0; }

.feature-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin: 20px 12px 0;
}
.feature-card {
  background: rgba(255,255,255,0.97);
  border: 1px solid rgba(210,220,244,0.7);
  border-radius: 22px;
  padding: 24px 20px;
  box-shadow: 0 10px 24px rgba(113,124,171,0.07);
}
.feature-card-icon { font-size: 2rem; display: block; margin-bottom: 10px; }
.feature-card-title { font-family: 'Syne', Arial, sans-serif; font-size: 1rem; font-weight: 800; color: #26315f; margin-bottom: 8px; }
.feature-card-desc { font-size: 0.88rem; color: #68739a; line-height: 1.55; margin: 0; }

.info-section-title {
  font-family: 'Syne', Arial, sans-serif;
  font-size: clamp(1.6rem, 1.4rem + 0.8vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #2d2f63;
  margin: 40px 12px 8px;
}
.info-section-sub { color: #6d7395; font-size: 1rem; margin: 0 12px 20px; }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin: 0 12px 0;
}
.step-card {
  background: rgba(255,255,255,0.97);
  border: 1px solid rgba(210,220,244,0.7);
  border-radius: 22px;
  padding: 24px 20px;
  box-shadow: 0 10px 24px rgba(113,124,171,0.07);
}
.step-number {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff;
  font-family: 'Syne', Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  box-shadow: 0 8px 18px rgba(87,111,223,0.24);
}
.step-title { font-family: 'Syne', Arial, sans-serif; font-weight: 800; color: #26315f; margin-bottom: 8px; }
.step-desc { font-size: 0.88rem; color: #68739a; line-height: 1.55; margin: 0; }

/* FAQ */
.faq-list { margin: 0 12px; }
.faq-item {
  background: rgba(255,255,255,0.97);
  border: 1px solid rgba(210,220,244,0.7);
  border-radius: 18px;
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(113,124,171,0.06);
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  font-weight: 700;
  color: #26315f;
  cursor: pointer;
  font-size: 0.98rem;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 22px;
  color: #6d7395;
  font-size: 0.92rem;
  line-height: 1.68;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.open .faq-answer { max-height: 300px; padding: 0 22px 18px; }
.faq-arrow { transition: transform 0.3s; font-size: 0.75rem; color: #98a1c8; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }

/* Trust strip */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 28px;
  margin: 32px 12px 0;
  padding: 24px 28px;
  border-radius: 22px;
  background: rgba(255,255,255,0.90);
  border: 1px solid rgba(210,220,244,0.7);
  box-shadow: 0 10px 28px rgba(113,124,171,0.07);
}
.trust-item { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #5e648b; font-size: 0.92rem; }
.trust-item .icon { font-size: 1.1rem; }
.trust-sep { width: 1px; height: 20px; background: rgba(190,201,240,0.5); }

/* ── 18. Footer ─────────────────────────────────────────────── */
.site-footer-inner {
  margin: 40px 12px 12px;
  padding: 28px 32px;
  border-radius: 24px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(210,220,244,0.7);
  text-align: center;
  color: #6d7395;
  font-size: 0.9rem;
  box-shadow: 0 10px 28px rgba(113,124,171,0.06);
}
.site-footer-inner p { margin: 4px 0; }
.site-footer-inner a { color: var(--primary); font-weight: 700; }
.site-footer-inner a:hover { text-decoration: underline; }

/* ── 19. Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .site-header { align-items: flex-start; padding: 18px; }
  .menu-toggle { display: inline-block; margin-left: auto; }
  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0; right: 0;
    display: none;
    padding: 16px;
    border-radius: 22px;
    background: rgba(255,255,255,0.97);
    box-shadow: 0 18px 40px rgba(95,112,180,0.16);
  }
  .site-nav.is-open { display: flex; flex-direction: column; align-items: stretch; }
  .site-nav a { width: 100%; text-align: left; }
  .preview-area { grid-template-columns: 1fr; }
  .tools-hub-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .site-header { width: calc(100% - 12px); margin: 6px 6px 0; padding: 14px 16px; border-radius: 24px 24px 0 0; }
  .hero, .page-hero { width: calc(100% - 12px); margin: 0 6px; padding: 36px 20px 36px !important; }
  .tabs { margin: 16px 6px 0; padding: 14px; }
  .main-layout { max-width: calc(100% - 12px); margin: 16px 6px 0; }
  .container { padding: 20px 16px; border-radius: 22px; }
  .tools-hub-grid { grid-template-columns: 1fr; margin: 16px 6px 0; }
  .search-wrap { margin: 16px 6px 0; }
  .filter-tabs { margin: 12px 6px 0; }
  .steps-grid { grid-template-columns: 1fr; }
  .feature-cards-grid { grid-template-columns: 1fr; }
  .trust-sep { display: none; }
  .trust-strip { flex-direction: column; gap: 12px; }
}
