:root {
    --primary: #0A84FF; /* Apple System Blue Dark Mode */
    --primary-hover: #0077ED;
    --text-main: #FFFFFF;
    --text-muted: #A1A1AA;
    --glass-bg: rgba(30, 30, 30, 0.65); /* Vetro scuro */
    --glass-border: rgba(255, 255, 255, 0.12);
    --input-bg: rgba(0, 0, 0, 0.3);
    --radius: 16px; /* Curve più morbide stile iOS */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif; /* Font nativo Apple */
    background-color: #000000;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center; /* Centra verticalmente */
    min-height: 100vh;
    padding: 20px;
    
    /* SFONDO LIQUID "AURORA" */
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(10, 132, 255, 0.25) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(172, 70, 255, 0.2) 0%, transparent 40%);
    background-attachment: fixed; /* Lo sfondo resta fermo mentre scrolli */
}

/* IL CONTENITORE DI VETRO */
.container {
    width: 100%;
    max-width: 500px;
    padding: 30px;
    border-radius: 24px; /* Curve molto ampie stile Apple */
    
    /* Effetto Glassmorphism */
    background: var(--glass-bg);
    backdrop-filter: blur(25px) saturate(180%); /* Sfocatura pesante + saturazione */
    -webkit-backdrop-filter: blur(25px) saturate(180%); /* Per Safari/iPhone */
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5); /* Ombra profonda */
    height: fit-content;
}

header { text-align: center; margin-bottom: 30px; }
header h1 { 
    font-size: 26px; 
    font-weight: 700; 
    color: #fff; 
    margin-bottom: 8px; 
    letter-spacing: -0.5px;
}
header p { color: var(--text-muted); font-size: 15px; }

.form-group { margin-bottom: 20px; }

label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #E5E5E5; /* Quasi bianco */
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0.8;
}

/* INPUT STILE VETRO SCURO */
input, select, textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-size: 17px; /* 17px è lo standard iOS */
    background: var(--input-bg);
    color: white;
    transition: all 0.3s ease;
    font-family: inherit;
    backdrop-filter: blur(5px); /* Leggera sfocatura dentro l'input */
}

/* Placeholder più chiaro */
::placeholder { color: rgba(255, 255, 255, 0.3); }

/* Focus effetto Neon Blue */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(10, 132, 255, 0.1); /* Blu molto tenue */
    box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.25); /* Glow esterno */
}

textarea { min-height: 120px; resize: vertical; }

/* Icona freccia Select bianca */
select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: 12px auto;
}

.row { display: flex; gap: 15px; }
.half { flex: 1; }

/* INPUT FILE */
input[type="file"] {
    padding: 10px;
    background: rgba(255,255,255,0.05);
}
input[type="file"]::file-selector-button {
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    margin-right: 10px;
    cursor: pointer;
    transition: background 0.2s;
}
input[type="file"]::file-selector-button:hover { background: rgba(255,255,255,0.2); }

/* BOTTONE "LIQUID" */
button {
    width: 100%;
    background: linear-gradient(135deg, #0A84FF 0%, #0077ED 100%);
    color: white;
    padding: 16px;
    border: none;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(10, 132, 255, 0.4); /* Glow blu */
    transition: transform 0.1s, box-shadow 0.2s, filter 0.2s;
}

button:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 20px rgba(10, 132, 255, 0.6);
}

button:active {
    transform: scale(0.98);
}

button:disabled { 
    background: #333; 
    color: #888; 
    box-shadow: none; 
}

/* MESSAGGI STATO DARK */
#statusMessage {
    margin-top: 25px;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
    display: none;
    backdrop-filter: blur(10px);
}
.success { 
    background-color: rgba(46, 204, 113, 0.2); /* Verde trasparente */
    color: #2ecc71; 
    border: 1px solid rgba(46, 204, 113, 0.3);
}
.error { 
    background-color: rgba(231, 76, 60, 0.2); /* Rosso trasparente */
    color: #e74c3c; 
    border: 1px solid rgba(231, 76, 60, 0.3);
}

/* Mobile Fix */
@media (max-width: 480px) {
    .container {
        padding: 20px;
        border-radius: 20px;
        background: rgba(20, 20, 20, 0.85); /* Un po' più scuro su mobile per leggibilità */
    }
}