/* Impostazioni di base */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
    background: linear-gradient(135deg, #e0f7fa, #80deea);
}


/* Stile per il contenitore centrale dei form */

.container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
}


/* Stile per i form */

form {
    width: 100%;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
}

input {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    margin-bottom: 20px;
}

button {
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    cursor: pointer;
    margin-left: auto;
}

button:hover {
    background-color: #0069d9;
}


/* Stile per i link */

a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s, box-shadow 0.3s;
}

a:hover {
    color: #007bff;
    text-decoration: underline;
    box-shadow: 0px 2px 5px rgba(0, 123, 255, 0.4);
}

a:active {
    color: #0069d9;
    transform: scale(0.98);
}


/* Pulsanti di link */

.button-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    border-radius: 5px;
    text-align: center;
    transition: background-color 0.3s;
}

.button-link:hover {
    background-color: #007bff;
}

a.gradient-link {
    background: linear-gradient(to right, #007bff, #00d4ff);
    -webkit-background-clip: text;
    color: transparent;
    transition: background 0.3s;
}

a.gradient-link:hover {
    background: linear-gradient(to right, #00d4ff, #007bff);
}


/* Stile per la barra di navigazione */

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #f5f5f5;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    height: 60px;
    /* Altezza fissa per allineamento uniforme */
}

.nav-left {
    flex: 1;
}

.nav-left a {
    font-weight: bold;
    color: #007bff;
    text-decoration: none;
}

.nav-right {
    display: flex;
    align-items: center;
    /* Allinea verticalmente al centro */
    gap: 20px;
    /* Spazio tra i link */
}


/* Stile per il link in .nav-right per altezza uniforme */

.nav-right a,
.user-info {
    display: flex;
    align-items: center;
    height: 100%;
    /* Allineamento verticale costante */
}

.nav-right a {
    color: #007bff;
    text-decoration: none;
    margin-left: 20px;
}

.nav-right a:first-child {
    margin-left: 0;
}

nav a:hover {
    color: #0056b3;
    text-decoration: underline;
}


/* Wrapper della home per lo sfondo e il centramento */

.home-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #e0f7fa, #80deea);
    /* Sfondo azzurrino solo per la home */
}


/* Stile per il contenuto specifico della home */

.home-content {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px 30px;
    max-width: 600px;
    text-align: center;
}


/* Stile per il titolo nella home */

.home-content h1 {
    font-size: 2em;
    color: #007bff;
    margin-bottom: 20px;
}


/* Stile per i paragrafi nella home */

.home-content p {
    line-height: 1.6;
    margin-bottom: 15px;
}


/* Evidenzia i testi importanti nella home */

.home-content strong {
    color: #0056b3;
}


/* Stile per il codice nella home */

.home-content code {
    background-color: #f1f1f1;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #d32f2f;
}


/* Wrapper per la pagina di upload */

.upload-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* Allinea in alto */
    min-height: 100vh;
    padding-top: 40px;
    /* Spazio sopra per distanziare dal bordo superiore */
    background: linear-gradient(135deg, #e0f7fa, #80deea);
    /* Sfondo azzurrino */
}


/* Stile specifico per il contenuto di upload */

.upload-content {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px 40px;
    max-width: 1000px;
    /* Maggiore larghezza */
    width: 100%;
    /* Adattamento completo */
    text-align: center;
    margin: 20px;
}


/* Posizionamento e stile del menu utente a tendina */

.user-info {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
}

.user-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
}

.user-name {
    font-weight: bold;
    color: #007bff;
}


/* Stile per il menu a tendina */

.dropdown-menu {
    display: none;
    /* Inizialmente nascosto */
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    padding: 10px;
    min-width: 100px;
    z-index: 10;
}

.dropdown-menu a {
    color: #007bff;
    text-decoration: none;
    font-weight: normal;
    display: block;
    padding: 5px 10px;
}

.dropdown-menu a:hover {
    background-color: #f1f1f1;
    border-radius: 5px;
}


.file-list {
    list-style-type: none;
    padding: 0;
    display: flex;
    padding: 0;
}

.file-list li {
    background-color: #d7d7d7;
    border-radius: 8px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
    padding: 5px 20px;
    width: calc(100% / 3); /* Set width for 3 items per row */
    border: 1px solid rgb(116, 116, 116);
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 2px;
}

.file-list button {
    margin-left: 10px;    
    margin-top: 5px; 
}

.file-list-single {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
}

.file-list-single li {
    background-color: #d7d7d7;
    border-radius: 8px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
    padding: 5px 20px;
    max-width: 300px;
    min-width: 250px;
    text-align: center;
    align-items: center;
    border: 1px solid rgb(116, 116, 116);
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-list-single button {
    margin: 5px;
}

#code_list {
    list-style-type: none;
    padding: 0;
    justify-items: center;
}

#code_list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ccc;
    padding: 10px;
    max-width: 25%;
    border: 1px solid rgb(116, 116, 116);
    background-color: #d7d7d7;
    border-radius: 8px;
}

.flashes {
    list-style-type: none;
    border: 3px;
    border-radius: 8px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
}


.spinner-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent black background */
    display: none; /* Initially hidden */
    z-index: 9999; /* Ensure spinner is on top */
}

/* Overlay styles */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

/* Spinner styles */
.spinner {
    width: 70px;
    height: 70px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}