/* ===========================
   PAGE
=========================== */

body {
    background: #f5f7fb;
    font-family: 'Segoe UI', sans-serif;
}

/* ===========================
   MAIN CARD
=========================== */

.converter-card {
    border: none;
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

/* ===========================
   TITLE
=========================== */

h1 {
    font-size: 42px;
    font-weight: 700;
    color: #4f46e5;
}

/* ===========================
   COMMON WIDTH
=========================== */

.upload-area,
#selectedFileCard,
#resultCard,
#splitBtn,
#progressSection {
    width: 70%;
    margin-left: auto;
    margin-right: auto;
}

/* ===========================
   FILE CARD
=========================== */

#selectedFileCard {
    margin-bottom: 20px;
}

#selectedFileCard .card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
}

#selectedFileCard .card-body {
    padding: 18px 25px;
}

.file-name-link {
    font-size: 20px;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
    word-break: break-word;
}

.file-name-link:hover {
    text-decoration: underline;
}

.file-size {
    font-size: 18px;
    font-weight: 700;
}

/* ===================================
   UPLOAD AREA
=================================== */

.upload-area {

    background: #eff6ff;

    border: 2px dashed #2563eb;

    border-radius: 20px;

    padding: 50px 30px;

    text-align: center;

    cursor: pointer;

    transition: all .3s ease;

}

.upload-area:hover {

    background: #dbeafe;

    border-color: #1d4ed8;

}

.upload-area.dragover {

    background: #bfdbfe;

    border-color: #1e40af;

    transform: scale(1.02);

}

.upload-icon {

    font-size: 70px;

    color: #2563eb;

    margin-bottom: 20px;

}

.upload-area h3 {

    color: #1d4ed8;

    font-size: 1.7rem;

    font-weight: 700;

    margin-bottom: 10px;

}

.upload-area p {

    color: #475569;

    margin-bottom: 8px;

}

.upload-area .btn-primary {

    background: #2563eb;

    border: none;

    border-radius: 10px;

    padding: 12px 30px;

    font-weight: 600;

}

.upload-area .btn-primary:hover {

    background: #1d4ed8;

}

.upload-area .btn-outline-primary {

    border: 2px solid #2563eb;

    color: #2563eb;

    border-radius: 10px;

    padding: 12px 30px;

    font-weight: 600;

}

.upload-area .btn-outline-primary:hover {

    background: #2563eb;

    color: #ffffff;

}

/* ===========================
   CHOOSE PDF BUTTON
=========================== */

.upload-area .btn-primary {
    min-width: 220px;
    height: 55px;
    font-size: 18px;
    font-weight: 600;
}

/* ===========================
   PREVIEW / DELETE BUTTONS
=========================== */

#previewSourceBtn,
#deleteSourceBtn {
    width: 110px;
    height: 40px;
    font-weight: 600;
}

/* ===========================
   SPLIT BUTTON
=========================== */

#splitBtn {
    height: 55px;
    font-size: 20px;
    font-weight: 600;
    border-radius: 12px;
}

/* ===========================
   RESULT SECTION
=========================== */

.result-header {
    background: #f8fafc;
    border-radius: 12px;
    padding: 15px;
    font-weight: 600;
}

#pdfDownloads .card {
    border: none;
    border-radius: 12px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
}

#pdfDownloads .card-body {
    padding: 15px 20px;
}

#pdfDownloads .btn {
    min-width: 100px;
}

/* ===========================
   BUTTONS
=========================== */

.btn-primary {
    background: linear-gradient(90deg,
            #2563eb,
            #7c3aed);
    border: none;
}

.btn-primary:hover {
    opacity: .9;
}

.btn-success {
    font-weight: 600;
}

.btn-lg {
    border-radius: 10px;
}

/* ===========================
   DISABLED BUTTON
=========================== */

#splitBtn:disabled {

    opacity: .7;

    cursor: not-allowed;

}

/* ===========================
   PROGRESS BAR
=========================== */

.progress {
    height: 25px;
    border-radius: 50px;
}

.progress-bar {
    font-weight: 600;
}

/* ===========================
   CONVERSION MODE
=========================== */

.converting {

    pointer-events: none;

    opacity: .65;

}

#progressSection {

    margin-top: 30px;

}

/* ===========================
   PDF PREVIEW
=========================== */

