#editor {
    font-size: 20px;
    white-space: pre-wrap;
    max-width: 80vw;
    min-height: 400px;
    outline: none;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

#editor.placeholder {
    color: #888 !important;
    font-style: italic !important;
}

section {
    padding: 3rem 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

#sidebar {
    font-family: 'Courier New', monospace;
    width: 250px;
    max-width: 20vw;
    padding: 0 1rem;
    transition: width 0.3s ease;
    overflow: hidden;
}

#sidebar.collapsed {
    width: 60px;
}

.hl-url {
    color: #0066cc;
}

.toggle-icon {
    font-family: Arial, sans-serif;
    font-size: 26px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
}

#sidebar.collapsed .sidebar-header {
    justify-content: center;
}

#sidebar.collapsed .sidebar-header span:not(.toggle-icon) {
    display: none;
}

.sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.sidebar-toggle:hover {
    color: #333;
}

.sidebar-content {
    max-height: calc(100% - 50px);
    overflow-y: auto;
}

#sidebar.collapsed .sidebar-content {
    display: none;
}

.keyword-item {
    margin-bottom: 8px;
    padding: 6px 8px;
    cursor: pointer;
}

.keyword-name {
    font-weight: bold;
}

.keyword-lines .line-number {
    color: #0066cc;
    cursor: pointer;
    text-decoration: underline;
}

.keyword-lines .line-number:hover {
    color: #4d84bb;
    text-decoration: none;
}

.hl-keyword.highlighted {
    background-color: rgb(255, 230, 5);
    transition: background-color 0.3s ease;
}

@media screen and (max-width: 1000px) {
    #sidebar {
        display: none;
    }

    #editor {
        width: 100%;
    }
}
