
 /* ==========================================================================
       Unified Design System Tokens
       ========================================================================== */
    :root {
      --primary: #6366f1;
      --primary-dark: #4f46e5;
      --secondary: #06b6d4;
      --accent: #f59e0b;
      --bg-dark: #0f172a;
      --bg-card: #1e293b;
      --bg-card-hover: #334155;
      --text-primary: #f8fafc;
      --text-secondary: #94a3b8;
      --border: #334155;
      --success: #10b981;
      --error: #ef4444;
      --gradient-1: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
      --gradient-2: linear-gradient(135deg, #06b6d4 0%, #10b981 100%);
      --radius: 20px;
      --radius-sm: 10px;
      --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    }

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

    body {
      background-color: var(--bg-dark);
      color: var(--text-primary);
      font-family: var(--font-sans);
      line-height: 1.6;
      padding: 2.5rem 1rem;
      min-height: 100vh;
      -webkit-font-smoothing: antialiased;
    }
.breadcrumb-nav { margin-bottom: 1.25rem; }
    .breadcrumb-list { display: flex; align-items: center; gap: 0.5rem; list-style: none; font-size: 0.85rem; color: var(--text-secondary); }
    .breadcrumb-list a { color: var(--text-secondary); text-decoration: none; transition: var(--transition); }
    .breadcrumb-list a:hover { color: var(--secondary); }
    .breadcrumb-separator { color: var(--border); }
    .breadcrumb-current { color: var(--secondary); font-weight: 600; }

    .converter-header { text-align: center; margin-bottom: 2.25rem; }
    .header-pill { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 0.35rem 1rem; border-radius: 9999px; background: rgba(99, 102, 241, 0.1); border: 1px solid rgba(99, 102, 241, 0.3); color: var(--secondary); margin-bottom: 0.85rem; }
    .converter-header h1 { font-size: 2.35rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.5rem; }
    .converter-header p { color: var(--text-secondary); font-size: 1.05rem; max-width: 680px; margin: 0 auto; }

    .matrix-stage { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; margin-bottom: 2.5rem; box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6); position: relative; }
    .flow-strip { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.25rem; background: rgba(15, 23, 42, 0.7); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1.25rem; margin-bottom: 1.5rem; }
    .flow-node { display: flex; flex-direction: column; gap: 0.35rem; }
    .node-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); }
    .format-badge-card { display: flex; align-items: center; justify-content: space-between; background: var(--bg-dark); border: 1px solid var(--border); border-radius: 8px; padding: 0.65rem 1rem; }
    .format-name { font-size: 1.15rem; font-weight: 800; color: var(--text-primary); }
    .format-type-tag { font-size: 0.7rem; font-weight: 700; padding: 0.2rem 0.5rem; border-radius: 4px; background: rgba(6, 182, 212, 0.12); color: var(--secondary); text-transform: uppercase; }
    .flow-swapper { width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #ffffff; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 15px rgba(99, 102, 241, 0.4); flex-shrink: 0; }

    .convert-dropzone { border: 2px dashed rgba(99, 102, 241, 0.35); background-color: rgba(15, 23, 42, 0.4); border-radius: var(--radius-sm); padding: 2.75rem 1.5rem; text-align: center; cursor: pointer; position: relative; transition: var(--transition); }
    .convert-dropzone:hover, .convert-dropzone.dragover { border-color: var(--secondary); background-color: rgba(6, 182, 212, 0.05); }
    .dropzone-core { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
    .dropzone-icon-wrap { width: 60px; height: 60px; border-radius: 14px; background: rgba(99, 102, 241, 0.15); color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 0.5rem; transition: var(--transition); }
    .convert-dropzone:hover .dropzone-icon-wrap { transform: scale(1.08) rotate(5deg); color: var(--secondary); background: rgba(6, 182, 212, 0.15); }
    .dropzone-title { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); }
    .dropzone-caption { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 1rem; }
    .btn-row { display: flex; gap: 0.75rem; justify-content: center; }
    .file-input { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

    .btn { display: inline-flex; justify-content: center; align-items: center; gap: 0.5rem; padding: 0.65rem 1.35rem; font-size: 0.95rem; font-weight: 600; border-radius: 8px; border: none; cursor: pointer; text-decoration: none; transition: var(--transition); white-space: nowrap; }
    .btn-sm { padding: 0.45rem 0.85rem; font-size: 0.85rem; }
    .btn-primary { background: var(--gradient-1); color: #ffffff; }
    .btn-primary:hover { opacity: 0.92; transform: translateY(-1px); }
    .btn-secondary { background: var(--secondary); color: var(--bg-dark); font-weight: 700; }
    .btn-secondary:hover { opacity: 0.9; }
    .btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-primary); }
    .btn-outline:hover { background: var(--bg-card-hover); border-color: var(--text-secondary); }
    .btn-success { background: var(--gradient-2); color: var(--bg-dark); font-weight: 700; }
    .btn-success:hover { opacity: 0.92; }
    .btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

    .queue-section { margin-top: 2rem; border-top: 1px solid var(--border); padding-top: 1.5rem; display: none; scroll-margin-top: 2rem; }
    .queue-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; gap: 0.75rem; }
    .queue-stats { font-size: 0.92rem; color: var(--text-secondary); }
    .queue-actions { display: flex; gap: 0.6rem; }
    .queue-list { display: flex; flex-direction: column; gap: 0.75rem; max-height: 420px; overflow-y: auto; }
    .queue-card { background: var(--bg-dark); border: 1px solid var(--border); border-radius: 8px; padding: 0.85rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; transition: var(--transition); }
    .queue-card:hover { border-color: rgba(99, 102, 241, 0.4); }
    .queue-card-left { display: flex; align-items: center; gap: 0.85rem; min-width: 0; }
    .queue-meta { display: flex; flex-direction: column; min-width: 0; }
    .queue-name { font-weight: 600; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
    .queue-sizes { font-size: 0.8rem; color: var(--text-secondary); }
    .queue-card-right { display: flex; align-items: center; gap: 0.85rem; flex-shrink: 0; }
    .status-tag { font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.55rem; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.05em; }
    .status-processing { background: rgba(245, 158, 11, 0.15); color: var(--accent); }
    .status-success { background: rgba(16, 185, 129, 0.15); color: var(--success); }
    .status-error { background: rgba(239, 68, 68, 0.15); color: var(--error); }
    .text-success { color: var(--success); }

    .reverse-pair-card { background: linear-gradient(90deg, rgba(99, 102, 241, 0.1) 0%, rgba(6, 182, 212, 0.05) 100%); border: 1px solid rgba(99, 102, 241, 0.3); border-radius: var(--radius-sm); padding: 1.25rem 1.5rem; display: flex; justify-content: space-between; align-items: center; margin-bottom: 2.5rem; flex-wrap: wrap; gap: 1rem; }
    .reverse-text h4 { font-size: 1rem; font-weight: 700; color: var(--text-primary); }
    .reverse-text p { font-size: 0.88rem; color: var(--text-secondary); }

    .seo-content { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; margin-bottom: 2rem; }
    .seo-content h2 { font-size: 1.35rem; font-weight: 800; margin: 1.75rem 0 0.5rem 0; color: var(--text-primary); }
    .seo-content h2:first-child { margin-top: 0; }
    .seo-content p { color: var(--text-secondary); margin-bottom: 1.1rem; }

    .table-wrap { overflow-x: auto; margin: 1.25rem 0 1.75rem 0; }
    .data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; text-align: left; }
    .data-table th, .data-table td { padding: 0.85rem 1.1rem; border: 1px solid var(--border); }
    .data-table th { background-color: var(--bg-dark); color: var(--text-primary); font-weight: 700; }
    .data-table tbody tr:nth-child(even) { background-color: rgba(15, 23, 42, 0.4); }

    .faq-container { display: flex; flex-direction: column; gap: 0.85rem; margin-top: 1.25rem; }
    details { background: var(--bg-dark); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; transition: var(--transition); }
    details:hover { border-color: var(--primary); }
    summary { padding: 1rem 1.2rem; font-weight: 600; cursor: pointer; user-select: none; color: var(--text-primary); }
    summary:hover { color: var(--secondary); }
    .faq-body { padding: 1rem 1.2rem; border-top: 1px solid var(--border); color: var(--text-secondary); font-size: 0.94rem; line-height: 1.6; }

    @media (max-width: 700px) {
      .flow-strip { grid-template-columns: 1fr; }
      .flow-swapper { margin: 0 auto; transform: rotate(90deg); }
      .queue-card { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
      .queue-card-right { width: 100%; justify-content: space-between; }
      .queue-name { max-width: 200px; }
    }










    .converter-shell {
      max-width: 960px;
      margin: 0 auto;
    }

    /* Modern Converter Header */
    .converter-header {
      text-align: center;
      margin-bottom: 2.25rem;
    }

    .header-pill {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      font-size: 0.78rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      padding: 0.35rem 1rem;
      border-radius: 9999px;
      background: rgba(99, 102, 241, 0.1);
      border: 1px solid rgba(99, 102, 241, 0.3);
      color: var(--secondary);
      margin-bottom: 0.85rem;
    }

    .converter-header h1 {
      font-size: 2.35rem;
      font-weight: 800;
      letter-spacing: -0.03em;
      margin-bottom: 0.5rem;
    }

    .converter-header p {
      color: var(--text-secondary);
      font-size: 1.05rem;
      max-width: 680px;
      margin: 0 auto;
    }

    /* ==========================================================================
       Distinct Conversion Matrix Stage Layout
       ========================================================================== */
    .matrix-stage {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 2rem;
      margin-bottom: 2.5rem;
      box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
      position: relative;
    }

    /* Flow Director Interactive Deck */
    .flow-strip {
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      align-items: center;
      gap: 1.25rem;
      background: rgba(15, 23, 42, 0.7);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 1.25rem;
      margin-bottom: 1.5rem;
    }

    .flow-node {
      display: flex;
      flex-direction: column;
      gap: 0.4rem;
    }

    .node-label {
      font-size: 0.75rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--text-secondary);
    }

    .select-input-styled {
      background: var(--bg-dark);
      border: 1px solid var(--border);
      border-radius: 8px;
      color: var(--text-primary);
      padding: 0.75rem 1rem;
      font-size: 1rem;
      font-weight: 700;
      outline: none;
      width: 100%;
      cursor: pointer;
      transition: var(--transition);
    }

    .select-input-styled:hover, .select-input-styled:focus {
      border-color: var(--primary);
    }

    .flow-swapper {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: var(--primary);
      color: #ffffff;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
      flex-shrink: 0;
    }

    /* Conversion Dropzone */
    .convert-dropzone {
      border: 2px dashed rgba(99, 102, 241, 0.35);
      background-color: rgba(15, 23, 42, 0.4);
      border-radius: var(--radius-sm);
      padding: 2.75rem 1.5rem;
      text-align: center;
      cursor: pointer;
      position: relative;
      transition: var(--transition);
    }

    .convert-dropzone:hover, .convert-dropzone.dragover {
      border-color: var(--secondary);
      background-color: rgba(6, 182, 212, 0.05);
    }

    .dropzone-core {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.5rem;
    }

    .dropzone-icon-wrap {
      width: 60px;
      height: 60px;
      border-radius: 14px;
      background: rgba(99, 102, 241, 0.15);
      color: var(--primary);
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 0.5rem;
      transition: var(--transition);
    }

    .convert-dropzone:hover .dropzone-icon-wrap {
      transform: scale(1.08) rotate(5deg);
      color: var(--secondary);
      background: rgba(6, 182, 212, 0.15);
    }

    .dropzone-title {
      font-size: 1.15rem;
      font-weight: 700;
      color: var(--text-primary);
    }

    .dropzone-caption {
      font-size: 0.85rem;
      color: var(--text-secondary);
      margin-bottom: 1rem;
    }

    .btn-row {
      display: flex;
      gap: 0.75rem;
      justify-content: center;
    }

    .file-input {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      opacity: 0;
      cursor: pointer;
    }

    .actions-strip {
      display: flex;
      justify-content: flex-end;
      margin-top: 1.25rem;
    }

    /* Buttons */
    .btn {
      display: inline-flex;
      justify-content: center;
      align-items: center;
      gap: 0.5rem;
      padding: 0.65rem 1.35rem;
      font-size: 0.95rem;
      font-weight: 600;
      border-radius: 8px;
      border: none;
      cursor: pointer;
      text-decoration: none;
      transition: var(--transition);
      white-space: nowrap;
    }

    .btn-sm { padding: 0.45rem 0.85rem; font-size: 0.85rem; }
    .btn-primary { background: var(--gradient-1); color: #ffffff; }
    .btn-primary:hover { opacity: 0.92; transform: translateY(-1px); }
    .btn-secondary { background: var(--secondary); color: var(--bg-dark); font-weight: 700; }
    .btn-secondary:hover { opacity: 0.9; }
    .btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-primary); }
    .btn-outline:hover { background: var(--bg-card-hover); border-color: var(--text-secondary); }
    .btn-success { background: var(--gradient-2); color: var(--bg-dark); font-weight: 700; }
    .btn-success:hover { opacity: 0.92; }
    .btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

    /* ==========================================================================
       Batch Queue List Section & Smooth Scrolling
       ========================================================================== */
    .queue-section {
      margin-top: 2rem;
      border-top: 1px solid var(--border);
      padding-top: 1.5rem;
      display: none;
      scroll-margin-top: 2rem;
    }

    .queue-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 1rem;
      flex-wrap: wrap;
      gap: 0.75rem;
    }

    .queue-stats { font-size: 0.92rem; color: var(--text-secondary); }
    .queue-actions { display: flex; gap: 0.6rem; }
    .queue-list { display: flex; flex-direction: column; gap: 0.75rem; max-height: 420px; overflow-y: auto; }

    .queue-card {
      background: var(--bg-dark);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 0.85rem 1rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      transition: var(--transition);
    }

    .queue-card:hover { border-color: rgba(99, 102, 241, 0.4); }
    .queue-card-left { display: flex; align-items: center; gap: 0.85rem; min-width: 0; }
    .queue-meta { display: flex; flex-direction: column; min-width: 0; }
    .queue-name { font-weight: 600; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
    .queue-sizes { font-size: 0.8rem; color: var(--text-secondary); }
    .queue-card-right { display: flex; align-items: center; gap: 0.85rem; flex-shrink: 0; }

    .status-tag {
      font-size: 0.75rem;
      font-weight: 700;
      padding: 0.2rem 0.55rem;
      border-radius: 4px;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }

    .status-processing { background: rgba(245, 158, 11, 0.15); color: var(--accent); }
    .status-success { background: rgba(16, 185, 129, 0.15); color: var(--success); }
    .status-error { background: rgba(239, 68, 68, 0.15); color: var(--error); }
    .text-success { color: var(--success); }

    /* Conversion Directory Spoke Grid */
    .spoke-directory {
      margin-bottom: 3rem;
    }

    .spoke-directory h2 {
      font-size: 1.35rem;
      font-weight: 700;
      color: var(--text-primary);
      margin-bottom: 0.25rem;
    }

    .spoke-directory p {
      color: var(--text-secondary);
      font-size: 0.95rem;
      margin-bottom: 1.25rem;
    }

    .preset-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 1rem;
    }

    .preset-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 1.1rem;
      text-decoration: none;
      display: flex;
      flex-direction: column;
      transition: var(--transition);
    }

    .preset-card:hover {
      transform: translateY(-2px);
      border-color: var(--primary);
      background: var(--bg-card-hover);
    }

    .preset-val {
      font-size: 1.1rem;
      font-weight: 800;
      color: var(--secondary);
    }

    .preset-desc {
      font-size: 0.82rem;
      color: var(--text-secondary);
      margin-top: 0.3rem;
      line-height: 1.4;
    }

    /* SEO Educational Block */
    .seo-content {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 2rem;
      margin-bottom: 2rem;
    }

    .seo-content h2 { font-size: 1.3rem; font-weight: 700; margin: 1.5rem 0 0.5rem 0; color: var(--text-primary); }
    .seo-content h2:first-child { margin-top: 0; }
    .seo-content p { color: var(--text-secondary); margin-bottom: 1rem; }

    /* Comparison Table */
    .table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem 0; }
    .data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; text-align: left; }
    .data-table th, .data-table td { padding: 0.75rem 1rem; border: 1px solid var(--border); }
    .data-table th { background-color: var(--bg-dark); color: var(--text-primary); font-weight: 600; }
    .data-table tbody tr:nth-child(even) { background-color: rgba(15, 23, 42, 0.4); }

    /* Accordion */
    details { background: var(--bg-dark); border: 1px solid var(--border); border-radius: 8px; margin-top: 0.75rem; overflow: hidden; }
    summary { padding: 0.85rem 1rem; font-weight: 600; cursor: pointer; user-select: none; color: var(--text-primary); }
    summary:hover { color: var(--secondary); }
    .faq-body { padding: 0.85rem 1rem; border-top: 1px solid var(--border); color: var(--text-secondary); font-size: 0.92rem; }

    @media (max-width: 700px) {
      .flow-strip { grid-template-columns: 1fr; }
      .flow-swapper { margin: 0 auto; transform: rotate(90deg); }
      .queue-card { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
      .queue-card-right { width: 100%; justify-content: space-between; }
      .queue-name { max-width: 200px; }
    }














/* ==========================================================================
   GLOBAL LAYOUT & STUDIO STYLES ,  AND THIS CODE IS FOR THE ACTUAL ENGINE
   ========================================================================== */

:root {
  --bg-gradient: radial-gradient(circle at 50% -20%, #1e1b4b, #0f172a 60%, #020617);
  --card-bg: rgba(30, 41, 59, 0.7);
  --card-border: rgba(255, 255, 255, 0.12);
  --accent-purple: #818cf8;
  --accent-pink: #c084fc;
  --accent-glow: rgba(129, 140, 248, 0.25);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --radius-xl: 24px;
  --radius-md: 12px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


.main-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
}

.container {
  width: 100%;
  max-width: 955px;
  z-index: 1;
}

/* Background Ambient Orbs */
.ambient-glow {
  position: fixed;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  filter: blur(140px);
  z-index: 0;
  pointer-events: none;
}
.glow-1 { top: 5%; left: 10%; background: rgba(99, 102, 241, 0.15); }
.glow-2 { bottom: 10%; right: 10%; background: rgba(192, 132, 252, 0.12); }

/* Main Card */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
              0 0 40px var(--accent-glow);
  transition: var(--transition-smooth);
}

.card:hover {
  border-color: rgba(129, 140, 248, 0.35);
}

.card-title {
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.6;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1.8rem;
}

.card-title .highlight {
  font-size: 1.55rem;
  font-weight: 800;
  background: linear-gradient(135deg, #a5b4fc 0%, #c084fc 50%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  margin-bottom: 0.3rem;
}

/* Format Conversion Badges */
/* Container Wrapper */

.format-badge-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 1.8rem;
}

.format-badge-first {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 18px;
  border-radius: 18px;
  display: flex;
  align-items: center;
}

.highlight-badge {
  border-color: rgba(192, 132, 252, 0.4);
  background: rgba(192, 132, 252, 0.1);
}

.badge-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-select {
  background: transparent;
  border: none;
  color: #c084fc;
  font-size: 0.95rem;
  font-weight: 800;
  outline: none;
  cursor: pointer;
}

.badge-select option {
  background: #0f172a;
  color: var(--text-primary);
}

.badge-arrow {
  color: var(--accent-purple);
  font-size: 1.2rem;
  font-weight: 800;
}


/* Mode Toggle Bar */
.mode-toggle-bar {
  display: flex;
  background: rgba(15, 23, 42, 0.6);
  padding: 6px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 1.5rem;
  gap: 6px;
}

.toggle-btnn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.toggle-btnn.active {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

/* Upload Zones */
.upload-zone {
  display: block;
  border: 2px dashed rgba(129, 140, 248, 0.3);
  border-radius: 18px;
  padding: 3rem 1.5rem;
  text-align: center;
  background: rgba(15, 23, 42, 0.3);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--accent-purple);
  background: rgba(99, 102, 241, 0.08);
}

.upload-icon {
  font-size: 2.8rem;
  margin-bottom: 0.8rem;
}

#upload-prompt-files, #upload-prompt-folder {
  font-size: 1rem;
  font-weight: 600;
}

