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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #1a1a2e;
    color: #eee;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: #16213e;
    border-bottom: 1px solid #0f3460;
    z-index: 10;
    flex-shrink: 0;
}

#title-section h1 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
}

#title-section .subtitle {
    font-size: 12px;
    color: #8899aa;
    margin-left: 8px;
}

#controls-top {
    display: flex;
    align-items: center;
    gap: 16px;
}

#color-toggle {
    display: flex;
    gap: 4px;
}

.color-btn {
    padding: 6px 14px;
    border: 1px solid #0f3460;
    background: transparent;
    color: #8899aa;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.color-btn:hover { color: #eee; border-color: #3498db; }
.color-btn.active { background: #0f3460; color: #eee; border-color: #3498db; }

#search-container {
    position: relative;
}

#search-input {
    padding: 6px 12px;
    width: 220px;
    border: 1px solid #0f3460;
    background: #1a1a2e;
    color: #eee;
    font-size: 13px;
    border-radius: 4px;
    outline: none;
}

#search-input:focus { border-color: #3498db; }
#search-input::placeholder { color: #556677; }

#search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: #16213e;
    border: 1px solid #0f3460;
    border-top: none;
    border-radius: 0 0 4px 4px;
    display: none;
    z-index: 20;
}

#search-suggestions .suggestion {
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
}

#search-suggestions .suggestion:hover { background: #0f3460; }

#main {
    flex: 1;
    position: relative;
    overflow: hidden;
}

#sigma-container {
    width: 100%;
    height: 100%;
}

#detail-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: #16213e;
    border-left: 1px solid #0f3460;
    padding: 16px;
    overflow-y: auto;
    z-index: 5;
    transition: transform 0.2s;
}

#detail-panel.hidden {
    transform: translateX(100%);
}

#close-panel {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    color: #8899aa;
    font-size: 24px;
    cursor: pointer;
}

#close-panel:hover { color: #eee; }

#detail-panel h2 {
    font-size: 18px;
    margin-bottom: 12px;
    padding-right: 24px;
}

.detail-row {
    margin-bottom: 8px;
    font-size: 13px;
    color: #aabbcc;
}

.detail-row strong {
    color: #eee;
}

#detail-neighbors { margin-top: 16px; }

#detail-neighbors h3 {
    font-size: 14px;
    margin-bottom: 8px;
    color: #8899aa;
}

#neighbor-list {
    list-style: none;
    font-size: 12px;
}

#neighbor-list li {
    padding: 3px 0;
    cursor: pointer;
    color: #8899aa;
}

#neighbor-list li:hover { color: #3498db; }

#detail-wikidata a {
    color: #3498db;
    text-decoration: none;
}

#detail-wikidata a:hover { text-decoration: underline; }

#bottom-bar {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 8px 16px;
    background: #16213e;
    border-top: 1px solid #0f3460;
    font-size: 13px;
    flex-shrink: 0;
    z-index: 10;
}

.filter-label {
    color: #8899aa;
    margin-right: 6px;
}

#issue-filter label {
    margin-right: 8px;
    cursor: pointer;
}

#issue-filter input[type="checkbox"] {
    margin-right: 3px;
    accent-color: #3498db;
}

#degree-slider {
    width: 120px;
    margin: 0 6px;
    accent-color: #3498db;
}

#degree-value {
    display: inline-block;
    width: 20px;
    text-align: center;
}

#stats {
    margin-left: auto;
    color: #8899aa;
}
