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

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #fff;
    color: #333;
    font-size: 13px;
    line-height: 1.5;
}

.header {
    background-color: #003366;
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left h1 {
    font-size: 20px;
    font-weight: bold;
    margin: 0;
}

.header-left .subtitle {
    font-size: 12px;
    margin-top: 3px;
    opacity: 0.95;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.help-btn {
    background-color: #fff;
    color: #003366;
    border: none;
    padding: 6px 15px;
    font-size: 12px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
}

.help-btn:hover {
    background-color: #f0f0f0;
}

.header-icon {
    width: 24px;
    height: 24px;
    background-color: #fff;
    color: #003366;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
}

.search-container {
    background-color: #f5f5f5;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
}

.search-box-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.search-input:focus {
    outline: 2px solid #003366;
    border-color: #003366;
}

.clear-search {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #cc0000;
    font-size: 18px;
    cursor: pointer;
    font-weight: bold;
    padding: 0 5px;
}

.clear-search:hover {
    color: #ff0000;
}

.main-content {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 150px);
}

.word-list-section {
    width: 300px;
    border-right: 1px solid #ddd;
    background-color: #fff;
    padding: 20px;
}

.word-list-title {
    font-size: 16px;
    font-weight: bold;
    color: #cc6600;
    margin-bottom: 15px;
}

.word-list-controls {
    margin-bottom: 15px;
    font-size: 12px;
}

.word-list-controls label {
    color: #666;
}

.word-list-controls select {
    margin-left: 5px;
    padding: 3px 5px;
    font-size: 12px;
    border: 1px solid #ccc;
}

.word-list-items {
    list-style: none;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}

.word-list-items li {
    padding: 6px 0;
    cursor: pointer;
    color: #333;
    font-size: 13px;
}

.word-list-items li:hover {
    background-color: #f5f5f5;
    padding-left: 5px;
}

.destination-entities-section {
    flex: 1;
    padding: 20px;
    background-color: #fff;
}

.selected-list-section {
    width: 320px;
    border-left: 1px solid #ddd;
    background-color: #fff;
    padding: 20px;
}

.selected-list-title {
    font-size: 16px;
    font-weight: bold;
    color: #cc6600;
    margin-bottom: 15px;
}

.selected-list {
    list-style: none;
    max-height: calc(100vh - 260px);
    overflow-y: auto;
    padding-right: 5px;
}

.selected-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 12px;
}

.iss-score {
    margin-top: 12px;
    font-weight: bold;
    color: #003366;
}

.destination-entities-title {
    font-size: 16px;
    font-weight: bold;
    color: #cc6600;
    margin-bottom: 15px;
}

.destination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 12px;
}

.filter-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-toggle {
    position: relative;
    width: 40px;
    height: 20px;
    background-color: #ccc;
    border-radius: 10px;
    cursor: pointer;
}

.filter-toggle.active {
    background-color: #4caf50;
}

.filter-toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background-color: #fff;
    border-radius: 50%;
    transition: 0.3s;
}

.filter-toggle.active .filter-toggle-slider {
    left: 22px;
}

.sort-control {
    display: flex;
    align-items: center;
    gap: 5px;
}

.sort-control select {
    padding: 3px 5px;
    font-size: 12px;
    border: 1px solid #ccc;
}

.info-text {
    font-size: 11px;
    color: #999;
    margin-bottom: 10px;
    font-style: italic;
}

.entities-list {
    list-style: none;
    max-height: calc(100vh - 280px);
    overflow-y: auto;
}

.entity-item {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.entity-item:hover {
    background-color: #f9f9f9;
}

.entity-code {
    font-weight: bold;
    color: #003366;
    min-width: 70px;
    font-size: 13px;
}

.entity-description {
    flex: 1;
    font-size: 13px;
    color: #333;
}

.entity-description .found {
    background-color: #ffebcc;
    color: #cc6600;
    font-weight: bold;
    padding: 1px 2px;
}

.entity-matches {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.entity-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.entity-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    color: #fff;
}

.entity-indicator.yellow {
    background-color: #ffcc00;
}

.entity-indicator.purple {
    background-color: #9966cc;
}

.details-btn {
    background: none;
    border: none;
    color: #0066cc;
    cursor: pointer;
    font-size: 12px;
    text-decoration: underline;
    padding: 0;
}

.details-btn:hover {
    color: #003366;
}

.plus-icon {
    color: #0066cc;
    font-weight: bold;
    font-size: 14px;
}

.btn-icon {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.add-btn {
    margin-left: 6px;
}

.btn-remove {
    color: #cc0000;
}

.empty-state {
    padding: 40px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

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

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #003366;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.details-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 999;
}

.details-panel {
    background-color: #fff;
    width: 720px;
    max-width: 100%;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    background-color: #f7f7f7;
}

.details-title {
    font-weight: bold;
    color: #003366;
}

.details-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #666;
}

.details-body {
    padding: 16px;
    font-size: 13px;
}

.details-list {
    list-style: none;
}

.details-list li {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

.details-label {
    font-weight: bold;
    color: #003366;
}

.hierarchy-list {
    list-style: none;
    margin-left: 10px;
    padding-left: 10px;
    border-left: 2px solid #eee;
}

.hierarchy-list li {
    padding: 4px 0;
}

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