.supportParag {
  font-size: 0.8rem;
  color: #34d399;
  margin-top: 0.4rem;
}

.upload-zone input[type="file"] {
  display: none;
}

/* Controls Grid */
.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  background: rgba(15, 23, 42, 0.5);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 1.5rem;
}

.control-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.select-input, .range-input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0f172a;
  color: var(--text-primary);
  outline: none;
}

/* Queue List */
.file-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.file-count {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.file-list {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  background: rgba(15, 23, 42, 0.4);
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.file-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}




/* Center alignment container */


/* Premium Button Styling */
/* Premium Button Styling */
.btn-convert {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  
  /* Dimensions */
  width: 180px; /* Exactly around your 150px request */
  height: 46px;
  
  /* Aesthetics */
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  
  /* Borders & Shadows */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
              
  /* Smooth Transitions */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Styled Custom Icon */
.btn-convert .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Text Label */
.btn-convert .convert-label {
  line-height: 1;
}

/* Hover States & Micro-interactions */
.btn-convert:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Spin animation on the icon when hovering the button */
.btn-convert:hover .icon {
  transform: rotate(180deg);
}

/* Click Active State */
.btn-convert:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.4);
}

/* Accessibility Focus State */
.btn-convert:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}


.status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  color: rgb(0, 255, 0);
}

