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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: rgb(239, 240, 240);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

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

header {
    text-align: left;
    color: rgb(1, 1, 70);
    margin-bottom: 30px;
    padding: 30px 0;
}

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

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.controls {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 200px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

.allergen-filters {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.allergen-filters h3 {
    font-size: 1rem;
    font-weight: 600;
    color: rgb(1, 1, 70);
    margin-bottom: 12px;
}

.allergen-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.allergen-btn {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    color: #333;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.allergen-btn:hover {
    border-color: #667eea;
    background: #f5f5f5;
}

.allergen-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.allergen-btn.active:hover {
    background: #5568d3;
    border-color: #5568d3;
}

.stats {
    padding: 12px 16px;
    background: #f5f5f5;
    border-radius: 8px;
    font-weight: 600;
    color: #667eea;
}

.loading, .error {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 1.1rem;
    color: #666;
}

.error {
    color: #d32f2f;
    background: #ffebee;
    text-align: left;
    line-height: 1.6;
}

.error code {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.recalls-container {
    display: grid;
    gap: 20px;
}

.recall-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid #667eea;
}

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

.recall-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.recall-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    flex: 1;
    min-width: 250px;
}

.recall-title a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s;
}

.recall-title a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.recall-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-category {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-class {
    background: #fff3e0;
    color: #f57c00;
}

.badge-organization {
    background: #f3e5f5;
    color: #7b1fa2;
}

.recall-details {
    margin-bottom: 16px;
}

.detail-row {
    margin-bottom: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.detail-label {
    font-weight: 600;
    color: #666;
    min-width: 100px;
}

.detail-value {
    color: #333;
    flex: 1;
}

.recall-issue {
    background: #fff3e0;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 3px solid #ff9800;
}

.recall-issue .detail-label {
    color: #e65100;
}

.recall-actions {
    background: #f5f5f5;
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
}

.recall-actions .detail-label {
    color: #424242;
    margin-bottom: 8px;
    display: block;
}

.recall-actions .detail-value {
    line-height: 1.6;
}

.recall-actions .action-paragraph {
    margin-bottom: 12px;
    line-height: 1.6;
}

.recall-actions .action-paragraph:last-child {
    margin-bottom: 0;
}

.recall-actions .action-item {
    margin-bottom: 8px;
    padding-left: 8px;
    line-height: 1.6;
}

.recall-actions .action-item:last-child {
    margin-bottom: 0;
}

.recall-actions .action-heading {
    font-weight: 600;
    margin-bottom: 8px;
    margin-top: 12px;
    color: rgb(1, 1, 70);
}

.recall-actions .action-heading:first-child {
    margin-top: 0;
}

.recall-actions .action-list {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.recall-actions .action-list-item {
    padding: 8px 0 8px 20px;
    position: relative;
    line-height: 1.6;
    margin-bottom: 4px;
}

.recall-actions .action-list-item::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
    font-size: 1.2em;
}

.recall-actions .action-list-item:last-child {
    margin-bottom: 0;
}

.recall-link {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

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

.recall-link a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.recall-date {
    color: #757575;
    font-size: 0.9rem;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.no-results h2 {
    color: #666;
    margin-bottom: 10px;
}

.no-results p {
    color: #999;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .controls {
        flex-direction: column;
    }

    .search-box,
    .filter-box {
        width: 100%;
    }

    .recall-header {
        flex-direction: column;
    }
}
