/* =========================================================
   Unified Tool Styles (Adapts Tools to Main Site Theme)
   Primary Theme: #2563eb (Bootstrap / Site Blue)
   Clean, consistent with all 121 converter tools.
   ========================================================= */

:root {
  --yt-red:    #2563eb;
  --yt-red-dk: #1d4ed8;
  --yt-blue:   #2563eb;
  --yt-dark:   #0f172a;
  --yt-gray:   #f8fafc;
  --yt-border: #e2e8f0;
  --text-main: #0f172a;
  --text-muted:#64748b;
  --radius-lg: 1rem;
  --radius-md: 0.75rem;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.05);
  --transition: all .2s cubic-bezier(.16,1,.3,1);
}

/* ── Tool Hero matching Main Site Hero ── */
.tool-hero {
  background: radial-gradient(circle at 50% 0%, #f0f7ff 0%, #ffffff 80%);
  border-bottom: 1px solid var(--yt-border);
  padding: 2.25rem 0 1.75rem;
  text-align: center;
}
.tool-hero h1 {
  font-size: clamp(1.6rem, 3.2vw, 2.35rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin-bottom: 0.5rem;
}
.tool-hero p {
  color: #64748b;
  font-size: 1.05rem;
  max-width: 680px;
  margin: 0 auto;
}

/* ── Category Badge ── */
.cat-badge {
  display: inline-block;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  border-radius: 50rem;
  padding: .25rem .85rem;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .75rem;
}

/* ── Breadcrumb ── */
.yt-breadcrumb {
  padding: 0.75rem 0;
  font-size: 0.85rem;
  color: #64748b;
}
.yt-breadcrumb a { color: #64748b; text-decoration: none; }
.yt-breadcrumb a:hover { color: #2563eb; }
.yt-breadcrumb .sep { margin: 0 0.4rem; color: #cbd5e1; }

/* ── Tool Input Card matching Dropzone Style ── */
.tool-card {
  background: #fff;
  border: 2px dashed #cbd5e1;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.tool-card:hover {
  border-color: #2563eb;
}
.tool-input-group {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}
.tool-input-group .form-control {
  border-radius: 50rem;
  border: 1.5px solid #cbd5e1;
  padding: .7rem 1.25rem;
  font-size: .95rem;
  flex: 1;
  min-width: 220px;
  transition: var(--transition);
}
.tool-input-group .form-control:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
  outline: none;
}
.btn-yt {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 50rem;
  padding: .7rem 1.75rem;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.btn-yt:hover { background: #1d4ed8; color: #fff; transform: translateY(-1px); }
.btn-yt:disabled { background: #94a3b8; cursor: not-allowed; transform: none; }
.btn-yt-outline {
  background: transparent;
  color: #2563eb;
  border: 1.5px solid #2563eb;
  border-radius: 50rem;
  padding: .5rem 1.2rem;
  font-weight: 600;
  font-size: .88rem;
  cursor: pointer;
  transition: var(--transition);
}
.btn-yt-outline:hover { background: #2563eb; color: #fff; }

/* ── Section & Layout ── */
.section {
  padding: 2.5rem 0 3.5rem;
}
.section-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -.02em;
  margin-bottom: .3rem;
}
.section-sub {
  color: #64748b;
  font-size: .95rem;
  margin-bottom: 1.75rem;
}

/* ── Results Area ── */
.results-area {
  margin-top: 1.5rem;
  display: none;
}
.results-area.show { display: block; }
.result-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: .75rem;
}
.result-label {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #64748b;
  margin-bottom: .25rem;
}
.result-value {
  font-size: .95rem;
  color: #0f172a;
  word-break: break-all;
  font-weight: 500;
}
.copy-btn {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: .25rem .65rem;
  font-size: .78rem;
  color: #475569;
  cursor: pointer;
  transition: var(--transition);
  margin-left: .4rem;
}
.copy-btn:hover { border-color: #2563eb; color: #2563eb; }
.copy-btn.copied { border-color: #10b981; color: #10b981; background: #ecfdf5; }

/* ── Thumbnail Grid ── */
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.thumb-item {
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #0f172a;
  transition: var(--transition);
}
.thumb-item:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.thumb-item img {
  width: 100%;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.thumb-item .thumb-info {
  padding: .75rem;
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
}
.thumb-label {
  font-size: .8rem;
  font-weight: 700;
  color: #334155;
}
.thumb-dims {
  font-size: .72rem;
  color: #64748b;
}

/* ── Tool Grid (Directory) ── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.tool-grid-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.1rem;
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  text-decoration: none;
  color: #0f172a;
}
.tool-grid-item:hover {
  border-color: #2563eb;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: #0f172a;
}
.tool-grid-item .tool-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}
.tool-grid-item .tool-name {
  font-weight: 600;
  font-size: .9rem;
  line-height: 1.3;
  margin-bottom: .15rem;
}
.tool-grid-item .tool-desc {
  font-size: .78rem;
  color: #64748b;
  line-height: 1.4;
}

/* ── How It Works Steps ── */
.how-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-weight: 800;
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-body h6 { font-weight: 700; margin-bottom: .25rem; color: #0f172a; }
.step-body p { font-size: .9rem; color: #64748b; margin: 0; }

/* ── FAQ ── */
.faq-item {
  border-bottom: 1px solid #e2e8f0;
  padding: 1rem 0;
}
.faq-q {
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  user-select: none;
  color: #0f172a;
}
.faq-q .faq-icon { transition: transform .2s; flex-shrink: 0; color: #64748b; }
.faq-q.open .faq-icon { transform: rotate(180deg); color: #2563eb; }
.faq-a {
  font-size: .9rem;
  color: #475569;
  line-height: 1.6;
  margin-top: .5rem;
  display: none;
}
.faq-a.open { display: block; }

/* ── Alerts & Loaders ── */
.yt-alert {
  border-radius: 0.5rem;
  padding: .75rem 1rem;
  font-size: .88rem;
  display: flex;
  align-items: flex-start;
  gap: .5rem;
}
.yt-alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.yt-alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.yt-alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.yt-alert-warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

.yt-loader {
  display: none;
  align-items: center;
  gap: .5rem;
  color: #64748b;
  font-size: .9rem;
  margin-top: .75rem;
}
.yt-loader.show { display: flex; }
.yt-spinner {
  width: 18px; height: 18px;
  border: 2px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Stats & Code ── */
.stat-card {
  text-align: center;
  padding: 1.25rem;
  background: #f8fafc;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
}
.stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
  margin-bottom: .25rem;
}
.stat-label {
  font-size: .78rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
}
.code-block {
  background: #0f172a;
  color: #f1f5f9;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  font-family: 'Consolas','Courier New',monospace;
  font-size: .85rem;
  line-height: 1.6;
  overflow-x: auto;
  position: relative;
}
.code-block .copy-code-btn {
  position: absolute;
  top: .5rem;
  right: .5rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: #f1f5f9;
  border-radius: 6px;
  padding: .2rem .6rem;
  font-size: .75rem;
  cursor: pointer;
}
.code-block .copy-code-btn:hover { background: rgba(255,255,255,.2); }

/* ── Related Tools ── */
.related-tools {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1rem;
}
.related-tool-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 50rem;
  padding: .3rem .85rem;
  font-size: .82rem;
  font-weight: 600;
  color: #334155;
  transition: var(--transition);
  text-decoration: none;
}
.related-tool-link:hover { border-color: #2563eb; color: #2563eb; }

/* ── Mockup Preview Component ── */
.mockup-container {
  max-width: 100%;
}
.mockup-desktop-card,
.mockup-mobile-frame,
.mockup-sidebar-card,
.yt-search-mockup {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  max-width: 100%;
}
.mockup-container.dark-mode .mockup-desktop-card,
.mockup-container.dark-mode .mockup-mobile-frame,
.mockup-container.dark-mode .mockup-sidebar-card,
.mockup-container.dark-mode .yt-search-mockup {
  background: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}
.mockup-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}
.mockup-thumb-wrap img,
.mockup-sidebar-thumb img,
.yt-search-mockup img,
.mockup-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mockup-badge-time {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.82);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.03em;
  z-index: 2;
}
.mockup-meta {
  display: flex;
  gap: 0.85rem;
  padding: 0.9rem;
  align-items: flex-start;
}
.mockup-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.mockup-title {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.35;
  color: #0f172a;
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mockup-container.dark-mode .mockup-title {
  color: #f8fafc;
}
.mockup-sub {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.35;
}
.mockup-container.dark-mode .mockup-sub {
  color: #94a3b8;
}
.mockup-mobile-frame {
  max-width: 420px;
}
.mockup-sidebar-card {
  display: flex;
  gap: 0.75rem;
  padding: 0.65rem;
  max-width: 480px;
}
.mockup-sidebar-thumb {
  position: relative;
  width: 168px;
  min-width: 168px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.mockup-sidebar-title {
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1.3;
  color: #0f172a;
  margin-bottom: 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mockup-container.dark-mode .mockup-sidebar-title {
  color: #f8fafc;
}

/* ── YouTube Search Mockup Component ── */
.yt-search-mockup {
  display: flex;
  gap: 1rem;
  padding: 0.85rem;
  align-items: flex-start;
}
.yt-search-mockup .mockup-thumb-wrap {
  width: 220px;
  min-width: 220px;
  border-radius: 6px;
  flex-shrink: 0;
}
.mockup-time-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0,0,0,0.8);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
}
.mockup-info {
  flex-grow: 1;
  min-width: 0;
}
.mockup-meta {
  font-size: 0.8rem;
  color: #64748b;
}

/* ── Global Images inside Tool Cards / Results ── */
.tool-card img,
.result-card img,
.results-area img {
  max-width: 100%;
  height: auto;
}

/* ── Colors & Utility classes ── */
.text-yt-red { color: #2563eb !important; }
.text-yt-blue { color: #2563eb !important; }
.bg-yt-red { background: #2563eb !important; }