.status-badge.done {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

/* Progress Bar */
.progress-wrapper {
  margin-bottom: 1.5rem;
  background: rgba(15, 23, 42, 0.5);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #6366f1 0%, #c084fc 100%);
  transition: width 0.2s ease;
}

/* Actions Footer */
.action-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.btn-secondary, .btn-primary {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.spinner {
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 2px solid white;
  width: 16px;
  height: 16px;
  animation: spin 0.8s linear infinite;
  display: none;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 680px) {
  .controls-grid { grid-template-columns: 1fr; }
  .action-footer { flex-direction: column-reverse; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
  
  .format-badge {
  background: rgba(15, 23, 42, 0.7);
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  padding: 3px 7px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 0px;
}
.format-badge-wrapper{
  gap: 6px;
}
}

@media (max-width: 415px) {
  
  .format-badge {
  background: rgba(15, 23, 42, 0.7);
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  padding: 2px 5px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 0px;
}
.format-badge-wrapper{
  gap: 3px;
}
/* Container Wrapper */

.format-badge-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin-bottom: 1.0rem;
}

.format-badge-first {
  
  padding: 8px 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
}



.badge-label {
  font-size: 0.75rem;
  font-weight: 300;
}

.badge-select {
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-arrow {
  font-size: 1.0rem;
  font-weight: 900;
}
}




/* this is the main code of query list */
/*************************************************************************/
/* Container */
/* 1. The Container: Allow dynamic growth or a scrollable list */
#fileList {
  display: flex;
  flex-direction: column;
  gap: 12px;                  /* Generous space between cards */
  width: 100%;
  max-height: 420px;          /* Set max-height instead of fixed height */
  overflow-y: auto;           /* Adds clean scrollbar when > 3-4 files */
  padding: 6px 4px;           /* Padding so shadows don't clip */
  box-sizing: border-box;
}

#fileList {
  scroll-margin-top: 30px; /* Adjust height according to your header/navbar */
}

/* Optional: Clean, modern scrollbar */
#fileList::-webkit-scrollbar {
  width: 6px;
}
#fileList::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}
#fileList::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

