*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:"Inter",sans-serif;
}

body{
    background:#f5f5f7;
}

.navbar{
    width:100%;
    height:72px;
    background:#ffffff;
    border-bottom:1px solid #e5e7eb;

    display:flex;
    align-items:center;
    justify-content:space-between;

    padding:0 30px;

    position:sticky;
    top:0;
    z-index:1000;
}

/* LOGO */

.logo{
    display:flex;
    align-items:center;
    text-decoration:none;
}

.logo img{
    height:111px;
    width:auto;
    display:block;
}

/* BACK BUTTON */

.back-btn{
    text-decoration:none;
    background:#111827;
    color:#ffffff;

    padding:12px 18px;
    border-radius:12px;

    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;

    font-size:14px;
    font-weight:600;

    transition:all .3s ease;
}

.back-btn:hover{
    background:#1f2937;
    transform:translateY(-2px);
}

.back-btn i{
    font-size:14px;
    color:#ffffff;
}

.back-text{
    display:inline;
}

/* MAIN */

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

.top-content{
    text-align:center;
    margin-bottom:40px;
}

.top-content h1{
    font-size:54px;
    margin-bottom:15px;
}

.top-content p{
    color:#6b7280;
}

/* UPLOAD */
.upload-box{
    background:#fff;
    border:3px dashed #d1d5db;
    border-radius:24px;

    width:100%;
    max-width:950px;

    min-height:220px;

    margin:0 auto;

    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;

    cursor:pointer;
    transition:.3s;
}

.upload-box:hover{
    border-color:#ef4444;
    background:#fafafa;
}

.upload-box i{
    font-size:70px;
    color:#ef4444;
    margin-bottom:16px;
}

.upload-box h2{
    font-size:32px;
    margin-bottom:8px;
}

.upload-box p{
    font-size:16px;
    color:#6b7280;
}

/* PREVIEW */

.preview-container{

    margin-top:40px;

    display:grid;

    grid-template-columns:
    repeat(auto-fill,minmax(280px,1fr));

    gap:25px;
}

.page-card{

    background:#fff;

    border-radius:20px;

    overflow:hidden;

    box-shadow:
    0 10px 25px rgba(0,0,0,.05);
}

.page-card canvas{

    width:100%;

    display:block;
}

.page-info{

    padding:15px;

    display:flex;
    justify-content:space-between;
    align-items:center;
}

.download-btn{

    border:none;

    background:#ef4444;
    color:white;

    padding:10px 15px;

    border-radius:10px;

    cursor:pointer;
    align-items:center;
}

.download-btn:hover{
    background:#dc2626;
}
#compressSection{
    max-width:900px;
    margin:40px auto 0;
}
#previewImage{
    width:100%;
    max-width:900px;
    max-height:520px;
    object-fit:contain;

    display:block;
    margin:0 auto 35px;

    border-radius:20px;

    background:#fff;

    box-shadow:
    0 15px 40px rgba(0,0,0,.08);
}

.stats-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:20px;
    margin-bottom:30px;
}
.stat-card{
    background:#fff;

    padding:28px 20px;

    border-radius:18px;

    text-align:center;

    border:1px solid #e5e7eb;

    box-shadow:
    0 10px 30px rgba(0,0,0,.05);
}

.stat-card span{
    display:block;
    color:#6b7280;
    font-size:15px;
    margin-bottom:10px;
}

.stat-card strong{
    font-size:30px;
    font-weight:700;
    color:#111827;
}
.quality-box{
    background:#fff;
    padding:22px;
    border-radius:18px;
    margin-bottom:25px;

    border:1px solid #e5e7eb;
}

.quality-box label{
    font-size:16px;
    font-weight:600;
    display:block;
    margin-bottom:12px;
}

.quality-box input{
    width:100%;
    height:8px;
}
#compressBtn{
    width:100%;
    height:62px;

    border:none;
    border-radius:16px;

    background:#ef4444;
    color:#fff;

    font-size:18px;
    font-weight:700;

    cursor:pointer;

    box-shadow:
    0 10px 25px rgba(239,68,68,.25);

    transition:.3s;
}

#compressBtn:hover{
    background:#dc2626;
}
#downloadBtn{
    display:none;

    margin-top:16px;

    width:100%;
    height:60px;

    border-radius:14px;

    background:#16a34a;

    color:#fff;
    text-decoration:none;

    font-size:18px;
    font-weight:700;

    text-align:center;
    line-height:60px;

    box-shadow:
    0 10px 25px rgba(22,163,74,.25);
}

@media(max-width:768px){

    .stats-grid{
        grid-template-columns:1fr;
    }

}
/* =========================
   TOOL CONTENT
========================= */

.tool-content{
    max-width:1000px;
    margin:70px auto;
    padding:0 20px;
}

