
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

    :root{
      --bg:#0f172a;
      --card:#111c34;
      --card2:#172554;
      --primary:#3b82f6;
      --primary2:#60a5fa;
      --text:#f8fafc;
      --muted:#94a3b8;
      --border:rgba(255,255,255,.08);
      --shadow:0 10px 40px rgba(0,0,0,.35);
    }

    body{
      font-family:'Inter',sans-serif;
      background:linear-gradient(to bottom,#020617,#0f172a);
      color:var(--text);
      overflow-x:hidden;
    }

    a{
      text-decoration:none;
      color:inherit;
    }

    .container{
      width:90%;
      max-width:1300px;
      margin:auto;
    }

    /* NAVBAR */

    nav{
        position:sticky;
        top:0;
        z-index:1000;
        backdrop-filter:blur(12px);
        background:rgba(2,6,23,.75);
        overflow: visible; /* important */
        width: 100%;
        min-height: 70px;
    }

    .nav-wrapper{
        position:relative;
        display: flex;
        align-items: center;
        justify-content: flex-start; /* keep everything left-aligned */
        min-height: 80px;
    }

    .logo{
      font-size:1.8rem;
      font-weight:800;
      background:linear-gradient(to right,#60a5fa,#3b82f6);
      -webkit-background-clip:text;
      -webkit-text-fill-color:transparent;
    }

    .nav-links{
        display: flex;
        gap: 30px;
        align-items: center;
        flex:1;  
    }

    .nav-links a,
    .dropbtn {
      color: var(--muted);
      transition: .3s;
      font-weight: 500;
    }

    .nav-links a:hover{
      color:#fff;
    }

    .nav-btn{
      background:linear-gradient(to right,#2563eb,#3b82f6);
      padding:12px 22px;
      border-radius:12px;
      font-weight:600;
      transition:.3s;
      box-shadow:0 10px 25px rgba(37,99,235,.4);
    }

    .nav-btn:hover{
      transform:translateY(-3px);
    }

    .logo a {
        display: flex;
        align-items: center;
    }

    .logo img {
        height: 100px;   /* Adjust this value */
        width: auto;
        display: block;
    }

    /* HERO */

    .hero{
      padding:100px 0 80px;
        margin-bottom: 50px
    }

    .hero .container {
      display: grid;
      grid-template-columns: 1.2fr 1fr;
      gap: 60px;
      align-items: center;
  }

/* left side */
.hero .container > div:first-child {
    flex: 1;
}

/* right card */

    .hero-grid{
      display:grid;
      align-items: center;
    }

    .hero h1{
      font-size:4rem;
      line-height:1.1;
      margin-bottom:25px;
      font-weight:800;
    }

    .hero-grid > div:first-child {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .gradient-text{
      background:linear-gradient(to right,#60a5fa,#3b82f6);
      -webkit-background-clip:text;
      -webkit-text-fill-color:transparent;
    }

    .hero p{
      color:var(--muted);
      max-width:700px;
      margin:auto;
      line-height:1.7;
    }

    .hero-buttons{
      display:flex;
      gap:20px;
      flex-wrap:wrap;
    }

    .primary-btn{
      background:linear-gradient(to right,#2563eb,#3b82f6);
      padding:16px 28px;
      border-radius:14px;
      font-weight:700;
      transition:.3s;
      box-shadow:0 10px 25px rgba(37,99,235,.4);
    }

    .primary-btn:hover{
      transform:translateY(-5px);
    }

    .secondary-btn{
      border:1px solid var(--border);
      padding:16px 28px;
      border-radius:14px;
      color:#fff;
      transition:.3s;
      background:rgba(255,255,255,.03);
    }

    .secondary-btn:hover{
      background:rgba(255,255,255,.06);
    }

    /* SEARCH */

    .search-box {
    display: flex;
    align-items: center;
    gap: 10px;

    width: 100%;
    max-width: 650px;

    margin: 0 auto;
}

    .search-box input{
      flex:1;
      padding:20px;
      background:transparent;
      border:none;
      outline:none;
      color:#fff;
      font-size:1rem;
    }

    .search-box button{
      padding:20px 28px;
      border:none;
      background:linear-gradient(to right,#2563eb,#3b82f6);
      color:#fff;
      cursor:pointer;
      font-weight:700;
    }

    /* HERO CARD */

    .hero-card{
      background:rgba(255,255,255,.05);
      border:1px solid var(--border);
      border-radius:30px;
      padding:35px;
      backdrop-filter:blur(20px);
      box-shadow:var(--shadow);
      align-self: start;
    }

    .converter-box{
      background:#0b1220;
      padding:25px;
      border-radius:20px;
      margin-top:20px;
    }

    .converter-box input,
    .converter-box select{
      width:100%;
      padding:15px;
      margin-bottom:15px;
      border-radius:12px;
      border:none;
      background:#111827;
      color:#fff;
      outline:none;
    }

    .converter-box button{
      width:100%;
      padding:15px;
      border:none;
      border-radius:12px;
      background:linear-gradient(to right,#2563eb,#3b82f6);
      color:#fff;
      font-weight:700;
      cursor:pointer;
    }

    /* STATS */

    .stats{
      padding:30px 0 80px;
    }

    .stats-grid{
      display:grid;
      grid-template-columns:repeat(4,1fr);
      gap:20px;
    }

    .stat-card{
      background:rgba(255,255,255,.04);
      border:1px solid var(--border);
      padding:30px;
      border-radius:20px;
      text-align:center;
      backdrop-filter:blur(10px);
    }

    .stat-card h2{
      font-size:2rem;
      margin-bottom:10px;
    }

    .stat-card p{
      color:var(--muted);
    }

    /* TOOLS */

    .tools{
      padding:80px 0;
    }

    .section-title{
      text-align:center;
      margin-bottom:60px;
    }

    .section-title h2{
      font-size:3rem;
      margin-bottom:20px;
    }

    .section-title p{
      color:var(--muted);
      max-width:700px;
      margin:auto;
      line-height:1.7;
    }

    .popular-searches {
        padding: 60px 0;
        background: #0f172a; /* or your dark theme */
    }

    .tag-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .tag {
        padding: 10px 16px;
        border-radius: 999px;
        background: rgba(255,255,255,0.06);
        color: #e2e8f0;
        font-size: 14px;
        border: 1px solid rgba(255,255,255,0.08);
        transition: 0.2s;
        cursor: pointer;
    }

    .tag:hover {
        background: rgba(99,102,241,0.2);
        border-color: rgba(99,102,241,0.5);
        transform: translateY(-2px);
    }

    .tools-grid{
      display:grid;
      grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
      gap:30px;
    }

    .tool-card{
        background:rgba(255,255,255,.04);
        border:1px solid var(--border);
        border-radius:24px;
        padding:25px;

        transition:.35s;
        position:relative;
        overflow:hidden;
        backdrop-filter:blur(14px);

        display:flex;
        gap:18px;

        align-items:center; /* 👈 FIX */
    }

    .tool-content{
        display:flex;
        flex-direction:column;
        justify-content:center; /* 👈 IMPORTANT */
        height:100%;
    }

    .tool-card::before{
      content:'';
      position:absolute;
      inset:0;
      background:linear-gradient(
        135deg,
        rgba(59,130,246,.15),
        transparent
      );
      opacity:0;
      transition:.4s;
      pointer-events: none;
    }

    .tool-card:hover::before{
      opacity:1;
    }

    .tool-card:hover{
      transform:translateY(-10px);
      border-color:rgba(59,130,246,.4);
      box-shadow:0 20px 40px rgba(0,0,0,.35);
    }

    .tool-icon{
    width:60px;
    height:60px;
    border-radius:18px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:1.8rem;
    background:linear-gradient(to bottom right,#2563eb,#60a5fa);
    box-shadow:0 10px 25px rgba(37,99,235,.35);

    flex-shrink:0;
    }

    .tool-card h3{
    font-size:1.2rem;
    margin:0;
    }

    .tool-card p{
    color:var(--muted);
    line-height:1.5;
    margin:0;
    }

    .tool-link{
      display:inline-flex;
      align-items:center;
      gap:10px;
      color:#60a5fa;
      font-weight:600;
      position: relative;
      z-index: 10;
    }

    /* FEATURES */

    .features{
      padding:100px 0;
    }

    .feature-grid{
      display:grid;
      grid-template-columns:repeat(3,1fr);
      gap:30px;
    }

    .feature-card{
      background:rgba(255,255,255,.04);
      border:1px solid var(--border);
      padding:35px;
      border-radius:24px;
      text-align:center;
    }

    .feature-card h3{
      margin:20px 0;
    }

    .feature-card p{
      color:var(--muted);
      line-height:1.7;
    }

    /* CTA */

    .cta{
      padding:100px 0;
    }

    .cta-box{
      background:linear-gradient(
        135deg,
        #1d4ed8,
        #2563eb,
        #3b82f6
      );
      padding:80px 50px;
      border-radius:35px;
      text-align:center;
      box-shadow:0 30px 60px rgba(37,99,235,.35);
    }

    .cta-box h2{
      font-size:3rem;
      margin-bottom:20px;
    }

    .cta-box p{
      max-width:700px;
      margin:auto;
      line-height:1.8;
      margin-bottom:35px;
      color:rgba(255,255,255,.9);
    }

    /* ===========================
    FOOTER
    =========================== */

.footer{
    margin-top:80px;
    padding:40px 0 30px;
    border-top:1px solid var(--border);
    background:rgba(255,255,255,.02);
}

.footer-top{
    display:grid;
    grid-template-columns:2.5fr 1fr 1fr 1fr;
    margin-bottom:30px;
}

.footer-brand img{
    height: 100px;   /* Adjust this value */
    width: auto;
}

.footer-brand p{
    max-width:340px;
    color:var(--muted);
    line-height:1.8;
}

.footer-links h4{
    font-size:16px;
    margin-bottom:18px;
    color:#fff;
}

.footer-links a{
    display:block;
    color:var(--muted);
    text-decoration:none;
    transition:.25s;
}

.footer-links a:hover{
    color:var(--primary);
    transform:translateX(4px);
}

.footer-bottom{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;

    padding-top:25px;
    border-top:1px solid var(--border);

    color:var(--muted);
    font-size:.9rem;
}

/* Responsive */

@media (max-width:900px){

    .footer-top{
        grid-template-columns:1fr 1fr;
    }

}

@media (max-width:640px){

    .footer-top{
        grid-template-columns:1fr;
        gap:35px;
    }

    .footer-bottom{
        flex-direction:column;
        text-align:center;
    }

}

    .bar {
        width: 100%;          /* key fix */
        max-width: 600px;     /* keeps your design limit */
        margin: 20px auto 40px;
        background: rgba(255,255,255,.1);
        border-radius: 10px;
        overflow: hidden;

        opacity: 0;
        transform: translateY(-5px);
        transition: 0.3s ease;
        pointer-events: none;
    }

    .bar.show {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    /* MOBILE */

    @media(max-width:1000px){

      .hero-grid{
        grid-template-columns:1fr;
      }

      .stats-grid{
        grid-template-columns:repeat(2,1fr);
      }

      .feature-grid{
        grid-template-columns:1fr;
      }

      .footer-grid{
        grid-template-columns:1fr 1fr;
      }

      .hero h1{
        font-size:3rem;
      }
    }

    @media(max-width:700px){

      .stats-grid{
        grid-template-columns:1fr;
      }

      .footer-grid{
        grid-template-columns:1fr;
      }

      .hero{
        padding-top:60px;
      }

      .hero h1{
        font-size:2.3rem;
      }

      .section-title h2{
        font-size:2rem;
      }

      .cta-box h2{
        font-size:2rem;
      }

      .search-box{
        flex-direction:column;
      }
    }


        .drop-zone {
            width: 100%;
            margin: 40px 0;
            padding: clamp(20px, 5vw, 50px);

            border: 2px dashed rgba(255,255,255,.2);
            border-radius: 20px;
            background: rgba(255,255,255,.03);

            cursor: pointer;
            text-align: center;

            transition: all .3s ease;
            box-sizing: border-box;
        }

        .drop-zone.dragover {
            border-color: #3b82f6;
            background: rgba(34, 197, 94, 0.1);
            transform: scale(1.01);
        }

        .drop-zone:hover {
            border-color: #3b82f6;
            background: #0f172a;
        }

        input[type="file"] {
            display: none;
        }

        #progressContainer {
            display: none;
            width: 100%;
            background: #e5e7eb;
            height: 20px;
            border-radius: 6px;
            overflow: hidden;
            margin-top: 15px;
        }

        #progressBar {
            width: 0%;
            height: 100%;
            background: linear-gradient(to right,#2563eb,#3b82f6);
            transition: width 0.25s ease;
        }


        button {
            padding: 14px 24px;
            border: none;
            border-radius: 12px;
            background: linear-gradient(to right,#2563eb,#3b82f6);
            color: white;
            font-weight: 600;
            cursor: pointer;
        }

        #fileText {
            margin-top: 12px;
            color: #94a3b8;
        }

        #status {
            text-align: center;
            margin-top: 20px;
            color: #94a3b8;
        }

        #zipBtn {
            display: inline-block;
            margin-top: 20px;
            padding: 12px 18px;
            background: #22c55e;
            color: white;
            border-radius: 10px;
            text-decoration: none;
        }

        #downloadBtn {
            display: inline-block;
            padding: 12px 18px;
            background: #22c55e;
            color: white;
            border-radius: 10px;
            text-decoration: none;
        }

        .quality-wrapper {
        margin-top: 25px;
        text-align: left;
    }

    .quality-wrapper label {
        display: block;
        margin-bottom: 10px;
        color: #94a3b8;
    }

    .quality-wrapper select {
        width: 100%;
        padding: 14px;
        border-radius: 12px;
        border: none;
        background: #111827;
        color: white;
        outline: none;
    }

    .preview {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 15px;
        margin-top: 20px;
        margin-bottom: 40px;
        width: 100%;
    }

    .img-box {
        width: 100%;
        max-width: 180px;
        margin: auto;

        background: rgba(255,255,255,.04);
        border: 1px solid rgba(255,255,255,.08);
        border-radius: 16px;
        padding: 12px;

        backdrop-filter: blur(12px);
    }

    .img-box img {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        border-radius: 10px;
    }

    .controls {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        margin-top: 12px;
    }

    .controls button {
        flex: 1;
        border: none;
        padding: 10px;
        border-radius: 10px;
        cursor: pointer;
        font-weight: 600;
        color: white;
        background: linear-gradient(to right,#2563eb,#3b82f6);
    }

 /* ========================================
    align-items: center;
    gap: 16px;
}
  */


    .search-wrapper {
        position: relative;
        width: 100%;
        max-width: 600px;
        z-index: 50;
        margin-top: 40px;
    margin-bottom: 40px;
    }

/* IMPORTANT: fully floating layer */
.search-results {
    position: absolute;

    top: 100%;
    left: 0;

    width: 100%;

    margin-top: 12px;

    background: rgba(15, 23, 42, 0.98);

    border: 1px solid rgba(255,255,255,.08);

    border-radius: 20px;

    backdrop-filter: blur(20px);

    box-shadow: 0 25px 60px rgba(0,0,0,.45);

    z-index: 9999;

    /* 🔥 KEY FIX */
    pointer-events: auto;

    /* prevent layout influence */
    height: auto;
}

/* ICON BOX */
.search-tool-icon {
    width: 52px;
    height: 52px;

    border-radius: 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: linear-gradient(
        to bottom right,
        #2563eb,
        #60a5fa
    );

    font-size: 22px;

    box-shadow:
        0 10px 25px rgba(37,99,235,.35);
}

/* TEXT */
.search-item h4 {
    color: white;
    font-size: 16px;
    margin-bottom: 4px;
}

.search-item p {
    color: rgba(255,255,255,.55);
    font-size: 14px;
}

/* RIGHT ARROW */
.search-arrow {
    color: rgba(255,255,255,.35);
    font-size: 22px;

    transition: .25s;
}

.search-item:hover .search-arrow {
    transform: translateX(5px);
    color: white;
}

/* EMPTY STATE */
.search-empty {
    padding: 30px;
    text-align: center;
    color: rgba(255,255,255,.6);
}

/* MOBILE */
@media(max-width:700px) {

    .search-box {
        flex-direction: row;
        padding: 12px;
    }

    .search-box button {
        padding: 12px 18px;
    }

    .search-item {
        padding: 18px;
    }

}

/* =========================
   DROPDOWN NAVBAR
========================= */

.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn,
.nav-links > a {

    display: flex;
    align-items: center;

    height: 44px;

    font-size: 16px;
    font-weight: 500;

    color: var(--muted);

    background: transparent;
    border: none;

    cursor: pointer;

    padding: 0;
}

.dropbtn:hover {
  color: #fff;
}

/* dropdown box */
.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;

  background: rgba(15, 23, 42, 0.98);
  border: 1px solid var(--border);

  min-width: 200px;

  border-radius: 14px;
  padding: 10px 0;

  box-shadow: 0 20px 50px rgba(0,0,0,0.4);

  z-index: 9999;
    max-height: 80vh;   /* prevents it from exceeding screen */
    overflow-y: auto;   /* enables vertical scrolling */
    overflow-x: hidden;

    -webkit-overflow-scrolling: touch; /* smooth iPad scrolling */
}

.dropdown-content a:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}

/* show when active */
.dropdown.active .dropdown-content {
    display: block;
}


/* dropdown container */
.dropdown-content {
  display: none;
  position: absolute;
  top:calc(100% + 18px);
  left: 0;

  background: rgba(15, 23, 42, 0.98);
  border: 1px solid var(--border);

  padding: 15px;

  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0,0,0,.45);

  z-index: 9999;
}

/* IMPORTANT: multi-column layout */
.dropdown-grid {
  display: flex;
  gap: 30px;
}

/* each column */
.dropdown-col {
  display: flex;
  flex-direction: column;
  min-width: 180px;
}

/* each item */
.dropdown-col a {
  padding: 10px 14px;
  color: var(--muted);
  border-radius: 10px;
  transition: 0.2s;
  white-space: nowrap;
}

.dropdown-col a:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}

/* Last 3 dropdowns open from the right */
.nav-links > .dropdown:nth-last-child(-n+2) .dropdown-content{
    left:auto;
    right:0;
}


/* =========================================
   RESPONSIVE NAVBAR
========================================= */

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

/* =========================================
   IMPROVED RESPONSIVE DESIGN
========================================= */

@media (max-width: 1100px) {

    .hero h1 {
        font-size: 3rem;
    }

    .hero p {
        font-size: 16px;
    }

    .dropdown-grid {
        flex-direction: column;
        gap: 10px;
    }

}

@media (max-width:900px){

    nav{
        overflow:visible;
    }

    .nav-wrapper{

        display:flex;

        justify-content:space-between;

        align-items:center;

        min-height:70px;

    }

    .logo{

        display:flex;

        align-items:center;

    }

    .logo img{

        height:100px;

    }

    .menu-toggle{

        display:block;

        font-size:30px;

        color:#fff;

        background:none;

        border:none;

    }

    .nav-links{

        position:absolute;

        top:100%;
        left:0;
        right:0;

        display:none;
        flex-direction:column;

        background:#0f172a;

        height:calc(100dvh - 70px);
        max-height:calc(100dvh - 70px);
        overflow-y:auto;
        -webkit-overflow-scrolling:touch;

        padding:24px;
        padding-bottom:40px;

    }

    .nav-links::after{
        content:"";
        display:block;
        flex-shrink:0;
    }

    .nav-links.active{

        display:flex;

    }

    .dropdown{

        width:100%;

    }

    .dropbtn{

        width:100%;

        justify-content:space-between;

    }

    .dropdown-content{

        position:static;

        width:100%;

        margin-top:10px;

        box-shadow:none;

        border:none;

        background:rgba(255,255,255,.03);

    }

    .dropdown-grid{

        flex-direction:column;

        gap:10px;

    }

    .dropdown-col{

        min-width:100%;

    }

    .nav-search{
        width:100%;
        margin-top:24px;
        padding-top:10px;
        flex-shrink:0;
    }

    .nav-search input{
        display:block;
        width:100%;
        box-sizing:border-box;
    }

}

@media (max-width: 900px) {
    /* HERO */

    .hero {
        padding: 70px 0 40px;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.6rem;
    }

    .hero p {
        font-size: 15px;
        padding: 0 10px;
    }

    /* SEARCH */

    .search-wrapper {
        width: 100%;
    }

    .search-box {
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }

    /* TOOLS */

    .tools-grid {
        grid-template-columns: 1fr 1fr;
    }

    .tool-card {
        padding: 25px;
    }

    /* FEATURES */

    .feature-grid {
        grid-template-columns: 1fr;
    }

    /* FOOTER */

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

}

@media (max-width: 600px) {

    .container {
        width: 92%;
    }

    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 14px;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .search-box {
        flex-direction: column;
        gap: 12px;
    }

    .search-box button {
        width: 100%;
        border-radius: 14px;
    }

    .search-box input {
        width: 100%;
        border-radius: 14px;
    }

    .tool-card{
        padding:18px;
        gap:12px;
        align-items:center; /* keep horizontal */
    }

    .tool-icon{
        width:50px;
        height:50px;
        font-size:1.4rem;
    }

    .tool-card h3{
        font-size:1rem;
        line-height:1.2;
    }

    .tools-grid{
        grid-template-columns: 1fr; /* single column on mobile */
    }

    .feature-card {
        padding: 25px;
    }

    .cta-box {
        padding: 50px 25px;
    }

    .cta-box h2 {
        font-size: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .search-results {
        border-radius: 16px;
    }

}

/* =========================================
   FIX OVERFLOW ISSUES
========================================= */

img,
video,
iframe {
    max-width: 100%;
}

body {
    overflow-x: hidden;
}

/* =========================================
   BETTER MOBILE TOUCH TARGETS
========================================= */

button,
a {
    min-height: 44px;
}

/* =========================================
   SMOOTHER ANIMATIONS
========================================= */

.tool-card,
.feature-card,
.primary-btn,
.nav-btn {
    transition: all .3s ease;
}

@media (max-width: 1024px) {

    .hero .container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .hero-card {
        width: 100%;
        max-width: 800px;
        flex: unset;
    }

}

nav .container {
    width: 100%;
    max-width: 100%;
    padding: 0 40px; /* keeps spacing but removes shrink effect */
    height: 100%;
}


textarea, select, input {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    border-radius: 6px;
    border: none;
}

/* container alignment */
.color-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

/* FIX: smaller, clean color picker */
.color-wrapper input[type="color"] {
    width: 45px;
    height: 45px;

    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

/* FIX: remove ugly default browser styling */
.color-wrapper input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-wrapper input[type="color"]::-webkit-color-swatch {
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.2);
}

/* preview box aligned perfectly */
.color-preview {
    width: 45px;
    height: 45px;

    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.2);

    background: #000;
    box-shadow: 0 8px 20px rgba(0,0,0,.3);
}




.qr-settings {
    margin-top: 40px;
    margin-bottom: 60px;
}

.settings-card {
    background: rgba(255,255,255,.05);
    border: 1px solid var(--border);
    border-radius: 25px;
    padding: 30px;
    backdrop-filter: blur(20px);
    max-width: 900px;
    margin: auto;
}

.settings-card h3 {
    margin-bottom: 20px;
    color: white;
}

.control-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
    margin-bottom: 18px;
}

.control-row label {
    color: var(--muted);
    min-width: 180px;
}

.control-row input[type="color"] {
    width: 50px;
    height: 40px;
    border-radius: 8px;
}

.control-row input[type="range"] {
    flex: 1;
}

.control-row select {
    flex: 1;
}


.control-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
}

.control-row label {
    color: var(--muted);
    min-width: 140px;
}

.control-row input[type="color"] {
    width: 45px;
    height: 35px;
}

.control-row select,
.control-row input[type="range"] {
    flex: 1;
}

.hero-single {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 0 40px;
}

/* override your old grid */
.hero-single-inner {
    display: flex !important;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* actual content centering */
.hero-text {
    text-align: center;
    max-width: 750px;
}

/* override old hero grid behavior */
.hero-grid {
    display: unset !important;
}

.download-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 25px;
}

.qr-card {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 30px; /* 🔥 KEY FIX */
    margin: 0;

    background: #fff;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;

    border-radius: 24px;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    transform: translateZ(0);
}

.qr-frame-header {
    display: flex;
    gap: 8px;
    align-items: center;
    font-weight: 600;
    color: white;
}

.qr-frame-text {
    font-size: 14px;
    opacity: 0.9;
}

.frame-coffee { border: 2px solid #a16207; }
.frame-bag { border: 2px dashed #3b82f6; }
.frame-scooter { border: 2px solid #22c55e; }
.frame-food { border: 2px solid #ef4444; }
.frame-social { border: 2px solid #8b5cf6; }

.qr-card.top {
    flex-direction: column-reverse;
}

/* ================= TABS ================= */

.tabs {
    margin-top: 20px;
}

.tab-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: rgba(255,255,255,.05);
    color: var(--muted);
    cursor: pointer;
    transition: .3s;
    font-weight: 600;
}

.tab-btn.active {
    background: linear-gradient(to right,#2563eb,#3b82f6);
    color: white;
}

.tab-content {
    display: none;
    animation: fade .2s ease-in;
}

.tab-content.active {
    display: block;
}

@keyframes fade {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

#qrPreview {
    display: flex;
    justify-content: center;
    align-items: center;

    padding: 20px 0 10px; /* smaller + controlled spacing */
    margin-bottom: 10px;
    overflow: visible !important;
}

/* =========================
   QR WORKSPACE RESPONSIVE FIX
========================= */

@media (max-width: 1024px) {


    .hero-card {
        width: 100%;
    }

    .output-panel {
        order: 2; /* QR preview goes below settings */
    }
}

@media (max-width: 600px) {


    .hero-card {
        padding: 20px;
        border-radius: 20px;
    }

    .tab-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .tab-btn {
        width: 100%;
    }

    .control-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .control-row label {
        min-width: unset;
        margin-bottom: 6px;
    }

    textarea,
    select,
    input {
        font-size: 14px;
    }

    #qrPreview {
        padding: 10px 0;
    }

    .preview {
        gap: 12px;
    }
}

@media (max-width: 900px) {

    .control-row {
        gap: 10px;
    }

    .hero-card {
        padding: 25px;
    }


}

.converter-box label {
    display: block;
    margin: 10px 0 6px;
    color: var(--muted);
    font-weight: 500;
}

.converter-box input,
.converter-box select {
    width: 100%;
    padding: 14px;
    margin-bottom: 10px;
    border-radius: 12px;
    border: none;
    background: #111827;
    color: #fff;
    outline: none;
}

.button-group {
    display: flex;
    margin-top: 10px !important;
    flex-wrap: wrap;
    gap: 12px;
    overflow: visible; /* important */
    overflow-x: hidden;
}

.button-group button {
    flex: 1;
    min-width: 100px;
}

.button-group button.active {
    background: #00c3ff;
    color: #fff;
    box-shadow: 0 0 10px rgba(0,195,255,0.4);
    transition: 0.2s;
}


.formula-box {
    margin-top: 20px;
    padding: 15px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    text-align: left;
    line-height: 1.7;
    font-size: 14px;
    white-space: pre-line;
}

.pdf-page{
    position:relative;
    margin-bottom:20px;
    text-align:center;
}

.rotate-controls{
    display:flex;
    justify-content:center;
    gap:10px;
    margin-bottom:10px;
}

.rotate-controls button{
    border:none;
    cursor:pointer;
    padding:8px 12px;
    border-radius:8px;
    font-size:18px;
}

.drop-zone.active {
    border-color: #4f46e5;
    background: rgba(79, 70, 229, 0.08);
    transform: scale(1.01);
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.2);
}

.drop-zone.active p {
    color: #4f46e5;
    font-weight: 600;
}

.workspace-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}


@media (max-width: 1024px) {

    .qr-workspace .hero-card {
        max-width: 800px;
    }

}

@media (max-width: 768px) {

    .qr-workspace {
        padding: 0 15px;
    }

    .qr-workspace .hero-card {
        width: 100%;
        max-width: 100%;
        padding: 25px;
        border-radius: 20px;
    }

    .drop-zone {
        margin: 20px 0;
        padding: 25px 15px;

    }

    .button-group {
        flex-direction: column;
        gap: 10px;
    }

    .button-group button:first-child {
        margin-right: 0;
    }

    .button-group button {
        width: 100%;
    }

    #downloadBtn {
        width: 100%;
        text-align: center;
    }

    .workspace-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    #preview.preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-card {
        padding: 20px;
    }

}

/* Preview container */
#preview.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    width: 100%;
}

