
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f0f2f5;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

.question {
    margin-bottom: 25px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

label {
    font-weight: bold;
    color: #444;
    display: block;
    margin-bottom: 10px;
}

input[type="radio"],
input[type="checkbox"] {
    margin: 8px 5px;
}

button {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
}

button:hover {
    background-color: #45a049;
}

#result {
    margin-top: 20px;
    padding: 20px;
    background-color: #e8f5e9;
    border-radius: 5px;
}

#result h3 {
    margin-top: 0;
    color: #2e7d32;
    border-bottom: 2px solid #a5d6a7;
    padding-bottom: 10px;
}

.result-intro {
    color: #555;
    font-size: 0.95em;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #fff8e1;
    border-radius: 5px;
    border-left: 4px solid #ffc107;
}

.recommendations {
    margin-bottom: 20px;
}

.category-section {
    margin-bottom: 25px;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.category-title {
    margin: 0 0 5px 0;
    color: #1b5e20;
    font-size: 1.2em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-subtitle {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 0.9em;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.food-item {
    padding: 0;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.food-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.food-item.primary {
    background-color: #e3f2fd;
    border: 2px solid #2196f3;
}

.food-item.alternative {
    background-color: #fafafa;
    border: 1px solid #e0e0e0;
}

.food-image-container {
    position: relative;
    width: 100%;
    height: 140px;
    overflow: hidden;
}

.food-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.price-tag {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: #2e7d32;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1em;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.food-details {
    padding: 12px;
}

.food-header {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 8px;
}

.currency-question {
    background-color: #e8f5e9;
    border: 2px solid #4caf50;
}

.currency-select {
    width: 100%;
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: white;
    margin-top: 10px;
    cursor: pointer;
}

.rank-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: bold;
    text-transform: uppercase;
    width: fit-content;
}

.rank-badge.primary-badge {
    background-color: #2196f3;
    color: white;
}

.rank-badge.alt-badge {
    background-color: #9e9e9e;
    color: white;
}

.food-name {
    color: #333;
    font-size: 1em;
    font-weight: 600;
}

.allergen-info {
    margin: 8px 0;
    font-size: 0.9em;
}

.allergen-label {
    color: #666;
    font-weight: 500;
}

.allergen-symbols {
    display: inline-block;
    margin-left: 5px;
}

.allergen-icon {
    font-size: 1.1em;
    margin: 0 2px;
    cursor: help;
}

.allergen-free {
    display: inline-block;
    background-color: #c8e6c9;
    color: #2e7d32;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.85em;
    font-weight: 500;
}

.allergen-warning {
    margin-top: 8px;
    padding: 6px 10px;
    background-color: #fff3e0;
    border: 1px solid #ffb74d;
    border-radius: 4px;
    font-size: 0.8em;
    color: #e65100;
}

.warning-icon {
    margin-right: 5px;
}

.error-message {
    padding: 15px;
    background-color: #ffebee;
    border: 1px solid #ef5350;
    border-radius: 5px;
    color: #c62828;
    text-align: center;
}

.allergen-legend {
    margin-top: 25px;
    padding: 15px;
    background-color: #fafafa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.allergen-legend h4 {
    margin: 0 0 12px 0;
    color: #616161;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    background-color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85em;
    color: #555;
    border: 1px solid #e0e0e0;
    gap: 5px;
}

.allergen-free-legend {
    background-color: #c8e6c9;
    color: #2e7d32;
    border-color: #a5d6a7;
}

.dietary-question {
    background-color: #e3f2fd;
    border: 2px solid #2196f3;
}

.allergy-question {
    background-color: #fff8e1;
    border: 2px solid #ffc107;
}

.no-common-allergens {
    display: inline-block;
    background-color: #e0e0e0;
    color: #616161;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.85em;
}

.allergy-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.allergy-option {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: normal;
}

.allergy-option:hover {
    border-color: #ffc107;
    background-color: #fffde7;
}

.allergy-option input[type="checkbox"] {
    margin-right: 8px;
}

.allergy-option input[type="checkbox"]:checked + .allergy-icon {
    transform: scale(1.2);
}

.allergy-option:has(input:checked) {
    background-color: #ffecb3;
    border-color: #ffc107;
}

.allergy-note {
    font-size: 0.85em;
    color: #666;
    margin: 5px 0 0 0;
    font-style: italic;
}

.allergy-summary {
    background-color: #e3f2fd;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #2196f3;
}

.allergy-summary p {
    margin: 8px 0 0 0;
    color: #1565c0;
}

.restriction-tag {
    display: inline-block;
    background-color: #ffecb3;
    padding: 3px 8px;
    border-radius: 15px;
    margin: 2px;
    font-size: 0.9em;
    text-transform: capitalize;
}

.safe-indicator {
    background-color: #c8e6c9;
    color: #2e7d32;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.75em;
    font-weight: 600;
}

.unsafe-indicator {
    background-color: #ffcdd2;
    color: #c62828;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.75em;
    font-weight: 600;
}

.food-item.safe {
    background-color: #e8f5e9;
    border: 1px solid #a5d6a7;
}

.food-item.unsafe {
    background-color: #ffebee;
    border: 1px solid #ef9a9a;
    opacity: 0.85;
}

.rank-badge.safe-badge {
    background-color: #4caf50;
    color: white;
}

.rank-badge.unsafe-badge {
    background-color: #ef5350;
    color: white;
}

.allergen-warning.danger {
    background-color: #ffcdd2;
    border-color: #ef5350;
    color: #c62828;
}

.allergen-warning.info {
    background-color: #fff3e0;
    border-color: #ffb74d;
    color: #e65100;
}

.warning-text {
    color: #c62828;
}

@media (max-width: 700px) {
    .container {
        padding: 15px;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .allergy-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .legend-items {
        flex-direction: column;
    }
    
    .legend-item {
        width: fit-content;
    }
}
