:root {
    --bg-color: #0097b2;
    --input-bg: #99f0f0;
    --btn-dark: #006b80;
    --btn-green: #52c41a;
    --box-dark: #005566;
    --text-light: #ffffff;
}

* { box-sizing: border-box; font-family: 'Segoe UI', system-ui, sans-serif; }

/* Sfondo scuro su PC per far risaltare l'app come su un telefono */
body {
    margin: 0;
    background-color: #1a1a1a; 
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

/* Contenitore che simula lo schermo dello smartphone anche su PC */
.mobile-app {
    width: 100%;
    max-width: 480px; 
    min-height: 100vh;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
}

.top-banner {
    width: 100%;
    display: flex;
    justify-content: center;
    background-color: #0d1e2d;
}

.top-banner img {
    width: 100%;
    height: auto;
    display: block;
}

.app-container {
    width: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1; 
}

.section-container { width: 100%; text-align: center; }

label {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-light);
}

.input-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #000;
}

input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    font-size: 1.2rem;
    border-radius: 20px;
    border: none;
    background-color: var(--input-bg);
    color: #000;
    outline: none;
}

/* GRIGLIA A STELLA DEI PULSANTI BLINDATA AI MARGINI ESTERNI */
.buttons-grid {
    display: grid;
    grid-template-columns: 1fr 80px 1fr;
    grid-template-rows: auto auto;
    gap: 15px 0; /* Rimossa la distanza orizzontale automatica per controllare i margini */
    width: 100%;
    max-width: 100%; /* Si allinea perfettamente alla larghezza degli input */
}

/* Ancoraggio assoluto: i sinistri a sinistra, i destri a destra */
.grid-tl { grid-column: 1; grid-row: 1; justify-self: start; }
.grid-tr { grid-column: 3; grid-row: 1; justify-self: end; }
.grid-bl { grid-column: 1; grid-row: 2; justify-self: start; }
.grid-br { grid-column: 3; grid-row: 2; justify-self: end; }
.grid-center { grid-column: 2; grid-row: 1 / span 2; justify-self: center; align-self: center; }

.btn-pill {
    background-color: var(--btn-dark);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    width: 105px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.btn-circle {
    background-color: var(--btn-green);
    color: black;
    border: none;
    width: 75px;
    height: 75px;
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.btn-circle-placeholder { width: 75px; height: 75px; pointer-events: none; }
.btn-pill:active, .btn-circle:active { transform: scale(0.95); }

.result-box {
    background-color: var(--box-dark);
    width: 100%;
    min-height: 80px;
    border-radius: 10px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    font-size: 1.2rem;
    text-align: center;
    color: var(--text-light);
}

.result-label { font-size: 0.9rem; margin-top: 8px; color: var(--text-light); }

.logo-container { margin-top: auto; padding-top: 40px; padding-bottom: 20px; text-align: center; }
.logo-container img { width: 80px; }

/* MODAL QUALITÀ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: #1a1a1a;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
}

.modal .mobile-app { min-height: 100vh; }

.modal-content {
    width: 100%;
    padding: 20px;
    position: relative;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.close-modal {
    position: absolute; right: 20px; top: -45px;
    color: white; font-size: 40px; font-weight: bold; cursor: pointer;
}

#modalInputNome { text-align: center; padding-left: 15px; }

.big-text-area {
    width: 100%;
    flex-grow: 1; 
    min-height: 250px;
    background-color: var(--box-dark);
    border: none;
    border-radius: 15px;
    color: white;
    padding: 20px;
    font-size: 1.4rem;
    line-height: 1.4;
    resize: none;
    outline: none;
    margin-top: 10px;
    margin-bottom: 20px;
}