/* Individual page card */
.preview-item {
    width: 100%;

    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);

    border-radius: 16px;
    padding: 12px;

    overflow: hidden;
}

/* Responsive canvas */
.preview-item canvas,
.preview-item img {
    display: block;
    width: 100%;
    height: auto;

    border-radius: 10px;
}

/* Page label */
.page-label {
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--muted);
    text-align: center;
}

.output-panel h2 {
    margin-bottom: 20px;
}


@media (max-width: 600px) {
    .preview {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .img-box {
        max-width: 100%;
    }
}

@media (max-width: 480px) {

    #preview.preview-grid {
        grid-template-columns: 1fr;
    }

    .preview-item {
        padding: 10px;
    }
    
}

 /* for the image crop tool */
.crop-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: auto;
    border: 2px dashed #ccc;
    overflow: hidden;
}

canvas {
    width: 100%;
    max-width: 500px;
    height: auto;
    background: #111;
    display: block;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.crop-container canvas {
    touch-action: none;
}

#selector {
    position: absolute;
    border: 2px solid #00c3ff;
    background: rgba(0, 195, 255, 0.2);
    display: none;
}

/* PDF Editor */

.pdf-editor-layout{
    display:flex;
    height:75vh;
}

#pageSidebar{
    width: 180px;              /* smaller sidebar */
    background:#eef2f8;
    overflow-y:auto;
    padding: 20px 10px;   /* TOP/BOTTOM spacing added */
}

