/* Reset e base */
* {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: sans-serif;
    overflow-x: hidden; /* Evita scroll orizzontale */
}

/* Layout Split Screen */
.split-screen {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* Pannello Sinistro (Immagine) */
.left-panel {
    flex: 1; /* Occupa tutto lo spazio rimanente */
    background-image: url("img/sfondo.jpg");
    background-size: cover;
    background-position: center;
    position: relative;
    min-height: 200px; /* Altezza minima per mobile */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    padding: 40px;
    text-align: left;
}



.promo-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    width: 100%;
}

.promo-content h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.2em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.promo-content .subtitle {
    font-size: 1.6rem;
    font-weight: 300;
    margin-top: 0;
    margin-bottom: 10px;
    opacity: 0.9;
}

.features {
    margin-bottom: 40px;
}

.features p {
    font-size: 1.2rem;
    margin: 15px 0;
    display: flex;
    align-items: center;
}

.features .icon {
    margin-right: 15px;
    font-size: 1.4rem;
}

.offer-badge {
    display: inline-block;
    background-color: #ffd700; /* Oro */
    color: #333;
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    font-weight: bold;
    transform: rotate(-2deg);
    transition: transform 0.3s;
}

.offer-badge:hover {
    transform: rotate(0) scale(1.05);
}

.offer-text {
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.offer-main {
    display: block;
    font-size: 1.5rem;
    font-weight: 900;
}

/* Pannello Destro (Login) */
.right-panel {
    width: 500px; /* Larghezza fissa desktop */
    min-width: 320px;
    background-color: #fff;
    display: flex;
    justify-content: center; /* Centra orizzontalmente il container interno */
    align-items: center;     /* Centra verticalmente il container interno */
    padding: 40px;
    box-shadow: -5px 0 15px rgba(0,0,0,0.05); /* Leggera ombra di separazione */
    position: relative;
    z-index: 10;
    overflow-y: auto; /* Permette lo scroll se il contenuto è troppo alto */
}

/* Container del Form */
.login-container {
    width: 100%;
    max-width: 380px; /* Larghezza massima del form */
    text-align: center;
}

/* Stili esistenti adattati */
.logo {
    max-width: 150px;
    margin: 0 auto 20px auto;
    display: block;
}

h1 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 24px;
    color: #333;
}

.greeting {
    margin: 0 0 5px 0;
    font-weight: bold;
    color: #555;
}

.instruction {
    margin: 0 0 25px 0;
    font-size: 14px;
    color: #888;
}

.input-group {
    margin-bottom: 20px;
    text-align: left; /* Allinea label e input a sinistra */
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus {
    border-color: #007bff;
    outline: none;
}

.forgot-password {
    float: right;
    font-size: 12px;
    color: #007bff;
    margin-top: 5px;
    cursor: pointer;
}

/* Clearfix per forgot-password */
.input-group::after {
    content: "";
    display: table;
    clear: both;
}

button {
    background-color: #007bff;
    border: none;
    color: white;
    padding: 14px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

button:hover {
    background-color: #0056b3;
}

.signup-link {
    font-size: 13px;
    color: #888;
    margin-top: 25px;
}

.back-button {
    background-color: transparent;
    border: 1px solid #007bff;
    color: #007bff;
    margin-top: 20px;
}

.back-button:hover {
    background-color: #f0f8ff;
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .split-screen {
        flex-direction: column; /* Impila verticalmente */
        height: auto; /* Permette alla pagina di scorrere */
        min-height: 100vh;
    }

    .left-panel {
        width: 100%;
        height: auto; /* Altezza automatica per mostrare tutto il contenuto */
        min-height: 40vh; 
        flex: none; /* Disabilita flex grow/shrink standard */
        padding-top: 60px;
        padding-bottom: 60px;
    }

    .right-panel {
        width: 100%;
        flex: 1; /* Occupa il resto dello spazio o si espande */
        padding: 30px 20px;
        align-items: flex-start; /* Allinea in alto per evitare problemi di scroll su schermi piccoli */
        box-shadow: none; /* Rimuovi ombra laterale su mobile */
        border-radius: 20px 20px 0 0; /* Arrotonda gli angoli superiori per effetto "foglio" */
        margin-top: -20px; /* Sovrapponi leggermente all'immagine */
    }
    
    .login-container {
        margin: 0 auto; /* Centra orizzontalmente */
    }

    /* Adattamenti promo mobile */
    .promo-content h2 {
        font-size: 1.8rem;
    }
    .promo-content .subtitle {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
    .features {
        display: block; /* Mostra dettagli features anche su mobile */
    }
    .offer-badge {
        padding: 10px 20px;
        transform: rotate(0);
    }
    .offer-main {
        font-size: 1.2rem;
    }

    .promo-content {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .install-section {
        align-self: center;
        margin-top: 30px;
    }
}

/* Nuova sezione Installazione App */
.install-section {
    margin-top: 30px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 15px 25px;
    display: inline-block;
    color: #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    text-align: center;
}

.install-title {
    margin: 0 0 10px 0;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #333;
}

.app-icons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.install-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.2s;
}

.install-icon:hover {
    transform: scale(1.1);
}

/* Nuovi stili per i Plugin */
.installed-plugins-title {
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.plugin-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
}

.plugin-card {
    background-color: #ffffff;
    border-radius: 20px;
    padding: 12px 10px;
    width: 110px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.plugin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.plugin-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
}

.plugin-name {
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
    color: #333;
}

/* Adattamento mobile per i plugin */
@media (max-width: 768px) {
    .plugin-cards {
        justify-content: flex-start; /* Allinea a sinistra su mobile, scroll se necessario o wrap */
    }
}

/* Menu Top Right Login */
.top-menu {
    position: absolute;
    top: 20px;
    left: 0;
    display: flex;
    gap: 20px;
    justify-content: flex-end; /* Sposta a destra le voci del menu */
    padding-right: 40px;
    width: 100%;
    z-index: 100;
}

.top-menu a {
    text-decoration: none;
    color: #555;
    font-size: 13px; /* Testo più piccolo */
    font-weight: 400; /* Font normale come in foto */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: color 0.3s;
}

.top-menu a:hover {
    color: #007bff;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .right-panel {
        flex-direction: column; /* Impila verticalmente su mobile */
        justify-content: flex-start; /* Allinea in alto */
    }

    .top-menu {
        position: static; /* Su mobile diventa parte del flusso */
        flex-wrap: wrap;
        margin-bottom: 20px;
        gap: 15px;
        padding-right: 0;
        justify-content: center;
    }
}
