/* =========================
   RESET
========================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    font-family: "Inter", sans-serif;
    color: #e2e8f0;

    background:
        radial-gradient(
            circle at 15% 0%,
            rgba(37, 99, 235, 0.22),
            transparent 32%
        ),
        radial-gradient(
            circle at 90% 100%,
            rgba(14, 165, 233, 0.14),
            transparent 32%
        ),
        linear-gradient(
            180deg,
            #08111f 0%,
            #0b1424 50%,
            #080f1c 100%
        );
}


/* =========================
   CONTAINER
========================= */

.compressor {
    width: min(900px, 94%);
    min-height: 100vh;

    margin: 0 auto;

    padding: 48px 0 60px;
}


/* =========================
   CABEÇALHO
========================= */

.titulo {
    text-align: center;

    margin-bottom: 30px;
}

.titulo h1 {
    color: #f8fafc;

    font-size: clamp(
        28px,
        5vw,
        40px
    );

    font-weight: 700;

    letter-spacing: -1.2px;
}

.titulo h1::after {
    content: "";

    display: block;

    width: 54px;
    height: 3px;

    margin: 14px auto 0;

    border-radius: 999px;

    background:
        linear-gradient(
            90deg,
            #2563eb,
            #38bdf8
        );
}

.titulo p {
    max-width: 560px;

    margin: 14px auto 0;

    color: #94a3b8;

    font-size: 14px;
    line-height: 1.6;
}


/* =========================
   CARDS
========================= */

.compressor-card,
.files-card,
.action-card {
    width: 100%;

    border: 1px solid
        rgba(148, 163, 184, 0.12);

    border-radius: 20px;

    background:
        linear-gradient(
            145deg,
            rgba(15, 23, 42, 0.94),
            rgba(8, 17, 31, 0.92)
        );

    box-shadow:
        0 20px 60px
        rgba(0, 0, 0, 0.24);

    backdrop-filter: blur(12px);
}

.files-card,
.action-card {
    margin-top: 18px;
}


/* =========================
   ÁREA DE UPLOAD
========================= */

.upload-area {
    position: relative;

    min-height: 330px;

    padding: 40px 24px;

    display: flex;
    flex-direction: column;

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

    text-align: center;

    overflow: hidden;
}

.upload-area::before {
    content: "";

    position: absolute;

    width: 300px;
    height: 300px;

    top: -180px;
    right: -100px;

    border-radius: 50%;

    background:
        rgba(37, 99, 235, 0.12);

    filter: blur(15px);

    pointer-events: none;
}

.upload-area::after {
    content: "";

    position: absolute;

    width: 220px;
    height: 220px;

    bottom: -160px;
    left: -90px;

    border-radius: 50%;

    background:
        rgba(14, 165, 233, 0.07);

    filter: blur(15px);

    pointer-events: none;
}


/* =========================
   ÍCONE ZIP
========================= */

.upload-icon {
    position: relative;
    z-index: 1;

    width: 76px;
    height: 76px;

    display: flex;

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

    margin-bottom: 20px;

    border: 1px solid
        rgba(56, 189, 248, 0.28);

    border-radius: 20px;

    background:
        linear-gradient(
            145deg,
            rgba(37, 99, 235, 0.28),
            rgba(14, 165, 233, 0.08)
        );

    color: #7dd3fc;

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

    letter-spacing: 1px;

    box-shadow:
        0 12px 40px
        rgba(37, 99, 235, 0.18);
}


/* =========================
   TEXTOS DO UPLOAD
========================= */

.upload-area h2,
.upload-area > p,
.upload-buttons {
    position: relative;
    z-index: 1;
}

.upload-area h2 {
    color: #f8fafc;

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

    letter-spacing: -0.4px;
}

.upload-area > p {
    margin-top: 8px;

    color: #64748b;

    font-size: 13px;

    line-height: 1.5;
}


/* =========================
   BOTÕES
========================= */

.upload-buttons {
    width: 100%;

    display: flex;

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

    gap: 10px;

    margin-top: 25px;
}

.btn-compressor,
.btn-secondary {
    min-height: 44px;

    padding: 9px 17px;

    border-radius: 10px;

    font-family: "Inter", sans-serif;

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

    cursor: pointer;

    transition:
        transform 0.16s ease,
        background 0.16s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        color 0.16s ease,
        opacity 0.16s ease;
}

.btn-compressor {
    border: 1px solid
        rgba(96, 165, 250, 0.45);

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #1d4ed8
        );

    color: #ffffff;

    box-shadow:
        0 8px 25px
        rgba(37, 99, 235, 0.18);
}

.btn-compressor:hover {
    transform: translateY(-1px);

    border-color:
        rgba(125, 211, 252, 0.65);

    background:
        linear-gradient(
            135deg,
            #3b82f6,
            #2563eb
        );

    box-shadow:
        0 10px 30px
        rgba(37, 99, 235, 0.25);
}

.btn-compressor:active {
    transform: translateY(0);
}