#thumbnailList{
    display:flex;
    flex-direction:column;
    gap:20px;
}

/* smaller card so it aligns better */
.thumb-card{
    width: 140px;
    background:#fff;
    border-radius:8px;
    padding:6px;
    box-shadow:0 2px 8px rgba(0,0,0,.08);
}

/* make canvas fit cleanly */
.thumb-card canvas{
    width:100%;
    height:auto;
    display:block;
    border-radius:4px;
}

/* action buttons tighter */
.thumb-actions{
    margin-top:6px;
    display:flex;
    justify-content:space-between;
    gap:4px;
}

.thumb-actions button{
    flex:1;
    font-size:11px;
    padding:3px;
}

/* NEW WRAPPER */
.thumb-slot{
    display:flex;
    flex-direction:column;
    align-items:center;
    margin-bottom:18px;  /* more breathing space between pages */
}

.thumb-slot:not(:last-child){
    padding-bottom:10px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.thumb-label{
    margin-top:6px;
    font-size:12px;
    color:#555;
    text-align:center;
}

.thumb-card.active{
    outline: 2px solid #2d6cdf;
    transform: scale(1.02);
}

/* button under thumbnail */
.insert-page-btn{
    width: 34px;
    height: 34px;

    margin-top: 8px;

    border-radius: 50%;
    border: none;

    background: #2d6cdf;
    color: #fff;
    font-size: 18px;
    font-weight: bold;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    /* IMPORTANT: center it inside the slot */
    align-self: center;
}

.insert-page-btn:hover{
    background:#1f56b8;
}

#pdfViewer {
    flex: 1;
    overflow: auto;
    background: #dfe5ef;

    display: block; /* 🔥 was flex */
    justify-content: center;
    align-items: flex-start;
    height: 100%;
    position: relative;
}

