
/* ========================================
   CONFIGURACIÓ GENERAL
======================================== */

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

body {
    min-height: 100vh;
    min-height: 100dvh;
    font-family: Arial, sans-serif;
    color: #24212b;
    overflow-x: hidden;
    position: relative;
    isolation: isolate;
}

/* ========================================
   MESH GRADIENT ANIMAT
======================================== */

.mesh-background {
    position: fixed;
    inset: 0;
    overflow: hidden;
    background: #eac6d7;
    z-index: -1;
}

.blob {
    position: absolute;
    width: 85vw;
    height: 85vw;
    min-width: 500px;
    min-height: 500px;
    border-radius: 50%;
    filter: blur(85px);
    opacity: 0.8;
    animation: floatMesh 12s ease-in-out infinite alternate;
}

.blob-1 {
    background: #f39c8b;
    top: -40%;
    left: -25%;
}

.blob-2 {
    background: #a89af9;
    top: 5%;
    right: -35%;
    animation-delay: -4s;
}

.blob-3 {
    background: #86c8e8;
    bottom: -50%;
    left: -15%;
    animation-delay: -7s;
}

@keyframes floatMesh {
    0% {
        transform: translate(-10%, 8%) scale(1);
    }

    100% {
        transform: translate(15%, -12%) scale(1.25);
    }
}

/* ========================================
   ESTRUCTURA
======================================== */

body {
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 45px 20px;
}

.logo {
    width: 180px;
    max-width: 70%;
    height: auto;
}

main {
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* ========================================
   PANELL GLASSMORPHISM
======================================== */

.transfer-panel {
    width: 100%;
    max-width: 440px;
    padding: 40px;
    text-align: center;

    background: rgba(255, 255, 255, 0.30);

    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);

    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 25px;

    box-shadow: 0 20px 60px rgba(50, 30, 70, 0.12);

    animation: panelEntrance 0.8s ease-out both;
}

@keyframes panelEntrance {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   CONTINGUT DEL PANELL
======================================== */

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

.transfer-panel h1 {
    font-size: 25px;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.transfer-panel > p {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.7;
    margin-bottom: 25px;
}

/* ========================================
   ZONA D'ARROSSEGAR ARXIUS
======================================== */

.drop-zone {
    padding: 35px 20px;
    margin-bottom: 20px;

    background: rgba(255, 255, 255, 0.25);
    border: 1px dashed rgba(60, 50, 70, 0.35);
    border-radius: 15px;

    transition: all 0.3s ease;
}

.drop-zone:hover {
    background: rgba(255, 255, 255, 0.45);
    border-color: #24212b;
}

.drop-zone span {
    display: block;
    font-size: 35px;
    margin-bottom: 12px;
}

.drop-zone p {
    font-size: 13px;
    margin-bottom: 15px;
}

#select-files {
    padding: 11px 20px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 30px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

#select-files:hover {
    background: white;
}

/* ========================================
   BOTÓ PRINCIPAL
======================================== */

.transfer-button {
    width: 100%;
    padding: 16px 20px;

    background: #24212b;
    color: white;

    border: none;
    border-radius: 30px;

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

    transition: transform 0.2s, background 0.2s;
}

.transfer-button:hover {
    background: #403849;
    transform: translateY(-2px);
}

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

footer {
    padding: 25px;
    font-size: 12px;
    opacity: 0.6;
    text-align: center;
}

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

@media (max-width: 600px) {

    header {
        padding: 30px 20px;
    }

    .logo {
        width: 150px;
    }

    .transfer-panel {
        padding: 28px 22px;
        border-radius: 20px;
    }

    .transfer-panel h1 {
        font-size: 22px;
    }

    .blob {
        filter: blur(60px);
    }
}

/* Accessibilitat: reduir moviment */
@media (prefers-reduced-motion: reduce) {
    .blob,
    .transfer-panel {
        animation: none;
    }
}


/* ========================================
   INTERACCIÓ AMB ARXIUS
======================================== */

.drop-zone.drag-active {
    background: rgba(255, 255, 255, 0.65);
    border-color: #24212b;
    transform: scale(1.02);
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.file-list:empty {
    display: none;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;

    background: rgba(255, 255, 255, 0.35);
    border-radius: 10px;

    font-size: 12px;
    text-align: left;
}

.file-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-item small {
    opacity: 0.6;
    white-space: nowrap;
}

.file-item button {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 22px;
    color: #24212b;
}


/* ========================================
   LOGIN
======================================== */

.login-label {
    display: block;
    text-align: left;
    font-size: 13px;
    margin-bottom: 10px;
}

.login-input {
    width: 100%;
    padding: 15px 18px;
    margin-bottom: 20px;

    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 12px;

    font-size: 16px;
    color: #24212b;
    outline: none;
}

.login-input:focus {
    border-color: #24212b;
}
