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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
}

.superskill {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.9;
    color: #ffcafd;
}

.superskill a {
    text-decoration: none;
    color: #ff9dfc; 
}

footer a {
    text-decoration: none;
    color: #ff9dfc; 
}


main {
    display: grid;
    gap: 30px;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2d3748;
}

.card p {
    color: #718096;
    margin-bottom: 20px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #4a5568;
}

input, select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

input:focus, select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-help {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 5px;
    font-style: italic;
}

/* Segmented Control */
.segmented-control {
    display: flex;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 4px;
    gap: 2px;
    margin-bottom: 5px;
}

.segment {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border: none;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    min-height: 60px;
}

.segment:hover {
    background: rgba(255, 255, 255, 0.5);
}

.segment.active {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.segment-icon {
    font-size: 1.2rem;
    margin-bottom: 4px;
    display: block;
}

.segment-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: #6b7280;
    display: block;
}

.segment.active .segment-text {
    color: #374151;
    font-weight: 600;
}

.btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.result {
    margin-top: 20px;
    padding: 20px;
    border-radius: 12px;
    animation: fadeIn 0.3s ease;
}

.result.success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.result.error {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
}

.result-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.result-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.result.success .result-icon::before {
    content: "✓";
}

.result.error .result-icon::before {
    content: "✗";
}

.result-text {
    font-weight: 600;
    font-size: 1.1rem;
}

.car-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Nuovi stili per le card Auto Trovata e Auto Idonea */
.car-found-card {
    background: rgba(59, 130, 246, 0.1);
    border: 2px solid #3b82f6;
    border-radius: 16px;
    padding: 20px;
    margin-top: 20px;
    animation: fadeIn 0.3s ease;
}

.car-found-card.not-found {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid #ef4444;
}

.car-found-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.car-found-icon {
    font-size: 1.2rem;
}

.car-found-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #3b82f6;
}

.car-found-card.not-found .car-found-title {
    color: #ef4444;
}

.car-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.car-info-item {
    display: flex;
    flex-direction: column;
}

.car-info-label {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.car-info-value {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95rem;
}

.reliability-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.reliability-alta {
    background: #3b82f6;
    color: white;
}

.reliability-media {
    background: #f59e0b;
    color: white;
}

.reliability-bassa {
    background: #ef4444;
    color: white;
}

.eligibility-card {
    background: rgba(34, 197, 94, 0.1);
    border: 2px solid #22c55e;
    border-radius: 16px;
    padding: 20px;
    margin-top: 15px;
    animation: fadeIn 0.3s ease;
}

.eligibility-card.not-eligible {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid #ef4444;
}

.eligibility-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.eligibility-icon {
    font-size: 1.2rem;
}

.eligibility-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #22c55e;
}

.eligibility-card.not-eligible .eligibility-title {
    color: #ef4444;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.spec-item {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.spec-label {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 5px;
}

.spec-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
}

.spec-limit {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 2px;
}

.spec-value.power {
    color: #8b5cf6;
}

.spec-value.weight {
    color: #3b82f6;
}

.spec-value.ratio {
    color: #22c55e;
}

.compliance-message {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.compliance-icon {
    font-size: 1.1rem;
}

.compliance-text {
    font-weight: 500;
    color: #374151;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #667eea;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none;
}

footer {
    text-align: center;
    margin-top: 40px;
    color: white;
    opacity: 0.8;
}

.disclaimer {
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Sezione SEO */
.seo-content {
    margin-top: 40px;
}

.seo-content h2 {
    color: #2d3748;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
}

.seo-content h3 {
    color: #4a5568;
    font-size: 1.3rem;
    margin: 25px 0 15px 0;
    font-weight: 600;
}

.seo-content p {
    color: #718096;
    line-height: 1.6;
    margin-bottom: 15px;
}

.seo-content ul, .seo-content ol {
    color: #718096;
    line-height: 1.6;
    margin: 15px 0;
    padding-left: 25px;
}

.seo-content li {
    margin-bottom: 8px;
}

.seo-content strong {
    color: #2d3748;
    font-weight: 600;
}

.seo-content a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.seo-content a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.seo-content em {
    color: #9ca3af;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    h1 {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .seo-content h2 {
        font-size: 1.5rem;
    }
    
    .seo-content h3 {
        font-size: 1.2rem;
    }
}