/* NEW STAGE */
#pdfStage {
    display: inline-block; /* prevents flex clipping behavior */
    position: relative;
    transform-origin: top left; /* 🔥 important change */
    justify-content: center;
    align-items: flex-start;
    width: 100%;
}

#pdfCanvas{
    background:#fff;
    margin:30px;
    box-shadow:0 10px 25px rgba(0,0,0,.15);
}

.pdf-topbar{
    display:flex;
    gap:10px;
    padding:12px;
    border-bottom:1px solid #ddd;
}

.toolbar-spacer{
    flex:1;
}

.pdf-footer{
    height:60px;

    display:flex;
    justify-content:center;
    align-items:center;

    gap:15px;
}

/* wrapper becomes pure centering */
.page-wrapper {
    position: relative;
    display: inline-block;      /* ❗ change from inline-block */
    width: fit-content;
    margin: 0 auto;        /* centers the page */
    background: white; 
}

#fabricCanvas {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 10;
    pointer-events: auto;
}

.page-wrapper canvas {
    display: block;        /* removes baseline gap */
}

/* Text Toolbar */

.text-toolbar{
    display:flex;
    gap:10px;
    align-items:center;

    padding:10px;
    border-bottom:1px solid #ddd;
    background:#f7f8fb;
}

.text-toolbar button{
    min-width:40px;
    height:36px;
    cursor:pointer;
}

.text-toolbar select,
.text-toolbar input{
    height:36px;
}

/* bmi-calculator */

.normal-weight {
    color: #22c55e;
}

