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

    margin-bottom: 20px;

    font-size: 18px;

    font-weight: 600;

}

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

    font-size: 24px;

    margin-right: 10px;

    color: #2563eb;

}

.file-row-size {

    font-size: 16px;

    font-weight: 600;

}

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

.upload-area {

    border: 2px dashed #2563eb;

    border-radius: 20px;

    background: #f8fbff;

    text-align: center;

    padding: 60px 20px;

    margin-top: 25px;

    transition: .3s;

}

.upload-area:hover {

    background: #eef6ff;

}

.drag-active {

    background: #dbeafe;

}

.upload-icon {

    font-size: 70px;

    color: #2563eb;

    margin-bottom: 15px;

}

.upload-area h3 {

    font-size: 24px;

    font-weight: 700;

}

.upload-area p {

    color: #6b7280;

    font-size: 16px;

}

/* ===========================
   SETTINGS
=========================== */

.settings-card {

    margin-top: 25px;

    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 15px;

    padding: 25px;

}

.settings-card label {

    font-weight: 600;

    margin-bottom: 10px;

}

/* ===========================
   QUALITY
=========================== */

#qualityValue {

    font-size: 18px;

    font-weight: 700;

    color: #2563eb;

}

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

.btn-primary {

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

    border: none;

}

.btn-primary:hover {

    opacity: .9;

}

.preview-btn,
.delete-btn,
.download-btn {
    min-width: 120px;
}

/* ===========================
   COMPRESS BUTTON
=========================== */

#compressBtn {

    width: 320px;

    height: 55px;

    font-size: 18px;

    font-weight: 600;

}

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

#progressSection {
    margin-top: 30px;
}

.progress {
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
}

.progress-bar {
    font-weight: 600;
    transition: width .4s ease;
}

button:disabled {
    cursor: not-allowed;
    opacity: .7;
}

.dark-mode .progress {
    background: #444;
}

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

.result-header {

    background: #f8fafc;

    border: 1px solid #e5e7eb;

    border-radius: 15px;

    padding: 15px;

    margin-bottom: 15px;

}

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

#compressedFilesContainer .card {

    border: none;

    border-radius: 15px;

    margin-bottom: 12px;

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

}

#compressedFilesContainer .card-body {

    padding: 18px 25px;

}

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

.result-summary {

    margin-top: 20px;

    padding: 15px;

    background: #f8fafc;

    border: 1px solid #e5e7eb;

    border-radius: 15px;

    text-align: center;

    font-weight: 600;

    font-size: 16px;

}

/* ===========================
   PREVIEW IMAGE
=========================== */

#previewImage {

    max-height: 700px;

    width: auto;

}

/* ===========================
   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 .settings-card {

    background: #374151;

    border-color: #4b5563;

}

.dark-mode .card {

    background: #374151;

    color: white;

}

.dark-mode .upload-area {

    background: #374151;

    border-color: #60a5fa;

}

.dark-mode .result-header {

    background: #374151;

    border-color: #4b5563;

}

.dark-mode .result-summary {

    background: #374151;

    border-color: #4b5563;

}

.dark-mode .form-select {

    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: 50px;
    }

    h1 {
        font-size: 38px;
    }

    .summary-card {
        font-size: 15px;
    }

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

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

    .result-header {
        display: none;
    }

    #fileListContainer .card-body,
    #compressedFilesContainer .card-body {
        padding: 18px;
    }

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

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

    .preview-btn,
    .delete-btn,
    .download-btn {
        min-width: 120px;
    }

    #compressBtn,
    #compressMoreBtn {
        width: 100%;
    }
}

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

@media (max-width:767px) {

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

    .converter-card {
        padding: 18px 14px;
        border-radius: 18px;
        margin-bottom: 50px;
    }

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

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

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

}

    .settings-card {
        padding: 18px;
    }

    .result-header {
        display: none;
    }

    /* Upload Card */

    #fileListContainer .card-body {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }

    .file-row-name {
        font-size: 14px;
        font-weight: 700;
        word-break: break-word;
    }

    .file-row-size {
        font-size: 13px;
        color: #64748b;
    }


    /* Result Card */

    #compressedFilesContainer .card-body {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 15px;
    }

    .result-file-name {
        font-size: 14px;
        font-weight: 700;
        word-break: break-word;
    }

    .result-info-row {
        display: flex;
        justify-content: space-between;
        font-size: 13px;
    }

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

    .result-action-row .btn {
        flex: 1;
    }

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

    #compressBtn,
    #compressMoreBtn {
        width: 100%;
    }
}

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

@media (max-width:575px) {

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

    h1 {
        font-size: 26px;
    }

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

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

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

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

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

    .settings-card {
        padding: 15px;
    }

    /* Upload Card */

    #fileListContainer .card-body {
        padding: 12px;
    }

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

    .file-row-size {
        font-size: 12px;
    }

    .preview-btn,
    .delete-btn {
        width: 100%;
        font-size: 12px;
    }

    /* Result Card */

    #compressedFilesContainer .card-body {
        padding: 12px;
    }

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

    .result-info-row {
        font-size: 12px;
        flex-direction: column;
        gap: 5px;
    }

    .result-action-row {
        flex-direction: column;
    }

    .result-action-row .btn {
        width: 100%;
    }

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

    #compressBtn,
    #compressMoreBtn {
        width: 100%;
        font-size: 14px;
    }
}