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

body {

    background: #f5f7fb;

    font-family: 'Segoe UI', sans-serif;

}

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

.converter-card {

    max-width: 1200px;

    margin: auto;

    background: white;

    border-radius: 25px;

    padding: 40px;

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

}

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

h1 {

    font-size: 46px;

    font-weight: 700;

    color: #2563eb;

}

/* ===========================
   SUMMARY CARD
=========================== */

.summary-card {

    display: flex;

    justify-content: space-between;

    align-items: center;

    background: #f8fafc;

    border: 1px solid #e5e7eb;

    border-radius: 15px;

    padding: 20px 25px;

    margin-bottom: 20px;

    font-size: 18px;

}

/* ===========================
   FILE LIST
=========================== */

#fileListContainer .card {

    border: none;

    border-radius: 15px;

    margin-bottom: 12px;

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

}

#fileListContainer .card-body {

    padding: 18px 25px;

}

.file-row-name {

    font-size: 18px;

    font-weight: 600;

}

.file-row-name i {

    color: #2563eb;

    font-size: 24px;

    margin-right: 10px;

}

.preview-btn {

    min-width: 90px;

    height: 40px;

    font-weight: 600;

}

.delete-btn {

    min-width: 110px;

    height: 42px;

    font-weight: 600;

}


/* ===================================
   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;

}

/* ===========================
   PASSWORD SECTION
=========================== */

.password-section {

    margin-top: 30px;

    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 15px;

    overflow: hidden;

}

.password-header {

    display: grid;

    grid-template-columns: 1fr 320px;

    background: #f8fafc;

    padding: 15px 25px;

    font-weight: 700;

    border-bottom: 1px solid #e5e7eb;

}

.password-row {

    display: grid;

    grid-template-columns: 1fr 320px;

    gap: 20px;

    align-items: center;

    padding: 15px 25px;

    border-bottom: 1px solid #e5e7eb;

}

.password-row:last-child {

    border-bottom: none;

}

.password-file {

    font-size: 16px;

    font-weight: 600;

}

.password-input {

    height: 48px;

    border-radius: 12px;

}

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

.btn-primary {

    background: linear-gradient(90deg,
            #2563eb,
            #7c3aed);

    border: none;

}

.btn-primary:hover {

    opacity: .9;

}

#protectBtn {

    width: 320px;

    height: 55px;

    font-size: 18px;

    font-weight: 600;

}

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

.progress {

    height: 28px;

    border-radius: 50px;

}

.progress-bar {

    font-weight: 600;

}

#progressSection {

    width: 70%;

    margin: auto;

}

/* ===========================
   RESULT HEADER
=========================== */

.result-header {

    background: #f8fafc;

    border: 1px solid #e5e7eb;

    border-radius: 15px;

    padding: 15px;

    margin-bottom: 15px;

}

/* ===========================
   RESULT FILES
=========================== */

#protectedFilesContainer .card {

    border: none;

    border-radius: 15px;

    margin-bottom: 12px;

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

}

#protectedFilesContainer .card-body {

    padding: 18px 25px;

}

#protectedFilesContainer .btn {

    min-width: 100px;

}

/* ===========================
   RESULT SUMMARY
=========================== */

.result-summary {

    margin-top: 20px;

    padding: 15px;

    background: #f8fafc;

    border: 1px solid #e5e7eb;

    border-radius: 15px;

    text-align: center;

    font-size: 16px;

    font-weight: 600;

}

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

#previewFrame {

    width: 100%;

    height: 700px;

    border: none;

}

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

.dark-mode {

    background: #111827;

    color: white;

}

.dark-mode .converter-card {

    background: #1f2937;

    color: white;

}

.dark-mode .summary-card {

    background: #374151;

    border-color: #4b5563;

}

.dark-mode .card {

    background: #374151;

    color: white;

}

.dark-mode .upload-area {

    background: #374151;

    border-color: #60a5fa;

}

.dark-mode .password-section {

    background: #374151;

    border-color: #4b5563;

}

.dark-mode .password-header {

    background: #374151;

    border-color: #4b5563;

}

.dark-mode .password-row {

    border-color: #4b5563;

}

.dark-mode .password-input {

    background: #111827;

    color: white;

    border-color: #4b5563;

}

.dark-mode .result-header {

    background: #374151;

    border-color: #4b5563;

}

.dark-mode .result-summary {

    background: #374151;

    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: 38px;
        text-align: center;
    }

    .summary-card {
        font-size: 16px;
        padding: 16px 20px;
    }

    .preview-btn,
    .delete-btn {

        width: 110px;

    }

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

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

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

    .password-header,
    .password-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .password-header {
        text-align: center;
    }

    .password-input {
        width: 100%;
    }

    #protectBtn {
        width: 100%;
    }

    #previewFrame {
        height: 550px;
    }

    #fileListContainer .card-body,
    #protectedFilesContainer .card-body {
        padding: 16px;
    }

    .result-header {
        display: none;
    }
}

/* ===================================
   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;
    }

    .summary-card {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        font-size: 15px;
        padding: 15px;
    }

    .upload-area {
        padding: 30px 15px;
        border-radius: 16px;
    }

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

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

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

    .upload-area .btn {
        width: 100%;
    }

    .password-section {
        margin-top: 20px;
    }

    .password-header {
        display: none;
    }

    .password-row {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 15px;
    }

    .password-file {
        text-align: center;
        font-size: 15px;
        word-break: break-word;
    }

    .password-input {
        width: 100%;
        height: 46px;
        font-size: 15px;
    }

    #protectBtn {
        width: 100%;
        height: 50px;
        font-size: 16px;
    }

    .result-header {
        display: none;
    }

    /* Upload File Card */

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

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

    .file-row-name {
        font-size: 15px;
        margin-bottom: 8px;
        word-break: break-word;
    }

    /* Result Cards */

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

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

    .result-file-name {
        font-size: 15px;
        font-weight: 700;
        text-align: center;
        margin-bottom: 12px;
        word-break: break-word;
    }

    .result-info {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        font-size: 13px;
        margin-bottom: 15px;
    }

    .preview-btn,
    .delete-btn {

        width: 110px;

        margin: 5px;

    }

    .result-actions {
        display: flex;
        gap: 10px;
    }

    .result-actions .btn {
        flex: 1;
    }

    .result-summary {
        font-size: 14px;
        line-height: 1.7;
    }

    #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;
    }

    .summary-card {
        font-size: 14px;
        padding: 12px;
    }

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

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

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

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

    .password-row {
        padding: 12px;
    }

    .password-file {
        font-size: 14px;
    }

    .password-input {
        height: 44px;
        font-size: 14px;
    }

    .preview-btn,
    .delete-btn {

        width: 100px;

        font-size: 14px;

    }

    .file-row-name {
        font-size: 14px;
    }

    .result-info {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .result-actions {
        flex-direction: column;
    }

    .result-actions .btn {
        width: 100%;
    }

    .result-summary {
        font-size: 13px;
    }

    #previewFrame {
        height: 400px;
    }
}