.underweight {
    color: #60a5fa;
}

.overweight {
    color: #f59e0b;
}

.obese {
    color: #ef4444;
}

/* ===== BMI INFO TABS (MATCH QR STYLE) ===== */

.bmi-info-card{
    padding: 25px;
}

/* TAB BAR */
.bmi-info-card .tab-buttons{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:15px;
    margin-bottom:15px;
}

/* TAB BUTTON */
.bmi-info-card .tab-btn{
    padding:10px 14px;
    border-radius:10px;
    border:1px solid rgba(255,255,255,0.08);
    background:rgba(255,255,255,0.02);
    color:var(--muted);
    cursor:pointer;
    transition:0.2s;
    font-size:14px;
}

.bmi-info-card .tab-btn:hover{
    color:#fff;
    border-color:rgba(255,255,255,0.2);
}

/* ACTIVE TAB */
.bmi-info-card .tab-btn.active{
    background:linear-gradient(135deg,#6a11cb,#2575fc);
    color:#fff;
    border:none;
}

/* TAB CONTENT */
.bmi-info-card .tab-content{
    display:none;
    padding:18px;
    border-radius:12px;
    border:1px solid rgba(255,255,255,0.06);
    background:rgba(255,255,255,0.02);
    line-height:1.9;
}

/* ACTIVE CONTENT */
.bmi-info-card .tab-content.active{
    display:block;
}

/* TEXT SPACING FIX (THIS IS WHAT YOU WERE MISSING) */
.bmi-info-card p{
    margin-bottom:14px;
    color:var(--muted);
}

/* TABLE SPACING FIX */
.bmi-info-card .table{
    margin-top:10px;
}

/* ===== BMI FULL WIDTH SINGLE COLUMN MODE ===== */

.bmi-full .workspace-grid{
    display: block;   /* overrides grid */
}

/* make card take full width of container */
.bmi-full .hero-card{
    width: 100%;
    max-width: 100%;
}

.bmi-full .container{
    max-width: 1100px; /* or 1200px depending on your site */
}

.bmi-full{
    margin-top: clamp(50px, 6vw, 100px);
}

/* ===== BMI TABLE (MODERN CARD STYLE) ===== */

.bmi-table{
    margin-top:15px;
    border:1px solid rgba(255,255,255,0.08);
    border-radius:12px;
    overflow:hidden;
}

.bmi-row{
    display:grid;
    grid-template-columns:1fr 1fr;
    padding:14px 16px;
    background:rgba(255,255,255,0.02);
    border-bottom:1px solid rgba(255,255,255,0.06);
    transition:0.2s;
}

.bmi-row:hover{
    background:rgba(255,255,255,0.04);
}

.bmi-row.header{
    background:rgba(255,255,255,0.06);
    font-weight:600;
    color:#fff;
}

.bmi-row:last-child{
    border-bottom:none;
}

/* remove gap between BMI number and category */
#bmiValue{
    margin: 0;
    line-height: 1;
}

#bmiCategory{
    margin: 4px 0 0 0;   /* tighter spacing */
    font-size:18px;
    font-weight:600;
}

.output-panel .formula-box{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:6px; /* controls spacing cleanly */
    text-align:center;
}

.bmi-tab-buttons{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin:20px 0;
}

.bmi-tab-btn{
    padding:10px 14px;
    border-radius:10px;
    border:1px solid rgba(255,255,255,0.08);
    background:rgba(255,255,255,0.02);
    color:var(--muted);
    cursor:pointer;
}

.bmi-tab-btn.active{
    background:linear-gradient(135deg,#6a11cb,#2575fc);
    color:#fff;
    border:none;
}

.bmi-tab-content{
    display:none;
    padding:18px;
    border-radius:12px;
    border:1px solid rgba(255,255,255,0.06);
    background:rgba(255,255,255,0.02);
    line-height:1.9;
}

.bmi-tab-content.active{
    display:block;
}

.seo-content-modern {
  padding: 60px 0;
}

.seo-card {
  background: #111;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 25px;
  margin-bottom: 20px;
}

.seo-card h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.seo-card p, .seo-card li {
  color: #ccc;
  line-height: 1.6;
}

.seo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.seo-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.seo-note {
  margin-top: 15px;
  padding: 10px;
  background: rgba(255,255,255,0.05);
  border-left: 3px solid #4da3ff;
  border-radius: 8px;
}

.seo-card.highlight {
  border-color: #4da3ff;
  background: rgba(77,163,255,0.08);
}

.seo-card.full {
  grid-column: 1 / -1;
}


/* ================================
   AMORTIZATION TABLE - FINTECH UI (FIXED)
================================ */

#scheduleTable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-family: Arial, sans-serif;
    font-size: 14px;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);

    table-layout: fixed; /* keeps clean alignment */
}

/* HEADER */
#scheduleTable thead {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 2;
}

#scheduleTable th {
    padding: 14px 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-size: 13px;
    text-transform: uppercase;
    text-align: center;
}

/* REMOVE WIDTH 25% (THIS WAS CAUSING BAD LAYOUT) */
#scheduleTable th,
#scheduleTable td {
    text-align: center;
    word-wrap: break-word;
}

/* BODY */
#scheduleTable td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    transition: 0.2s ease;
}

/* ZEBRA STRIPES */
#scheduleTable tbody tr:nth-child(even) {
    background: #f8fafc;
}

/* HOVER */
#scheduleTable tbody tr:hover {
    background: #e0f2fe;
}

/* FINANCE COLOR CODING */
#scheduleTable td:nth-child(2) {
    color: #16a34a;
    font-weight: 600;
}

#scheduleTable td:nth-child(3) {
    color: #dc2626;
    font-weight: 600;
}

#scheduleTable td:nth-child(4) {
    color: #1d4ed8;
    font-weight: 700;
}

#scheduleTable td:first-child {
    font-weight: bold;
    color: #111827;
}

/* ================================
   FIX: REMOVE TABLE DISPLAY BLOCK ISSUE
================================ */

/* DO NOT use display:block on table */
/* Instead, wrap only container */

.hero-card > div {
    overflow-x: auto;
}

/* ================================
   OPTIONAL: SCROLLBAR (CLEAN)
================================ */

.hero-card > div::-webkit-scrollbar {
    height: 8px;
}

.hero-card > div::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.hero-card > div::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 10px;
}

.hero-card > div::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

.error-box {
    margin-top: 10px;
    padding: 10px;
    border-radius: 8px;
    background: #fff1f2;
    color: #b91c1c;
    font-size: 13px;
    display: none;
}

.error-box.show {
    display: block;
}

/* ================================
   MOBILE FIX → CARD VIEW
================================ */

@media (max-width: 768px) {

    /* Hide table header */
    #scheduleTable thead {
        display: none;
    }

    #scheduleTable,
    #scheduleTable tbody,
    #scheduleTable tr,
    #scheduleTable td {
        display: block;
        width: 100%;
    }

    #scheduleTable tr {
        margin-bottom: 12px;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.06);
        padding: 12px;
    }

    #scheduleTable td {
        text-align: right;
        padding: 8px 10px;
        position: relative;
        border: none;
        border-bottom: 1px solid #f1f1f1;
        font-size: 13px;
    }

    #scheduleTable td:last-child {
        border-bottom: none;
    }

    /* LABEL BEFORE VALUE */
    #scheduleTable td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        font-weight: 600;
        color: #111827;
        text-align: left;
    }

    /* FIX ALIGNMENT */
    #scheduleTable td {
        padding-left: 120px;
    }
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
    font-family: Arial, sans-serif;
}

.pagination button {
    padding: 8px 14px;
    border: none;
    background: #2563eb;
    color: white;
    border-radius: 8px;
    cursor: pointer;
}

.pagination button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.pagination span {
    font-size: 14px;
    font-weight: 600;
}

.pagination-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.pagination-wrapper button {
    padding: 6px 10px;
    border: none;
    background: #1e40af;
    color: white;
    border-radius: 6px;
    cursor: pointer;
}