.btn-compressor:focus-visible,
.btn-secondary:focus-visible {
    outline: none;

    border-color: #38bdf8;

    box-shadow:
        0 0 0 3px
        rgba(56, 189, 248, 0.1);
}


/* =========================
   BOTÃO SECUNDÁRIO
========================= */

.btn-secondary {
    border: 1px solid
        rgba(96, 165, 250, 0.16);

    background: #111e33;

    color: #94a3b8;
}

.btn-secondary:hover {
    border-color:
        rgba(96, 165, 250, 0.4);

    background: #172943;

    color: #f8fafc;
}


/* =========================
   INPUTS OCULTOS
========================= */

#fileInput,
#folderInput {
    display: none;
}


/* =========================
   CARD DE ARQUIVOS
========================= */

.files-card {
    padding: 20px;
}

.files-header {
    display: flex;

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

    gap: 15px;

    margin-bottom: 14px;
}

.section-label {
    display: block;

    color: #cbd5e1;

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

    letter-spacing: 0.2px;
}

.file-count {
    margin-top: 4px;

    color: #64748b;

    font-size: 11px;
}


/* =========================
   LISTA DE ARQUIVOS
========================= */

.file-list {
    max-height: 330px;

    display: flex;
    flex-direction: column;

    gap: 7px;

    overflow-y: auto;

    padding-right: 3px;

    scrollbar-width: thin;
}

.file-item {
    width: 100%;

    padding: 11px 13px;

    display: flex;

    align-items: center;

    border: 1px solid
        rgba(96, 165, 250, 0.08);

    border-radius: 10px;

    background:
        rgba(15, 23, 42, 0.72);

    transition:
        background 0.16s ease,
        border-color 0.16s ease;
}

.file-item:hover {
    border-color:
        rgba(96, 165, 250, 0.2);

    background:
        rgba(23, 41, 67, 0.7);
}

.file-info {
    width: 100%;
    min-width: 0;

    display: flex;

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

    gap: 15px;
}

.file-info strong {
    min-width: 0;

    overflow: hidden;

    color: #cbd5e1;

    font-size: 12px;
    font-weight: 500;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-info span {
    flex-shrink: 0;

    color: #64748b;

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 10px;
}


/* =========================
   CARD DE AÇÃO
========================= */

.action-card {
    padding: 18px;

    display: flex;
    flex-direction: column;

    align-items: center;
}

.btn-download {
    width: 100%;

    min-height: 48px;

    font-size: 13px;
}

.btn-download:disabled {
    opacity: 0.55;

    cursor: not-allowed;

    transform: none;

    box-shadow: none;
}


/* =========================
   STATUS
========================= */

.compressor-status {
    min-height: 18px;

    margin-top: 10px;

    color: #64748b;

    font-size: 11px;

    line-height: 1.4;

    text-align: center;
}

.compressor-status:not(:empty) {
    color: #60a5fa;
}


/* =========================
   SCROLLBAR
========================= */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #07101d;
}

::-webkit-scrollbar-thumb {
    border-radius: 999px;

    background: #1e3a5f;
}

::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}


/* =========================
   SELEÇÃO
========================= */

::selection {
    background:
        rgba(37, 99, 235, 0.35);

    color: #ffffff;
}


/* =========================
   RESPONSIVIDADE
========================= */

@media (max-width: 600px) {

    .compressor {
        width: 94%;

        padding:
            32px 0 40px;
    }

    .titulo {
        margin-bottom: 22px;
    }

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

    .titulo p {
        font-size: 13px;
    }

    .compressor-card,
    .files-card,
    .action-card {
        border-radius: 16px;
    }

    .upload-area {
        min-height: 300px;

        padding:
            32px 18px;
    }

    .upload-icon {
        width: 64px;
        height: 64px;

        margin-bottom: 17px;

        border-radius: 17px;

        font-size: 16px;
    }

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

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

    .upload-buttons {
        flex-direction: column;

        gap: 8px;

        margin-top: 22px;
    }

    .upload-buttons .btn-compressor {
        width: 100%;
    }

    .files-card {
        padding: 15px;
    }

    .files-header {
        align-items: flex-start;
    }

    .btn-secondary {
        min-height: 38px;

        padding:
            8px 12px;
    }

    .file-list {
        max-height: 280px;
    }

    .file-info {
        align-items: flex-start;

        flex-direction: column;

        gap: 4px;
    }

    .file-info strong {
        width: 100%;
    }

    .file-info span {
        font-size: 10px;
    }

    .action-card {
        padding: 14px;
    }
}


/* =========================
   TELAS MUITO PEQUENAS
========================= */

@media (max-width: 360px) {

    .compressor {
        width: 95%;
    }

    .titulo h1 {
        font-size: 25px;
    }

    .titulo p {
        font-size: 12px;
    }

    .upload-area {
        padding:
            28px 14px;
    }

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

    .upload-icon {
        width: 58px;
        height: 58px;

        border-radius: 15px;
    }

    .files-card {
        padding: 12px;
    }

    .file-item {
        padding: 10px;
    }

    .action-card {
        padding: 12px;
    }
}