/* =========================
   CONTENT SECTIONS
========================= */

.content-section{
    background:#ffffff;
    padding:40px;
    margin-bottom:35px;
    border-radius:20px;
    box-shadow:0 2px 12px rgba(0,0,0,0.05);
}

.content-section h2{
    font-size:2.2rem;
    font-weight:700;
    text-align:center;
    color:#111827;
    margin-bottom:30px;
    position:relative;
}

.content-section h2::after{
    content:"";
    display:block;
    width:80px;
    height:4px;
    background:#ef4444;
    margin:12px auto 0;
    border-radius:999px;
}

.content-section h3{
    font-size:1.3rem;
    font-weight:600;
    color:#111827;
    margin-bottom:10px;
}

.content-section p{
    font-size:1.05rem;
    line-height:1.9;
    color:#4b5563;
    margin-bottom:18px;
}

.content-section ul,
.content-section ol{
    padding-left:25px;
}

.content-section li{
    font-size:1.05rem;
    line-height:1.9;
    color:#4b5563;
    margin-bottom:10px;
}

/* =========================
   FAQ
========================= */

.faq-item{
    padding:20px;
    border:1px solid #e5e7eb;
    border-radius:14px;
    margin-bottom:20px;
    background:#fafafa;
}

.faq-item h3{
    margin-bottom:8px;
}

.faq-item p{
    margin-bottom:0;
}

/* =========================
   RELATED TOOLS
========================= */

.related-tools{
    margin-top:60px;
}

.related-tools h2{
    text-align:center;
    font-size:2.2rem;
    font-weight:700;
    color:#111827;
    margin-bottom:15px;
    position:relative;
}

.related-tools h2::after{
    content:"";
    display:block;
    width:80px;
    height:4px;
    background:#ef4444;
    margin:12px auto 0;
    border-radius:999px;
}

.related-desc{
    text-align:center;
    color:#6b7280;
    max-width:700px;
    margin:0 auto 40px;
    line-height:1.8;
    font-size:1rem;
}

.tools-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:22px;
}
.tool-card{
    position:relative;
    overflow:hidden;
    background:#ffffff;
    border:1px solid #e5e7eb;
    border-radius:20px;
    padding:28px;
    text-decoration:none;
    transition:all .35s ease;
    display:flex;
    flex-direction:column;
    gap:12px;
    min-height:180px;
}

.tool-card::before{
    content:"";
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:5px;
    background:linear-gradient(
        90deg,
        #ef4444,
        #f97316,
        #3b82f6
    );
}

.tool-card::after{
    content:"→";
    position:absolute;
    right:25px;
    bottom:20px;
    font-size:22px;
    font-weight:700;
    color:#ef4444;
    opacity:0;
    transition:.3s;
}

.tool-card:hover{
    transform:translateY(-8px);
    border-color:#ef4444;
    box-shadow:
        0 15px 35px rgba(0,0,0,.08),
        0 5px 15px rgba(239,68,68,.15);
}

.tool-card:hover::after{
    opacity:1;
    right:20px;
}

.tool-card h3{
    font-size:1.3rem;
    font-weight:700;
    color:#111827;
    margin:0;
}

.tool-card p{
    color:#6b7280;
    line-height:1.7;
    font-size:.95rem;
    margin:0;
}
.content-link{
    color:#ef4444;
    font-weight:700;
    text-decoration:none;
    transition:.3s;
}

.content-link:hover{
    text-decoration:underline;
}
/* =========================
   MOBILE
========================= */

@media (max-width:768px){

    .tool-content{
        margin:50px auto;
        padding:0 15px;
    }

    .content-section{
        padding:25px;
        border-radius:16px;
    }

    .content-section h2{
        font-size:1.8rem;
        line-height:1.3;
    }

    .related-tools h2{
        font-size:1.8rem;
    }

    .content-section p,
    .content-section li{
        font-size:1rem;
        line-height:1.8;
    }

    .tools-grid{
        grid-template-columns:1fr;
    }

    .tool-card{
        padding:22px;
    }
}

/* =========================
   SMALL MOBILE
========================= */

@media (max-width:480px){

    .content-section{
        padding:20px;
    }

    .content-section h2{
        font-size:1.6rem;
    }

    .related-tools h2{
        font-size:1.6rem;
    }

    .content-section p,
    .content-section li{
        font-size:0.95rem;
    }

    .tool-card h3{
        font-size:1.1rem;
    }

    .tool-card p{
        font-size:0.9rem;
    }
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px) {

  .header {
    padding: 0 18px;
  }

  .logo {
    font-size: 24px;
  }

  .top-content h1 {
    font-size: 40px;
  }

  .upload-box {
    min-height: 260px;
  }

  .upload-box i {
    font-size: 60px;
  }

  .upload-box h2 {
    font-size: 28px;
  }

  .merge-btn {
    height: 60px;
    font-size: 18px;
  }

}