.pagination-wrapper button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-wrapper input,
.pagination-wrapper select {
    padding: 5px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.pagination-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.pagination-controls button {
    padding: 6px 12px;
    border: none;
    background: #1e40af;
    color: white;
    border-radius: 6px;
    cursor: pointer;
}

.pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-controls input,
.pagination-controls select {
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* ===============================
   PAGINATION BAR (FINTECH FIX)
================================ */

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 10px;
    text-align: center;
}

/* ===============================
   UNIFORM CONTROL BASE STYLE
================================ */

.pagination-bar button,
.pagination-bar input,
.pagination-bar select {
    height: 34px;
    font-size: 13px;
    border-radius: 6px;
    box-sizing: border-box;
}

/* ===============================
   BUTTONS
================================ */

.pagination-bar button {
    padding: 0 12px;
    border: none;
    background: #2563eb;
    color: white;
    cursor: pointer;
    transition: 0.2s ease;
}

.pagination-bar button:hover {
    background: #1e40af;
}

.pagination-bar button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===============================
   PAGE INPUT (GO TO)
================================ */

.pagination-bar input {
    width: 60px;              /* tighter + aligned */
    text-align: center;
    border: 1px solid #d1d5db;
    outline: none;
}

.pagination-bar input:focus {
    border-color: #2563eb;
}

/* ===============================
   ROW SELECT (FIXED WIDTH)
================================ */

.pagination-bar select {
    width: 70px;              /* 🔥 FIX: prevents stretching */
    border: 1px solid #d1d5db;
    padding: 0 6px;
    background: white;
    cursor: pointer;
}

/* ===============================
   PAGE TEXT
================================ */

.pagination-bar span {
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}

/* ===============================
   DIVIDER
================================ */

.pagination-divider {
    width: 1px;
    height: 18px;
    background: #d1d5db;
}

/* =========================
   CONTROL GROUP (KEY FIX)
========================= */

.control-group {
    display: flex;
    align-items: center;
    justify-content: center;   /* 🔥 KEY FIX */
    gap: 6px;
}

/* Labels aligned properly */
.control-group label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    width: 40px;
    text-align: center;
    line-height: 1;           /* 🔥 FIX: removes vertical drift */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Inputs + Select unified */
.control-group input,
.control-group select {
    height: 32px;
    line-height: 32px;       /* 🔥 critical for vertical centering */
    font-size: 13px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0 8px;

    display: flex;            /* 🔥 forces consistent box behavior */
    align-items: center;
    box-sizing: border-box;
}

/* Input width */
.control-group input {
    width: 70px;
    text-align: center;
}

/* Select width (fixed, no stretching) */
.control-group select {
    width: 80px;

    /* 🔥 removes native dropdown weird offset */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    background-position: right 6px center;
    background-repeat: no-repeat;
}

/* Buttons inside group */
.control-group button {
    height: 32px;
    line-height: 32px;
    padding: 0 10px;
    border: none;
    border-radius: 6px;
    background: #2563eb;
    color: white;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===============================
   MOBILE IMPROVEMENT
================================ */

@media (max-width: 480px) {
    .pagination-bar {
        gap: 8px;
    }

    .pagination-bar input,
    .pagination-bar select {
        width: 65px;
    }

    .pagination-bar button {
        padding: 0 10px;
    }
}

/* =========================
   ANALYTICS TABLE DESIGN
========================= */

/* =========================
   TABS UI
========================= */

.tab-controls {
    display: flex;
    gap: 10px;
    margin: 15px 0 20px 0;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 10px;
}

.tab-btn {
    padding: 8px 14px;
    border: none;
    background: #f1f5f9;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 600;
    transition: 0.2s;
}

.tab-btn:hover {
    background: #e2e8f0;
}

.tab-btn.active {
    background: #2563eb;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* subtle shadow for table container feel */
.table-wrapper {
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    border-radius: 12px;
}

/* smoother row transitions */
.bmi-table tbody tr {
    transition: all 0.15s ease;
}

.age-tool .bmi-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    font-size: 14px;
}

/* HEADER */
.age-tool .bmi-table thead th {
    background: #0f172a;
    color: #ffffff;
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* CELLS */
.age-tool .bmi-table tbody td {
    padding: 14px 16px;
    border-top: 1px solid #f1f5f9;
    color: #334155;
}

/* STRIPES */
.age-tool .bmi-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

/* HOVER */
.age-tool .bmi-table tbody tr:hover {
    background: #eef2ff;
    transition: 0.2s ease;
}

/* LABEL COLUMN */
.age-tool .bmi-table tbody td:first-child {
    font-weight: 600;
    color: #0f172a;
}

/* WRAPPER SAFETY */
.age-tool .table-wrapper {
    border-radius: 14px;
    overflow: hidden;
}

.life-progress-wrapper {
    width: 100%;
    padding: 10px 0;
}

.life-progress-track {
    width: 100%;
    height: 28px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

#lifeProgressBar {
    width: 0%;
    height: 100%;
    background: #2563eb;
    transition: width 0.4s ease;
    display: block;
}

/* Scientific calculator */

.solver-panel {
    display: none;
}

.solver-panel.active {
    display: block;
}

.solver-output {
    margin-top: 15px;
    padding: 15px;
    background: #111;
    border-radius: 10px;
    color: #fff;
}

.solver-panel button {
    margin-top: 12px;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.solver-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.solver-inputs input {
    padding: 10px;
    border-radius: 6px;
}

.solver-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-start;
}

.solver-actions button {
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.steps-box {
    margin-top: 10px;
    padding: 10px;
    background: #1a1a1a;
    border-radius: 8px;
}

.steps-box ol {
    line-height: 1.7;
    padding-left: 20px;
    margin-top: 10px;
}

.steps-box li {
    margin-bottom: 6px;
}

.calculator-grid-modern {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* FUNCTION ROW */
.keypad-row.functions {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}

/* MAIN BODY */
.keypad-body {
    display: flex;
    gap: 10px;
}

/* NUMBER PAD */
.number-pad {
    flex: 3;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

/* OPERATOR PAD */
.operator-pad {
    flex: 1;
    display: grid;
    grid-template-rows: repeat(5, 1fr);
    gap: 8px;
}

/* CONTROL ROW */
.keypad-row.controls {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}

/* BUTTON STYLE (optional polish) */
.calculator-grid-modern button {
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    background: #222;
    color: white;
}

.calculator-grid-modern button:hover {
    background: #333;
}

.calculator-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    margin-top: 15px;
}

/* ANGLE MODE GROUP */
.angle-mode {
    display: flex;
    gap: 6px;
}

.mode-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    background: #222;
    color: #aaa;
    cursor: pointer;
    font-size: 12px;
}

.mode-btn.active {
    background: #00c896;
    color: #000;
    font-weight: bold;
}

/* ACTION BUTTONS */
.calc-actions {
    display: flex;
    gap: 6px;
}

.calc-actions button {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    background: #ff4d4d;
    color: white;
    cursor: pointer;
    font-size: 12px;
}

.calc-actions button:hover {
    opacity: 0.8;
}

/* =========================
   SHARED HISTORY TABLE BASE
========================= */

.history-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* same base table style for BOTH */
.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: fixed;
    border-radius: 10px;
    overflow: hidden;
}

/* headers (shared look) */
.history-table thead th {
    text-align: left;
    padding: 12px;
    background: #1f2937;
    color: #fff;
    font-weight: 600;
}

/* rows shared */
.history-table tbody tr {
    background: #f9fafb;
    transition: 0.2s ease;
    cursor: pointer;
}

/* alternating rows */
.history-table tbody tr:nth-child(even) {
    background: #eef2f7;
}

/* hover effect */
.history-table tbody tr:hover {
    background: #dbeafe;
    transform: scale(1.01);
}

/* cells */
.history-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    word-break: break-word;
}

/* calculator expression style */
#historyTable td:first-child {
    font-family: monospace;
    color: #111827;
}

#historyTable td {
    color: #111827 !important;
}

/* =========================
   SOLVER HISTORY TABLE (MATCH CALCULATOR STYLE)
========================= */

.solver-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 14px;
}

/* header */
.solver-table thead th {
    text-align: left;
    padding: 12px;
    background: #1f2937;
    color: #ffffff;
    font-weight: 600;
}

/* rows */
.solver-table tbody tr {
    background: #f9fafb;
    transition: 0.2s ease;
    cursor: pointer;
}

/* alternating rows */
.solver-table tbody tr:nth-child(even) {
    background: #eef2f7;
}

/* hover */
.solver-table tbody tr:hover {
    background: #dbeafe;
    transform: scale(1.01);
}

/* cells */
.solver-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    word-break: break-word;
    color: #111827; /* IMPORTANT: fixes white text issue */
}

/* solver table extra columns */
.solver-table td:nth-child(1) {
    font-weight: 600;
    color: #111827;
}

.solver-table td:nth-child(3),
.solver-table td:last-child {
    font-weight: 600;
    color: #2563eb !important;
    font-family: "Courier New", monospace;
}