/* 2. The Individual Row: Prevent squishing */
.file-item-row {
  flex-shrink: 0;             /* ⭐ CRITICAL: Prevents rows from crushing together */
  min-height: 54px;           /* Guarantees full card height */
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
}


/* Upper Section (Main Row) */
.upper-sides {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  gap: 12px;
}

/* File Meta (Left) */
.file-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.file-icon-box {
  width: 36px;
  height: 36px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  flex-shrink: 0;
}

.file-svg-icon {
  width: 18px;
  height: 18px;
}

.file-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.file-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-subtext {
  font-size: 0.74rem;
  color: #94a3b8;
  white-space: nowrap;
}

/* Controls (Right) */
.file-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Status / Convert Indicator */
.status-text {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0 6px;
  border-radius: 6px;
  white-space: nowrap;
}

.status-text.is-done {
  color: #10b981;
  font-weight: 700;
}

/* Badges & Selects */



/* 1. Ensure the parent badge wrapper is positioned and sized properly */
.custom-select-wrapper,
.file-item-row .file-right {
  position: relative !important;
}

/* 2. Fix the select hitbox so it does not escape or expand across the screen */
.target-select {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  cursor: pointer !important;
  z-index: 2 !important;
  max-width: 120px !important; /* Constrain max width */
}

