html, body
{
    margin: 0;
    width: 100%;
    height: 100%;

    overflow: hidden;
}

#header
{
    position: fixed;

    top: 0;
    left: 0;
    right: 0;

    z-index: 10;

    pointer-events: none;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 16px 20px;
}

#title
{
    display: flex;
    align-items: center;

    gap: 12px;
}

#title h1
{
    margin: 0;
}

.scp-logo
{
    width: 34px;
    height: 34px;
}

#search
{
    position: relative;

    width: 260px;

    pointer-events: auto;
}

#search.hidden
{
    display: none;
}

#search-input
{
    box-sizing: border-box;
    width: 100%;

    padding: 8px 12px;

    background: white;
    color: #333;

    border: 1px solid #666;
    border-radius: 8px;

    font-family: sans-serif;
    font-size: 14px;

    outline: none;
}

#search-input:focus
{
    border-color: #333;
}

#search-results
{
    position: absolute;

    top: 100%;
    left: 0;
    right: 0;

    margin: 4px 0 0 0;
    padding: 4px 0;

    max-height: 50vh;
    overflow-y: auto;

    list-style: none;

    background: rgba(40, 40, 40, 0.95);
    color: white;

    border: 1px solid #666;
    border-radius: 8px;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);

    font-family: sans-serif;
    font-size: 14px;
}

#search-results.hidden
{
    display: none;
}

#search-results li
{
    padding: 6px 12px;

    cursor: pointer;
}

#search-results li.active
{
    background: rgba(255, 255, 255, 0.15);
}

#cy
{
    position: fixed;
    inset: 0;

    background: white;
}

#placeholder
{
    position: fixed;
    inset: 0;

    z-index: 5;

    display: flex;
    align-items: center;
    justify-content: center;

    background: white;

    font-family: sans-serif;
    font-size: 16px;
    color: #666;
}

#placeholder.hidden
{
    display: none;
}

#loading-overlay
{
    position: fixed;
    inset: 0;

    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;

    background: white;
}

#loading-overlay.hidden
{
    display: none;
}

#loading-box
{
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 12px;

    font-family: sans-serif;
    font-size: 14px;
    color: #333;
}

#loading-spinner
{
    width: 40px;
    height: 40px;

    animation: loading-spin 2s linear infinite;
}

#loading-text
{
    margin: 0;
}

@keyframes loading-spin
{
    to { transform: rotate(360deg); }
}

#selected-tags
{
    position: fixed;

    bottom: 20px;
    left: 20px;

    min-width: 220px;
    max-width: 350px;

    padding: 12px;

    background: rgba(40, 40, 40, 0.95);
    color: white;

    border: 1px solid #666;
    border-radius: 8px;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);

    font-family: sans-serif;
    font-size: 14px;
}

#selected-tags.hidden
{
    display: none;
}

#selected-tags h3
{
    margin: 0 0 10px 0;
    font-size: 16px;
}

#selected-tags-list
{
    margin: 0;

    max-height: 30vh;
    overflow-y: auto;
}

#selected-tags-reset
{
    display: block;
    width: 100%;

    margin-top: 10px;
    padding: 6px;

    background: transparent;
    color: white;

    border: 1px solid #666;

    font-family: sans-serif;
    font-size: 13px;

    cursor: pointer;
}

#selected-tags-reset:hover
{
    background: rgba(255, 255, 255, 0.12);
}

#graph-controls
{
    position: fixed;

    bottom: 20px;
    right: 20px;

    display: flex;

    gap: 8px;
}

#graph-controls.hidden
{
    display: none;
}

.graph-button
{
    padding: 8px 12px;

    background: rgba(40, 40, 40, 0.95);
    color: white;

    border: 1px solid #666;
    border-radius: 8px;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);

    font-family: sans-serif;
    font-size: 13px;

    cursor: pointer;
}

.graph-button:hover
{
    background: rgba(70, 70, 70, 0.95);
}