.solver-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    word-break: break-word;
    color: #111827; /* default readable color */
}

/* image color picker */

/* MAIN GRID */
.tool-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}

/* LEFT PANEL */
.tool-panel {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* RIGHT PANEL */
.canvas-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* CANVAS BOX */
.canvas-box canvas {
  width: 100%;
  height: 450px;
  background: #000;
  border-radius: 10px;
}

.color-picker-canvas canvas {
    max-width: 100%;
}

/* VERTICAL BUTTONS */
.button-group.vertical {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.button-group.vertical button {
  width: 100%;
}

/* RESULT BOX */
.result-box {
  background: #0b1220;
  padding: 15px;
  border-radius: 10px;
}

/* BIG COLOR DISPLAY */
.result-card {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 10px;
}

#colorBoxLarge {
  width: 70px;
  height: 70px;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.1);
}

.result-values p {
  margin: 5px 0;
}

/* HISTORY GRID FIX */
#history {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;

  max-width: 100%;
  width: 100%;

  padding: 8px;
  box-sizing: border-box;

  align-items: flex-start;
}

#history div {
  width: 28px;
  height: 28px;

  flex: 0 0 auto;

  border-radius: 4px;
  cursor: pointer;
}

.palette-card {
    margin-top: 20px;
    grid-column: 1 / -1;
    width: 100%;
}

.palette-container {
    display: flex;
    flex-direction: column;
    gap: 18px;

    max-height: 600px;
    overflow-y: auto;

    padding-right: 20px; /* 👈 THIS FIXES YOUR ISSUE */
}

/* EACH COLOR GROUP */
.palette-group {
    background: #111;
    padding: 10px;
    border-radius: 10px;
}

/* TITLE */
.palette-group h4 {
    margin-bottom: 8px;
    font-size: 12px;
    opacity: 0.7;
    letter-spacing: 1px;
}

/* COLOR GRID */
.palette-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18px, 1fr));
    gap: 5px;
}

/* COLOR BOX */
.palette-row div {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.08);
    transition: transform 0.1s;
}

.palette-row div:hover {
    transform: scale(1.4);
    z-index: 2;
}

.workspace-right {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.result-card-box {
  background: #111;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
}

.result-card-box h3 {
  margin-bottom: 10px;
}

.result-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.result-values p {
  margin: 2px 0;
  font-size: 13px;
  font-family: monospace;
}

.history-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 6px 2px;
  scrollbar-width: thin;
}

.history-strip div {
  min-width: 22px;
  height: 22px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
  transition: transform 0.15s;
}

.history-strip div:hover {
  transform: scale(1.3);
}

.copied {
  transform: scale(1.2);
  outline: 2px solid #fff;
  transition: 0.15s;
}

.history-card-box {
    background: #111;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);

    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.meal-tables h3 {
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 20px;
}

.food-search-wrapper {
    position: relative;
    width: 100%;
    z-index: 10; /* IMPORTANT: creates stacking context */
}

/* DROPDOWN BOX */
.food-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;

    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);

    max-height: 250px;
    overflow-y: auto;

    z-index: 9999; /* VERY IMPORTANT */

    display: flex;
    flex-direction: column;

    margin-top: 6px;
}

.food-results,
.food-results * {
    color: #111; /* force readable text */
}

.food-results::-webkit-scrollbar {
    width: 6px;
}

.food-results::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* FOOD ITEM */
.food-card {
    padding: 10px 12px;
    cursor: pointer;
    transition: 0.2s;
    border-bottom: 1px solid #eee;
}

/* HOVER EFFECT */
.food-card:hover {
    background: #f3f4f6;
}

/* REMOVE LAST BORDER */
.food-card:last-child {
    border-bottom: none;
}

/* dropdown-style suggestions (hover overlay) */
.food-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9999;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* make sure it doesn't take layout space */
#foodResults {
    margin-top: 5px;
}

/* screen record */

.recorder-card{
    max-width:850px;
    width:100%;
    margin:auto;
}

#preview{
    width:100%;
    border-radius:12px;
    background:#111;
    margin-bottom:20px;
}

.controls{
    display:flex;
    gap:20px;
    margin-bottom:20px;
}

.recording-info{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
}

#timer {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
}

#status{
    color:#888;
}

.control-box {
    background: #111;
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: 0.2s ease;
}

.control-box:hover {
    transform: translateY(-2px);
}

.control-box h3 {
    margin-bottom: 12px;
    font-size: 13px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.output-box {
    background: #101a12;
    border: 1px solid rgba(29, 185, 84, 0.2);
}

.output-box h3 {
    color: #1db954;
}


.recorder-workspace {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 40px 20px;
}

/* THIS is the real fix */
.recorder-layout {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;

    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* TOP PREVIEW */
.recorder-preview-card video {
    width: 100%;
    height: 420px;
    background: black;
    border-radius: 14px;
    object-fit: cover;
}

/* BOTTOM GRID (3 columns) */
.recorder-bottom-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 30px; /* IMPORTANT */
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .recorder-bottom-grid {
        grid-template-columns: 1fr;
    }
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    cursor: pointer;
}

.checkbox input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 10px; /* IMPORTANT FIX */
}

.btn {
    padding: 10px 12px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
}

.btn.primary {
    background: #4f46e5;
    color: white;
}

.btn.danger {
    background: #dc2626;
    color: white;
}

.status-bar {
    display: flex;
    flex-direction: column;   /* STACK vertically */
    justify-content: center;
    align-items: center;

    gap: 6px;

    margin-top: 12px;
    padding: 10px 0;
}

.progress-bar{
    width:100%;
    height:12px;
    background:#e5e7eb;
    border-radius:999px;
    overflow:hidden;
    margin-top:10px;
}

.progress-fill{
    width:0%;
    height:100%;
    background:#2563eb;
    transition:width .2s;
}

.video-wrapper {
    display: flex;
    overflow: hidden;
    max-width: 100%;
    justify-content: center;
    align-items: center;
}

/* keep video clean */
#videoPreview {
    display: block;
    width: 100%;
    transform-origin: center;
}

#progressText {
    margin-top: 8px;
    font-size: 13px;
    color: #cbd5e1;
    font-weight: 500;
}

/* =========================
   PREVIEW AREA
========================= */

#previewContainer{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:16px;
    width:100%;
    margin-bottom:20px;
}

#previewContainer video{
    width:100%;
    max-width:100%;
    height:auto;
    display:block;
    border-radius:10px;
    object-fit:cover;
}

/* mobile */

@media (max-width:768px){

    #previewContainer{
        grid-template-columns:1fr;
        gap:12px;
    }
}

/* ========================================
   TIMELINE
======================================== */

.timeline{
    display:grid;
    grid-template-columns: repeat(2, 1fr);
    gap:12px;

    padding-bottom:10px;
}

/* Mobile: still 2 columns but smaller gap */
@media (max-width: 768px){
    .timeline{
        grid-template-columns: repeat(2, 1fr);
        gap:10px;
    }
}

/* Very small phones: still 2 columns but tighter */
@media (max-width: 420px){
    .timeline{
        grid-template-columns: repeat(2, 1fr);
        gap:8px;
    }
}

.timeline::-webkit-scrollbar{
    height:8px;
}

.timeline-item{
    width:100%;
    background:#f8fafc;
    border-radius:12px;
    padding:10px;

    cursor:grab;
    box-sizing:border-box;
}

.timeline-item video{
    width:100%;
    aspect-ratio: 16 / 9;
    object-fit:cover;
    border-radius:8px;
}

.file-name{
    margin-top:8px;
    font-size:13px;

    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color: black;
}

/* ========================================
   FILE LIST
======================================== */

#fileListText{
    margin-top:15px;
    text-align:left;

    max-height:180px;
    overflow-y:auto;

    word-break:break-word;
    overflow-wrap:anywhere;

    font-size:14px;
    line-height:1.6;
}

.output-panel{
    overflow:hidden;
}

#previewContainer,
#timeline{
    max-width:100%;
}

.preview-card{
    width:100%;
    overflow:hidden;
    border-radius:12px;
    background:#f8fafc;
    padding:8px;
    box-sizing:border-box;
}

.preview-card video{
    width:100%;
    display:block;
}

.meal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.meal-card {
    background: #fff;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.meal-card h3 {
    margin-bottom: 10px;
    font-size: 16px;
    color: #111;
}