#previewFrame {
    width: 100%;
    height: 700px;
    border: none;
}

/* ===========================
   CARD HOVER
=========================== */

.card {
    transition: .2s;
}

.card:hover {
    transform: translateY(-2px);
}

/* ===========================
   DARK MODE
=========================== */

.dark-mode {
    background: #111827;
    color: white;
}

.dark-mode .converter-card {
    background: #1f2937;
    color: white;
}

.dark-mode .upload-area {
    background: #374151;
    border-color: #60a5fa;
}

.dark-mode .card {
    background: #374151;
    color: white;
}

.dark-mode .form-control {
    background: #1f2937;
    color: white;
    border-color: #4b5563;
}

.dark-mode .modal-content {
    background: #1f2937;
    color: white;
}

/* ===================================
   TABLET (768px - 991px)
=================================== */

@media (max-width:991px) {

    .converter-card {
        padding: 30px;
        margin-bottom: 100px;
    }

    h1 {
        font-size: 36px;
        text-align: center;
    }

    .upload-area,
    #selectedFileCard,
    #resultCard,
    #splitBtn,
    #progressSection {
        width: 90%;
    }

    .upload-area {
        padding: 30px 20px;
    }

    .upload-icon {
        font-size: 45px;
    }

    .file-name-link {
        font-size: 18px;
    }

    .file-size {
        font-size: 16px;
    }

    #previewFrame {
        height: 550px;
    }
}

/* ===================================
   MOBILE (576px - 767px)
=================================== */

@media (max-width:767px) {

    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .converter-card {
        padding: 20px 15px;
        border-radius: 18px;
        margin-bottom: 100px;
    }

    h1 {
        font-size: 30px;
        text-align: center;
    }

    .upload-area,
    #selectedFileCard,
    #resultCard,
    #splitBtn,
    #progressSection {
        width: 100%;
    }

    .upload-area {
        padding: 25px 15px;
        border-radius: 16px;
        min-height: auto;
    }

    .upload-icon {
        font-size: 40px;
    }

    .upload-area h3 {
        font-size: 18px;
    }

    .upload-area p {
        font-size: 13px;
    }

    .upload-area .btn-primary {
        width: 100%;
        min-width: auto;
        height: 50px;
        font-size: 16px;
    }

    /* Upload File Card */

    #selectedFileCard .card {
        border-radius: 14px;
    }

    #selectedFileCard .card-body {
        padding: 15px;
        text-align: center;
    }

    .file-name-link {
        font-size: 16px;
        display: block;
        margin-bottom: 10px;
    }

    .file-size {
        font-size: 14px;
        margin-bottom: 15px;
    }

    #previewSourceBtn,
    #deleteSourceBtn {
        width: 100%;
        height: 45px;
        margin-bottom: 10px;
    }

    #splitBtn {
        width: 100%;
        height: 50px;
        font-size: 17px;
    }

    /* Result Cards */

    .result-header {
        display: none;
    }

    #pdfDownloads .card {
        border-radius: 14px;
        margin-bottom: 15px;
    }

    #pdfDownloads .card-body {
        padding: 15px;
        text-align: center;
    }

    #pdfDownloads .btn {
        width: 100%;
        margin-top: 10px;
    }

    #previewFrame {
        height: 500px;
    }

    .modal-dialog {
        max-width: 98%;
        margin: 10px auto;
    }
}

/* ===================================
   SMALL MOBILE (320px - 575px)
=================================== */

@media (max-width:575px) {

    .converter-card {
        padding: 15px 12px;
        margin-bottom: 100px;
    }

    h1 {
        font-size: 26px;
    }

    .upload-area {
        padding: 20px 10px;
    }

    .upload-icon {
        font-size: 35px;
    }

    .upload-area h3 {
        font-size: 17px;
    }

    .upload-area p {
        font-size: 12px;
    }

    .file-name-link {
        font-size: 15px;
    }

    .file-size {
        font-size: 13px;
    }

    #previewSourceBtn,
    #deleteSourceBtn {
        height: 42px;
        font-size: 14px;
    }

    #splitBtn {
        height: 48px;
        font-size: 16px;
    }

    #pdfDownloads .btn {
        font-size: 14px;
    }

    #previewFrame {
        height: 400px;
    }
}

/* ===========================
   HIDE DURING CONVERSION
=========================== */

.hide-during-conversion {

    display: none !important;

}