@media (max-width: 480px) {

  .top-content h1 {
    font-size: 32px;
  }

  .top-content p {
    font-size: 16px;
  }

  .file-item {
    flex-direction: column;
    align-items: flex-start;

    gap: 18px;
  }

}


#scrollBtn{
    position:fixed;
    right:20px;
    bottom:20px;

    width:50px;
    height:50px;

    border:none;
    border-radius:50%;

    background:#111827;
    color:#fff;

    cursor:pointer;

    display:flex;
    align-items:center;
    justify-content:center;

    box-shadow:0 8px 20px rgba(0,0,0,.2);

    z-index:9999;

    opacity:0;
    visibility:hidden;

    transition:all .3s ease;
}

#scrollBtn.show{
    opacity:1;
    visibility:visible;
}

#scrollBtn:hover{
    background:#ef4444;
    transform:translateY(-3px);
}

#scrollBtn i{
    font-size:18px;
    pointer-events:none;
}


/* =========================
   FOOTER
========================= */

.footer{

    background:#111827;

    color:#fff;

    margin-top:80px;
}

.footer-container{

    max-width:1300px;

    margin:auto;

    padding:60px 24px;

    display:grid;

    grid-template-columns:
    2fr 1fr 1fr 1fr;

    gap:40px;
}

.footer-brand img{
    height:81px;

    background:white;

    padding:5px;

    border-radius:5px;
}
.footer-brand p{

    color:#9ca3af;

    line-height:1.8;

    max-width:320px;
}

.footer-column h3{

    margin-bottom:20px;

    font-size:18px;

    font-weight:700;
}

.footer-column{
    display:flex;
    flex-direction:column;
    position:relative;
    padding-left:30px;
}

.footer-column a{

    color:#9ca3af;

    text-decoration:none;

    margin-bottom:12px;

    transition:.3s;
}

.footer-column a:hover{

    color:#ef4444;
}

.footer-bottom{

    border-top:1px solid #374151;

    text-align:center;

    padding:20px;
}

.footer-bottom p{

    color:#9ca3af;

    font-size:14px;
}

.footer-column::before{

    content:"";

    position:absolute;

    left:0;
    top:10px;

    width:1px;
    height:80%;

    background:rgba(255,255,255,0.12);
}


/* =========================
   LARGE TABLET / SMALL LAPTOP
========================= */
@media (max-width:1200px){

     .navbar{
        height: 88px;
        padding: 0 24px;
    }

    .logo img{
        height: 92px;
    }

    .hero h1{
        font-size:52px;
    }
}


/* =========================
   TABLET
========================= */
@media (max-width:992px){

   .navbar{
        height: 80px;
        padding: 0 20px;
    }

    .logo img{
        height: 84px;
    }

    .back-btn{
        padding:10px 16px;
        font-size:14px;
    }

    .hero h1{
        font-size:44px;
    }

    .hero p{
        font-size:18px;
    }

    .footer-container{
        grid-template-columns:repeat(2,1fr);
        gap:30px;
    }
}
/* =========================
   MOBILE
========================= */
@media (max-width:768px){

   .navbar{
        height: 76px;
        padding: 0 16px;
    }

    .logo img{
        height: 74px;
    }

    .back-btn{
        width:42px;
        height:42px;

        padding:0;

        border-radius:12px;

        display:flex;
        align-items:center;
        justify-content:center;
    }

    .back-text{
        display:none;
    }

    .back-btn i{
        font-size:18px;
        color:#ffffff;
    }

    .hero{
        padding:50px 20px 35px;
    }

    .hero h1{
        font-size:32px;
    }

    .hero p{
        font-size:15px;
    }

    .tools-grid-page{
        grid-template-columns:1fr;
        gap:15px;
    }

    .tool-item{
        min-height:80px;
        font-size:15px;
        padding:16px;
    }

    .footer-container{
        grid-template-columns:1fr;
        text-align:center;
    }

    .footer-brand img{
        height:60px;
    }

    .footer-brand p{
        max-width:100%;
        margin:auto;
    }

    .footer-column{
        padding-left:0;
    }

    .footer-column::before{
        display:none;
    }
}

/* =========================
   SMALL MOBILE
========================= */
@media (max-width:480px){

    .navbar{
        height: 72px;
        padding: 0 12px;
    }

    .logo img{
        height: 68px;
    }

    .back-btn{
        width:38px;
        height:38px;
        padding:0;
        border-radius:10px;
    }

    .back-btn i{
        font-size:16px;
    }

    .hero h1{
        font-size:28px;
    }

    .hero p{
        font-size:14px;
    }

    .tool-item{
        min-height:75px;
        font-size:14px;
        padding:14px;
    }

    .footer-bottom p{
        font-size:13px;
    }
}