/* 3. Also prevent the main badge selects from expanding */
.badge-select {
  position: static !important;
  width: auto !important;
  max-width: 140px !important;
}

.custom-select-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #1e293b;
  font-size: 0.78rem;
  font-weight: 600;
  pointer-events: none;
  white-space: nowrap;
}

.chevron-icon {
  width: 12px;
  height: 12px;
}



/* Options / Action Buttons */
.btn-options {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.btn-options:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
  transform: translateY(-0.5px);
}

.btn-options svg {
  width: 14px;
  height: 14px;
  color: #64748b;
  transition: transform 0.2s ease, color 0.15s ease;
}

.btn-options:hover svg {
  color: #3b82f6;
  transform: rotate(25deg);
}
.btn-options svg {
  width: 14px;
  height: 14px;
}

.btn-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-remove:hover {
  color: #ef4444;
  background: #fee2e2;
}

.btn-remove svg {
  width: 14px;
  height: 14px;
}

/* Bottom Download Drawer */
.bottom-side {
  display: none; /* Hidden by default until completed */
  padding: 8px 14px 12px;
  border-top: 1px dashed #e2e8f0;
  background: #fafafa;
}

.file-item-row.is-completed .bottom-side {
  display: flex;
  justify-content: space-between; /* 👈 This pushes items to opposite sides */
  align-items: center;            /* 👈 Optional: keeps them lined up vertically */
}
.bottom-left-info {
  display: flex;
  flex-direction: column; /* 👈 This stacks the text up and down */
  gap: 2px;               /* 👈 Space between name and size */
}