/* LIST ITEM */
.meal-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ROW */
.meal-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 10px 12px;
    border-radius: 10px;
    background: #f9fafb;
    transition: 0.2s;
}

.meal-item:hover {
    background: #eef2ff;
}

/* TEXT */
.meal-name {
    font-size: 14px;
    color: #111;
    flex: 1;
}

.meal-cal {
    font-size: 13px;
    color: #666;
    margin-right: 10px;
}

/* DELETE BUTTON */
.meal-delete {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    color: #ef4444;
}

.meal-delete:hover {
    transform: scale(1.1);
}

/* FAQ Section */

.faq-grid {
  display: grid;
  gap: 15px;
}

.faq-item {
  background: #111;
  border: 1px solid #222;
  padding: 20px;
  border-radius: 12px;
  transition: 0.3s;
}

.faq-item:hover {
  border-color: #444;
  transform: translateY(-2px);
}

.faq-item h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.faq-item p {
  font-size: 14px;
  color: #aaa;
}

.seo-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
}

.seo-section .container {
  max-width: 1100px;
}

.seo-section h1,
.seo-section h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.seo-section .gradient-text {
  background: linear-gradient(90deg, #4f46e5, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.seo-section p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
  margin-bottom: 15px;
}

/* SEO Content and FAQ */

.seo-content {
            margin-top:50px;
            padding: 60px 0;
            background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
        }

        .seo-wrapper {
            max-width: 1100px;
        }

        .seo-header {
            text-align: center;
            margin-bottom: 40px;
        }

        .seo-header h2 {
            font-size: 28px;
            margin-bottom: 10px;
        }

        .seo-header p {
            max-width: 700px;
            margin: 0 auto;
            opacity: 0.8;
            line-height: 1.6;
        }

        .seo-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 15px;
            margin-bottom: 40px;
        }

        .seo-card {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 14px;
            padding: 18px;
            transition: 0.2s ease;
        }

        .seo-card:hover {
            transform: translateY(-3px);
            background: rgba(255,255,255,0.06);
        }

        .seo-card h3 {
            font-size: 16px;
            margin-bottom: 8px;
        }

        .seo-card p {
            font-size: 14px;
            opacity: 0.8;
            line-height: 1.5;
        }

        .seo-footer {
            margin-top: 20px;
            text-align: center;
        }

        .seo-footer h3 {
            margin-bottom: 10px;
        }

        .seo-footer ul {
            list-style: none;
            padding: 0;
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
            max-width: 700px;
            margin: 0 auto;
            opacity: 0.85;
        }

        .seo-footer li {
            background: rgba(255,255,255,0.03);
            padding: 10px;
            border-radius: 10px;
            border: 1px solid rgba(255,255,255,0.05);
        }

        /* RESPONSIVE */
        @media (max-width: 900px) {
            .seo-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 500px) {
            .seo-grid {
                grid-template-columns: 1fr;
            }

            .seo-footer ul {
                grid-template-columns: 1fr;
            }
        }

        .seo-faq {
            padding: 60px 0;
            background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
        }

        .faq-wrapper {
            max-width: 900px;
        }

        .faq-header {
            text-align: center;
            margin-bottom: 30px;
        }

        .faq-header h2 {
            font-size: 28px;
            margin-bottom: 8px;
        }

        .faq-header p {
            opacity: 0.7;
            font-size: 14px;
        }

        .faq-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .faq-item {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 12px;
            overflow: hidden;
            transition: 0.2s ease;
        }

        .faq-item:hover {
            background: rgba(255,255,255,0.05);
        }

        .faq-question {
            width: 100%;
            text-align: left;
            padding: 15px;
            background: none;
            border: none;
            color: white;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .faq-question::after {
            content: "+";
            font-size: 18px;
            opacity: 0.7;
            transition: 0.2s;
        }

        .faq-item.active .faq-question::after {
            content: "–";
        }

        .faq-answer {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease, padding 0.3s ease;
            padding: 0 15px;
        }

        .faq-item.active .faq-answer {
            max-height: 200px;
            padding: 0 15px 15px;
        }

        .faq-answer p {
            font-size: 14px;
            opacity: 0.8;
            line-height: 1.6;
        }

    .app-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
}

.app-modal.hidden {
  display: none;
}

.app-modal-box {
  width: 360px;
  max-width: 90vw;
  background: #111;
  color: #fff;
  padding: 22px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: pop 0.15s ease;
}

.app-modal-box h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.app-modal-box p {
  font-size: 14px;
  color: #cfcfcf;
  line-height: 1.4;
  margin-bottom:15px;
}

.app-modal-actions {
  margin-top: 18px;
}

.app-modal-actions button {
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  background: #4f46e5;
  color: white;
  cursor: pointer;
}

.app-modal-actions button:hover {
  background: #4338ca;
}

@keyframes pop {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.clear-history-btn{
    background:rgb(151, 52, 52);
    border:1px solid var(--border);
    color:var(--muted);
    padding:7px 14px;
    border-radius:8px;
    cursor:pointer;
    transition:.25s;
    font-size:14px;
}

.clear-history-btn:hover{
    color:#fff;
    border-color:var(--primary);
    background:rgba(59,130,246,.08);
}

.nav-search{
    display:flex;
    align-items:center;
    margin-left:auto;
}

.nav-search input{
    width:250px;
    padding:10px 14px;
    border-radius:8px;

    border:1px solid var(--border);

    background:#1b1b1b;

    color:#fff;

    box-sizing:border-box;

    font-size:15px;
}

.nav-search input:focus{

    outline:none;

    border-color:#4f46e5;

    box-shadow:0 0 0 3px rgba(79,70,229,.20);

}

/* =========================================
   BACK TO TOP BUTTON
========================================= */

.back-to-top{

    position:fixed;

    right:25px;
    bottom:25px;

    width:58px;
    height:58px;

    border:none;
    border-radius:18px;

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:26px;
    font-weight:700;

    color:#fff;

    cursor:pointer;

    background:linear-gradient(
        135deg,
        #2563eb,
        #60a5fa
    );

    backdrop-filter:blur(16px);

    box-shadow:
        0 15px 35px rgba(37,99,235,.35);

    z-index:999;

    opacity:0;
    visibility:hidden;

    transform:
        translateY(20px)
        scale(.9);

    transition:
        opacity .3s,
        transform .3s,
        visibility .3s;
}

/* Visible */

.back-to-top.show{

    opacity:1;
    visibility:visible;

    transform:
        translateY(0)
        scale(1);
}

/* Hover */

.back-to-top:hover{

    transform:
        translateY(-6px)
        scale(1.08);

    box-shadow:
        0 20px 45px rgba(37,99,235,.45);
}

/* Click */

.back-to-top:active{

    transform:scale(.95);
}

.back-to-top::before{

    content:"";

    position:absolute;

    inset:-4px;

    border-radius:inherit;

    background:linear-gradient(
        135deg,
        #60a5fa,
        transparent,
        #2563eb
    );

    filter:blur(16px);

    opacity:.55;

    z-index:-1;
}

/* Mobile */

@media(max-width:700px){

    .back-to-top{

        width:52px;
        height:52px;

        right:18px;
        bottom:18px;

        font-size:22px;
    }

}

/* ==========================================
        Conversion Tables
        ========================================== */

        .conversion-table{
            margin:40px 0;
            overflow-x:auto;
            border-radius:18px;
            border:1px solid rgba(255,255,255,.08);
            background:rgba(255,255,255,.03);
            backdrop-filter:blur(14px);
        }

        .conversion-grid{
            width:100%;
            border-collapse:collapse;
            min-width:520px;
        }

        .conversion-grid thead{
            background:linear-gradient(
                90deg,
                #6366f1,
                #8b5cf6
            );
        }

        .conversion-grid th{
            color:#fff;
            font-size:16px;
            font-weight:700;
            padding:18px 24px;
            text-align:left;
        }

        .conversion-grid td{
            padding:18px 24px;
            border-bottom:1px solid rgba(255,255,255,.06);
            font-size:16px;
            color:#e5e7eb;
        }

        .conversion-grid tbody tr{
            transition:.25s;
        }

        .conversion-grid tbody tr:hover{
            background:rgba(99,102,241,.12);
        }

        .conversion-grid tbody tr:last-child td{
            border-bottom:none;
        }

        .conversion-grid td:first-child{
            font-weight:700;
            color:#60a5fa;
            font-size:17px;
        }

        .conversion-grid td:last-child{
            font-weight:700;
            color:#4ade80;
            font-size:17px;
        }
