.kfa-container {
    max-width: 1200px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.kfa-container h2 {
    margin-top: 0;
    color: #333;
    font-size: 24px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.kfa-input-section label {
    display: block;
    margin: 15px 0 5px;
    font-weight: 600;
    color: #555;
}

#kfa-text {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    resize: vertical;
    box-sizing: border-box;
}

#kfa-keywords {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.kfa-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
    margin: 15px 0;
}

.kfa-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.kfa-filter-item select,
.kfa-filter-item input[type="checkbox"] {
    cursor: pointer;
}

.kfa-button-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.kfa-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.kfa-btn-primary {
    background: #007cba;
    color: #fff;
}

.kfa-btn-primary:hover {
    background: #005a87;
}

.kfa-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.kfa-btn-secondary:hover {
    background: #ddd;
}

#kfa-loading {
    text-align: center;
    font-size: 20px;
    padding: 30px;
    color: #007cba;
}

.kfa-stats {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.kfa-stat-card {
    background: #f8f9fa;
    padding: 15px 25px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-size: 18px;
    font-weight: 500;
}

.kfa-stat-card span {
    font-weight: 700;
    color: #007cba;
}

.kfa-chart-container {
    height: 300px;
    margin: 30px 0;
}

.kfa-table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
}

.kfa-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.kfa-table th,
.kfa-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.kfa-table th {
    background: #007cba;
    color: white;
    font-weight: 600;
}

.kfa-table tr:last-child td {
    border-bottom: none;
}

.kfa-table tbody tr:hover {
    background: #f5f5f5;
}

.kfa-table .kfa-top-keyword {
    background: #fff9c4;
}

.kfa-action-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

@media (max-width: 600px) {
    .kfa-filter-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .kfa-button-group {
        flex-direction: column;
    }
    .kfa-btn {
        width: 100%;
        justify-content: center;
    }
}