.bottom-file-name {
  color: #000000;         /* 👈 Black color for file name */
  font-size: 0.85rem;
  font-weight: 500;
}

.bottom-file-size {
  color: #10b981;         /* 👈 Green color for file size */
  font-size: 0.75rem;
  font-weight: 600;
}

.eachSingleBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  background: #10b981;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.eachSingleBtn:hover {
  background: #059669;
}

/* Responsive adjustment for Mobile */
@media (max-width: 640px) {
  .upper-sides {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .file-left {
    width: 100%;
    padding-bottom: 6px;
    border-bottom: 1px solid #f1f5f9;
  }
  .file-right {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }
  .btn-remove {
    margin-left: auto;
  }
}

/* Toggle Switch */

/* TOGGLE FOR PDF CSSSSSSS CODE LISTEN */
.toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
}

.toggle-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
}

.toggle-label.active {
  color: #0f172a;
  font-weight: 600;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #2563eb;
  border-radius: 34px;
  transition: 0.3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

input:checked + .slider {
  background-color: #0d9488;
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* this is the code for the name of the pdf giving to it */

/* Container Wrapper */
.custom-name-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  margin: 14px 0;
  text-align: left;
}

/* Label Styling */
.custom-name-wrapper label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.01em;
}

/* Modern Pill/Card Input Field */
.custom-name-wrapper input[type="text"] {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.9rem;
  color: #1e293b;
  background-color: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  outline: none;
  transition: all 0.2s ease-in-out;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* Hover & Focus States */
.custom-name-wrapper input[type="text"]:hover {
  border-color: #cbd5e1;
  background-color: #ffffff;
}

.custom-name-wrapper input[type="text"]:focus {
  border-color: #3b82f6;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Placeholder Styling */
.custom-name-wrapper input[type="text"]::placeholder {
  color: #94a3b8;
  font-size: 0.875rem;
}
.input-with-suffix {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}

.input-with-suffix input[type="text"] {
  padding-right: 56px; /* Prevent text from typing under the badge */
}

.suffix-badge {
  position: absolute;
  right: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  background: #e2e8f0;
  padding: 3px 8px;
  border-radius: 5px;
  pointer-events: none;
}
