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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #fafafa;
    color: #333;
    line-height: 1.6;
}

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

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

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
    font-weight: 300;
}

.search-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.search-container {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-btn {
    padding: 14px 24px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.search-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.filter-tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 10px 20px;
    border: 2px solid #e1e8ed;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-tab:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.filter-tab.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.comparison-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.comparison-section h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.selected-list {
    min-height: 60px;
    border: 2px dashed #e1e8ed;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.empty-message {
    color: #95a5a6;
    font-style: italic;
    text-align: center;
    width: 100%;
}

.selected-item {
    background: #e8f4fd;
    color: #2980b9;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeIn 0.3s ease;
}

.selected-item .remove-btn {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.selected-item .remove-btn:hover {
    background: rgba(231, 76, 60, 0.1);
}

.clear-btn {
    padding: 10px 20px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.clear-btn:hover {
    background: #c0392b;
}

.results-section {
    margin-bottom: 30px;
}

.risk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.risk-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.risk-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.risk-item.selected {
    border-color: #3498db;
    background: #f8f9fa;
}

.risk-item h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.risk-level {
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 10px;
    font-weight: 500;
}

.risk-level.low {
    background: #e8f5e8;
    color: #27ae60;
}

.risk-level.medium {
    background: #fff3cd;
    color: #f39c12;
}

.risk-level.high {
    background: #f8d7da;
    color: #e74c3c;
}

.risk-rate {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.risk-description {
    font-size: 0.9rem;
    color: #7f8c8d;
    line-height: 1.4;
}

.chart-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.chart-container {
    position: relative;
    height: 400px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .filter-tabs {
        gap: 5px;
    }
    
    .filter-tab {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .risk-grid {
        grid-template-columns: 1fr;
    }
}

