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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 300;
}

header h2 {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
}

form {
    padding: 40px;
}

.form-section {
    margin-bottom: 40px;
}

.form-section h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.5rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafafa;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus {
    outline: none;
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 2px dashed #3498db;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="file"]:hover {
    background: #e3f2fd;
    border-color: #2980b9;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

input[type="checkbox"] {
    margin-top: 4px;
    transform: scale(1.2);
    accent-color: #3498db;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    width: 18px !important;
    height: 18px !important;
    margin-right: 8px !important;
    vertical-align: top !important;
}

#gdprConsent, #privacyConsent {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    width: 20px !important;
    height: 20px !important;
    margin-right: 10px !important;
    margin-top: 2px !important;
    appearance: checkbox !important;
    -webkit-appearance: checkbox !important;
    -moz-appearance: checkbox !important;
    transform: scale(1.3) !important;
    background: white !important;
    border: 2px solid #666 !important;
    border-radius: 3px !important;
    cursor: pointer !important;
    z-index: 15 !important;
    min-width: 20px !important;
    min-height: 20px !important;
    flex-shrink: 0 !important;
}

.checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
    line-height: 1.5;
}

/* Container specifici per le checkbox GDPR - metodo robusto */
.gdpr-checkbox-container {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    margin-bottom: 20px !important;
    padding: 15px !important;
    background: #f9f9f9 !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    min-height: 50px !important;
    position: relative !important;
}

/* Assicura che le checkbox nei container GDPR siano sempre visibili */
.gdpr-checkbox-container input[type="checkbox"] {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    width: 20px !important;
    height: 20px !important;
    margin-right: 10px !important;
    margin-top: 2px !important;
    appearance: checkbox !important;
    -webkit-appearance: checkbox !important;
    -moz-appearance: checkbox !important;
    transform: scale(1.3) !important;
    background: white !important;
    border: 2px solid #666 !important;
    border-radius: 3px !important;
    cursor: pointer !important;
    z-index: 10 !important;
    min-width: 20px !important;
    min-height: 20px !important;
    flex-shrink: 0 !important;
}

/* Stili per le label nei container GDPR */
.gdpr-checkbox-container label {
    cursor: pointer !important;
    line-height: 1.5 !important;
    margin-bottom: 0 !important;
    flex: 1 !important;
}

.partner-info {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(255, 193, 7, 0.2);
}

.partner-info p {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #856404;
}

.partner-info strong {
    color: #d39e00;
}

.highlight-checkbox {
    background: #e3f2fd;
    border: 2px solid #2196f3;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(33, 150, 243, 0.1);
}

.highlight-checkbox label {
    font-size: 16px;
    color: #1976d2;
}

.partner-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid #3498db;
    margin-top: 20px;
}

.privacy-info {
    background: #e8f4fd;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #3498db;
}

.privacy-info p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.form-actions {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

button {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #3498db;
    font-size: 18px;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #3498db;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.success-message {
    text-align: center;
    padding: 40px;
    color: #27ae60;
    font-size: 18px;
    font-weight: 600;
}

.error {
    border-color: #e74c3c !important;
    background: #fdf2f2 !important;
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
}

small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 10px;
    }
    
    header {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    form {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    button {
        width: 100%;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    header h2 {
        font-size: 1rem;
    }
    
    .form-section h3 {
        font-size: 1.3rem;
    }
}